MeshCut3DUserObject: (1) reads in a mesh describing the crack surface, (2) uses the mesh to do initial cutting of 3D elements, and (3) grows the mesh based on prescribed growth functions. More...
#include <MeshCut3DUserObject.h>
Public Member Functions | |
MeshCut3DUserObject (const InputParameters ¶meters) | |
virtual void | initialize () override |
virtual const std::vector< Point > | getCrackFrontPoints (unsigned int num_crack_front_points) const override |
get a set of points along a crack front from a XFEM GeometricCutUserObject More... | |
virtual bool | cutElementByGeometry (const Elem *elem, std::vector< Xfem::CutEdge > &cut_edges, std::vector< Xfem::CutNode > &cut_nodes, Real time) const override |
Check to see whether a specified 2D element should be cut based on geometric conditions. More... | |
virtual bool | cutElementByGeometry (const Elem *elem, std::vector< Xfem::CutFace > &cut_faces, Real time) const override |
Check to see whether a specified 3D element should be cut based on geometric conditions. More... | |
virtual bool | cutFragmentByGeometry (std::vector< std::vector< Point >> &frag_edges, std::vector< Xfem::CutEdge > &cut_edges, Real time) const override |
Check to see whether a fragment of a 2D element should be cut based on geometric conditions. More... | |
virtual bool | cutFragmentByGeometry (std::vector< std::vector< Point >> &frag_faces, std::vector< Xfem::CutFace > &cut_faces, Real time) const override |
Check to see whether a fragment of a 3D element should be cut based on geometric conditions. More... | |
virtual void | execute () override |
virtual void | threadJoin (const UserObject &y) override |
virtual void | finalize () override |
unsigned int | getInterfaceID () const |
Get the interface ID for this cutting object. More... | |
void | setInterfaceID (unsigned int interface_id) |
Set the interface ID for this cutting object. More... | |
bool | shouldHealMesh () const |
Should the elements cut by this cutting object be healed in the current time step? More... | |
Protected Member Functions | |
virtual bool | intersectWithEdge (const Point &p1, const Point &p2, const std::vector< Point > &_vertices, Point &pint) const |
Check if a line intersects with an element. More... | |
bool | findIntersection (const Point &p1, const Point &p2, const std::vector< Point > &vertices, Point &pint) const |
Find directional intersection along the positive extension of the vector from p1 to p2. More... | |
bool | isInsideEdge (const Point &p1, const Point &p2, const Point &p) const |
Check if point p is inside the edge p1-p2. More... | |
Real | getRelativePosition (const Point &p1, const Point &p2, const Point &p) const |
Get the relative position of p from p1. More... | |
bool | isInsideCutPlane (const std::vector< Point > &_vertices, const Point &p) const |
Check if point p is inside a plane. More... | |
void | findBoundaryNodes () |
Find boundary nodes of the cutter mesh This is a simple algorithm simply based on the added angle = 360 degrees Works fine for planar cutting surface for curved cutting surface, need to re-work this subroutine to make it more general. More... | |
void | findBoundaryEdges () |
Find boundary edges of the cutter mesh. More... | |
void | sortBoundaryNodes () |
Sort boundary nodes to be in the right order along the boundary. More... | |
Real | findDistance (dof_id_type node1, dof_id_type node2) |
Find distance between two nodes. More... | |
void | refineBoundary () |
If boundary nodes are too sparse, add nodes in between. More... | |
void | findActiveBoundaryNodes () |
Find all active boundary nodes in the cutter mesh Find boundary nodes that will grow; nodes outside of the structural mesh are inactive. More... | |
void | findActiveBoundaryDirection () |
Find growth direction at each active node. More... | |
void | growFront () |
Grow the cutter mesh. More... | |
void | sortFrontNodes () |
Sort the front nodes. More... | |
void | findFrontIntersection () |
Find front-structure intersections. More... | |
void | refineFront () |
Refine the mesh at the front. More... | |
void | triangulation () |
Create tri3 elements between the new front and the old front. More... | |
void | joinBoundary () |
Join active boundaries and inactive boundaries to be the new boundary. More... | |
void | serialize (std::string &serialized_buffer) |
Methods to pack/unpack the _marked_elems_2d and _marked_elems_3d data into a structure suitable for parallel communication. More... | |
void | deserialize (std::vector< std::string > &serialized_buffers) |
Protected Attributes | |
std::unique_ptr< MeshBase > | _cut_mesh |
The cutter mesh. More... | |
const unsigned int | _cut_elem_nnode = 3 |
The cutter mesh has triangluar elements only. More... | |
const unsigned int | _cut_elem_dim = 2 |
MooseMesh & | _mesh |
The structural mesh. More... | |
const unsigned int | _elem_dim = 3 |
The structural mesh must be 3D only. More... | |
const Real | _const_intersection = 0.01 |
Used to define intersection points. More... | |
Real | _size_control |
Used for cutter mesh refinement and front advancement. More... | |
unsigned int | _n_step_growth |
Number of steps to grow the mesh. More... | |
bool | _stop |
variables to help control the work flow More... | |
bool | _grow |
std::vector< dof_id_type > | _boundary |
Boundary nodes of the cutter mesh. More... | |
std::set< Xfem::CutEdge > | _boundary_edges |
Edges at the boundary. More... | |
std::map< dof_id_type, std::vector< dof_id_type > > | _boundary_map |
A map of boundary nodes and their neighbors. More... | |
std::vector< std::vector< dof_id_type > > | _active_boundary |
Active boundary nodes where growth is allowed. More... | |
std::vector< std::vector< Point > > | _active_direction |
Growth direction for active boundaries. More... | |
std::vector< unsigned int > | _inactive_boundary_pos |
Inactive boundary. More... | |
std::vector< std::vector< dof_id_type > > | _front |
New boundary after growth. More... | |
Function & | _func_x |
Parsed functions of front growth. More... | |
Function & | _func_y |
Function & | _func_z |
std::shared_ptr< XFEM > | _xfem |
Pointer to the XFEM controller object. More... | |
unsigned int | _interface_id |
Associated interface id. More... | |
bool | _heal_always |
Heal the mesh. More... | |
std::map< unsigned int, std::vector< Xfem::GeomMarkedElemInfo2D > > | _marked_elems_2d |
Containers with information about all 2D and 3D elements marked for cutting by this object. More... | |
std::map< unsigned int, std::vector< Xfem::GeomMarkedElemInfo3D > > | _marked_elems_3d |
MeshCut3DUserObject: (1) reads in a mesh describing the crack surface, (2) uses the mesh to do initial cutting of 3D elements, and (3) grows the mesh based on prescribed growth functions.
Definition at line 29 of file MeshCut3DUserObject.h.
MeshCut3DUserObject::MeshCut3DUserObject | ( | const InputParameters & | parameters | ) |
Definition at line 44 of file MeshCut3DUserObject.C.
|
overridevirtual |
Check to see whether a specified 2D element should be cut based on geometric conditions.
elem | Pointer to the libMesh element to be considered for cutting |
cut_edges | Data structure filled with information about edges to be cut |
cut_nodes | Data structure filled with information about nodes to be cut |
time | Current simulation time |
Implements GeometricCutUserObject.
Definition at line 112 of file MeshCut3DUserObject.C.
|
overridevirtual |
Check to see whether a specified 3D element should be cut based on geometric conditions.
elem | Pointer to the libMesh element to be considered for cutting |
cut_faces | Data structure filled with information about edges to be cut |
time | Current simulation time |
Implements GeometricCutUserObject.
Definition at line 122 of file MeshCut3DUserObject.C.
|
overridevirtual |
Check to see whether a fragment of a 2D element should be cut based on geometric conditions.
frag_edges | Data structure defining the current fragment to be considered |
cut_edges | Data structure filled with information about fragment edges to be cut |
time | Current simulation time |
Implements GeometricCutUserObject.
Definition at line 194 of file MeshCut3DUserObject.C.
|
overridevirtual |
Check to see whether a fragment of a 3D element should be cut based on geometric conditions.
frag_faces | Data structure defining the current fragment to be considered |
cut_faces | Data structure filled with information about fragment faces to be cut |
time | Current simulation time |
Implements GeometricCutUserObject.
Definition at line 203 of file MeshCut3DUserObject.C.
|
protectedinherited |
Definition at line 222 of file GeometricCutUserObject.C.
Referenced by GeometricCutUserObject::finalize().
|
overridevirtualinherited |
Reimplemented in MovingLineSegmentCutSetUserObject.
Definition at line 67 of file GeometricCutUserObject.C.
Referenced by MovingLineSegmentCutSetUserObject::execute().
|
overridevirtualinherited |
Reimplemented in MovingLineSegmentCutSetUserObject.
Definition at line 254 of file GeometricCutUserObject.C.
Referenced by MovingLineSegmentCutSetUserObject::finalize().
|
protected |
Find growth direction at each active node.
Definition at line 666 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protected |
Find all active boundary nodes in the cutter mesh Find boundary nodes that will grow; nodes outside of the structural mesh are inactive.
Definition at line 606 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protected |
Find boundary edges of the cutter mesh.
Definition at line 361 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protected |
Find boundary nodes of the cutter mesh This is a simple algorithm simply based on the added angle = 360 degrees Works fine for planar cutting surface for curved cutting surface, need to re-work this subroutine to make it more general.
Definition at line 319 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protected |
Find distance between two nodes.
Definition at line 541 of file MeshCut3DUserObject.C.
Referenced by refineBoundary(), refineFront(), and triangulation().
|
protected |
Find front-structure intersections.
Definition at line 778 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protected |
Find directional intersection along the positive extension of the vector from p1 to p2.
Definition at line 244 of file MeshCut3DUserObject.C.
Referenced by findFrontIntersection().
|
overridevirtual |
get a set of points along a crack front from a XFEM GeometricCutUserObject
Implements CrackFrontPointsProvider.
Definition at line 1073 of file MeshCut3DUserObject.C.
|
inlineinherited |
Get the interface ID for this cutting object.
Definition at line 173 of file GeometricCutUserObject.h.
|
protected |
Get the relative position of p from p1.
Definition at line 284 of file MeshCut3DUserObject.C.
|
protected |
Grow the cutter mesh.
Definition at line 733 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
overridevirtual |
Reimplemented from GeometricCutUserObject.
Definition at line 78 of file MeshCut3DUserObject.C.
|
protectedvirtual |
Check if a line intersects with an element.
Definition at line 213 of file MeshCut3DUserObject.C.
|
protected |
Check if point p is inside a plane.
Definition at line 292 of file MeshCut3DUserObject.C.
Referenced by findIntersection(), and intersectWithEdge().
|
protected |
Check if point p is inside the edge p1-p2.
Definition at line 276 of file MeshCut3DUserObject.C.
Referenced by intersectWithEdge().
|
protected |
Join active boundaries and inactive boundaries to be the new boundary.
Definition at line 1033 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protected |
If boundary nodes are too sparse, add nodes in between.
Definition at line 552 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protected |
Refine the mesh at the front.
Definition at line 885 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protectedinherited |
Methods to pack/unpack the _marked_elems_2d and _marked_elems_3d data into a structure suitable for parallel communication.
Definition at line 209 of file GeometricCutUserObject.C.
Referenced by GeometricCutUserObject::finalize().
|
inlineinherited |
Set the interface ID for this cutting object.
the | interface ID |
Definition at line 179 of file GeometricCutUserObject.h.
Referenced by XFEM::addGeometricCut().
|
inlineinherited |
Should the elements cut by this cutting object be healed in the current time step?
Definition at line 186 of file GeometricCutUserObject.h.
|
protected |
Sort boundary nodes to be in the right order along the boundary.
Definition at line 481 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protected |
Sort the front nodes.
Definition at line 772 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
overridevirtualinherited |
Definition at line 133 of file GeometricCutUserObject.C.
|
protected |
Create tri3 elements between the new front and the old front.
Definition at line 946 of file MeshCut3DUserObject.C.
Referenced by initialize().
|
protected |
Active boundary nodes where growth is allowed.
Definition at line 89 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryDirection(), findActiveBoundaryNodes(), growFront(), joinBoundary(), and triangulation().
|
protected |
Growth direction for active boundaries.
Definition at line 92 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryDirection(), and growFront().
|
protected |
Boundary nodes of the cutter mesh.
Definition at line 80 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryNodes(), joinBoundary(), refineBoundary(), and sortBoundaryNodes().
|
protected |
Edges at the boundary.
Definition at line 83 of file MeshCut3DUserObject.h.
Referenced by findBoundaryEdges(), and sortBoundaryNodes().
|
protected |
A map of boundary nodes and their neighbors.
Definition at line 86 of file MeshCut3DUserObject.h.
Referenced by findBoundaryEdges(), findBoundaryNodes(), and sortBoundaryNodes().
|
protected |
Used to define intersection points.
Definition at line 67 of file MeshCut3DUserObject.h.
Referenced by findFrontIntersection().
|
protected |
Definition at line 58 of file MeshCut3DUserObject.h.
Referenced by MeshCut3DUserObject().
|
protected |
The cutter mesh has triangluar elements only.
Definition at line 57 of file MeshCut3DUserObject.h.
Referenced by findBoundaryEdges(), findBoundaryNodes(), MeshCut3DUserObject(), and triangulation().
|
protected |
The cutter mesh.
Definition at line 54 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryDirection(), findActiveBoundaryNodes(), findBoundaryEdges(), findBoundaryNodes(), findDistance(), findFrontIntersection(), growFront(), MeshCut3DUserObject(), refineBoundary(), refineFront(), and triangulation().
|
protected |
The structural mesh must be 3D only.
Definition at line 64 of file MeshCut3DUserObject.h.
|
protected |
New boundary after growth.
Definition at line 98 of file MeshCut3DUserObject.h.
Referenced by findFrontIntersection(), growFront(), joinBoundary(), refineFront(), and triangulation().
|
protected |
Parsed functions of front growth.
Definition at line 203 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryDirection().
|
protected |
Definition at line 204 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryDirection().
|
protected |
Definition at line 205 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryDirection().
|
protected |
Definition at line 77 of file MeshCut3DUserObject.h.
Referenced by initialize(), and MeshCut3DUserObject().
|
protectedinherited |
Heal the mesh.
Definition at line 196 of file GeometricCutUserObject.h.
|
protected |
Inactive boundary.
Definition at line 95 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryDirection(), findActiveBoundaryNodes(), growFront(), initialize(), joinBoundary(), refineFront(), and triangulation().
|
protectedinherited |
Associated interface id.
Definition at line 193 of file GeometricCutUserObject.h.
Referenced by GeometricCutUserObject::finalize(), and GeometricCutUserObject::GeometricCutUserObject().
|
protectedinherited |
Containers with information about all 2D and 3D elements marked for cutting by this object.
Definition at line 199 of file GeometricCutUserObject.h.
Referenced by GeometricCutUserObject::deserialize(), GeometricCutUserObject::execute(), GeometricCutUserObject::finalize(), GeometricCutUserObject::initialize(), GeometricCutUserObject::serialize(), and GeometricCutUserObject::threadJoin().
|
protectedinherited |
|
protected |
The structural mesh.
Definition at line 61 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryNodes(), and findFrontIntersection().
|
protected |
Number of steps to grow the mesh.
Definition at line 73 of file MeshCut3DUserObject.h.
Referenced by initialize(), and MeshCut3DUserObject().
|
protected |
Used for cutter mesh refinement and front advancement.
Definition at line 70 of file MeshCut3DUserObject.h.
Referenced by growFront(), MeshCut3DUserObject(), refineBoundary(), and refineFront().
|
protected |
variables to help control the work flow
Definition at line 76 of file MeshCut3DUserObject.h.
Referenced by findActiveBoundaryNodes(), and initialize().
|
protectedinherited |
Pointer to the XFEM controller object.
Definition at line 186 of file GeometricCutUserObject.h.
Referenced by GeometricCutUserObject::execute(), GeometricCutUserObject::finalize(), and GeometricCutUserObject::GeometricCutUserObject().