Go to the documentation of this file.
12 #include "ElementPairLocator.h"
14 #include "XFEMInterface.h"
17 #include "libmesh/vector_value.h"
18 #include "libmesh/quadrature.h"
61 class XFEM :
public XFEMInterface
64 explicit XFEM(
const InputParameters & params);
71 void addStateMarkedElem(
unsigned int elem_id, RealVectorValue & normal,
unsigned int marked_side);
84 const unsigned int interface_id);
94 const unsigned int interface_id);
101 virtual bool update(Real time, NonlinearSystemBase & nl, AuxiliarySystem & aux)
override;
103 virtual void initSolution(NonlinearSystemBase & nl, AuxiliarySystem & aux)
override;
112 Point cut_origin, RealVectorValue cut_normal, Point & edge_p1, Point & edge_p2, Real & dist);
113 bool cutMeshWithEFA(NonlinearSystemBase & nl, AuxiliarySystem & aux);
127 MeshBase * displaced_mesh = NULL)
const;
145 unsigned int plane_id)
const;
151 std::vector<std::vector<Point>> & frag_faces,
152 bool displaced_mesh =
false)
const;
159 Point crack_tip_origin,
160 Point crack_tip_direction,
161 Real & distance_keep,
162 unsigned int & edge_id_keep,
163 Point & normal_keep);
166 std::vector<Point> & crack_front_points);
182 const MooseArray<Point> & q_points)
override;
186 const MooseArray<Point> & q_points,
187 unsigned int side)
override;
206 virtual const ElementPairLocator::ElementPairList *
223 unsigned int plane_id,
225 std::vector<Point> & intersectionPoints,
226 bool displaced_mesh =
false)
const;
228 std::vector<Point> & quad_pts,
229 std::vector<Real> & quad_wts)
const;
231 std::vector<Point> & quad_pts,
232 std::vector<Real> & quad_wts)
const;
249 std::vector<std::vector<Point>> & frag_edges)
const;
252 std::vector<std::vector<Point>> & frag_faces)
const;
333 const Node * node_to_store_from,
335 std::map<unique_id_type, std::vector<Real>> & stored_solution,
336 const NumericVector<Number> & current_solution,
337 const NumericVector<Number> & old_solution,
338 const NumericVector<Number> & older_solution);
351 const Elem * elem_to_store_from,
353 std::map<unique_id_type, std::vector<Real>> & stored_solution,
354 const NumericVector<Number> & current_solution,
355 const NumericVector<Number> & old_solution,
356 const NumericVector<Number> & older_solution);
367 const std::map<unique_id_type, std::vector<Real>> & stored_solution,
368 NumericVector<Number> & current_solution,
369 NumericVector<Number> & old_solution,
370 NumericVector<Number> & older_solution);
381 const std::vector<dof_id_type> & stored_solution_dofs,
382 NumericVector<Number> & current_solution,
383 NumericVector<Number> & old_solution,
384 NumericVector<Number> & older_solution);
std::map< unsigned int, std::set< unsigned int > > _geom_marker_id_elems
Data structure for storing the elements cut by specific geometric cutters.
bool isElemAtCrackTip(const Elem *elem) const
void storeSolutionForElement(const Elem *elem_to_store_to, const Elem *elem_to_store_from, SystemBase &sys, std::map< unique_id_type, std::vector< Real >> &stored_solution, const NumericVector< Number > ¤t_solution, const NumericVector< Number > &old_solution, const NumericVector< Number > &older_solution)
Store the solution in stored_solution for a given element.
Xfem::XFEM_QRULE _XFEM_qrule
Real getCutPlane(const Elem *elem, const Xfem::XFEM_CUTPLANE_QUANTITY quantity, unsigned int plane_id) const
Get specified component of normal or origin for cut plane for a given element.
Data structure describing geometrically described cut through 2D element.
void storeSolutionForNode(const Node *node_to_store_to, const Node *node_to_store_from, SystemBase &sys, std::map< unique_id_type, std::vector< Real >> &stored_solution, const NumericVector< Number > ¤t_solution, const NumericVector< Number > &old_solution, const NumericVector< Number > &older_solution)
Store the solution in stored_solution for a given node.
std::set< const Elem * > _state_marked_frags
virtual void getXFEMqRuleOnSurface(std::vector< Point > &intersection_points, std::vector< Point > &quad_pts, std::vector< Real > &quad_wts) const
void addStateMarkedElem(unsigned int elem_id, RealVectorValue &normal)
void setCrackGrowthMethod(bool use_crack_growth_increment, Real crack_growth_increment)
EFAElement3D * getEFAElem3D(const Elem *elem)
Get the EFAElement3D object for a specified libMesh element.
virtual void getXFEMIntersectionInfo(const Elem *elem, unsigned int plane_id, Point &normal, std::vector< Point > &intersectionPoints, bool displaced_mesh=false) const
std::map< const Elem *, std::vector< Xfem::GeomMarkedElemInfo2D > > _geom_marked_elems_2d
Data structure for storing information about all 2D elements to be cut by geometry.
bool cutMeshWithEFA(NonlinearSystemBase &nl, AuxiliarySystem &aux)
virtual void getXFEMqRuleOnLine(std::vector< Point > &intersection_points, std::vector< Point > &quad_pts, std::vector< Real > &quad_wts) const
void setDebugOutputLevel(unsigned int debug_output_level)
Controls amount of debugging information output.
std::vector< dof_id_type > getElementSolutionDofs(const Elem *elem, SystemBase &sys) const
Get a vector of the dof indices for all components of all variables associated with an element.
virtual unsigned int getGeometricCutID(const GeometricCutUserObject *gcu)
Get the interface ID corresponding to a given GeometricCutUserObject.
void clearStateMarkedElems()
std::map< const Elem *, RealVectorValue > _state_marked_elems
bool isElemCut(const Elem *elem, XFEMCutElem *&xfce) const
bool markCutFacesByGeometry()
void addStateMarkedFrag(unsigned int elem_id, RealVectorValue &normal)
void setSolutionForDOFs(const std::vector< Real > &stored_solution, const std::vector< dof_id_type > &stored_solution_dofs, NumericVector< Number > ¤t_solution, NumericVector< Number > &old_solution, NumericVector< Number > &older_solution)
Set the solution for a set of DOFs.
void correctCrackExtensionDirection(const Elem *elem, EFAElement2D *CEMElem, EFAEdge *orig_edge, Point normal, Point crack_tip_origin, Point crack_tip_direction, Real &distance_keep, unsigned int &edge_id_keep, Point &normal_keep)
virtual void initSolution(NonlinearSystemBase &nl, AuxiliarySystem &aux) override
std::map< const Elem *, std::vector< Xfem::GeomMarkedElemInfo3D > > _geom_marked_elems_3d
Data structure for storing information about all 3D elements to be cut by geometry.
bool markCutFacesByState()
Real getPhysicalVolumeFraction(const Elem *elem) const
Get the volume fraction of an element that is physical.
Xfem::XFEM_QRULE & getXFEMQRule()
virtual bool getXFEMWeights(MooseArray< Real > &weights, const Elem *elem, QBase *qrule, const MooseArray< Point > &q_points) override
void setXFEMQRule(std::string &xfem_qrule)
std::map< const Elem *, unsigned int > _state_marked_elem_sides
std::map< unique_id_type, std::vector< Real > > _cached_solution
Data structure to store the nonlinear solution for nodes/elements affected by XFEM For each node/elem...
virtual bool updateHeal() override
bool markCutEdgesByState(Real time)
bool isPointInsidePhysicalDomain(const Elem *elem, const Point &point) const
Return true if the point is inside the element physical domain Note: if this element is not cut,...
void getFragmentFaces(const Elem *elem, std::vector< std::vector< Point >> &frag_faces, bool displaced_mesh=false) const
std::vector< const GeometricCutUserObject * > _geometric_cuts
void setSolution(SystemBase &sys, const std::map< unique_id_type, std::vector< Real >> &stored_solution, NumericVector< Number > ¤t_solution, NumericVector< Number > &old_solution, NumericVector< Number > &older_solution)
Set the solution for all locally-owned nodes/elements that have stored values.
Data structure describing geometrically described cut through 3D element.
bool _use_crack_growth_increment
EFAElement2D * getEFAElem2D(const Elem *elem)
Get the EFAElement2D object for a specified libMesh element.
std::vector< dof_id_type > getNodeSolutionDofs(const Node *node, SystemBase &sys) const
Get a vector of the dof indices for all components of all variables associated with a node.
void getFragmentEdges(const Elem *elem, EFAElement2D *CEMElem, std::vector< std::vector< Point >> &frag_edges) const
const std::map< const Elem *, std::vector< Point > > & getCrackTipOriginMap() const
unsigned int _debug_output_level
Controls amount of debugging output information 0: None 1: Summary 2: Details on modifications to mes...
void clearGeomMarkedElems()
Clear out the list of elements to be marked for cutting.
std::map< unsigned int, ElementPairLocator::ElementPairList > _sibling_elems
Real _crack_growth_increment
virtual const ElementPairLocator::ElementPairList * getXFEMDisplacedCutElemPairs(unsigned int interface_id)
Get the list of cut element pairs on the displaced mesh corresponding to a given interface ID.
std::set< const Elem * > _crack_tip_elems_to_be_healed
std::map< unique_id_type, XFEMCutElem * > _cut_elem_map
std::set< const Elem * > _crack_tip_elems
void getCrackTipOrigin(std::map< unsigned int, const Elem * > &elem_id_crack_tip, std::vector< Point > &crack_front_points)
bool healMesh()
Potentially heal the mesh by merging some of the pairs of partial elements cut by XFEM back into sing...
std::map< unsigned int, ElementPairLocator::ElementPairList > _sibling_displaced_elems
bool initCutIntersectionEdge(Point cut_origin, RealVectorValue cut_normal, Point &edge_p1, Point &edge_p2, Real &dist)
virtual bool getXFEMFaceWeights(MooseArray< Real > &weights, const Elem *elem, QBase *qrule, const MooseArray< Point > &q_points, unsigned int side) override
std::map< unique_id_type, std::vector< Real > > _cached_aux_solution
Data structure to store the auxiliary solution for nodes/elements affected by XFEM For each node/elem...
Point getEFANodeCoords(EFANode *CEMnode, EFAElement *CEMElem, const Elem *elem, MeshBase *displaced_mesh=NULL) const
void addGeometricCut(GeometricCutUserObject *geometric_cut)
bool markCutEdgesByGeometry()
XFEM(const InputParameters ¶ms)
ElementFragmentAlgorithm _efa_mesh
virtual const ElementPairLocator::ElementPairList * getXFEMCutElemPairs(unsigned int interface_id)
Get the list of cut element pairs corresponding to a given interface ID.
virtual bool update(Real time, NonlinearSystemBase &nl, AuxiliarySystem &aux) override
std::map< const GeometricCutUserObject *, unsigned int > _geom_marker_id_map
Data structure for storing the GeommetricCutUserObjects and their corresponding id.
void addGeomMarkedElem3D(const unsigned int elem_id, const Xfem::GeomMarkedElemInfo3D geom_info, const unsigned int interface_id)
Add information about a new cut to be performed on a specific 3d element.
void storeCrackTipOriginAndDirection()
void addGeomMarkedElem2D(const unsigned int elem_id, const Xfem::GeomMarkedElemInfo2D geom_info, const unsigned int interface_id)
Add information about a new cut to be performed on a specific 2d element.
std::map< const Elem *, std::vector< Point > > _elem_crack_origin_direction_map