https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
THMMesh Class Reference

Mesh for THM. More...

#include <THMMesh.h>

Inheritance diagram for THMMesh:
[legend]

Public Types

enum  ParallelType
 
typedef std::pair< const Node *, BoundaryIDPeriodicNodeInfo
 
typedef DataFileName DataFileParameterType
 

Public Member Functions

 THMMesh (const InputParameters &parameters)
 
 THMMesh (const THMMesh &other_mesh)
 
virtual unsigned int dimension () const override
 
virtual unsigned int effectiveSpatialDimension () const override
 
virtual std::unique_ptr< MooseMeshsafeClone () const override
 
virtual void buildMesh () override
 
NodeaddNode (const Point &pt)
 Add a new node into the mesh.
 
ElemaddElement (libMesh::ElemType elem_type, const std::vector< dof_id_type > &node_ids)
 Add a new element into the mesh.
 
ElemaddNodeElement (dof_id_type node)
 
ElemaddElementEdge2 (dof_id_type node0, dof_id_type node1)
 
ElemaddElementEdge3 (dof_id_type node0, dof_id_type node1, dof_id_type node2)
 
ElemaddElementQuad4 (dof_id_type node0, dof_id_type node1, dof_id_type node2, dof_id_type node3)
 
ElemaddElementQuad9 (dof_id_type node0, dof_id_type node1, dof_id_type node2, dof_id_type node3, dof_id_type node4, dof_id_type node5, dof_id_type node6, dof_id_type node7, dof_id_type node8)
 
virtual SubdomainID getNextSubdomainId ()
 Gets the next subdomain ID.
 
virtual BoundaryID getNextBoundaryId ()
 Gets the next nodeset or sideset ID.
 
virtual MooseMeshclone () const
 
void determineUseDistributedMesh ()
 
std::unique_ptr< MeshBase > buildMeshBaseObject (unsigned int dim=libMesh::invalid_uint)
 
std::unique_ptr< TbuildTypedMesh (unsigned int dim=libMesh::invalid_uint)
 
void setMeshBase (std::unique_ptr< MeshBase > mesh_base)
 
virtual void init ()
 
virtual std::vector< std::filesystem::path > writeRecoveryFiles (const std::filesystem::path &file_base)
 
virtual unsigned int spatialDimension () const
 
unsigned int getBlocksMaxDimension (const std::vector< SubdomainName > &blocks) const
 
std::vector< BoundaryIDgetBoundaryIDs (const Elem *const elem, const unsigned short int side) const
 
std::vector< std::vector< BoundaryID > > getBoundaryIDs (const Elem *const elem) const
 
const std::set< BoundaryID > & getBoundaryIDs () const
 
std::vector< BoundaryIDgetBoundaryIDs (const std::vector< BoundaryName > &boundary_name, bool generate_unknown=false) const
 
const Elem * getLowerDElem (const Elem *, unsigned short int) const
 
unsigned int getHigherDSide (const Elem *elem) const
 
void buildNodeList ()
 
void buildBndElemList ()
 
const std::unordered_map< dof_id_type, std::vector< dof_id_type > > & nodeToElemMap ()
 
virtual bnd_node_iterator bndNodesBegin ()
 
virtual bnd_node_iterator bndNodesEnd ()
 
virtual bnd_elem_iterator bndElemsBegin ()
 
virtual bnd_elem_iterator bndElemsEnd ()
 
void buildNodeListFromSideList ()
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildSideList ()
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList () const
 
unsigned int sideWithBoundaryID (const Elem *const elem, const BoundaryID boundary_id) const
 
MeshBase::node_iterator localNodesBegin ()
 
MeshBase::const_node_iterator localNodesBegin () const
 
MeshBase::node_iterator localNodesEnd ()
 
MeshBase::const_node_iterator localNodesEnd () const
 
MeshBase::element_iterator activeLocalElementsBegin ()
 
MeshBase::const_element_iterator activeLocalElementsBegin () const
 
const MeshBase::element_iterator activeLocalElementsEnd ()
 
const MeshBase::const_element_iterator activeLocalElementsEnd () const
 
virtual dof_id_type nNodes () const
 
virtual dof_id_type nElem () const
 
virtual dof_id_type nLocalNodes () const
 
virtual dof_id_type nActiveElem () const
 
virtual dof_id_type nActiveLocalElem () const
 
virtual SubdomainID nSubdomains () const
 
virtual unsigned int nPartitions () const
 
virtual bool skipPartitioning () const
 
virtual bool skipNoncriticalPartitioning () const
 
virtual dof_id_type maxNodeId () const
 
virtual dof_id_type maxElemId () const
 
virtual const Node & node (const dof_id_type i) const
 
virtual Node & node (const dof_id_type i)
 
virtual const Node & nodeRef (const dof_id_type i) const
 
virtual Node & nodeRef (const dof_id_type i)
 
virtual const Node * nodePtr (const dof_id_type i) const
 
