12 #include "libmesh/mesh.h" 13 #include "libmesh/elem.h" 14 #include "libmesh/node.h" 15 #include "libmesh/quadrature.h" 16 #include "libmesh/fe.h" 17 #include "libmesh/enum_fe_family.h" 24 _n_qpoints(n_qpoints),
26 _nodes(_n_nodes, nullptr),
27 _elem_side_area(n_sides),
28 _physical_areafrac(n_sides),
30 _have_face_weights(n_sides),
31 _new_face_weights(n_sides)
33 for (
unsigned int i = 0; i <
_n_nodes; ++i)
34 _nodes[i] = elem->node_ptr(i);
36 for (
unsigned int i = 0; i <
_n_sides; ++i)
72 for (
unsigned int qp = 0; qp <
_new_weights.size(); ++qp)
102 for (
unsigned qp = 0; qp < qrule->n_points(); ++qp)
123 for (
unsigned qp = 0; qp < qrule->n_points(); ++qp)
145 if (denominator > 0.0)
164 bool nonzero =
false;
165 for (
unsigned qp = 0; qp < qrule->n_points(); ++qp)
181 for (
unsigned qp = 0; qp < qrule->n_points(); ++qp)
187 mooseError(
"Undefined option for XFEM_QRULE");
196 bool physical_flag =
true;
198 for (
unsigned int plane_id = 0; plane_id < n_cut_planes; ++plane_id)
202 Point origin2qp = p - origin;
203 if (origin2qp * normal > 0.0)
205 physical_flag =
false;
209 return physical_flag;
std::vector< Real > _elem_side_area
std::vector< std::vector< Real > > _new_face_weights
face quadrature weights from surface area fraction
std::vector< bool > _have_face_weights
void mooseError(Args &&... args)
std::vector< Point > _qp_points
Real getPhysicalVolumeFraction() const
Returns the volume fraction of the element fragment.
virtual unsigned int numCutPlanes() const =0
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.
void getFaceWeightMultipliers(MooseArray< Real > &face_weights, QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points, unsigned int side)
const dof_id_type n_nodes
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
std::vector< Real > _qp_weights
std::vector< Real > _new_weights
quadrature weights from volume fraction and moment fitting
virtual void computePhysicalVolumeFraction()=0
Computes the volume fraction of the element fragment.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void computeXFEMWeights(QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points)
Computes integration weights for the cut element.
Real getPhysicalFaceAreaFraction(unsigned int side) const
Returns the surface area fraction of the element side.
static const std::string alpha
std::vector< Node * > _nodes
void resize(unsigned int size)
void getWeightMultipliers(MooseArray< Real > &weights, QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points)
std::vector< Real > _physical_areafrac
XFEMCutElem(Elem *elem, unsigned int n_qpoints, unsigned int n_sides)
Constructor initializes XFEMCutElem object.
virtual Point getCutPlaneNormal(unsigned int plane_id, MeshBase *displaced_mesh=nullptr) const =0
virtual void computeMomentFittingWeights()=0
bool isPointPhysical(const Point &p) const