17 #include "libmesh/vector_value.h" 18 #include "libmesh/quadrature.h" 130 const unsigned int interface_id);
140 const unsigned int interface_id);
148 const std::vector<std::shared_ptr<NonlinearSystemBase>> & nl,
151 virtual void initSolution(
const std::vector<std::shared_ptr<NonlinearSystemBase>> & nl,
161 Point cut_origin,
RealVectorValue cut_normal, Point & edge_p1, Point & edge_p2,
Real & dist);
162 bool cutMeshWithEFA(
const std::vector<std::shared_ptr<NonlinearSystemBase>> & nl,
177 MeshBase * displaced_mesh =
nullptr)
const;
195 unsigned int plane_id)
const;
201 std::vector<std::vector<Point>> & frag_faces,
202 bool displaced_mesh =
false)
const;
209 Point crack_tip_origin,
210 Point crack_tip_direction,
211 Real & distance_keep,
212 unsigned int & edge_id_keep,
213 Point & normal_keep);
216 std::vector<Point> & crack_front_points);
237 unsigned int side)
override;
273 unsigned int plane_id,
275 std::vector<Point> & intersectionPoints,
276 bool displaced_mesh =
false)
const;
278 std::vector<Point> & quad_pts,
279 std::vector<Real> & quad_wts)
const;
281 std::vector<Point> & quad_pts,
282 std::vector<Real> & quad_wts)
const;
299 std::vector<std::vector<Point>> & frag_edges)
const;
302 std::vector<std::vector<Point>> & frag_faces)
const;
316 const Elem * cut_elem,
317 const Elem * parent_elem =
nullptr)
const;
405 const Node * node_to_store_from,
423 const Elem * elem_to_store_from,
439 const std::map<
unique_id_type, std::vector<Real>> & stored_solution,
453 const std::vector<dof_id_type> & stored_solution_dofs,
512 const Elem * elem_from,
513 std::unordered_map<const Elem *, Xfem::CutElemInfo> & cached_cei)
const;
void getCrackTipOrigin(std::map< unsigned int, const Elem *> &elem_id_crack_tip, std::vector< Point > &crack_front_points)
void getFragmentFaces(const Elem *elem, std::vector< std::vector< Point >> &frag_faces, bool displaced_mesh=false) const
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)
bool _use_crack_growth_increment
unsigned int _debug_output_level
Controls amount of debugging output information 0: None 1: Summary 2: Details on modifications to mes...
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.
const GeometricCutUserObject * getGeometricCutForElem(const Elem *elem) const
Get the GeometricCutUserObject associated with an element.
bool markCutEdgesByState(Real time)
void storeMaterialPropertiesForElement(const Elem *parent_elem, const Elem *child_elem)
Helper function to store the material properties of a healed element.
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.
CutSubdomainID getCutSubdomainID(const GeometricCutUserObject *gcuo, const Elem *cut_elem, const Elem *parent_elem=nullptr) const
Determine which cut subdomain the element belongs to relative to the cut.
Data structure describing geometrically described cut through 3D element.
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.
virtual bool update(Real time, const std::vector< std::shared_ptr< NonlinearSystemBase >> &nl, AuxiliarySystem &aux) override
std::map< unsigned int, ElementPairLocator::ElementPairList > _sibling_elems
Real _crack_growth_increment
virtual bool getXFEMFaceWeights(MooseArray< Real > &weights, const Elem *elem, QBase *qrule, const MooseArray< Point > &q_points, unsigned int side) override
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...
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 getFragmentEdges(const Elem *elem, EFAElement2D *CEMElem, std::vector< std::vector< Point >> &frag_edges) const
bool match(const CutElemInfo &rhs)
bool cutMeshWithEFA(const std::vector< std::shared_ptr< NonlinearSystemBase >> &nl, AuxiliarySystem &aux)
const std::map< const Elem *, std::vector< Point > > & getCrackTipOriginMap() const
std::map< unsigned int, ElementPairLocator::ElementPairList > _sibling_displaced_elems
void clearGeomMarkedElems()
Clear out the list of elements to be marked for cutting.
std::map< unique_id_type, XFEMCutElem * > _cut_elem_map
std::set< const Elem * > _crack_tip_elems
CutSubdomainID _cut_subdomain_id
bool healMesh()
Potentially heal the mesh by merging some of the pairs of partial elements cut by XFEM back into sing...
XFEM(const InputParameters ¶ms)
ElementFragmentAlgorithm _efa_mesh
std::array< std::unordered_map< unsigned int, std::string >, 2 > CachedMaterialProperties
Convenient typedef for local storage of stateful material properties.
const GeometricCutUserObject * _geometric_cut
CachedMaterialProperties _bnd_material_properties
CutElemInfo(const Elem *parent_elem, const GeometricCutUserObject *geometric_cut, CutSubdomainID cut_subdomain_id)
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
void addGeometricCut(GeometricCutUserObject *geometric_cut)
auto max(const L &left, const R &right)
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...
bool markCutEdgesByGeometry()
unsigned int CutSubdomainID
const Elem * _parent_elem
virtual const ElementPairLocator::ElementPairList * getXFEMCutElemPairs(unsigned int interface_id)
Get the list of cut element pairs corresponding to a given interface ID.
bool initCutIntersectionEdge(Point cut_origin, RealVectorValue cut_normal, Point &edge_p1, Point &edge_p2, Real &dist)
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()
const Node * pickFirstPhysicalNode(const Elem *e, const Elem *e0) const
Return the first node in the provided element that is found to be in the physical domain...
void loadMaterialPropertiesForElement(const Elem *elem, const Elem *elem_from, std::unordered_map< const Elem *, Xfem::CutElemInfo > &cached_cei) const
Helper function to store the material properties of a healed element.
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.
std::map< const GeometricCutUserObject *, unsigned int > _geom_marker_id_map
Data structure for storing the GeommetricCutUserObjects and their corresponding id.
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.
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
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::list< std::pair< const Elem *, const Elem *> > ElementPairList
virtual void getXFEMqRuleOnLine(std::vector< Point > &intersection_points, std::vector< Point > &quad_pts, std::vector< Real > &quad_wts) const
Data structure describing geometrically described cut through 2D element.
void loadMaterialPropertiesForElementHelper(const Elem *elem, const Xfem::CachedMaterialProperties &cached_props, MaterialPropertyStorage &storage) const
Load the material properties.
void setDebugOutputLevel(unsigned int debug_output_level)
Controls amount of debugging information output.
std::map< const Elem *, std::vector< Point > > _elem_crack_origin_direction_map
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.
std::map< unsigned int, std::set< unsigned int > > _geom_marker_id_elems
Data structure for storing the elements cut by specific geometric cutters.
virtual unsigned int getGeometricCutID(const GeometricCutUserObject *gcu)
Get the interface ID corresponding to a given GeometricCutUserObject.
virtual void initSolution(const std::vector< std::shared_ptr< NonlinearSystemBase >> &nl, AuxiliarySystem &aux) override
std::set< const Elem * > _state_marked_frags
void storeMaterialPropertiesForElementHelper(const Elem *elem, MaterialPropertyStorage &storage)
EFAElement3D * getEFAElem3D(const Elem *elem)
Get the EFAElement3D object for a specified libMesh element.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool isElemAtCrackTip(const Elem *elem) const
CachedMaterialProperties _elem_material_properties
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...
Xfem::XFEM_QRULE & getXFEMQRule()
Real getPhysicalVolumeFraction(const Elem *elem) const
Get the volume fraction of an element that is physical.
virtual bool getXFEMWeights(MooseArray< Real > &weights, const Elem *elem, QBase *qrule, const MooseArray< Point > &q_points) override
virtual void getXFEMqRuleOnSurface(std::vector< Point > &intersection_points, std::vector< Point > &quad_pts, std::vector< Real > &quad_wts) const
bool markCutFacesByGeometry()
void setCrackGrowthMethod(bool use_crack_growth_increment, Real crack_growth_increment)
void addStateMarkedElem(unsigned int elem_id, RealVectorValue &normal)
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...
bool isElemCut(const Elem *elem, XFEMCutElem *&xfce) const
virtual bool updateHeal() override
void clearStateMarkedElems()
void setXFEMQRule(std::string &xfem_qrule)
std::map< const Elem *, unsigned int > _state_marked_elem_sides
Information about a cut element.
Point getEFANodeCoords(EFANode *CEMnode, EFAElement *CEMElem, const Elem *elem, MeshBase *displaced_mesh=nullptr) const
std::map< const Elem *, RealVectorValue > _state_marked_elems
EFAElement2D * getEFAElem2D(const Elem *elem)
Get the EFAElement2D object for a specified libMesh element.
bool markCutFacesByState()
void addStateMarkedFrag(unsigned int elem_id, RealVectorValue &normal)
std::unordered_map< const Elem *, Xfem::CutElemInfo > _geom_cut_elems
All geometrically cut elements and their CutElemInfo during the current execution of XFEM_MARK...
std::unordered_map< const Elem *, Xfem::CutElemInfo > _old_geom_cut_elems
All geometrically cut elements and their CutElemInfo before the current execution of XFEM_MARK...