virtual Node * nodePtr (const dof_id_type i)
 
virtual const Node * queryNodePtr (const dof_id_type i) const
 
virtual Node * queryNodePtr (const dof_id_type i)
 
virtual Elem * elem (const dof_id_type i)
 
virtual const Elem * elem (const dof_id_type i) const
 
virtual Elem * elemPtr (const dof_id_type i)
 
virtual const Elem * elemPtr (const dof_id_type i) const
 
virtual Elem * queryElemPtr (const dof_id_type i)
 
virtual const Elem * queryElemPtr (const dof_id_type i) const
 
bool prepared () const
 
virtual void prepared (bool state)
 
void needsPrepareForUse ()
 
void meshChanged ()
 
virtual void onMeshChanged ()
 
void cacheChangedLists ()
 
ConstElemPointerRangerefinedElementRange () const
 
ConstElemPointerRangecoarsenedElementRange () const
 
const std::vector< const Elem * > & coarsenedElementChildren (const Elem *elem) const
 
void updateActiveSemiLocalNodeRange (std::set< dof_id_type > &ghosted_elems)
 
bool isSemiLocal (Node *const node) const
 
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToElems () const
 
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToActiveSemiLocalElemIds () const
 
std::unordered_set< dof_id_type > getBoundaryActiveSemiLocalElemIds (BoundaryID bid) const
 
std::unordered_set< dof_id_type > getBoundaryActiveNeighborElemIds (BoundaryID bid) const
 
bool isBoundaryFullyExternalToSubdomains (BoundaryID bid, const std::set< SubdomainID > &blk_group) const
 
const std::set< SubdomainID > & meshSubdomains () const
 
const std::set< BoundaryID > & meshBoundaryIds () const
 
const std::set< BoundaryID > & meshSidesetIds () const
 
const std::set< BoundaryID > & meshNodesetIds () const
 
void setBoundaryToNormalMap (std::unique_ptr< std::map< BoundaryID, RealVectorValue > > boundary_map)
 
void setBoundaryToNormalMap (std::map< BoundaryID, RealVectorValue > *boundary_map)
 
void setMeshBoundaryIDs (std::set< BoundaryID > boundary_IDs)
 
const RealVectorValue & getNormalByBoundaryID (BoundaryID id) const
 
bool prepare (const MeshBase *mesh_to_clone)
 
void update ()
 
unsigned int uniformRefineLevel () const
 
void setUniformRefineLevel (unsigned int, bool deletion=true)
 
bool skipDeletionRepartitionAfterRefine () const
 
bool skipRefineWhenUseSplit () const
 
void addGhostedBoundary (BoundaryID boundary_id)
 
void setGhostedBoundaryInflation (const std::vector< Real > &inflation)
 
const std::set< unsigned int > & getGhostedBoundaries () const
 
const std::vector< Real > & getGhostedBoundaryInflation () const
 
void ghostGhostedBoundaries ()
 
void needGhostGhostedBoundaries (bool needghost)
 
unsigned int getPatchSize () const
 
unsigned int getGhostingPatchSize () const
 
unsigned int getMaxLeafSize () const
 
void setPatchUpdateStrategy (Moose::PatchUpdateType patch_update_strategy)
 
const Moose::PatchUpdateTypegetPatchUpdateStrategy () const
 
libMesh::BoundingBox getInflatedProcessorBoundingBox (Real inflation_multiplier=0.01) const
 
 operator libMesh::MeshBase & ()
 
 operator const libMesh::MeshBase & () const
 
MeshBase & getMesh ()
 
MeshBase & getMesh (const std::string &name)
 
const MeshBase & getMesh () const
 
const MeshBase & getMesh (const std::string &name) const
 
const MeshBase * getMeshPtr () const
 
Moose::Kokkos::MeshgetKokkosMesh ()
 
const Moose::Kokkos::MeshgetKokkosMesh () const
 
void printInfo (std::ostream &os=libMesh::out, const unsigned int verbosity=0) const
 
const std::set< SubdomainID > & getNodeBlockIds (const Node &node) const
 
const std::vector< dof_id_type > & getNodeList (boundary_id_type nodeset_id) const
 
const Node * addUniqueNode (const Point &p, Real tol=1e-6)
 
Node * addQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
 
Node * getQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp)
 
void clearQuadratureNodes ()
 
BoundaryID getBoundaryID (const BoundaryName &boundary_name) const
 
SubdomainID getSubdomainID (const SubdomainName &subdomain_name) const
 
std::vector< SubdomainIDgetSubdomainIDs (const std::vector< SubdomainName > &subdomain_names) const
 
std::set< SubdomainIDgetSubdomainIDs (const std::set< SubdomainName > &subdomain_names) const
 
void setSubdomainName (SubdomainID subdomain_id, const SubdomainName &name)
 
const std::string & getSubdomainName (SubdomainID subdomain_id) const
 
std::vector< SubdomainName > getSubdomainNames (const std::vector< SubdomainID > &subdomain_ids) const
 
