This is the XFEM
class.
More...
#include <XFEM.h>
Public Member Functions | |
XFEM (const InputParameters ¶ms) | |
~XFEM () | |
void | addGeometricCut (GeometricCutUserObject *geometric_cut) |
void | addStateMarkedElem (unsigned int elem_id, RealVectorValue &normal) |
void | addStateMarkedElem (unsigned int elem_id, RealVectorValue &normal, unsigned int marked_side) |
void | addStateMarkedFrag (unsigned int elem_id, RealVectorValue &normal) |
void | clearStateMarkedElems () |
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. More... | |
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. More... | |
void | clearGeomMarkedElems () |
Clear out the list of elements to be marked for cutting. More... | |
virtual bool | update (Real time, NonlinearSystemBase &nl, AuxiliarySystem &aux) override |
virtual void | initSolution (NonlinearSystemBase &nl, AuxiliarySystem &aux) override |
void | buildEFAMesh () |
bool | markCuts (Real time) |
bool | markCutEdgesByGeometry () |
bool | markCutEdgesByState (Real time) |
bool | markCutFacesByGeometry () |
bool | markCutFacesByState () |
bool | initCutIntersectionEdge (Point cut_origin, RealVectorValue cut_normal, Point &edge_p1, Point &edge_p2, Real &dist) |
bool | cutMeshWithEFA (NonlinearSystemBase &nl, AuxiliarySystem &aux) |
bool | healMesh () |
Potentially heal the mesh by merging some of the pairs of partial elements cut by XFEM back into single elements if indicated by the cutting objects. More... | |
virtual bool | updateHeal () override |
Point | getEFANodeCoords (EFANode *CEMnode, EFAElement *CEMElem, const Elem *elem, MeshBase *displaced_mesh=NULL) const |
Real | getPhysicalVolumeFraction (const Elem *elem) const |
Get the volume fraction of an element that is physical. More... | |
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, return true too. More... | |
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. More... | |
bool | isElemAtCrackTip (const Elem *elem) const |
bool | isElemCut (const Elem *elem, XFEMCutElem *&xfce) const |
bool | isElemCut (const Elem *elem) const |
void | getFragmentFaces (const Elem *elem, std::vector< std::vector< Point >> &frag_faces, bool displaced_mesh=false) const |
void | storeCrackTipOriginAndDirection () |
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) |
void | getCrackTipOrigin (std::map< unsigned int, const Elem * > &elem_id_crack_tip, std::vector< Point > &crack_front_points) |
Xfem::XFEM_QRULE & | getXFEMQRule () |
void | setXFEMQRule (std::string &xfem_qrule) |
void | setCrackGrowthMethod (bool use_crack_growth_increment, Real crack_growth_increment) |
void | setDebugOutputLevel (unsigned int debug_output_level) |
Controls amount of debugging information output. More... | |
virtual bool | getXFEMWeights (MooseArray< Real > &weights, const Elem *elem, QBase *qrule, const MooseArray< Point > &q_points) override |
virtual bool | getXFEMFaceWeights (MooseArray< Real > &weights, const Elem *elem, QBase *qrule, const MooseArray< Point > &q_points, unsigned int side) override |
virtual const ElementPairLocator::ElementPairList * | getXFEMCutElemPairs (unsigned int interface_id) |
Get the list of cut element pairs corresponding to a given interface ID. More... | |
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. More... | |
virtual unsigned int | getGeometricCutID (const GeometricCutUserObject *gcu) |
Get the interface ID corresponding to a given GeometricCutUserObject. More... | |
virtual void | getXFEMIntersectionInfo (const Elem *elem, unsigned int plane_id, Point &normal, std::vector< Point > &intersectionPoints, bool displaced_mesh=false) const |
virtual void | getXFEMqRuleOnLine (std::vector< Point > &intersection_points, std::vector< Point > &quad_pts, std::vector< Real > &quad_wts) const |
virtual void | getXFEMqRuleOnSurface (std::vector< Point > &intersection_points, std::vector< Point > &quad_pts, std::vector< Real > &quad_wts) const |
bool | has_secondary_cut () |
EFAElement2D * | getEFAElem2D (const Elem *elem) |
Get the EFAElement2D object for a specified libMesh element. More... | |
EFAElement3D * | getEFAElem3D (const Elem *elem) |
Get the EFAElement3D object for a specified libMesh element. More... | |
void | getFragmentEdges (const Elem *elem, EFAElement2D *CEMElem, std::vector< std::vector< Point >> &frag_edges) const |
void | getFragmentFaces (const Elem *elem, EFAElement3D *CEMElem, std::vector< std::vector< Point >> &frag_faces) const |
const std::map< const Elem *, std::vector< Point > > & | getCrackTipOriginMap () const |
Private Member Functions | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Private Attributes | |
bool | _has_secondary_cut |
Xfem::XFEM_QRULE | _XFEM_qrule |
bool | _use_crack_growth_increment |
Real | _crack_growth_increment |
std::vector< const GeometricCutUserObject * > | _geometric_cuts |
std::map< unique_id_type, XFEMCutElem * > | _cut_elem_map |
std::set< const Elem * > | _crack_tip_elems |
std::set< const Elem * > | _crack_tip_elems_to_be_healed |
std::map< unsigned int, ElementPairLocator::ElementPairList > | _sibling_elems |
std::map< unsigned int, ElementPairLocator::ElementPairList > | _sibling_displaced_elems |
std::map< const Elem *, std::vector< Point > > | _elem_crack_origin_direction_map |
std::map< const Elem *, RealVectorValue > | _state_marked_elems |
std::set< const Elem * > | _state_marked_frags |
std::map< const Elem *, unsigned int > | _state_marked_elem_sides |
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. More... | |
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. More... | |
std::map< unsigned int, std::set< unsigned int > > | _geom_marker_id_elems |
Data structure for storing the elements cut by specific geometric cutters. More... | |
std::map< const GeometricCutUserObject *, unsigned int > | _geom_marker_id_map |
Data structure for storing the GeommetricCutUserObjects and their corresponding id. More... | |
ElementFragmentAlgorithm | _efa_mesh |
unsigned int | _debug_output_level |
Controls amount of debugging output information 0: None 1: Summary 2: Details on modifications to mesh 3: Full dump of element fragment algorithm mesh. More... | |
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/element, this is stored as a vector that contains all components of all applicable variables in an order defined by getElementSolutionDofs() or getNodeSolutionDofs(). More... | |
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/element, this is stored as a vector that contains all components of all applicable variables in an order defined by getElementSolutionDofs() or getNodeSolutionDofs(). More... | |
This is the XFEM
class.
This class implements algorithms for dynamic mesh modification in support of a phantom node approach for XFEM
void XFEM::addGeometricCut | ( | GeometricCutUserObject * | geometric_cut | ) |
void XFEM::addGeomMarkedElem2D | ( | const unsigned int | elem_id, |
const Xfem::GeomMarkedElemInfo2D | geom_info, | ||
const unsigned int | interface_id | ||
) |
void XFEM::addGeomMarkedElem3D | ( | const unsigned int | elem_id, |
const Xfem::GeomMarkedElemInfo3D | geom_info, | ||
const unsigned int | interface_id | ||
) |
void XFEM::addStateMarkedElem | ( | unsigned int | elem_id, |
RealVectorValue & | normal | ||
) |
Definition at line 112 of file XFEM.C.
Referenced by addStateMarkedElem(), and addStateMarkedFrag().
void XFEM::addStateMarkedElem | ( | unsigned int | elem_id, |
RealVectorValue & | normal, | ||
unsigned int | marked_side | ||
) |
void XFEM::addStateMarkedFrag | ( | unsigned int | elem_id, |
RealVectorValue & | normal | ||
) |
void XFEM::buildEFAMesh | ( | ) |
Definition at line 340 of file XFEM.C.
Referenced by update().
void XFEM::clearGeomMarkedElems | ( | ) |
void XFEM::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 XFEM::cutMeshWithEFA | ( | NonlinearSystemBase & | nl, |
AuxiliarySystem & | aux | ||
) |
Definition at line 1077 of file XFEM.C.
Referenced by update().
void XFEM::getCrackTipOrigin | ( | std::map< unsigned int, const Elem * > & | elem_id_crack_tip, |
std::vector< Point > & | crack_front_points | ||
) |
|
inline |
Real XFEM::getCutPlane | ( | const Elem * | elem, |
const Xfem::XFEM_CUTPLANE_QUANTITY | quantity, | ||
unsigned int | plane_id | ||
) | const |
EFAElement2D * XFEM::getEFAElem2D | ( | const Elem * | elem | ) |
Get the EFAElement2D object for a specified libMesh element.
elem | Pointer to the libMesh element for which the object is requested |
Definition at line 1651 of file XFEM.C.
Referenced by markCutEdgesByGeometry(), and markCutEdgesByState().
EFAElement3D * XFEM::getEFAElem3D | ( | const Elem * | elem | ) |
Get the EFAElement3D object for a specified libMesh element.
elem | Pointer to the libMesh element for which the object is requested |
Definition at line 1663 of file XFEM.C.
Referenced by markCutFacesByGeometry().
Point XFEM::getEFANodeCoords | ( | EFANode * | CEMnode, |
EFAElement * | CEMElem, | ||
const Elem * | elem, | ||
MeshBase * | displaced_mesh = NULL |
||
) | const |
Definition at line 1500 of file XFEM.C.
Referenced by correctCrackExtensionDirection(), getFragmentEdges(), getFragmentFaces(), and markCutEdgesByState().
|
private |
Get a vector of the dof indices for all components of all variables associated with an element.
elem | Element for which dof indices are found |
sys | System for which the dof indices are found |
Definition at line 2002 of file XFEM.C.
Referenced by setSolution(), and storeSolutionForElement().
void XFEM::getFragmentEdges | ( | const Elem * | elem, |
EFAElement2D * | CEMElem, | ||
std::vector< std::vector< Point >> & | frag_edges | ||
) | const |
void XFEM::getFragmentFaces | ( | const Elem * | elem, |
EFAElement3D * | CEMElem, | ||
std::vector< std::vector< Point >> & | frag_faces | ||
) | const |
void XFEM::getFragmentFaces | ( | const Elem * | elem, |
std::vector< std::vector< Point >> & | frag_faces, | ||
bool | displaced_mesh = false |
||
) | const |
|
inlinevirtual |
Get the interface ID corresponding to a given GeometricCutUserObject.
gcu | pointer to the GeometricCutUserObject |
|
private |
Get a vector of the dof indices for all components of all variables associated with a node.
node | Node for which dof indices are found |
sys | System for which the dof indices are found |
Definition at line 2028 of file XFEM.C.
Referenced by setSolution(), and storeSolutionForNode().
Real XFEM::getPhysicalVolumeFraction | ( | const Elem * | elem | ) | const |
Get the volume fraction of an element that is physical.
Definition at line 1532 of file XFEM.C.
Referenced by markCutEdgesByState().
|
inlinevirtual |
Get the list of cut element pairs corresponding to a given interface ID.
interface_id | The ID of the interface |
|
inlinevirtual |
Get the list of cut element pairs on the displaced mesh corresponding to a given interface ID.
interface_id | The ID of the interface |
|
overridevirtual |
|
virtual |
Xfem::XFEM_QRULE & XFEM::getXFEMQRule | ( | ) |
Definition at line 1718 of file XFEM.C.
Referenced by getXFEMFaceWeights(), and getXFEMWeights().
|
virtual |
|
virtual |
|
overridevirtual |
bool XFEM::healMesh | ( | ) |
Potentially heal the mesh by merging some of the pairs of partial elements cut by XFEM back into single elements if indicated by the cutting objects.
Definition at line 920 of file XFEM.C.
Referenced by updateHeal().
bool XFEM::initCutIntersectionEdge | ( | Point | cut_origin, |
RealVectorValue | cut_normal, | ||
Point & | edge_p1, | ||
Point & | edge_p2, | ||
Real & | dist | ||
) |
Definition at line 901 of file XFEM.C.
Referenced by correctCrackExtensionDirection(), and markCutEdgesByState().
|
overridevirtual |
bool XFEM::isElemAtCrackTip | ( | const Elem * | elem | ) | const |
Definition at line 1604 of file XFEM.C.
Referenced by markCutEdgesByGeometry(), and markCutEdgesByState().
bool XFEM::isElemCut | ( | const Elem * | elem | ) | const |
bool XFEM::isElemCut | ( | const Elem * | elem, |
XFEMCutElem *& | xfce | ||
) | const |
Definition at line 1610 of file XFEM.C.
Referenced by getXFEMFaceWeights(), getXFEMWeights(), and isElemCut().
bool XFEM::isPointInsidePhysicalDomain | ( | const Elem * | elem, |
const Point & | point | ||
) | const |
bool XFEM::markCutEdgesByGeometry | ( | ) |
bool XFEM::markCutEdgesByState | ( | Real | time | ) |
Definition at line 588 of file XFEM.C.
Referenced by markCuts().
bool XFEM::markCutFacesByGeometry | ( | ) |
bool XFEM::markCutFacesByState | ( | ) |
void XFEM::setCrackGrowthMethod | ( | bool | use_crack_growth_increment, |
Real | crack_growth_increment | ||
) |
void XFEM::setDebugOutputLevel | ( | unsigned int | debug_output_level | ) |
Controls amount of debugging information output.
debug_output_level | How much information to output (see description of _debug_output_level) |
|
private |
Set the solution for all locally-owned nodes/elements that have stored values.
sys | System for which the solution is set |
stored_solution | Data structure that the stored solution is obtained from |
current_solution | Current solution vector that will be set |
old_solution | Old solution vector that will be set |
older_solution | Older solution vector that will be set |
Definition at line 1941 of file XFEM.C.
Referenced by initSolution().
|
private |
Set the solution for a set of DOFs.
stored_solution | Stored solution values to set the solution to |
stored_solution_dofs | Dof indices for the entries in stored_solution |
current_solution | Current solution vector that will be set |
old_solution | Old solution vector that will be set |
older_solution | Older solution vector that will be set |
Definition at line 1979 of file XFEM.C.
Referenced by setSolution().
void XFEM::storeCrackTipOriginAndDirection | ( | ) |
|
private |
Store the solution in stored_solution for a given element.
elem_to_store_to | Element for which the solution will be stored |
elem_to_store_from | Element from which the solution to be stored is obtained |
sys | System from which the solution is stored |
stored_solution | Data structure that the stored solution is saved to |
current_solution | Current solution vector that the solution is obtained from |
old_solution | Old solution vector that the solution is obtained from |
older_solution | Older solution vector that the solution is obtained from |
Definition at line 1907 of file XFEM.C.
Referenced by cutMeshWithEFA().
|
private |
Store the solution in stored_solution for a given node.
node_to_store_to | Node for which the solution will be stored |
node_to_store_from | Node from which the solution to be stored is obtained |
sys | System from which the solution is stored |
stored_solution | Data structure that the stored solution is saved to |
current_solution | Current solution vector that the solution is obtained from |
old_solution | Old solution vector that the solution is obtained from |
older_solution | Older solution vector that the solution is obtained from |
Definition at line 1873 of file XFEM.C.
Referenced by cutMeshWithEFA().
|
overridevirtual |
|
private |
Data structure to store the auxiliary solution for nodes/elements affected by XFEM For each node/element, this is stored as a vector that contains all components of all applicable variables in an order defined by getElementSolutionDofs() or getNodeSolutionDofs().
This vector first contains the current solution in that order, followed by the old and older solutions, also in that same order.
Definition at line 320 of file XFEM.h.
Referenced by cutMeshWithEFA(), and initSolution().
|
private |
Data structure to store the nonlinear solution for nodes/elements affected by XFEM For each node/element, this is stored as a vector that contains all components of all applicable variables in an order defined by getElementSolutionDofs() or getNodeSolutionDofs().
This vector first contains the current solution in that order, followed by the old and older solutions, also in that same order.
Definition at line 311 of file XFEM.h.
Referenced by cutMeshWithEFA(), and initSolution().
|
private |
Definition at line 265 of file XFEM.h.
Referenced by markCutEdgesByState(), and setCrackGrowthMethod().
|
private |
Definition at line 270 of file XFEM.h.
Referenced by cutMeshWithEFA(), healMesh(), and isElemAtCrackTip().
|
private |
Definition at line 271 of file XFEM.h.
Referenced by cutMeshWithEFA(), and healMesh().
|
private |
Definition at line 269 of file XFEM.h.
Referenced by buildEFAMesh(), cutMeshWithEFA(), getCutPlane(), getFragmentFaces(), getPhysicalVolumeFraction(), getXFEMIntersectionInfo(), healMesh(), isElemCut(), isPointInsidePhysicalDomain(), storeCrackTipOriginAndDirection(), and ~XFEM().
|
private |
Controls amount of debugging output information 0: None 1: Summary 2: Details on modifications to mesh 3: Full dump of element fragment algorithm mesh.
Definition at line 302 of file XFEM.h.
Referenced by cutMeshWithEFA(), healMesh(), and setDebugOutputLevel().
|
private |
Definition at line 295 of file XFEM.h.
Referenced by buildEFAMesh(), cutMeshWithEFA(), getEFAElem2D(), getEFAElem3D(), markCutEdgesByGeometry(), markCutEdgesByState(), markCutFacesByGeometry(), and storeCrackTipOriginAndDirection().
|
private |
Definition at line 275 of file XFEM.h.
Referenced by cutMeshWithEFA(), getCrackTipOrigin(), getCrackTipOriginMap(), healMesh(), markCutEdgesByState(), and storeCrackTipOriginAndDirection().
|
private |
Data structure for storing information about all 2D elements to be cut by geometry.
Definition at line 284 of file XFEM.h.
Referenced by addGeomMarkedElem2D(), clearGeomMarkedElems(), and markCutEdgesByGeometry().
|
private |
Data structure for storing information about all 3D elements to be cut by geometry.
Definition at line 287 of file XFEM.h.
Referenced by addGeomMarkedElem3D(), clearGeomMarkedElems(), and markCutFacesByGeometry().
|
private |
Data structure for storing the elements cut by specific geometric cutters.
Definition at line 290 of file XFEM.h.
Referenced by addGeomMarkedElem2D(), addGeomMarkedElem3D(), cutMeshWithEFA(), and updateHeal().
|
private |
Data structure for storing the GeommetricCutUserObjects and their corresponding id.
Definition at line 293 of file XFEM.h.
Referenced by addGeometricCut(), and getGeometricCutID().
|
private |
Definition at line 267 of file XFEM.h.
Referenced by addGeometricCut(), cutMeshWithEFA(), and healMesh().
|
private |
Definition at line 260 of file XFEM.h.
Referenced by has_secondary_cut(), markCutEdgesByGeometry(), markCutEdgesByState(), and XFEM().
|
private |
Definition at line 273 of file XFEM.h.
Referenced by cutMeshWithEFA(), getXFEMDisplacedCutElemPairs(), and healMesh().
|
private |
Definition at line 272 of file XFEM.h.
Referenced by cutMeshWithEFA(), getXFEMCutElemPairs(), and healMesh().
|
private |
Definition at line 281 of file XFEM.h.
Referenced by addStateMarkedElem(), clearStateMarkedElems(), and markCutEdgesByState().
|
private |
Definition at line 279 of file XFEM.h.
Referenced by addStateMarkedElem(), clearStateMarkedElems(), and markCutEdgesByState().
|
private |
Definition at line 280 of file XFEM.h.
Referenced by addStateMarkedFrag(), clearStateMarkedElems(), and markCutEdgesByState().
|
private |
Definition at line 264 of file XFEM.h.
Referenced by markCutEdgesByState(), and setCrackGrowthMethod().
|
private |
Definition at line 262 of file XFEM.h.
Referenced by getXFEMQRule(), and setXFEMQRule().