Peridynamics mesh class. More...
#include <PeridynamicsMesh.h>
Public Member Functions | |
PeridynamicsMesh (const InputParameters ¶meters) | |
PeridynamicsMesh (const PeridynamicsMesh &)=default | |
PeridynamicsMesh & | operator= (const PeridynamicsMesh &other_mesh)=delete |
virtual std::unique_ptr< MooseMesh > | safeClone () const override |
virtual void | buildMesh () override |
virtual unsigned int | dimension () const override |
dof_id_type | nPDNodes () const |
Function to return number of PD nodes. More... | |
dof_id_type | nPDBonds () const |
Function to return number of PD Edge elements. More... | |
void | createPeridynamicsMeshData (MeshBase &fe_mesh, std::set< dof_id_type > converted_elem_id, std::multimap< SubdomainID, SubdomainID > connect_block_id_pairs, std::multimap< SubdomainID, SubdomainID > non_connect_block_id_pairs) |
Function to assign values to member variables (PD mesh data) of this class this function will be called in the PD mesh generator class. More... | |
std::vector< dof_id_type > | getNeighbors (dof_id_type node_id) |
Function to return neighbor nodes indices for node node_id. More... | |
dof_id_type | getNeighborIndex (dof_id_type node_i, dof_id_type node_j) |
Function to return the local neighbor index of node_j from node_i's neighbor list. More... | |
std::vector< dof_id_type > | getBonds (dof_id_type node_id) |
Function to return the bond number connected with node node_id. More... | |
std::vector< dof_id_type > | getDefGradNeighbors (dof_id_type node_id, unsigned int neighbor_id) |
Function to return indices of neighbors used in formulation of bond-associated deformation gradient for bond connecting node_id and neighbor_id. More... | |
SubdomainID | getNodeBlockID (dof_id_type node_id) |
Function to return block ID for node node_id. More... | |
void | setNodeBlockID (SubdomainID id) |
Function to set block ID for all PD nodes. More... | |
Point | getPDNodeCoord (dof_id_type node_id) |
Function to return coordinates for node node_id. More... | |
std::vector< dof_id_type > | getPDNodeIDToFiniteElemIDMap () |
Function to return the correspondence between PD node IDs and FE element IDs. More... | |
Real | getPDNodeVolume (dof_id_type node_id) |
Function to return nodal volume for node node_id. More... | |
Real | getHorizVolume (dof_id_type node_id) |
Function to return summation of neighbor nodal volumes for node node_id. More... | |
Real | getDefGradVolFraction (dof_id_type node_id, dof_id_type neighbor_id) |
Function to return summation of volumes of bond-associated neighbors used in the deformation gradient calculation for bond connecting node node_id and its neighbor neighbor_id. More... | |
Real | getNodeAvgSpacing (dof_id_type node_id) |
Function to return the average spacing between node node_id with its most adjacent neighbors. More... | |
Real | getHorizon (dof_id_type node_id) |
Function to return horizon size. More... | |
Real | getBoundaryOffset (dof_id_type node_id) |
Function to return offset for boundary nodes. More... | |
Protected Member Functions | |
void | createNodeHorizBasedData (std::multimap< SubdomainID, SubdomainID > connect_block_id_pairs, std::multimap< SubdomainID, SubdomainID > non_connect_block_id_pairs) |
Function to create neighbors and other data for each material point with given horizon. More... | |
bool | checkInterface (SubdomainID pdnode_blockID_i, SubdomainID pdnode_blockID_j, std::multimap< SubdomainID, SubdomainID > blockID_pairs) |
Function to check existence of interface between two blocks. More... | |
void | createNeighborHorizonBasedData () |
Function to create node neighbors and other data for each material point based on NEIGHBOR_HORIZON based horizon partition for deformation gradient calculation. More... | |
bool | checkPointInsideRectangle (Point point, Point rec_p1, Point rec_p2, Real rec_height, Real tol=0) |
Function to check whether a material point falls within a given rectangular crack geometry. More... | |
bool | checkCrackIntersectBond (Point crack_p1, Point crack_p2, Real crack_width, Point bond_p1, Point bond_p2) |
Function to check whether a bond crosses crack surface. More... | |
bool | checkSegmentIntersectSegment (Point seg1_p1, Point seg1_p2, Point seg2_p1, Point seg2_p2) |
Function to check whether a segment crosses another segment. More... | |
Protected Attributes | |
unsigned int & | _dim |
Mesh dimension. More... | |
unsigned int & | _n_pdnodes |
Number of total material points. More... | |
unsigned int & | _n_pdbonds |
Number of total bonds. More... | |
std::vector< std::vector< dof_id_type > > & | _pdnode_neighbors |
Neighbor lists for each material point determined using the horizon. More... | |
std::vector< std::vector< dof_id_type > > & | _pdnode_bonds |
Bond lists associated with material points. More... | |
std::vector< std::vector< std::vector< dof_id_type > > > & | _dg_neighbors |
Neighbor lists for deformation gradient calculation using bond-associated horizon. More... | |
std::vector< std::vector< Real > > & | _dg_vol_frac |
Volume fraction of deformation gradient region to its sum at a node. More... | |
std::map< dof_id_type, Real > & | _boundary_node_offset |
Offset of each boundary node to its original FE element boundary edge or face. More... | |
const Real | _horiz_rad |
Horizon size control parameters. More... | |
const bool | _has_horiz_num |
const Real | _horiz_num |
const Real | _bah_ratio |
const bool | _has_cracks |
Information for crack generation. More... | |
std::vector< Point > | _cracks_start |
std::vector< Point > | _cracks_end |
std::vector< Real > | _cracks_width |
std::vector< Point > | _pdnode_coord |
Data associated with each peridynamics node. More... | |
std::vector< Real > & | _pdnode_avg_spacing |
std::vector< Real > & | _pdnode_horiz_rad |
std::vector< Real > & | _pdnode_vol |
std::vector< Real > & | _pdnode_horiz_vol |
std::vector< SubdomainID > & | _pdnode_blockID |
std::vector< dof_id_type > & | _pdnode_elemID |
Peridynamics mesh class.
Definition at line 25 of file PeridynamicsMesh.h.
PeridynamicsMesh::PeridynamicsMesh | ( | const InputParameters & | parameters | ) |
Definition at line 42 of file PeridynamicsMesh.C.
|
default |
|
overridevirtual |
Definition at line 111 of file PeridynamicsMesh.C.
|
protected |
Function to check whether a bond crosses crack surface.
crack_p1 | Crack starting point |
crack_p2 | Crack ending point |
crack_width | Crack width |
bond_p1 | Bond starting point |
bond_p2 | Bond ending point |
Definition at line 513 of file PeridynamicsMesh.C.
Referenced by createNodeHorizBasedData().
|
protected |
Function to check existence of interface between two blocks.
blockID_i | & blockID_j IDs of two querying blocks |
blockID_pairs | ID pairs of neighboring blocks |
Definition at line 305 of file PeridynamicsMesh.C.
Referenced by createNodeHorizBasedData().
|
protected |
Function to check whether a material point falls within a given rectangular crack geometry.
point | The querying point |
rec_p1 | The center of one edge of a rectangle |
rec_p2 | The center of the opposite edge of the retangle |
rec_height | The distance between the rest two edges of the rectangle |
tol | Acceptable tolerence |
Definition at line 489 of file PeridynamicsMesh.C.
Referenced by createNodeHorizBasedData().
|
protected |
Function to check whether a segment crosses another segment.
seg1_p1 | The starting point of segment 1 |
seg1_p2 | The ending point of segment 1 |
seg2_p1 | The starting point of segment 2 |
seg2_p2 | The ending point of segment 2 |
Definition at line 548 of file PeridynamicsMesh.C.
Referenced by checkCrackIntersectBond().
|
protected |
Function to create node neighbors and other data for each material point based on NEIGHBOR_HORIZON based horizon partition for deformation gradient calculation.
Definition at line 329 of file PeridynamicsMesh.C.
Referenced by createPeridynamicsMeshData().
|
protected |
Function to create neighbors and other data for each material point with given horizon.
connect_block_id_pairs | ID pairs of blocks to be connected via interfacial bonds |
non_connect_block_id_pairs | ID pairs of blocks not to be connected |
Definition at line 237 of file PeridynamicsMesh.C.
Referenced by createPeridynamicsMeshData().
void PeridynamicsMesh::createPeridynamicsMeshData | ( | MeshBase & | fe_mesh, |
std::set< dof_id_type > | converted_elem_id, | ||
std::multimap< SubdomainID, SubdomainID > | connect_block_id_pairs, | ||
std::multimap< SubdomainID, SubdomainID > | non_connect_block_id_pairs | ||
) |
Function to assign values to member variables (PD mesh data) of this class this function will be called in the PD mesh generator class.
fe_mesh | The finite element mesh based on which the peridynamics mesh will be created |
converted_elem_id | The IDs of finite elements to be converted to peridynamics mesh |
Definition at line 138 of file PeridynamicsMesh.C.
Referenced by MeshGeneratorPD::generate().
|
overridevirtual |
Definition at line 120 of file PeridynamicsMesh.C.
Referenced by RBMPresetOldValuePD::shouldApply().
std::vector< dof_id_type > PeridynamicsMesh::getBonds | ( | dof_id_type | node_id | ) |
Function to return the bond number connected with node node_id.
node_id | The querying node index |
Definition at line 382 of file PeridynamicsMesh.C.
Referenced by NodalRankTwoPD::computeNodalTotalStrain(), GhostElemPD::ghostElements(), and RBMPresetOldValuePD::shouldApply().
Real PeridynamicsMesh::getBoundaryOffset | ( | dof_id_type | node_id | ) |
Function to return offset for boundary nodes.
node_id | The querying node index |
Definition at line 480 of file PeridynamicsMesh.C.
Referenced by BoundaryOffsetPD::computeValue().
std::vector< dof_id_type > PeridynamicsMesh::getDefGradNeighbors | ( | dof_id_type | node_id, |
unsigned int | neighbor_id | ||
) |
Function to return indices of neighbors used in formulation of bond-associated deformation gradient for bond connecting node_id and neighbor_id.
node_id | The ID of the node providing the neighbor list |
neighbor_id | The ID of the node querying the neighbor list |
Definition at line 391 of file PeridynamicsMesh.C.
Real PeridynamicsMesh::getDefGradVolFraction | ( | dof_id_type | node_id, |
dof_id_type | neighbor_id | ||
) |
Function to return summation of volumes of bond-associated neighbors used in the deformation gradient calculation for bond connecting node node_id and its neighbor neighbor_id.
node_id | The ID of the node providing the neighbor's bond-associated volume |
neighbor_id | The ID of the querying neighbor |
Definition at line 453 of file PeridynamicsMesh.C.
Referenced by NodalRankTwoUserObjectBasePD::computeValue(), GeneralizedPlaneStrainUserObjectNOSPD::execute(), and PeridynamicsKernelBase::prepare().
Real PeridynamicsMesh::getHorizon | ( | dof_id_type | node_id | ) |
Function to return horizon size.
node_id | The querying node index |
Definition at line 471 of file PeridynamicsMesh.C.
Referenced by NodalRankTwoPD::computeNodalTotalStrain(), PeridynamicsKernelBase::prepare(), PeridynamicsMaterialBase::setupMeshRelatedData(), and RBMPresetOldValuePD::shouldApply().
Real PeridynamicsMesh::getHorizVolume | ( | dof_id_type | node_id | ) |
Function to return summation of neighbor nodal volumes for node node_id.
node_id | The querying node index |
Definition at line 444 of file PeridynamicsMesh.C.
Referenced by NodalDamageIndexPD::computeValue(), and PeridynamicsMaterialBase::setupMeshRelatedData().
dof_id_type PeridynamicsMesh::getNeighborIndex | ( | dof_id_type | node_i, |
dof_id_type | node_j | ||
) |
Function to return the local neighbor index of node_j from node_i's neighbor list.
node_i | The ID of the node providing the neighbor list for query |
node_j | The ID of the node querying the neighbor index |
Definition at line 368 of file PeridynamicsMesh.C.
Referenced by NodalRankTwoUserObjectBasePD::computeValue(), GeneralizedPlaneStrainUserObjectNOSPD::execute(), and PeridynamicsKernelBase::prepare().
std::vector< dof_id_type > PeridynamicsMesh::getNeighbors | ( | dof_id_type | node_id | ) |
Function to return neighbor nodes indices for node node_id.
node_id | The querying node index |
Definition at line 362 of file PeridynamicsMesh.C.
Referenced by HeatSourceBPD::computeLocalResidual(), NodalRankTwoPD::computeNodalTotalStrain(), GeneralizedPlaneStrainUserObjectOSPD::execute(), MeshGeneratorPD::generate(), GhostElemPD::ghostElements(), and RBMPresetOldValuePD::shouldApply().
Real PeridynamicsMesh::getNodeAvgSpacing | ( | dof_id_type | node_id | ) |
Function to return the average spacing between node node_id with its most adjacent neighbors.
node_id | The querying node index |
Definition at line 462 of file PeridynamicsMesh.C.
SubdomainID PeridynamicsMesh::getNodeBlockID | ( | dof_id_type | node_id | ) |
Function to return block ID for node node_id.
node_id | The querying node index |
Definition at line 405 of file PeridynamicsMesh.C.
Referenced by MeshGeneratorPD::generate().
Point PeridynamicsMesh::getPDNodeCoord | ( | dof_id_type | node_id | ) |
Function to return coordinates for node node_id.
node_id | The querying node index |
Definition at line 420 of file PeridynamicsMesh.C.
Referenced by MechanicsMaterialBasePD::computeBondCurrentLength(), PeridynamicsKernelBase::prepare(), and PeridynamicsMaterialBase::setupMeshRelatedData().
std::vector< dof_id_type > PeridynamicsMesh::getPDNodeIDToFiniteElemIDMap | ( | ) |
Function to return the correspondence between PD node IDs and FE element IDs.
Definition at line 429 of file PeridynamicsMesh.C.
Real PeridynamicsMesh::getPDNodeVolume | ( | dof_id_type | node_id | ) |
Function to return nodal volume for node node_id.
node_id | The querying node index |
Definition at line 435 of file PeridynamicsMesh.C.
Referenced by NodalRankTwoPD::computeNodalTotalStrain(), NodalDamageIndexPD::computeValue(), NodalVolumePD::computeValue(), GeneralizedPlaneStrainUserObjectOSPD::execute(), GeneralizedPlaneStrainUserObjectNOSPD::execute(), NodalIntegralPostprocessorBasePD::execute(), PeridynamicsKernelBase::prepare(), PeridynamicsMaterialBase::setupMeshRelatedData(), and RBMPresetOldValuePD::shouldApply().
dof_id_type PeridynamicsMesh::nPDBonds | ( | ) | const |
Function to return number of PD Edge elements.
Definition at line 132 of file PeridynamicsMesh.C.
Referenced by MeshGeneratorPD::generate().
dof_id_type PeridynamicsMesh::nPDNodes | ( | ) | const |
Function to return number of PD nodes.
Definition at line 126 of file PeridynamicsMesh.C.
Referenced by MeshGeneratorPD::generate().
|
delete |
|
overridevirtual |
Definition at line 105 of file PeridynamicsMesh.C.
void PeridynamicsMesh::setNodeBlockID | ( | SubdomainID | id | ) |
Function to set block ID for all PD nodes.
id | The subdomain ID for all PD nodes |
Definition at line 414 of file PeridynamicsMesh.C.
Referenced by MeshGeneratorPD::generate().
|
protected |
Definition at line 169 of file PeridynamicsMesh.h.
Referenced by createNeighborHorizonBasedData().
|
protected |
Offset of each boundary node to its original FE element boundary edge or face.
Definition at line 211 of file PeridynamicsMesh.h.
Referenced by createPeridynamicsMeshData(), and getBoundaryOffset().
|
protected |
Definition at line 175 of file PeridynamicsMesh.h.
Referenced by createNodeHorizBasedData(), and PeridynamicsMesh().
|
protected |
Definition at line 174 of file PeridynamicsMesh.h.
Referenced by createNodeHorizBasedData(), and PeridynamicsMesh().
|
protected |
Definition at line 176 of file PeridynamicsMesh.h.
Referenced by createNodeHorizBasedData(), and PeridynamicsMesh().
|
protected |
Neighbor lists for deformation gradient calculation using bond-associated horizon.
Definition at line 205 of file PeridynamicsMesh.h.
Referenced by createNeighborHorizonBasedData(), createPeridynamicsMeshData(), and getDefGradNeighbors().
|
protected |
Volume fraction of deformation gradient region to its sum at a node.
Definition at line 208 of file PeridynamicsMesh.h.
Referenced by createNeighborHorizonBasedData(), createPeridynamicsMeshData(), and getDefGradVolFraction().
|
protected |
Mesh dimension.
Definition at line 180 of file PeridynamicsMesh.h.
Referenced by createPeridynamicsMeshData(), dimension(), and getDefGradNeighbors().
|
protected |
Information for crack generation.
Definition at line 173 of file PeridynamicsMesh.h.
Referenced by PeridynamicsMesh().
|
protected |
Definition at line 167 of file PeridynamicsMesh.h.
Referenced by createPeridynamicsMeshData(), and PeridynamicsMesh().
|
protected |
Definition at line 168 of file PeridynamicsMesh.h.
Referenced by createPeridynamicsMeshData().
|
protected |
Horizon size control parameters.
Definition at line 166 of file PeridynamicsMesh.h.
Referenced by createPeridynamicsMeshData().
|
protected |
Number of total bonds.
Definition at line 186 of file PeridynamicsMesh.h.
Referenced by createPeridynamicsMeshData(), and nPDBonds().
|
protected |
Number of total material points.
Definition at line 183 of file PeridynamicsMesh.h.
Referenced by createNeighborHorizonBasedData(), createNodeHorizBasedData(), createPeridynamicsMeshData(), getBonds(), getDefGradNeighbors(), getDefGradVolFraction(), getHorizon(), getHorizVolume(), getNodeAvgSpacing(), getNodeBlockID(), getPDNodeCoord(), getPDNodeVolume(), nPDNodes(), and setNodeBlockID().
|
protected |
Definition at line 190 of file PeridynamicsMesh.h.
Referenced by createPeridynamicsMeshData(), and getNodeAvgSpacing().
|
protected |
Definition at line 194 of file PeridynamicsMesh.h.
Referenced by createNodeHorizBasedData(), createPeridynamicsMeshData(), getNodeBlockID(), and setNodeBlockID().
|
protected |
Bond lists associated with material points.
Definition at line 202 of file PeridynamicsMesh.h.
Referenced by createPeridynamicsMeshData(), and getBonds().
|
protected |
Data associated with each peridynamics node.
Definition at line 189 of file PeridynamicsMesh.h.
Referenced by createNeighborHorizonBasedData(), createNodeHorizBasedData(), createPeridynamicsMeshData(), and getPDNodeCoord().
|
protected |
Definition at line 195 of file PeridynamicsMesh.h.
Referenced by createPeridynamicsMeshData(), and getPDNodeIDToFiniteElemIDMap().
|
protected |
Definition at line 191 of file PeridynamicsMesh.h.
Referenced by createNeighborHorizonBasedData(), createNodeHorizBasedData(), createPeridynamicsMeshData(), and getHorizon().
|
protected |
Definition at line 193 of file PeridynamicsMesh.h.
Referenced by createNodeHorizBasedData(), createPeridynamicsMeshData(), and getHorizVolume().
|
protected |
Neighbor lists for each material point determined using the horizon.
Definition at line 199 of file PeridynamicsMesh.h.
Referenced by createNeighborHorizonBasedData(), createNodeHorizBasedData(), createPeridynamicsMeshData(), getNeighborIndex(), and getNeighbors().
|
protected |
Definition at line 192 of file PeridynamicsMesh.h.
Referenced by createNeighborHorizonBasedData(), createNodeHorizBasedData(), createPeridynamicsMeshData(), and getPDNodeVolume().