Go to the documentation of this file.
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"
23 : _n_nodes(elem->n_nodes()),
24 _n_qpoints(n_qpoints),
26 _nodes(_n_nodes, NULL),
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)
64 const MooseArray<Point> & q_points)
70 for (
unsigned int qp = 0; qp <
_new_weights.size(); ++qp)
78 const MooseArray<Point> & q_points,
92 const MooseArray<Point> & ,
100 for (
unsigned qp = 0; qp < qrule->n_points(); ++qp)
109 const MooseArray<Point> & q_points)
121 for (
unsigned qp = 0; qp < qrule->n_points(); ++qp)
143 if (denominator > 0.0)
162 bool nonzero =
false;
163 for (
unsigned qp = 0; qp < qrule->n_points(); ++qp)
179 for (
unsigned qp = 0; qp < qrule->n_points(); ++qp)
185 mooseError(
"Undefined option for XFEM_QRULE");
194 bool physical_flag =
true;
196 for (
unsigned int plane_id = 0; plane_id < n_cut_planes; ++plane_id)
200 Point origin2qp = p - origin;
201 if (origin2qp * normal > 0.0)
203 physical_flag =
false;
207 return physical_flag;
std::vector< Point > _qp_points
Real getPhysicalVolumeFraction() const
Returns the volume fraction of the element fragment.
std::vector< Real > _elem_side_area
void getFaceWeightMultipliers(MooseArray< Real > &face_weights, QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points, unsigned int side)
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.
Real getPhysicalFaceAreaFraction(unsigned int side) const
Returns the surface area fraction of the element side.
virtual void computePhysicalFaceAreaFraction(unsigned int side)=0
Computes the surface area fraction of the element side.
std::vector< Real > _qp_weights
void getWeightMultipliers(MooseArray< Real > &weights, QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points)
std::vector< Real > _new_weights
quadrature weights from volume fraction and moment fitting
std::vector< Node * > _nodes
std::vector< Real > _physical_areafrac
virtual void computePhysicalVolumeFraction()=0
Computes the volume fraction of the element fragment.
XFEMCutElem(Elem *elem, unsigned int n_qpoints, unsigned int n_sides)
Constructor initializes XFEMCutElem object.
void computeXFEMWeights(QBase *qrule, Xfem::XFEM_QRULE xfem_qrule, const MooseArray< Point > &q_points)
Computes integration weights for the cut element.
bool isPointPhysical(const Point &p) const
virtual Point getCutPlaneOrigin(unsigned int plane_id, MeshBase *displaced_mesh=NULL) const =0
virtual Point getCutPlaneNormal(unsigned int plane_id, MeshBase *displaced_mesh=NULL) const =0
virtual void computeMomentFittingWeights()=0
std::vector< bool > _have_face_weights
std::vector< std::vector< Real > > _new_face_weights
face quadrature weights from surface area fraction