void setBoundaryName (BoundaryID boundary_id, BoundaryName name)
 
const std::string & getBoundaryName (const BoundaryID boundary_id) const
 
std::string getBoundaryString (const BoundaryID boundary_id) const
 
void buildPeriodicNodeMap (std::multimap< dof_id_type, dof_id_type > &periodic_node_map, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
 
void buildPeriodicNodeSets (std::map< BoundaryID, std::set< dof_id_type > > &periodic_node_sets, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
 
Real dimensionWidth (unsigned int component) const
 
bool detectOrthogonalDimRanges (Real tol=1e-6)
 
void addPeriodicVariable (const unsigned int sys_num, const unsigned int var_num, const BoundaryID primary, const BoundaryID secondary)
 
const std::array< bool, 3 > & queryPeriodicDimensions (const unsigned int sys_num, const unsigned int var_num) const
 
const std::array< bool, 3 > & queryPeriodicDimensions (const MooseVariableBase &var) const
 
bool isTranslatedPeriodic (const unsigned int sys_num, const unsigned int var_num, const unsigned int component) const
 
bool isTranslatedPeriodic (const MooseVariableBase &var, const unsigned int component) const
 
bool isTranslatedPeriodic (const unsigned int var_num, const unsigned int component) const
 
RealVectorValue minPeriodicVector (const unsigned int sys_num, const unsigned int var_num, Point p, Point q) const
 
RealVectorValue minPeriodicVector (const MooseVariableBase &var, const Point &p, const Point &q) const
 
RealVectorValue minPeriodicVector (const unsigned int var_num, const Point &p, const Point &q) const
 
Real minPeriodicDistance (const unsigned int sys_num, const unsigned int var_num, const Point &p, const Point &q) const
 
Real minPeriodicDistance (const MooseVariableBase &var, const Point &p, const Point &q) const
 
Real minPeriodicDistance (const unsigned int var_num, const Point &p, const Point &q) const
 
void detectPairedSidesets ()
 
bool hasDetectedPairedSidesets () const
 
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping (unsigned int component) const
 
void buildRefinementAndCoarseningMaps (Assembly *assembly)
 
const std::vector< std::vector< QpMap > > & getRefinementMap (const Elem &elem, int parent_side, int child, int child_side)
 
const std::vector< std::pair< unsigned int, QpMap > > & getCoarseningMap (const Elem &elem, int input_side)
 
void changeBoundaryId (const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 
const std::set< BoundaryID > & getSubdomainBoundaryIds (const SubdomainID subdomain_id) const
 
std::set< BoundaryIDgetSubdomainInterfaceBoundaryIds (const SubdomainID subdomain_id) const
 
std::set< SubdomainIDgetBoundaryConnectedBlocks (const BoundaryID bid) const
 
std::set< SubdomainIDgetBoundaryConnectedSecondaryBlocks (const BoundaryID bid) const
 
std::set< SubdomainIDgetInterfaceConnectedBlocks (const BoundaryID bid) const
 
const std::set< SubdomainID > & getBlockConnectedBlocks (const SubdomainID subdomain_id) const
 
bool isBoundaryNode (dof_id_type node_id) const
 
bool isBoundaryNode (dof_id_type node_id, BoundaryID bnd_id) const
 
bool isBoundaryElem (dof_id_type elem_id) const
 
bool isBoundaryElem (dof_id_type elem_id, BoundaryID bnd_id) const
 
void errorIfDistributedMesh (std::string name) const
 
virtual bool isDistributedMesh () const
 
bool isParallelTypeForced () const
 
void setParallelType (ParallelType parallel_type)
 
ParallelType getParallelType () const
 
const MooseEnumpartitionerName () const
 
bool isPartitionerForced () const
 
void allowRecovery (bool allow)
 
void setCustomPartitioner (libMesh::Partitioner *partitioner)
 
bool isRegularOrthogonal ()
 
bool hasSecondOrderElements ()
 
virtual std::unique_ptr< libMesh::PointLocatorBasegetPointLocator () const
 
virtual std::string getFileName () const
 
void needsRemoteElemDeletion (bool need_delete)
 
bool needsRemoteElemDeletion () const
 
void allowRemoteElementRemoval (bool allow_removal)
 
bool allowRemoteElementRemoval () const
 
void deleteRemoteElements ()
 
bool hasMeshBase () const
 
bool hasElementID (const std::string &id_name) const
 
unsigned int getElementIDIndex (const std::string &id_name) const
 
dof_id_type maxElementID (unsigned int elem_id_index) const
 
dof_id_type minElementID (unsigned int elem_id_index) const
 
bool areElemIDsIdentical (const std::string &id_name1, const std::string &id_name2) const
 
std::set< dof_id_type > getAllElemIDs (unsigned int elem_id_index) const
 
std::set< dof_id_type > getElemIDsOnBlocks (unsigned int elem_id_index, const std::set< SubdomainID > &blks) const
 
unsigned int getMaxSidesPerElem () const
 
unsigned int getMaxNodesPerElem () const
 
unsigned int getMaxNodesPerSide () const
 
std::unordered_map< dof_id_type, std::set< dof_id_type > > getElemIDMapping (const std::string &from_id_name, const std::string &to_id_name) const
 
void cacheFaceInfoVariableOwnership () const
 
void cacheFVElementalDoFs () const
 
void computeFiniteVolumeCoords () const
 
void isDisplaced (bool is_displaced)
 
bool isDisplaced () const
 
const std::map< boundary_id_type, std::vector< dof_id_type > > & nodeSetNodes () const
 
Moose::CoordinateSystemType getCoordSystem (SubdomainID sid) const
 
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem () const
 
Moose::CoordinateSystemType getUniqueCoordSystem () const
 
void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 
void setGeneralAxisymmetricCoordAxes (const std::vector< SubdomainName > &blocks, const std::vector< std::pair< Point, RealVectorValue > > &axes)
 
const std::pair< Point, RealVectorValue > & getGeneralAxisymmetricCoordAxis (SubdomainID subdomain_id) const
 
bool usingGeneralAxisymmetricCoordAxes () const
 
unsigned int getAxisymmetricRadialCoord () const
 
void checkCoordinateSystems ()
 
void setCoordData (const MooseMesh &other_mesh)
 
void markFiniteVolumeInfoDirty ()
 
bool isFiniteVolumeInfoDirty () const
 
MooseAppCoordTransformcoordTransform ()
 
const MooseUnitslengthUnit () const
 
const std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > & getLowerDElemMap () const
 
bool isSplit () const
 
void buildFiniteVolumeInfo () const
 
void setupFiniteVolumeMeshData () const
 
void doingPRefinement (bool doing_p_refinement)
 
bool doingPRefinement () const
 
unsigned int maxPLevel () const
 
unsigned int maxHLevel () const
 
const std::vector< QpMap > & getPRefinementMap (const Elem &elem) const
 
const std::vector< QpMap > & getPRefinementSideMap (const Elem &elem) const
 
const std::vector< QpMap > & getPCoarseningMap (const Elem &elem) const
 
const std::vector< QpMap > & getPCoarseningSideMap (const Elem &elem) const
 
void buildPRefinementAndCoarseningMaps (Assembly *assembly)
 
bool hasLowerD () const
 
const std::set< SubdomainID > & interiorLowerDBlocks () const
 
const std::set< SubdomainID > & boundaryLowerDBlocks () const
 
bool getConstructNodeListFromSideList ()
 
bool getDisplaceNodeListBySideList ()
 
bool possiblyRebuildNodeToElemMap ()
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
bool isKokkosObject () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
PerfGraphperfGraph ()
 
const libMesh::ConstElemRangegetActiveLocalElementRange ()
 
const libMesh::ConstElemRangegetActiveLocalElementRange ()
 
libMesh::NodeRangegetActiveNodeRange ()
 
libMesh::NodeRangegetActiveNodeRange ()
 
SemiLocalNodeRangegetActiveSemiLocalNodeRange () const
 
SemiLocalNodeRangegetActiveSemiLocalNodeRange () const
 
libMesh::ConstNodeRangegetLocalNodeRange ()
 
libMesh::ConstNodeRangegetLocalNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange ()
 
virtual Real getMinInDimension (unsigned int component) const
 
virtual Real getMinInDimension (unsigned int component) const
 
virtual Real getMaxInDimension (unsigned int component) const
 
virtual Real getMaxInDimension (unsigned int component) const
 
bool isCustomPartitionerRequested () const
 
bool isCustomPartitionerRequested () const
 
void setIsCustomPartitionerRequested (bool cpr)
 
void setIsCustomPartitionerRequested (bool cpr)
 
unsigned int nFace () const
 
unsigned int nFace () const
 
const std::vector< const FaceInfo * > & faceInfo () const
 
const FaceInfofaceInfo (const Elem *elem, unsigned int side) const
 
const std::vector< const FaceInfo * > & faceInfo () const
 
const FaceInfofaceInfo (const Elem *elem, unsigned int side) const
 
face_info_iterator ownedFaceInfoBegin ()
 
face_info_iterator ownedFaceInfoBegin ()
 
face_info_iterator ownedFaceInfoEnd ()
 
face_info_iterator ownedFaceInfoEnd ()
 
elem_info_iterator ownedElemInfoBegin ()
 
elem_info_iterator ownedElemInfoBegin ()
 
elem_info_iterator ownedElemInfoEnd ()
 
elem_info_iterator ownedElemInfoEnd ()
 
const ElemInfoelemInfo (const dof_id_type id) const
 
const ElemInfoelemInfo (const dof_id_type id) const
 
const std::vector< const ElemInfo * > & elemInfoVector () const
 
const std::vector< const ElemInfo * > & elemInfoVector () const
 
const std::vector< FaceInfo > & allFaceInfo () const
 
const std::vector< FaceInfo > & allFaceInfo () const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void setSubdomainName (MeshBase &mesh, SubdomainID subdomain_id, const SubdomainName &name)
 
static void changeBoundaryId (MeshBase &mesh, const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 
static MooseEnum partitioning ()
 
static MooseEnum elemTypes ()
 
static void setPartitioner (MeshBase &mesh_base, MooseEnum &partitioner, bool use_distributed_mesh, const InputParameters &params, MooseObject &context_obj)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const BoundaryName INVALID_BOUNDARY_ID = "invalid_boundary_id"
 
static const std::array< bool, 3 > periodic_dim_default
 
static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 

Protected Types

typedef std::vector< BndNode * >::iterator bnd_node_iterator_imp
 
typedef std::vector< BndNode * >::const_iterator const_bnd_node_iterator_imp
 
typedef std::vector< BndElement * >::iterator bnd_elem_iterator_imp
 
typedef std::vector< BndElement * >::const_iterator const_bnd_elem_iterator_imp
 

Protected Member Functions

virtual dof_id_type getNextNodeId ()
 Gets the next node ID.
 
virtual dof_id_type getNextElementId ()
 Gets the next element ID.
 
bool allowRecovery () const
 
void cacheInfo ()
 
void freeBndNodes ()
 
void freeBndElems ()
 
void setPartitionerHelper (MeshBase *mesh=nullptr)
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
TdeclareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< TdeclareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const TgetRestartableData (const std::string &data_name) const
 
TdeclareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
TdeclareRecoverableData (const std::string &data_name, Args &&... args)
 
TdeclareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
TdeclareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 

Protected Attributes

unsigned int _dim
 The dimension of the mesh.
 
dof_id_type _next_node_id
 The next node ID in the mesh (used for mesh generation)
 
dof_id_type _next_element_id
 The next element ID in the mesh (used for mesh generation)
 
SubdomainID _next_subdomain_id
 The next subdomain ID in the mesh (used for mesh generation)
 
BoundaryID _next_boundary_id
 The next boundary ID in the mesh (used for mesh generation)
 
 X
 
 Y
 
 Z
 
 MIN
 
 MAX
 
std::vector< std::unique_ptr< libMesh::GhostingFunctor > > _ghosting_functors
 
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
 
bool _built_from_other_mesh
 
ParallelType _parallel_type
 
bool _use_distributed_mesh
 
bool _distribution_overridden
 
bool _parallel_type_overridden
 
std::unique_ptr< libMesh::MeshBase_mesh
 
std::unique_ptr< Moose::Kokkos::Mesh_kokkos_mesh
 
MooseEnum _partitioner_name
 
bool _partitioner_overridden
 
std::unique_ptr< libMesh::Partitioner_custom_partitioner
 
bool _custom_partitioner_requested
 
unsigned int _uniform_refine_level
 
bool _skip_refine_when_use_split
 
bool _skip_deletion_repartition_after_refine
 
bool _is_changed
 
bool _is_nemesis
 
bool _moose_mesh_prepared
 
std::unique_ptr< ConstElemPointerRange_refined_elements
 
std::unique_ptr< ConstElemPointerRange_coarsened_elements
 
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
 
std::set< Node * > _semilocal_node_list
 
std::unique_ptr< SemiLocalNodeRange_active_semilocal_node_range
 
std::unique_ptr< libMesh::NodeRange_active_node_range
 
std::unique_ptr< libMesh::ConstNodeRange_local_node_range
 
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
 
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
 
std::unordered_map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
 
bool _node_to_elem_map_built
 
std::set< SubdomainID_mesh_subdomains
 
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
 
std::vector< BndNode * > _bnd_nodes
 
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
 
std::vector< BndElement * > _bnd_elems
 
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
 
std::map< dof_id_type, Node * > _quadrature_nodes
 
std::map< dof_id_type, std::map< unsigned int, std::map< dof_id_type, Node * > > > _elem_to_side_to_qp_to_quadrature_nodes
 
std::vector< BndNode_extra_bnd_nodes
 
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
 
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
 
std::set< unsigned int_ghosted_boundaries
 
std::vector< Real > _ghosted_boundaries_inflation
 
unsigned int _patch_size
 
unsigned int _ghosting_patch_size
 
unsigned int _max_leaf_size
 
Moose::PatchUpdateType _patch_update_strategy
 
std::vector< Node * > _node_map
 
bool _regular_orthogonal_mesh
 
std::vector< std::vector< Real > > _bounds
 
std::optional< std::vector< std::pair< BoundaryID, BoundaryID > > > _paired_boundary
 
const bool _is_split
 
const bool & _enabled
 
MooseApp_app
 
Factory_factory
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
std::set< BoundaryID_mesh_boundary_ids
 
std::set< BoundaryID_mesh_sideset_ids
 
std::set< BoundaryID_mesh_nodeset_ids
 
const Parallel::Communicator & _communicator
 

Private Member Functions

std::unordered_map< dof_id_type, std::vector< dof_id_type > > & internalNodeToElemMap ()
 
void buildRefinementMap (const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int parent_side, int child, int child_side)
 
void buildCoarseningMap (const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int input_side)
 
void mapPoints (const std::vector< Point > &from, const std::vector< Point > &to, std::vector< QpMap > &qp_map)
 
void findAdaptivityQpMaps (const Elem *template_elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, std::vector< std::vector< QpMap > > &refinement_map, std::vector< std::pair< unsigned int, QpMap > > &coarsen_map, int parent_side, int child, int child_side)
 
void buildHRefinementAndCoarseningMaps (Assembly *assembly)
 
const std::vector< QpMap > & getPRefinementMapHelper (const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > &) const
 
const std::vector< QpMap > & getPCoarseningMapHelper (const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > &) const
 
void updateCoordTransform ()
 
void checkDuplicateSubdomainNames ()
 
void computeMaxPerElemAndSide ()
 
void buildElemIDInfo ()
 
void buildLowerDMesh ()
 
RestartableDataValueregisterRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

std::unordered_map< dof_id_type, ElemInfo_elem_to_elem_info
 
std::vector< const ElemInfo * > _elem_info
 
std::vector< FaceInfo_all_face_info
 
std::vector< const FaceInfo * > _face_info
 
std::unordered_map< std::pair< const Elem *, unsigned int >, FaceInfo * > _elem_side_to_face_info
 
bool _finite_volume_info_dirty
 
bool _linear_finite_volume_dofs_cached
 
std::map< std::pair< unsigned int, unsigned int >, std::array< bool, 3 > > _periodic_dim
 
RealVectorValue _half_range
 
std::vector< Node * > _extreme_nodes
 
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::vector< QpMap > > > _elem_type_to_refinement_map
 
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
 
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
 
std::map< libMesh::ElemType, std::map< std::pair< int, int >, std::vector< std::vector< QpMap > > > > _elem_type_to_child_side_refinement_map
 
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::pair< unsigned int, QpMap > > > _elem_type_to_coarsening_map
 
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
 
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_side_map
 
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
 
std::unordered_map< SubdomainID, std::set< BoundaryID > > _neighbor_subdomain_boundary_ids
 
std::set< SubdomainID_lower_d_interior_blocks
 
std::set< SubdomainID_lower_d_boundary_blocks
 
std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > _higher_d_elem_side_to_lower_d_elem
 
std::unordered_map< const Elem *, unsigned short int_lower_d_elem_to_higher_d_elem_side
 
bool _allow_recovery
 
bool _construct_node_list_from_side_list
 
bool _displace_node_list_by_side_list
 
bool _need_delete
 
bool _allow_remote_element_removal
 
std::set< Elem * > _ghost_elems_from_ghost_boundaries
 
bool _need_ghost_ghosted_boundaries
 
std::vector< std::unordered_map< SubdomainID, std::set< dof_id_type > > > _block_id_mapping
 
std::vector< dof_id_type > _max_ids
 
std::vector< dof_id_type > _min_ids
 
std::vector< std::vector< bool > > _id_identical_flag
 
unsigned int _max_sides_per_elem
 
unsigned int _max_nodes_per_elem
 
unsigned int _max_nodes_per_side
 
bool _is_displaced
 
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
 
unsigned int _rz_coord_axis
 
std::unordered_map< SubdomainID, std::pair< Point, RealVectorValue > > _subdomain_id_to_rz_coord_axis
 
std::unique_ptr< MooseAppCoordTransform_coord_transform
 
bool _coord_system_set
 
std::vector< SubdomainName > _provided_coord_blocks
 
bool _doing_p_refinement
 
unsigned int _max_p_level
 
unsigned int _max_h_level
 
const ParallelParamObject_parent
 
const MooseBase_si_moose_base
 
const FEProblemBase_si_problem
 
const RestartableDataMapName _metaname
 
std::string _restartable_name
 

Detailed Description

Mesh for THM.

Definition at line 18 of file THMMesh.h.

Constructor & Destructor Documentation

◆ THMMesh() [1/2]

THMMesh::THMMesh ( const InputParameters parameters)

Definition at line 36 of file THMMesh.C.

38 _dim(getParam<MooseEnum>("dim")),
43{
44}
const InputParameters & parameters() const
MooseMesh()=delete
SubdomainID _next_subdomain_id
The next subdomain ID in the mesh (used for mesh generation)
Definition THMMesh.h:67
dof_id_type _next_element_id
The next element ID in the mesh (used for mesh generation)
Definition THMMesh.h:65
BoundaryID _next_boundary_id
The next boundary ID in the mesh (used for mesh generation)
Definition THMMesh.h:69
unsigned int _dim
The dimension of the mesh.
Definition THMMesh.h:60
dof_id_type _next_node_id
The next node ID in the mesh (used for mesh generation)
Definition THMMesh.h:63

◆ THMMesh() [2/2]

THMMesh::THMMesh ( const THMMesh other_mesh)

Definition at line 46 of file THMMesh.C.

47 : MooseMesh(other_mesh),
48 _dim(other_mesh._dim),
49 _next_node_id(other_mesh._next_node_id),
53{
54}

Member Function Documentation

◆ addElement()

Elem * THMMesh::addElement ( libMesh::ElemType  elem_type,
const std::vector< dof_id_type > &  node_ids 
)

Add a new element into the mesh.

Definition at line 103 of file THMMesh.C.

104{
105 dof_id_type elem_id = getNextElementId();
106
107 Elem * elem = libMesh::Elem::build(elem_type).release();
108 elem->set_id(elem_id);
109 _mesh->add_elem(elem);
110 for (std::size_t i = 0; i < node_ids.size(); i++)
111 elem->set_node(i, _mesh->node_ptr(node_ids[i]));
112 return elem;
113}
virtual Elem * elem(const dof_id_type i)
std::unique_ptr< libMesh::MeshBase > _mesh
virtual dof_id_type getNextElementId()
Gets the next element ID.
Definition THMMesh.C:88
dof_id_type & set_id()
virtual Node *& set_node(const unsigned int i)
static std::unique_ptr< Elem > build(const ElemType type, Elem *p=nullptr)
uint8_t dof_id_type

Referenced by GeometricalComponent::addElement().

◆ addElementEdge2()

Elem * THMMesh::addElementEdge2 ( dof_id_type  node0,
dof_id_type  node1 
)

Definition at line 128 of file THMMesh.C.

129{
130 dof_id_type elem_id = getNextElementId();
131
132 Elem * elem = new Edge2;
133 elem->set_id(elem_id);
134 _mesh->add_elem(elem);
135 elem->set_node(0, _mesh->node_ptr(node0));
136 elem->set_node(1, _mesh->node_ptr(node1));
137 return elem;
138}

Referenced by GeometricalComponent::addElementEdge2().

◆ addElementEdge3()

Elem * THMMesh::addElementEdge3 ( dof_id_type  node0,
dof_id_type  node1,
dof_id_type  node2 
)

Definition at line 141 of file THMMesh.C.

142{
143 dof_id_type elem_id = getNextElementId();
144
145 Elem * elem = new Edge3;
146 elem->set_id(elem_id);
147 _mesh->add_elem(elem);
148 elem->set_node(0, _mesh->node_ptr(node0));
149 elem->set_node(1, _mesh->node_ptr(node1));
150 elem->set_node(2, _mesh->node_ptr(node2));
151 return elem;
152}

Referenced by GeometricalComponent::addElementEdge3().

◆ addElementQuad4()

Elem * THMMesh::addElementQuad4 ( dof_id_type  node0,
dof_id_type  node1,
dof_id_type  node2,
dof_id_type  node3 
)

Definition at line 155 of file THMMesh.C.

156{
157 dof_id_type elem_id = getNextElementId();
158
159 Elem * elem = new Quad4;
160 elem->set_id(elem_id);
161 _mesh->add_elem(elem);
162 elem->set_node(0, _mesh->node_ptr(node0));
163 elem->set_node(1, _mesh->node_ptr(node1));
164 elem->set_node(2, _mesh->node_ptr(node2));
165 elem->set_node(3, _mesh->node_ptr(node3));
166 return elem;
167}

Referenced by GeometricalComponent::addElementQuad4().

◆ addElementQuad9()

Elem * THMMesh::addElementQuad9 ( dof_id_type  node0,
dof_id_type  node1,
dof_id_type  node2,
dof_id_type  node3,
dof_id_type  node4,
dof_id_type  node5,
dof_id_type  node6,
dof_id_type  node7,
dof_id_type  node8 
)

Definition at line 170 of file THMMesh.C.

179{
180 dof_id_type elem_id = getNextElementId();
181
182 Elem * elem = new Quad9;
183 elem->set_id(elem_id);
184 _mesh->add_elem(elem);
185 // vertices
186 elem->set_node(0, _mesh->node_ptr(node0));
187 elem->set_node(1, _mesh->node_ptr(node1));
188 elem->set_node(2, _mesh->node_ptr(node2));
189 elem->set_node(3, _mesh->node_ptr(node3));
190 // mid-edges
191 elem->set_node(4, _mesh->node_ptr(node4));
192 elem->set_node(5, _mesh->node_ptr(node5));
193 elem->set_node(6, _mesh->node_ptr(node6));
194 elem->set_node(7, _mesh->node_ptr(node7));
195 // center
196 elem->set_node(8, _mesh->node_ptr(node8));
197
198 return elem;
199}

Referenced by GeometricalComponent::addElementQuad9().

◆ addNode()

Node * THMMesh::addNode ( const Point pt)

Add a new node into the mesh.

Definition at line 95 of file THMMesh.C.

96{
98 Node * node = _mesh->add_point(pt, id);
99 return node;
100}
virtual const Node & node(const dof_id_type i) const
virtual dof_id_type getNextNodeId()
Gets the next node ID.
Definition THMMesh.C:81

Referenced by Component::addNode().

◆ addNodeElement()

Elem * THMMesh::addNodeElement ( dof_id_type  node)

Definition at line 116 of file THMMesh.C.

117{
118 dof_id_type elem_id = getNextElementId();
119
120 Elem * elem = new NodeElem;
121 elem->set_id(elem_id);
122 _mesh->add_elem(elem);
123 elem->set_node(0, _mesh->node_ptr(node));
124 return elem;
125}

Referenced by Component::addNodeElement().

◆ buildMesh()

void THMMesh::buildMesh ( )
overridevirtual

Implements MooseMesh.

Definition at line 75 of file THMMesh.C.

76{
78}
MeshBase & getMesh()
void set_spatial_dimension(unsigned char d)

◆ dimension()

unsigned int THMMesh::dimension ( ) const
overridevirtual

Reimplemented from MooseMesh.

Definition at line 57 of file THMMesh.C.

58{
59 return _dim;
60}

◆ effectiveSpatialDimension()

unsigned int THMMesh::effectiveSpatialDimension ( ) const
overridevirtual

Reimplemented from MooseMesh.

Definition at line 63 of file THMMesh.C.

64{
65 return _dim;
66}

◆ getNextBoundaryId()

BoundaryID THMMesh::getNextBoundaryId ( )
virtual

Gets the next nodeset or sideset ID.

Definition at line 209 of file THMMesh.C.

210{
212 return id;
213}
boundary_id_type BoundaryID

Referenced by Component1D::buildMesh(), Component2D::buildMesh(), Component1DBoundary::setupMesh(), and Component1DJunction::setupMesh().

◆ getNextElementId()

dof_id_type THMMesh::getNextElementId ( )
protectedvirtual

Gets the next element ID.

Definition at line 88 of file THMMesh.C.

89{
91 return id;
92}

Referenced by addElement(), addElementEdge2(), addElementEdge3(), addElementQuad4(), addElementQuad9(), and addNodeElement().

◆ getNextNodeId()

dof_id_type THMMesh::getNextNodeId ( )
protectedvirtual

Gets the next node ID.

Definition at line 81 of file THMMesh.C.

82{
84 return id;
85}

Referenced by addNode().

◆ getNextSubdomainId()

SubdomainID THMMesh::getNextSubdomainId ( )
virtual

Gets the next subdomain ID.

Definition at line 202 of file THMMesh.C.

203{
205 return id;
206}

Referenced by Component1D::buildMesh(), and VolumeJunction1Phase::setupMesh().

◆ safeClone()

std::unique_ptr< MooseMesh > THMMesh::safeClone ( ) const
overridevirtual

Implements MooseMesh.

Definition at line 69 of file THMMesh.C.

70{
71 return _app.getFactory().copyConstruct(*this);
72}
Factory & getFactory()
MooseApp & _app

◆ validParams()

InputParameters THMMesh::validParams ( )
static

Definition at line 25 of file THMMesh.C.

26{
28 params.addClassDescription("Creates a mesh (nodes and elements) for the Components");
29 MooseEnum dims("1=1 2 3", "3");
30 params.addParam<MooseEnum>("dim", dims, "The dimension of the mesh to be generated");
31 // we do not allow renumbering, because we generate our meshes
32 params.set<bool>("allow_renumbering") = false;
33 return params;
34}
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
static InputParameters validParams()

Member Data Documentation

◆ _dim

unsigned int THMMesh::_dim
protected

The dimension of the mesh.

Definition at line 60 of file THMMesh.h.

Referenced by buildMesh(), dimension(), and effectiveSpatialDimension().

◆ _next_boundary_id

BoundaryID THMMesh::_next_boundary_id
protected

The next boundary ID in the mesh (used for mesh generation)

Definition at line 69 of file THMMesh.h.

Referenced by getNextBoundaryId().

◆ _next_element_id

dof_id_type THMMesh::_next_element_id
protected

The next element ID in the mesh (used for mesh generation)

Definition at line 65 of file THMMesh.h.

Referenced by getNextElementId().

◆ _next_node_id

dof_id_type THMMesh::_next_node_id
protected

The next node ID in the mesh (used for mesh generation)

Definition at line 63 of file THMMesh.h.

Referenced by getNextNodeId().

◆ _next_subdomain_id

SubdomainID THMMesh::_next_subdomain_id
protected

The next subdomain ID in the mesh (used for mesh generation)

Definition at line 67 of file THMMesh.h.

Referenced by getNextSubdomainId().

◆ INVALID_BOUNDARY_ID

const BoundaryName THMMesh::INVALID_BOUNDARY_ID = "invalid_boundary_id"
static

Definition at line 72 of file THMMesh.h.


The documentation for this class was generated from the following files: