17#include "libmesh/vector_value.h"
18#include "libmesh/quadrature.h"
117 void addStateMarkedElem(
unsigned int elem_id, RealVectorValue & normal,
unsigned int marked_side);
130 const unsigned int interface_id);
140 const unsigned int interface_id);
147 virtual bool update(Real time,
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);
244 unsigned int side)
override;
280 unsigned int plane_id,
282 std::vector<Point> & intersectionPoints,
283 bool displaced_mesh =
false)
const;
285 std::vector<Point> & quad_pts,
286 std::vector<Real> & quad_wts)
const;
288 std::vector<Point> & quad_pts,
289 std::vector<Real> & quad_wts)
const;
306 std::vector<std::vector<Point>> & frag_edges)
const;
309 std::vector<std::vector<Point>> & frag_faces)
const;
323 const Elem * cut_elem,
324 const Elem * parent_elem =
nullptr)
const;
416 const Node * node_to_store_from,
418 std::map<unique_id_type, std::vector<Real>> & stored_solution,
419 const NumericVector<Number> & current_solution,
420 const NumericVector<Number> & old_solution,
421 const NumericVector<Number> & older_solution);
434 const Elem * elem_to_store_from,
436 std::map<unique_id_type, std::vector<Real>> & stored_solution,
437 const NumericVector<Number> & current_solution,
438 const NumericVector<Number> & old_solution,
439 const NumericVector<Number> & older_solution);
450 const std::map<unique_id_type, std::vector<Real>> & stored_solution,
451 NumericVector<Number> & current_solution,
452 NumericVector<Number> & old_solution,
453 NumericVector<Number> & older_solution);
464 const std::vector<dof_id_type> & stored_solution_dofs,
465 NumericVector<Number> & current_solution,
466 NumericVector<Number> & old_solution,
467 NumericVector<Number> & older_solution);
523 const Elem * elem_from,
524 std::unordered_map<const Elem *, Xfem::CutElemInfo> & cached_cei)
const;
unsigned int CutSubdomainID
std::list< std::pair< const Elem *, const Elem * > > ElementPairList
void storeMaterialPropertiesForElementHelper(const Elem *elem, MaterialPropertyStorage &storage)
virtual void getXFEMIntersectionInfo(const Elem *elem, unsigned int plane_id, Point &normal, std::vector< Point > &intersectionPoints, bool displaced_mesh=false) const
std::vector< const GeometricCutUserObject * > _geometric_cuts
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.
const std::map< const Elem *, std::vector< Point > > & getCrackTipOriginMap() const
virtual bool updateHeal() override
EFAElement2D * getEFAElem2D(const Elem *elem)
Get the EFAElement2D object for a specified libMesh element.
bool markCutFacesByState()
std::map< const GeometricCutUserObject *, unsigned int > _geom_marker_id_map
Data structure for storing the GeommetricCutUserObjects and their corresponding id.
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.
virtual void initSolution(const std::vector< std::shared_ptr< NonlinearSystemBase > > &nl, AuxiliarySystem &aux) override
virtual void getXFEMqRuleOnSurface(std::vector< Point > &intersection_points, std::vector< Point > &quad_pts, std::vector< Real > &quad_wts) 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.
void storeCrackTipOriginAndDirection()
Real _crack_growth_increment
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 loadMaterialPropertiesForElementHelper(const Elem *elem, const Xfem::CachedMaterialProperties &cached_props, MaterialPropertyStorage &storage) const
Load the material properties.
void addGeometricCut(GeometricCutUserObject *geometric_cut)
bool markCutFacesByGeometry()
std::map< unsigned int, std::set< unsigned int > > _geom_marker_id_elems
Data structure for storing the elements cut by specific geometric cutters.
virtual void getXFEMqRuleOnLine(std::vector< Point > &intersection_points, std::vector< Point > &quad_pts, std::vector< Real > &quad_wts) const
std::map< unsigned int, ElementPairLocator::ElementPairList > _sibling_displaced_elems
bool cutMeshWithEFA(const std::vector< std::shared_ptr< NonlinearSystemBase > > &nl, AuxiliarySystem &aux)
std::map< unique_id_type, XFEMCutElem * > _cut_elem_map
virtual unsigned int getGeometricCutID(const GeometricCutUserObject *gcu)
Get the interface ID corresponding to a given GeometricCutUserObject.
bool markCutEdgesByGeometry()
ElementFragmentAlgorithm _efa_mesh
bool isElemCut(const Elem *elem, XFEMCutElem *&xfce) const
void setDebugOutputLevel(unsigned int debug_output_level)
Controls amount of debugging information output.
virtual const ElementPairLocator::ElementPairList * getXFEMCutElemPairs(unsigned int interface_id)
Get the list of cut element pairs corresponding to a given interface ID.
void setMinWeightMultiplier(Real min_weight_multiplier)
Controls the minimum average weight multiplier for each element.
Point getEFANodeCoords(EFANode *CEMnode, EFAElement *CEMElem, const Elem *elem, MeshBase *displaced_mesh=nullptr) const
Real getPhysicalVolumeFraction(const Elem *elem) const
Get the volume fraction of an element that is physical.
std::map< const Elem *, RealVectorValue > _state_marked_elems
void addStateMarkedFrag(unsigned int elem_id, RealVectorValue &normal)
Xfem::XFEM_QRULE _XFEM_qrule
std::map< unsigned int, ElementPairLocator::ElementPairList > _sibling_elems
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::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.
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.
bool isElemAtCrackTip(const Elem *elem) const
virtual bool getXFEMFaceWeights(MooseArray< Real > &weights, const Elem *elem, QBase *qrule, const MooseArray< Point > &q_points, unsigned int side) override
bool healMesh()
Potentially heal the mesh by merging some of the pairs of partial elements cut by XFEM back into sing...
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.
void getFragmentFaces(const Elem *elem, std::vector< std::vector< Point > > &frag_faces, bool displaced_mesh=false) const
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...
void setCrackGrowthMethod(bool use_crack_growth_increment, Real crack_growth_increment)
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.
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::unordered_map< const Elem *, Xfem::CutElemInfo > _old_geom_cut_elems
All geometrically cut elements and their CutElemInfo before the current execution of XFEM_MARK.
std::unordered_map< const Elem *, Xfem::CutElemInfo > _geom_cut_elems
All geometrically cut elements and their CutElemInfo during the current execution of XFEM_MARK.
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.
void clearGeomMarkedElems()
Clear out the list of elements to be marked for cutting.
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.
void getCrackTipOrigin(std::map< unsigned int, const Elem * > &elem_id_crack_tip, std::vector< Point > &crack_front_points)
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)
EFAElement3D * getEFAElem3D(const Elem *elem)
Get the EFAElement3D object for a specified libMesh element.
bool markCutEdgesByState(Real time)
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 getFragmentEdges(const Elem *elem, EFAElement2D *CEMElem, std::vector< std::vector< Point > > &frag_edges) const
Xfem::XFEM_QRULE & getXFEMQRule()
void addStateMarkedElem(unsigned int elem_id, RealVectorValue &normal)
virtual bool update(Real time, const std::vector< std::shared_ptr< NonlinearSystemBase > > &nl, AuxiliarySystem &aux) override
virtual bool getXFEMWeights(MooseArray< Real > &weights, const Elem *elem, QBase *qrule, const MooseArray< Point > &q_points) override
std::set< const Elem * > _crack_tip_elems
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,...
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.
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.
unsigned int _debug_output_level
Controls amount of debugging output information 0: None 1: Summary 2: Details on modifications to mes...
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< Point > > _elem_crack_origin_direction_map
const GeometricCutUserObject * getGeometricCutForElem(const Elem *elem) const
Get the GeometricCutUserObject associated with an element.
void setXFEMQRule(std::string &xfem_qrule)
bool initCutIntersectionEdge(Point cut_origin, RealVectorValue cut_normal, Point &edge_p1, Point &edge_p2, Real &dist)
Real _min_weight_multiplier
The minimum average multiplier applied by XFEM to the standard quadrature weights to integrate partia...
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...
std::set< const Elem * > _crack_tip_elems_to_be_healed
std::set< const Elem * > _state_marked_frags
bool _use_crack_growth_increment
void clearStateMarkedElems()
std::array< std::unordered_map< unsigned int, std::string >, 2 > CachedMaterialProperties
Convenient typedef for local storage of stateful material properties.
Information about a cut element.
CachedMaterialProperties _elem_material_properties
bool match(const CutElemInfo &rhs)
CutSubdomainID _cut_subdomain_id
const Elem * _parent_elem
CutElemInfo(const Elem *parent_elem, const GeometricCutUserObject *geometric_cut, CutSubdomainID cut_subdomain_id)
const GeometricCutUserObject * _geometric_cut
CachedMaterialProperties _bnd_material_properties
Data structure describing geometrically described cut through 2D element.
Data structure describing geometrically described cut through 3D element.