https://mooseframework.inl.gov
Loading...
Searching...
No Matches
XFEMCutElem.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include <vector>
13
14#include "MooseTypes.h"
15#include "XFEM.h"
16
17using namespace libMesh;
18
19namespace libMesh
20{
21class MeshBase;
22class Elem;
23class Node;
24class QBase;
25}
26class EFANode;
27class EFAElement;
28
30{
31public:
38 XFEMCutElem(Elem * elem, unsigned int n_qpoints, unsigned int n_sides);
39 virtual ~XFEMCutElem();
40
41protected:
42 unsigned int _n_nodes;
43 unsigned int _n_qpoints;
44 unsigned int _n_sides;
45 std::vector<Node *> _nodes;
46 std::vector<Point> _qp_points;
47 std::vector<Real> _qp_weights;
49 std::vector<Real> _elem_side_area;
51 std::vector<Real> _physical_areafrac;
53 std::vector<bool> _have_face_weights;
55 std::vector<Real> _new_weights;
57 std::vector<std::vector<Real>> _new_face_weights;
58 virtual Point getNodeCoordinates(EFANode * node, MeshBase * displaced_mesh = nullptr) const = 0;
59
60public:
61 void setQuadraturePointsAndWeights(const std::vector<Point> & qp_points,
62 const std::vector<Real> & qp_weights);
67
72
77 virtual void computePhysicalFaceAreaFraction(unsigned int side) = 0;
78
83 Real getPhysicalFaceAreaFraction(unsigned int side) const;
84
85 virtual void computeMomentFittingWeights() = 0;
86 Real getMomentFittingWeight(unsigned int i_qp) const;
87 virtual Point getCutPlaneOrigin(unsigned int plane_id,
88 MeshBase * displaced_mesh = nullptr) const = 0;
89 virtual Point getCutPlaneNormal(unsigned int plane_id,
90 MeshBase * displaced_mesh = nullptr) const = 0;
91 virtual void
92 getCrackTipOriginAndDirection(unsigned tip_id, Point & origin, Point & direction) const = 0;
93 virtual void getFragmentFaces(std::vector<std::vector<Point>> & frag_faces,
94 MeshBase * displaced_mesh = nullptr) const = 0;
95 virtual const EFAElement * getEFAElement() const = 0;
96 virtual unsigned int numCutPlanes() const = 0;
98 QBase * qrule,
99 Xfem::XFEM_QRULE xfem_qrule,
100 const MooseArray<Point> & q_points);
101 void getFaceWeightMultipliers(MooseArray<Real> & face_weights,
102 QBase * qrule,
103 Xfem::XFEM_QRULE xfem_qrule,
104 const MooseArray<Point> & q_points,
105 unsigned int side);
106
113 void computeXFEMWeights(QBase * qrule,
114 Xfem::XFEM_QRULE xfem_qrule,
115 const MooseArray<Point> & q_points);
116
125 void computeXFEMFaceWeights(QBase * qrule,
126 Xfem::XFEM_QRULE xfem_qrule,
127 const MooseArray<Point> & q_points,
128 unsigned int side);
129 bool isPointPhysical(const Point & p) const;
130 virtual void getIntersectionInfo(unsigned int plane_id,
131 Point & normal,
132 std::vector<Point> & intersectionPoints,
133 MeshBase * displaced_mesh = nullptr) const = 0;
134};
const Real p
virtual void getCrackTipOriginAndDirection(unsigned tip_id, Point &origin, Point &direction) const =0
std::vector< bool > _have_face_weights
Definition XFEMCutElem.h:53
virtual void computeMomentFittingWeights()=0
Real _physical_volfrac
Definition XFEMCutElem.h:50
virtual const EFAElement * getEFAElement() const =0
void getWeightMultipliers(MooseArray< Real > &weights, QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points)
Definition XFEMCutElem.C:63
virtual Point getCutPlaneNormal(unsigned int plane_id, MeshBase *displaced_mesh=nullptr) const =0
void getFaceWeightMultipliers(MooseArray< Real > &face_weights, QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points, unsigned int side)
Definition XFEMCutElem.C:77
Real getPhysicalVolumeFraction() const
Returns the volume fraction of the element fragment.
Definition XFEMCutElem.C:51
unsigned int _n_sides
Definition XFEMCutElem.h:44
std::vector< Real > _qp_weights
Definition XFEMCutElem.h:47
Real getPhysicalFaceAreaFraction(unsigned int side) const
Returns the surface area fraction of the element side.
Definition XFEMCutElem.C:57
void computeXFEMWeights(QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points)
Computes integration weights for the cut element.
std::vector< Real > _new_weights
quadrature weights from volume fraction and moment fitting
Definition XFEMCutElem.h:55
virtual void computePhysicalFaceAreaFraction(unsigned int side)=0
Computes the surface area fraction of the element side.
virtual Point getCutPlaneOrigin(unsigned int plane_id, MeshBase *displaced_mesh=nullptr) const =0
virtual void getIntersectionInfo(unsigned int plane_id, Point &normal, std::vector< Point > &intersectionPoints, MeshBase *displaced_mesh=nullptr) const =0
unsigned int _n_nodes
Definition XFEMCutElem.h:42
Real getMomentFittingWeight(unsigned int i_qp) const
Real _elem_volume
Definition XFEMCutElem.h:48
void setQuadraturePointsAndWeights(const std::vector< Point > &qp_points, const std::vector< Real > &qp_weights)
std::vector< Node * > _nodes
Definition XFEMCutElem.h:45
std::vector< Point > _qp_points
Definition XFEMCutElem.h:46
virtual void computePhysicalVolumeFraction()=0
Computes the volume fraction of the element fragment.
bool isPointPhysical(const Point &p) const
void computeXFEMFaceWeights(QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points, unsigned int side)
Computes face integration weights for the cut element side.
Definition XFEMCutElem.C:92
virtual Point getNodeCoordinates(EFANode *node, MeshBase *displaced_mesh=nullptr) const =0
std::vector< std::vector< Real > > _new_face_weights
face quadrature weights from surface area fraction
Definition XFEMCutElem.h:57
bool _have_weights
Definition XFEMCutElem.h:52
std::vector< Real > _physical_areafrac
Definition XFEMCutElem.h:51
unsigned int _n_qpoints
Definition XFEMCutElem.h:43
virtual void getFragmentFaces(std::vector< std::vector< Point > > &frag_faces, MeshBase *displaced_mesh=nullptr) const =0
virtual ~XFEMCutElem()
Definition XFEMCutElem.C:48
virtual unsigned int numCutPlanes() const =0
std::vector< Real > _elem_side_area
Definition XFEMCutElem.h:49
XFEM_QRULE
Definition XFEM.h:38
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real