https://mooseframework.inl.gov
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
MooseMesh Class Referenceabstract

MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and storing more state. More...

#include <MooseMesh.h>

Inheritance diagram for MooseMesh:
[legend]

Classes

struct  bnd_elem_iterator
 The definition of the bnd_elem_iterator struct. More...
 
struct  bnd_node_iterator
 The definition of the bnd_node_iterator struct. More...
 
struct  const_bnd_elem_iterator
 The definition of the const_bnd_elem_iterator struct. More...
 
struct  const_bnd_node_iterator
 The definition of the const_bnd_node_iterator struct. More...
 
struct  const_elem_info_iterator
 The definition of the const_elem_info_iterator struct. More...
 
struct  const_face_info_iterator
 The definition of the const_face_info_iterator struct. More...
 
struct  elem_info_iterator
 The definition of the elem_info_iterator struct. More...
 
struct  face_info_iterator
 The definition of the face_info_iterator struct. More...
 
struct  MeshType
 
struct  MeshType< libMesh::DistributedMesh >
 
struct  MeshType< libMesh::ReplicatedMesh >
 
struct  SubdomainData
 

Public Types

enum  ParallelType { ParallelType::DEFAULT, ParallelType::REPLICATED, ParallelType::DISTRIBUTED }
 
using PeriodicNodeInfo = std::pair< const Node *, BoundaryID >
 Helper type for building periodic node maps. More...
 
using DataFileParameterType = DataFileName
 The parameter type this interface expects for a data file name. More...
 

Public Member Functions

 MooseMesh (const InputParameters &parameters)
 
 MooseMesh (const MooseMesh &other_mesh)
 
 MooseMesh ()=delete
 
MooseMeshoperator= (const MooseMesh &other_mesh)=delete
 
virtual ~MooseMesh ()
 
virtual MooseMeshclone () const
 Clone method. More...
 
virtual std::unique_ptr< MooseMeshsafeClone () const =0
 A safer version of the clone() method that hands back an allocated object wrapped in a smart pointer. More...
 
void determineUseDistributedMesh ()
 Determine whether to use a distributed mesh. More...
 
std::unique_ptr< MeshBasebuildMeshBaseObject (unsigned int dim=libMesh::invalid_uint)
 Method to construct a libMesh::MeshBase object that is normally set and used by the MooseMesh object during the "init()" phase. More...
 
template<typename T >
std::unique_ptr< T > buildTypedMesh (unsigned int dim=libMesh::invalid_uint)
 Shortcut method to construct a unique pointer to a libMesh mesh instance. More...
 
void setMeshBase (std::unique_ptr< MeshBase > mesh_base)
 Method to set the mesh_base object. More...
 
virtual void init ()
 Initialize the Mesh object. More...
 
virtual void buildMesh ()=0
 Must be overridden by child classes. More...
 
virtual unsigned int dimension () const
 Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh mesh object. More...
 
virtual unsigned int spatialDimension () const
 Returns MeshBase::spatial_dimension. More...
 
virtual unsigned int effectiveSpatialDimension () const
 Returns the effective spatial dimension determined by the coordinates actually used by the mesh. More...
 
unsigned int getBlocksMaxDimension (const std::vector< SubdomainName > &blocks) const
 Returns the maximum element dimension on the given blocks. More...
 
std::vector< BoundaryIDgetBoundaryIDs (const Elem *const elem, const unsigned short int side) const
 Returns a vector of boundary IDs for the requested element on the requested side. More...
 
const ElemgetLowerDElem (const Elem *, unsigned short int) const
 Returns a const pointer to a lower dimensional element that corresponds to a side of a higher dimensional element. More...
 
unsigned int getHigherDSide (const Elem *elem) const
 Returns the local side ID of the interior parent aligned with the lower dimensional element. More...
 
const std::set< BoundaryID > & getBoundaryIDs () const
 Returns a const reference to a set of all user-specified boundary IDs. More...
 
void buildNodeList ()
 Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in those lists. More...
 
void buildBndElemList ()
 
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToElemMap ()
 If not already created, creates a map from every node to all elements to which they are connected. More...
 
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToActiveSemilocalElemMap ()
 If not already created, creates a map from every node to all active semilocal elements to which they are connected. More...
 
virtual bnd_node_iterator bndNodesBegin ()
 Return iterators to the beginning/end of the boundary nodes list. More...
 
virtual bnd_node_iterator bndNodesEnd ()
 
virtual bnd_elem_iterator bndElemsBegin ()
 Return iterators to the beginning/end of the boundary elements list. More...
 
virtual bnd_elem_iterator bndElemsEnd ()
 
void buildNodeListFromSideList ()
 Calls BoundaryInfo::build_node_list_from_side_list(). More...
 
void buildSideList (std::vector< dof_id_type > &el, std::vector< unsigned short int > &sl, std::vector< boundary_id_type > &il)
 Calls BoundaryInfo::build_side_list(). More...
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildSideList ()
 As above, but uses the non-deprecated std::tuple interface. More...
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList () const
 Calls BoundaryInfo::build_active_side_list. More...
 
unsigned int sideWithBoundaryID (const Elem *const elem, const BoundaryID boundary_id) const
 Calls BoundaryInfo::side_with_boundary_id(). More...
 
MeshBase::node_iterator localNodesBegin ()
 Calls local_nodes_begin/end() on the underlying libMesh mesh object. More...
 
MeshBase::node_iterator localNodesEnd ()
 
MeshBase::const_node_iterator localNodesBegin () const
 
MeshBase::const_node_iterator localNodesEnd () const
 
MeshBase::element_iterator activeLocalElementsBegin ()
 Calls active_local_nodes_begin/end() on the underlying libMesh mesh object. More...
 
const MeshBase::element_iterator activeLocalElementsEnd ()
 
MeshBase::const_element_iterator activeLocalElementsBegin () const
 
const MeshBase::const_element_iterator activeLocalElementsEnd () const
 
virtual dof_id_type nNodes () const
 Calls n_nodes/elem() on the underlying libMesh mesh object. More...
 
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
 Calls max_node/elem_id() on the underlying libMesh mesh object. More...
 
virtual dof_id_type maxElemId () const
 
virtual const Nodenode (const dof_id_type i) const
 Various accessors (pointers/references) for Node "i". More...
 
virtual Nodenode (const dof_id_type i)
 
virtual const NodenodeRef (const dof_id_type i) const
 
virtual NodenodeRef (const dof_id_type i)
 
virtual const NodenodePtr (const dof_id_type i) const
 
virtual NodenodePtr (const dof_id_type i)
 
virtual const NodequeryNodePtr (const dof_id_type i) const
 
virtual NodequeryNodePtr (const dof_id_type i)
 
virtual Elemelem (const dof_id_type i)
 Various accessors (pointers/references) for Elem "i". More...
 
virtual const Elemelem (const dof_id_type i) const
 
virtual ElemelemPtr (const dof_id_type i)
 
virtual const ElemelemPtr (const dof_id_type i) const
 
virtual ElemqueryElemPtr (const dof_id_type i)
 
virtual const ElemqueryElemPtr (const dof_id_type i) const
 
bool prepared () const
 Setter/getter for whether the mesh is prepared. More...
 
virtual void prepared (bool state)
 
void needsPrepareForUse ()
 If this method is called, we will call libMesh's prepare_for_use method when we call Moose's prepare method. More...
 
void meshChanged ()
 Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches. More...
 
virtual void onMeshChanged ()
 Declares a callback function that is executed at the conclusion of meshChanged(). More...
 
void cacheChangedLists ()
 Cache information about what elements were refined and coarsened in the previous step. More...
 
ConstElemPointerRangerefinedElementRange () const
 Return a range that is suitable for threaded execution over elements that were just refined. More...
 
ConstElemPointerRangecoarsenedElementRange () const
 Return a range that is suitable for threaded execution over elements that were just coarsened. More...
 
const std::vector< const Elem * > & coarsenedElementChildren (const Elem *elem) const
 Get the newly removed children element ids for an element that was just coarsened. More...
 
void updateActiveSemiLocalNodeRange (std::set< dof_id_type > &ghosted_elems)
 Clears the "semi-local" node list and rebuilds it. More...
 
bool isSemiLocal (Node *const node) const
 Returns true if the node is semi-local. More...
 
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToElems () const
 Returns a map of boundaries to ids of elements on the boundary. More...
 
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToActiveSemiLocalElemIds () const
 Returns a map of boundaries to ids of elements on the boundary. More...
 
std::unordered_set< dof_id_typegetBoundaryActiveSemiLocalElemIds (BoundaryID bid) const
 Return all ids of elements which have a side which is part of a sideset. More...
 
std::unordered_set< dof_id_typegetBoundaryActiveNeighborElemIds (BoundaryID bid) const
 Return all ids of neighbors of elements which have a side which is part of a sideset. More...
 
bool isBoundaryFullyExternalToSubdomains (BoundaryID bid, const std::set< SubdomainID > &blk_group) const
 Returns whether a boundary (given by its id) is not crossing through a group of blocks, by which we mean that elements on both sides of the boundary are in those blocks. More...
 
const std::set< SubdomainID > & meshSubdomains () const
 Returns a read-only reference to the set of subdomains currently present in the Mesh. More...
 
const std::set< BoundaryID > & meshBoundaryIds () const
 Returns a read-only reference to the set of boundary IDs currently present in the Mesh. More...
 
const std::set< BoundaryID > & meshSidesetIds () const
 Returns a read-only reference to the set of sidesets currently present in the Mesh. More...
 
const std::set< BoundaryID > & meshNodesetIds () const
 Returns a read-only reference to the set of nodesets currently present in the Mesh. More...
 
void setBoundaryToNormalMap (std::unique_ptr< std::map< BoundaryID, RealVectorValue >> boundary_map)
 Sets the mapping between BoundaryID and normal vector Is called by AddAllSideSetsByNormals. More...
 
void setBoundaryToNormalMap (std::map< BoundaryID, RealVectorValue > *boundary_map)
 
void setMeshBoundaryIDs (std::set< BoundaryID > boundary_IDs)
 Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals. More...
 
const RealVectorValuegetNormalByBoundaryID (BoundaryID id) const
 Returns the normal vector associated with a given BoundaryID. More...
 
bool prepare (const MeshBase *mesh_to_clone)
 Calls prepare_for_use() if the underlying MeshBase object isn't prepared, then communicates various boundary information on parallel meshes. More...
 
void update ()
 Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList(). More...
 
unsigned int uniformRefineLevel () const
 Returns the level of uniform refinement requested (zero if AMR is disabled). More...
 
void setUniformRefineLevel (unsigned int, bool deletion=true)
 Set uniform refinement level. More...
 
bool skipDeletionRepartitionAfterRefine () const
 Return a flag indicating whether or not we should skip remote deletion and repartition after uniform refinements. More...
 
bool skipRefineWhenUseSplit () const
 Whether or not skip uniform refinements when using a pre-split mesh. More...
 
void addGhostedBoundary (BoundaryID boundary_id)
 This will add the boundary ids to be ghosted to this processor. More...
 
void setGhostedBoundaryInflation (const std::vector< Real > &inflation)
 This sets the inflation amount for the bounding box for each partition for use in ghosting boundaries. More...
 
const std::set< unsigned int > & getGhostedBoundaries () const
 Return a writable reference to the set of ghosted boundary IDs. More...
 
const std::vector< Real > & getGhostedBoundaryInflation () const
 Return a writable reference to the _ghosted_boundaries_inflation vector. More...
 
void ghostGhostedBoundaries ()
 Actually do the ghosting of boundaries that need to be ghosted to this processor. More...
 
void needGhostGhostedBoundaries (bool needghost)
 Whether or not we want to ghost ghosted boundaries. More...
 
unsigned int getPatchSize () const
 Getter for the patch_size parameter. More...
 
unsigned int getGhostingPatchSize () const
 Getter for the ghosting_patch_size parameter. More...
 
unsigned int getMaxLeafSize () const
 Getter for the maximum leaf size parameter. More...
 
void setPatchUpdateStrategy (Moose::PatchUpdateType patch_update_strategy)
 Set the patch size update strategy. More...
 
const Moose::PatchUpdateTypegetPatchUpdateStrategy () const
 Get the current patch update strategy. More...
 
libMesh::BoundingBox getInflatedProcessorBoundingBox (Real inflation_multiplier=0.01) const
 Get a (slightly inflated) processor bounding box. More...
 
 operator libMesh::MeshBase & ()
 Implicit conversion operator from MooseMesh -> libMesh::MeshBase. More...
 
 operator const libMesh::MeshBase & () const
 
MeshBasegetMesh ()
 Accessor for the underlying libMesh Mesh object. More...
 
MeshBase & getMesh (const std::string &name)
 
const MeshBasegetMesh () const
 
const MeshBase & getMesh (const std::string &name) const
 
const MeshBasegetMeshPtr () const
 
void printInfo (std::ostream &os=libMesh::out, const unsigned int verbosity=0) const
 Calls print_info() on the underlying Mesh. More...
 
const std::set< SubdomainID > & getNodeBlockIds (const Node &node) const
 Return list of blocks to which the given node belongs. More...
 
const std::vector< dof_id_type > & getNodeList (boundary_id_type nodeset_id) const
 Return a writable reference to a vector of node IDs that belong to nodeset_id. More...
 
const NodeaddUniqueNode (const Point &p, Real tol=1e-6)
 Add a new node to the mesh. More...
 
NodeaddQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
 Adds a fictitious "QuadratureNode". More...
 
NodegetQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp)
 Get a specified quadrature node. More...
 
void clearQuadratureNodes ()
 Clear out any existing quadrature nodes. More...
 
BoundaryID getBoundaryID (const BoundaryName &boundary_name) const
 Get the associated BoundaryID for the boundary name. More...
 
std::vector< BoundaryIDgetBoundaryIDs (const std::vector< BoundaryName > &boundary_name, bool generate_unknown=false) const
 Get the associated BoundaryID for the boundary names that are passed in. More...
 
SubdomainID getSubdomainID (const SubdomainName &subdomain_name) const
 Get the associated subdomain ID for the subdomain name. More...
 
std::vector< SubdomainIDgetSubdomainIDs (const std::vector< SubdomainName > &subdomain_names) const
 Get the associated subdomainIDs for the subdomain names that are passed in. More...
 
std::set< SubdomainIDgetSubdomainIDs (const std::set< SubdomainName > &subdomain_names) const
 
void setSubdomainName (SubdomainID subdomain_id, const SubdomainName &name)
 This method sets the name for subdomain_id to name. More...
 
const std::string & getSubdomainName (SubdomainID subdomain_id) const
 Return the name of a block given an id. More...
 
std::vector< SubdomainName > getSubdomainNames (const std::vector< SubdomainID > &subdomain_ids) const
 Get the associated subdomainNames for the subdomain ids that are passed in. More...
 
void setBoundaryName (BoundaryID boundary_id, BoundaryName name)
 This method sets the boundary name of the boundary based on the id parameter. More...
 
const std::string & getBoundaryName (BoundaryID boundary_id)
 Return the name of the boundary given the id. More...
 
void buildPeriodicNodeMap (std::multimap< dof_id_type, dof_id_type > &periodic_node_map, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
 This routine builds a multimap of boundary ids to matching boundary ids across all periodic boundaries in the system. More...
 
void buildPeriodicNodeSets (std::map< BoundaryID, std::set< dof_id_type >> &periodic_node_sets, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
 This routine builds a datastructure of node ids organized by periodic boundary ids. More...
 
Real dimensionWidth (unsigned int component) const
 Returns the width of the requested dimension. More...
 
bool detectOrthogonalDimRanges (Real tol=1e-6)
 This routine determines whether the Mesh is a regular orthogonal mesh (i.e. More...
 
void addPeriodicVariable (unsigned int var_num, BoundaryID primary, BoundaryID secondary)
 For "regular orthogonal" meshes, determine if variable var_num is periodic with respect to the primary and secondary BoundaryIDs, record this fact in the _periodic_dim data structure. More...
 
bool isTranslatedPeriodic (unsigned int nonlinear_var_num, unsigned int component) const
 Returns whether this generated mesh is periodic in the given dimension for the given variable. More...
 
RealVectorValue minPeriodicVector (unsigned int nonlinear_var_num, Point p, Point q) const
 This function returns the minimum vector between two points on the mesh taking into account periodicity for the given variable number. More...
 
Real minPeriodicDistance (unsigned int nonlinear_var_num, Point p, Point q) const
 This function returns the distance between two points on the mesh taking into account periodicity for the given variable number. More...
 
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping (unsigned int component)
 This function attempts to return the paired boundary ids for the given component. More...
 
void buildRefinementAndCoarseningMaps (Assembly *assembly)
 Create the refinement and coarsening maps necessary for projection of stateful material properties when using adaptivity. More...
 
const std::vector< std::vector< QpMap > > & getRefinementMap (const Elem &elem, int parent_side, int child, int child_side)
 Get the refinement map for a given element type. More...
 
const std::vector< std::pair< unsigned int, QpMap > > & getCoarseningMap (const Elem &elem, int input_side)
 Get the coarsening map for a given element type. More...
 
void changeBoundaryId (const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 Change all the boundary IDs for a given side from old_id to new_id. More...
 
const std::set< BoundaryID > & getSubdomainBoundaryIds (const SubdomainID subdomain_id) const
 Get the list of boundary ids associated with the given subdomain id. More...
 
std::set< BoundaryIDgetSubdomainInterfaceBoundaryIds (const SubdomainID subdomain_id) const
 Get the list of boundaries that contact the given subdomain. More...
 
std::set< SubdomainIDgetBoundaryConnectedBlocks (const BoundaryID bid) const
 Get the list of subdomains associated with the given boundary. More...
 
std::set< SubdomainIDgetBoundaryConnectedSecondaryBlocks (const BoundaryID bid) const
 Get the list of subdomains associated with the given boundary of its secondary side. More...
 
std::set< SubdomainIDgetInterfaceConnectedBlocks (const BoundaryID bid) const
 Get the list of subdomains contacting the given boundary. More...
 
const std::set< SubdomainID > & getBlockConnectedBlocks (const SubdomainID subdomain_id) const
 Get the list of subdomains neighboring a given subdomain. More...
 
bool isBoundaryNode (dof_id_type node_id) const
 Returns true if the requested node is in the list of boundary nodes, false otherwise. More...
 
bool isBoundaryNode (dof_id_type node_id, BoundaryID bnd_id) const
 Returns true if the requested node is in the list of boundary nodes for the specified boundary, false otherwise. More...
 
bool isBoundaryElem (dof_id_type elem_id) const
 Returns true if the requested element is in the list of boundary elements, false otherwise. More...
 
bool isBoundaryElem (dof_id_type elem_id, BoundaryID bnd_id) const
 Returns true if the requested element is in the list of boundary elements for the specified boundary, false otherwise. More...
 
void errorIfDistributedMesh (std::string name) const
 Generate a unified error message if the underlying libMesh mesh is a DistributedMesh. More...
 
virtual bool isDistributedMesh () const
 Returns the final Mesh distribution type. More...
 
bool isParallelTypeForced () const
 Tell the user if the distribution was overriden for any reason. More...
 
void setParallelType (ParallelType parallel_type)
 Allow to change parallel type. More...
 
ParallelType getParallelType () const
 
const MooseEnumpartitionerName () const
 
bool isPartitionerForced () const
 Tell the user if the partitioner was overriden for any reason. More...
 
void allowRecovery (bool allow)
 Set whether or not this mesh is allowed to read a recovery file. More...
 
void setCustomPartitioner (libMesh::Partitioner *partitioner)
 Setter for custom partitioner. More...
 
bool isRegularOrthogonal ()
 Getter to query if the mesh was detected to be regular and orthogonal. More...
 
bool hasSecondOrderElements ()
 check if the mesh has SECOND order elements More...
 
virtual std::unique_ptr< libMesh::PointLocatorBasegetPointLocator () const
 Proxy function to get a (sub)PointLocator from either the underlying libMesh mesh (default), or to allow derived meshes to return a custom point locator. More...
 
virtual std::string getFileName () const
 Returns the name of the mesh file read to produce this mesh if any or an empty string otherwise. More...
 
void needsRemoteElemDeletion (bool need_delete)
 Set whether we need to delete remote elements. More...
 
bool needsRemoteElemDeletion () const
 Whether we need to delete remote elements. More...
 
void allowRemoteElementRemoval (bool allow_removal)
 Set whether to allow remote element removal. More...
 
bool allowRemoteElementRemoval () const
 Whether we are allow remote element removal. More...
 
void deleteRemoteElements ()
 Delete remote elements. More...
 
bool hasMeshBase () const
 Whether mesh base object was constructed or not. More...
 
bool hasElementID (const std::string &id_name) const
 Whether mesh has an extra element integer with a given name. More...
 
unsigned int getElementIDIndex (const std::string &id_name) const
 Return the accessing integer for an extra element integer with its name. More...
 
dof_id_type maxElementID (unsigned int elem_id_index) const
 Return the maximum element ID for an extra element integer with its accessing index. More...
 
dof_id_type minElementID (unsigned int elem_id_index) const
 Return the minimum element ID for an extra element integer with its accessing index. More...
 
bool areElemIDsIdentical (const std::string &id_name1, const std::string &id_name2) const
 Whether or not two extra element integers are identical. More...
 
std::set< dof_id_typegetAllElemIDs (unsigned int elem_id_index) const
 Return all the unique element IDs for an extra element integer with its index. More...
 
std::set< dof_id_typegetElemIDsOnBlocks (unsigned int elem_id_index, const std::set< SubdomainID > &blks) const
 Return all the unique element IDs for an extra element integer with its index on a set of subdomains. More...
 
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
 Cache if variables live on the elements connected by the FaceInfo objects. More...
 
void cacheFVElementalDoFs () const
 Cache the DoF indices for FV variables on each element. More...
 
void computeFiniteVolumeCoords () const
 Compute the face coordinate value for all FaceInfo and ElemInfo objects. More...
 
void isDisplaced (bool is_displaced)
 Set whether this mesh is a displaced mesh. More...
 
bool isDisplaced () const
 whether this mesh is a displaced mesh More...
 
const std::map< boundary_id_type, std::vector< dof_id_type > > & nodeSetNodes () const
 
Moose::CoordinateSystemType getCoordSystem (SubdomainID sid) const
 Get the coordinate system type, e.g. More...
 
Moose::CoordinateSystemType getUniqueCoordSystem () const
 Get the coordinate system from the mesh, it must be the same in all subdomains otherwise this will error. More...
 
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem () const
 Get the map from subdomain ID to coordinate system type, e.g. More...
 
void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 Set the coordinate system for the provided blocks to coord_sys. More...
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 For axisymmetric simulations, set the symmetry coordinate axis. More...
 
void setGeneralAxisymmetricCoordAxes (const std::vector< SubdomainName > &blocks, const std::vector< std::pair< Point, RealVectorValue >> &axes)
 Sets the general coordinate axes for axisymmetric blocks. More...
 
const std::pair< Point, RealVectorValue > & getGeneralAxisymmetricCoordAxis (SubdomainID subdomain_id) const
 Gets the general axisymmetric coordinate axis for a block. More...
 
bool usingGeneralAxisymmetricCoordAxes () const
 Returns true if general axisymmetric coordinate axes are being used. More...
 
unsigned int getAxisymmetricRadialCoord () const
 Returns the desired radial direction for RZ coordinate transformation. More...
 
void checkCoordinateSystems ()
 Performs a sanity check for every element in the mesh. More...
 
void setCoordData (const MooseMesh &other_mesh)
 Set the coordinate system data to that of other_mesh. More...
 
void markFiniteVolumeInfoDirty ()
 Mark the finite volume information as dirty. More...
 
bool isFiniteVolumeInfoDirty () const
 
MooseAppCoordTransformcoordTransform ()
 
const MooseUnitslengthUnit () const
 
const std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > & getLowerDElemMap () const
 This function attempts to return the map from a high-order element side to its corresponding lower-d element. More...
 
bool isSplit () const
 
void buildFiniteVolumeInfo () const
 Builds the face and elem info vectors that store meta-data needed for looping over and doing calculations based on mesh faces and elements in a finite volume setting. More...
 
void setupFiniteVolumeMeshData () const
 Sets up the additional data needed for finite volume computations. More...
 
void doingPRefinement (bool doing_p_refinement)
 Indicate whether the kind of adaptivity we're doing is p-refinement. More...
 
bool doingPRefinement () const
 Query whether we have p-refinement. More...
 
unsigned int maxPLevel () const
 Returns the maximum p-refinement level of all elements. More...
 
unsigned int maxHLevel () const
 Returns the maximum h-refinement level of all elements. More...
 
const std::vector< QpMap > & getPRefinementMap (const Elem &elem) const
 Get the map describing for each volumetric quadrature point (qp) on the refined level which qp on the previous coarser level the fine qp is closest to. More...
 
const std::vector< QpMap > & getPRefinementSideMap (const Elem &elem) const
 Get the map describing for each side quadrature point (qp) on the refined level which qp on the previous coarser level the fine qp is closest to. More...
 
const std::vector< QpMap > & getPCoarseningMap (const Elem &elem) const
 Get the map describing for each volumetric quadrature point (qp) on the coarse level which qp on the previous finer level the coarse qp is closest to. More...
 
const std::vector< QpMap > & getPCoarseningSideMap (const Elem &elem) const
 Get the map describing for each side quadrature point (qp) on the coarse level which qp on the previous finer level the coarse qp is closest to. More...
 
void buildPRefinementAndCoarseningMaps (Assembly *assembly)
 
bool isLowerD (const SubdomainID subdomain_id) const
 
bool hasLowerD () const
 
const std::set< SubdomainID > & interiorLowerDBlocks () const
 
const std::set< SubdomainID > & boundaryLowerDBlocks () const
 
bool getConstructNodeListFromSideList ()
 Return construct node list from side list boolean. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 Get another shared pointer to this object that has the same ownership group. More...
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 Get the MooseApp this class is associated with. More...
 
const std::string & type () const
 Get the type of this class. More...
 
const std::string & name () const
 Get the name of the class. More...
 
std::string typeAndName () const
 Get the class's combined type and name; useful in error handling. More...
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 Retrieve two parameters and provide pair of parameters for the object. More...
 
template<typename T >
const T * queryParam (const std::string &name) const
 Query a parameter for the object. More...
 
template<typename T >
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 Retrieve a renamed parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
bool isParamSetByUser (const std::string &name) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default. More...
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 Connect controllable parameter of this action with the controllable parameters of the objects added by this action. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args) const
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args) const
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args) const
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 Deprecated message prefix; the error type is no longer used. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 Emits an error prefixed with object name and type and optionally a file path to the top-level block parameter if available. More...
 
template<typename... Args>
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
template<typename... Args>
void mooseErrorNonPrefixed (Args &&... args) const
 Emits an error without the prefixing included in mooseError(). More...
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 Emits a warning prefixed with object name and type. More...
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 Emits a warning without the prefixing included in mooseWarning(). More...
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
 External method for calling moose error with added object context. More...
 
const Parallel::Communicatorcomm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
std::string getDataFileName (const std::string &param) const
 Deprecated method. More...
 
std::string getDataFileNameByName (const std::string &relative_path) const
 Deprecated method. More...
 
std::string getDataFilePath (const std::string &relative_path) const
 Returns the path of a data file for a given relative file path. More...
 
PerfGraphperfGraph ()
 Get the PerfGraph. More...
 
libMesh::ConstElemRangegetActiveLocalElementRange ()
 Return pointers to range objects for various types of ranges (local nodes, boundary elems, etc.). More...
 
libMesh::NodeRangegetActiveNodeRange ()
 
SemiLocalNodeRangegetActiveSemiLocalNodeRange () const
 
libMesh::ConstNodeRangegetLocalNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange ()
 
virtual Real getMinInDimension (unsigned int component) const
 Returns the min or max of the requested dimension respectively. More...
 
virtual Real getMaxInDimension (unsigned int component) const
 
bool isCustomPartitionerRequested () const
 Setter and getter for _custom_partitioner_requested. More...
 
void setIsCustomPartitionerRequested (bool cpr)
 
unsigned int nFace () const
 accessors for the FaceInfo objects More...
 
const std::vector< const FaceInfo * > & faceInfo () const
 Accessor for local FaceInfo objects. More...
 
face_info_iterator ownedFaceInfoBegin ()
 Iterators to owned faceInfo objects. More...
 
face_info_iterator ownedFaceInfoEnd ()
 
elem_info_iterator ownedElemInfoBegin ()
 Iterators to owned faceInfo objects. More...
 
elem_info_iterator ownedElemInfoEnd ()
 
const FaceInfofaceInfo (const Elem *elem, unsigned int side) const
 Accessor for the local FaceInfo object on the side of one element. Returns null if ghosted. More...
 
const ElemInfoelemInfo (const dof_id_type id) const
 Accessor for the elemInfo object for a given element ID. More...
 
const std::vector< const ElemInfo * > & elemInfoVector () const
 Accessor for the element info objects owned by this process. More...
 
const std::vector< FaceInfo > & allFaceInfo () const
 Accessor for all FaceInfo objects. More...
 

Static Public Member Functions

static InputParameters validParams ()
 Typical "Moose-style" constructor and copy constructor. More...
 
static MooseEnum partitioning ()
 returns MooseMesh partitioning options so other classes can use it More...
 
static MooseEnum elemTypes ()
 returns MooseMesh element type options More...
 
static void setSubdomainName (MeshBase &mesh, SubdomainID subdomain_id, const SubdomainName &name)
 This method sets the name for subdomain_id on the provided mesh to name. More...
 
static void changeBoundaryId (MeshBase &mesh, const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 Change all the boundary IDs for a given side from old_id to new_id for the given mesh. More...
 
static void setPartitioner (MeshBase &mesh_base, MooseEnum &partitioner, bool use_distributed_mesh, const InputParameters &params, MooseObject &context_obj)
 Method for setting the partitioner on the passed in mesh_base object. More...
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node)
 External method for calling moose error with added object context. More...
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 

Static Public Attributes

static const std::string type_param = "_type"
 The name of the parameter that contains the object type. More...
 
static const std::string name_param = "_object_name"
 The name of the parameter that contains the object name. More...
 
static const std::string unique_name_param = "_unique_name"
 The name of the parameter that contains the unique object name. More...
 
static const std::string app_param = "_moose_app"
 The name of the parameter that contains the MooseApp. More...
 
static const std::string moose_base_param = "_moose_base"
 The name of the parameter that contains the moose system base. More...
 

Protected Types

enum  { X = 0, Y, Z }
 Convenience enums. More...
 
enum  { MIN = 0, MAX }
 
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

void cacheInfo ()
 
void freeBndNodes ()
 
void freeBndElems ()
 
void setPartitionerHelper (MeshBase *mesh=nullptr)
 
template<typename T , typename... Args>
T & declareRestartableData (const std::string &data_name, Args &&... args)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T , typename... Args>
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 Declares a piece of "managed" restartable data and initialize it. More...
 
template<typename T , typename... Args>
const T & getRestartableData (const std::string &data_name) const
 Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but returns a const reference to the object. More...
 
template<typename T , typename... Args>
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T , typename... Args>
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 Declare a piece of data as "recoverable" and initialize it. More...
 
template<typename T , typename... Args>
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 Declare a piece of data as "restartable". More...
 
template<typename T , typename... Args>
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 Declare a piece of data as "restartable". More...
 
std::string restartableName (const std::string &data_name) const
 Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 Call to register a named section for timing. More...
 
std::string timedSectionName (const std::string &section_name) const
 

Protected Attributes

std::vector< std::unique_ptr< libMesh::GhostingFunctor > > _ghosting_functors
 Deprecated (DO NOT USE) More...
 
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
 The list of active geometric relationship managers (bound to the underlying MeshBase object). More...
 
bool _built_from_other_mesh = false
 Whether or not this mesh was built from another mesh. More...
 
ParallelType _parallel_type
 Can be set to DISTRIBUTED, REPLICATED, or DEFAULT. More...
 
bool _use_distributed_mesh
 False by default. More...
 
bool _distribution_overridden
 
bool _parallel_type_overridden
 
std::unique_ptr< libMesh::MeshBase_mesh
 Pointer to underlying libMesh mesh object. More...
 
MooseEnum _partitioner_name
 The partitioner used on this mesh. More...
 
bool _partitioner_overridden
 
std::unique_ptr< libMesh::Partitioner_custom_partitioner
 The custom partitioner. More...
 
bool _custom_partitioner_requested
 
unsigned int _uniform_refine_level
 The level of uniform refinement requested (set to zero if AMR is disabled) More...
 
bool _skip_refine_when_use_split
 Whether or not to skip uniform refinements when using a pre-split mesh. More...
 
bool _skip_deletion_repartition_after_refine
 Whether or not skip remote deletion and repartition after uniform refinements. More...
 
bool _is_changed
 true if mesh is changed (i.e. after adaptivity step) More...
 
bool _is_nemesis
 True if a Nemesis Mesh was read in. More...
 
bool _moose_mesh_prepared = false
 True if prepare has been called on the mesh. More...
 
std::unique_ptr< ConstElemPointerRange_refined_elements
 The elements that were just refined. More...
 
std::unique_ptr< ConstElemPointerRange_coarsened_elements
 The elements that were just coarsened. More...
 
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
 Map of Parent elements to child elements for elements that were just coarsened. More...
 
std::set< Node * > _semilocal_node_list
 Used for generating the semilocal node range. More...
 
std::unique_ptr< libMesh::ConstElemRange_active_local_elem_range
 A range for use with threading. More...
 
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::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
 A map of all of the current nodes to the elements that they are connected to. More...
 
bool _node_to_elem_map_built
 
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
 A map of all of the current nodes to the active elements that they are connected to. More...
 
bool _node_to_active_semilocal_elem_map_built
 
std::set< SubdomainID_mesh_subdomains
 A set of subdomain IDs currently present in the mesh. More...
 
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
 The boundary to normal map - valid only when AddAllSideSetsByNormals is active. More...
 
std::vector< BndNode * > _bnd_nodes
 array of boundary nodes More...
 
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
 Map of sets of node IDs in each boundary. More...
 
std::vector< BndElement * > _bnd_elems
 array of boundary elems More...
 
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
 Map of set of elem IDs connected to each boundary. More...
 
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
 list of nodes that belongs to a specified block (domain) More...
 
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
 list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids] More...
 
std::set< unsigned int_ghosted_boundaries
 
std::vector< Real_ghosted_boundaries_inflation
 
unsigned int _patch_size
 The number of nodes to consider in the NearestNode neighborhood. More...
 
unsigned int _ghosting_patch_size
 The number of nearest neighbors to consider for ghosting purposes when iteration patch update strategy is used. More...
 
unsigned int _max_leaf_size
 
Moose::PatchUpdateType _patch_update_strategy
 The patch update strategy. More...
 
std::vector< Node * > _node_map
 Vector of all the Nodes in the mesh for determining when to add a new point. More...
 
bool _regular_orthogonal_mesh
 Boolean indicating whether this mesh was detected to be regular and orthogonal. More...
 
std::vector< std::vector< Real > > _bounds
 The bounds in each dimension of the mesh for regular orthogonal meshes. More...
 
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
 A vector holding the paired boundaries for a regular orthogonal mesh. More...
 
const bool _is_split
 Whether or not we are using a (pre-)split mesh (automatically DistributedMesh) More...
 
const bool & _enabled
 Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects. More...
 
MooseApp_app
 The MOOSE application this is associated with. More...
 
Factory_factory
 The Factory associated with the MooseApp. More...
 
ActionFactory_action_factory
 Builds Actions. More...
 
const std::string & _type
 The type of this class. More...
 
const std::string & _name
 The name of this class. More...
 
const InputParameters_pars
 The object's parameters. More...
 
const Parallel::Communicator_communicator
 
MooseApp_restartable_app
 Reference to the application. More...
 
const std::string _restartable_system_name
 The system name this object is in. More...
 
const THREAD_ID _restartable_tid
 The thread ID for this object. More...
 
const bool _restartable_read_only
 Flag for toggling read only status (see ReporterData) More...
 
MooseApp_pg_moose_app
 The MooseApp that owns the PerfGraph. More...
 
const std::string _prefix
 A prefix to use for all sections. More...
 
std::set< BoundaryID_mesh_boundary_ids
 A set of boundary IDs currently present in the mesh. More...
 
std::set< BoundaryID_mesh_sideset_ids
 
std::set< BoundaryID_mesh_nodeset_ids
 

Private Member Functions

void detectPairedSidesets ()
 This routine detects paired sidesets of a regular orthogonal mesh (.i.e. More...
 
void buildRefinementMap (const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int parent_side, int child, int child_side)
 Build the refinement map for a given element type. More...
 
void buildCoarseningMap (const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int input_side)
 Build the coarsening map for a given element type. More...
 
void mapPoints (const std::vector< Point > &from, const std::vector< Point > &to, std::vector< QpMap > &qp_map)
 Find the closest points that map "from" to "to" and fill up "qp_map". More...
 
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)
 Given an elem type, get maps that tell us what qp's are closest to each other between a parent and it's children. More...
 
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 ()
 Update the coordinate transformation object based on our coordinate system data. More...
 
void checkDuplicateSubdomainNames ()
 Loop through all subdomain IDs and check if there is name duplication used for the subdomains with same ID. More...
 
void buildElemIDInfo ()
 Build extra data for faster access to the information of extra element integers. More...
 
void buildLowerDMesh ()
 Build lower-d mesh for all sides. More...
 

Private Attributes

std::unordered_map< dof_id_type, ElemInfo_elem_to_elem_info
 Map connecting elems with their corresponding ElemInfo, we use the element ID as the key. More...
 
std::vector< const ElemInfo * > _elem_info
 Holds only those ElemInfo objects that have processor_id equal to this process's id, e.g. More...
 
std::vector< FaceInfo_all_face_info
 FaceInfo object storing information for face based loops. More...
 
std::vector< const FaceInfo * > _face_info
 Holds only those FaceInfo objects that have processor_id equal to this process's id, e.g. More...
 
std::unordered_map< std::pair< const Elem *, unsigned int >, FaceInfo * > _elem_side_to_face_info
 Map from elem-side pair to FaceInfo. More...
 
bool _finite_volume_info_dirty = true
 
bool _linear_finite_volume_dofs_cached = false
 
std::map< unsigned int, std::vector< bool > > _periodic_dim
 A map of vectors indicating which dimensions are periodic in a regular orthogonal mesh for the specified variable numbers. More...
 
RealVectorValue _half_range
 A convenience vector used to hold values in each dimension representing half of the range. More...
 
std::vector< Node * > _extreme_nodes
 A vector containing the nodes at the corners of a regular orthogonal mesh. More...
 
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::vector< QpMap > > > _elem_type_to_refinement_map
 Holds mappings for volume to volume and parent side to child side Map key: More...
 
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
 Holds mappings for "internal" child sides to parent volume. The second key is (child, child_side). More...
 
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::pair< unsigned int, QpMap > > > _elem_type_to_coarsening_map
 Holds mappings for volume to volume and parent side to child side Map key: More...
 
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
 Holds a map from subdomain ids to associated data. More...
 
std::unordered_map< SubdomainID, std::set< BoundaryID > > _neighbor_subdomain_boundary_ids
 Holds a map from neighbor subomdain ids to the boundary ids that are attached to it. More...
 
std::set< SubdomainID_lower_d_interior_blocks
 Mesh blocks for interior lower-d elements in different types. More...
 
std::set< SubdomainID_lower_d_boundary_blocks
 Mesh blocks for boundary lower-d elements in different types. More...
 
std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > _higher_d_elem_side_to_lower_d_elem
 Holds a map from a high-order element side to its corresponding lower-d element. More...
 
std::unordered_map< const Elem *, unsigned short int_lower_d_elem_to_higher_d_elem_side
 
bool _has_lower_d
 Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces. More...
 
bool _allow_recovery
 Whether or not this Mesh is allowed to read a recovery file. More...
 
bool _construct_node_list_from_side_list
 Whether or not to allow generation of nodesets from sidesets. More...
 
bool _need_delete
 Whether we need to delete remote elements after init'ing the EquationSystems. More...
 
bool _allow_remote_element_removal
 Whether to allow removal of remote elements. More...
 
std::set< Elem * > _ghost_elems_from_ghost_boundaries
 Set of elements ghosted by ghostGhostedBoundaries. More...
 
bool _need_ghost_ghosted_boundaries
 A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready. More...
 
std::vector< std::unordered_map< SubdomainID, std::set< dof_id_type > > > _block_id_mapping
 Unique element integer IDs for each subdomain and each extra element integers. More...
 
std::vector< dof_id_type_max_ids
 Maximum integer ID for each extra element integer. More...
 
std::vector< dof_id_type_min_ids
 Minimum integer ID for each extra element integer. More...
 
std::vector< std::vector< bool > > _id_identical_flag
 Flags to indicate whether or not any two extra element integers are the same. More...
 
bool _is_displaced
 Whether this mesh is displaced. More...
 
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
 Type of coordinate system per subdomain. More...
 
unsigned int _rz_coord_axis
 Storage for RZ axis selection. More...
 
std::unordered_map< SubdomainID, std::pair< Point, RealVectorValue > > _subdomain_id_to_rz_coord_axis
 Map of subdomain ID to general axisymmetric axis. More...
 
std::unique_ptr< MooseAppCoordTransform_coord_transform
 A coordinate transformation object that describes how to transform this problem's coordinate system into the canonical/reference coordinate system. More...
 
bool _coord_system_set
 Whether the coordinate system has been set. More...
 
std::vector< SubdomainName > _provided_coord_blocks
 Set for holding user-provided coordinate system type block names. More...
 
bool _doing_p_refinement
 Whether we have p-refinement (as opposed to h-refinement) More...
 
unsigned int _max_p_level
 Maximum p-refinement level of all elements. More...
 
unsigned int _max_h_level
 Maximum h-refinement level of all elements. More...
 

Detailed Description

MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and storing more state.

Definition at line 88 of file MooseMesh.h.

Member Typedef Documentation

◆ bnd_elem_iterator_imp

typedef std::vector<BndElement *>::iterator MooseMesh::bnd_elem_iterator_imp
protected

Definition at line 1541 of file MooseMesh.h.

◆ bnd_node_iterator_imp

typedef std::vector<BndNode *>::iterator MooseMesh::bnd_node_iterator_imp
protected

Definition at line 1534 of file MooseMesh.h.

◆ const_bnd_elem_iterator_imp

typedef std::vector<BndElement *>::const_iterator MooseMesh::const_bnd_elem_iterator_imp
protected

Definition at line 1542 of file MooseMesh.h.

◆ const_bnd_node_iterator_imp

typedef std::vector<BndNode *>::const_iterator MooseMesh::const_bnd_node_iterator_imp
protected

Definition at line 1535 of file MooseMesh.h.

◆ DataFileParameterType

using DataFileInterface::DataFileParameterType = DataFileName
inherited

The parameter type this interface expects for a data file name.

Definition at line 27 of file DataFileInterface.h.

◆ PeriodicNodeInfo

using MooseMesh::PeriodicNodeInfo = std::pair<const Node *, BoundaryID>

Helper type for building periodic node maps.

Definition at line 1074 of file MooseMesh.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Convenience enums.

Enumerator

Definition at line 1444 of file MooseMesh.h.

1445  {
1446  X = 0,
1447  Y,
1448  Z
1449  };

◆ anonymous enum

anonymous enum
protected
Enumerator
MIN 
MAX 

Definition at line 1450 of file MooseMesh.h.

1451  {
1452  MIN = 0,
1453  MAX
1454  };

◆ ParallelType

Enumerator
DEFAULT 
REPLICATED 
DISTRIBUTED 

Definition at line 104 of file MooseMesh.h.

105  {
106  DEFAULT,
107  REPLICATED,
108  DISTRIBUTED
109  };

Constructor & Destructor Documentation

◆ MooseMesh() [1/3]

MooseMesh::MooseMesh ( const InputParameters parameters)

Definition at line 227 of file MooseMesh.C.

229  Restartable(this, "Mesh"),
230  PerfGraphInterface(this),
231  _parallel_type(getParam<MooseEnum>("parallel_type").getEnum<MooseMesh::ParallelType>()),
232  _use_distributed_mesh(false),
235  _mesh(nullptr),
236  _partitioner_name(getParam<MooseEnum>("partitioner")),
240  _skip_refine_when_use_split(getParam<bool>("skip_refine_when_use_split")),
242  _is_nemesis(getParam<bool>("nemesis")),
245  _patch_size(getParam<unsigned int>("patch_size")),
246  _ghosting_patch_size(isParamValid("ghosting_patch_size")
247  ? getParam<unsigned int>("ghosting_patch_size")
248  : 5 * _patch_size),
249  _max_leaf_size(getParam<unsigned int>("max_leaf_size")),
251  getParam<MooseEnum>("patch_update_strategy").getEnum<Moose::PatchUpdateType>()),
253  _is_split(getParam<bool>("_is_split")),
254  _has_lower_d(false),
255  _allow_recovery(true),
256  _construct_node_list_from_side_list(getParam<bool>("construct_node_list_from_side_list")),
257  _need_delete(false),
260  _is_displaced(false),
261  _coord_sys(
262  declareRestartableData<std::map<SubdomainID, Moose::CoordinateSystemType>>("coord_sys")),
263  _rz_coord_axis(getParam<MooseEnum>("rz_coord_axis")),
264  _coord_system_set(false),
265  _doing_p_refinement(false)
266 {
267  if (isParamValid("ghosting_patch_size") && (_patch_update_strategy != Moose::Iteration))
268  mooseError("Ghosting patch size parameter has to be set in the mesh block "
269  "only when 'iteration' patch update strategy is used.");
270 
271  if (isParamValid("coord_block"))
272  {
273  if (isParamValid("block"))
274  paramWarning("block",
275  "You set both 'Mesh/block' and 'Mesh/coord_block'. The value of "
276  "'Mesh/coord_block' will be used.");
277 
278  _provided_coord_blocks = getParam<std::vector<SubdomainName>>("coord_block");
279  }
280  else if (isParamValid("block"))
281  _provided_coord_blocks = getParam<std::vector<SubdomainName>>("block");
282 
283  if (getParam<bool>("build_all_side_lowerd_mesh"))
284  // Do not initially allow removal of remote elements
286 
288 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1423
bool _node_to_elem_map_built
Definition: MooseMesh.h:1506
bool allowRemoteElementRemoval() const
Whether we are allow remote element removal.
Definition: MooseMesh.h:1094
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1469
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:1874
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready...
Definition: MooseMesh.h:1837
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1457
unsigned int _max_leaf_size
Definition: MooseMesh.h:1568
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseBase.h:384
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1858
bool _custom_partitioner_requested
Definition: MooseMesh.h:1441
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:127
bool _doing_p_refinement
Whether we have p-refinement (as opposed to h-refinement)
Definition: MooseMesh.h:1877
void determineUseDistributedMesh()
Determine whether to use a distributed mesh.
Definition: MooseMesh.C:2828
MooseObject(const InputParameters &parameters)
Definition: MooseObject.C:45
bool _has_lower_d
Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces...
Definition: MooseMesh.h:1816
T & declareRestartableData(const std::string &data_name, Args &&... args)
Declare a piece of data as "restartable" and initialize it.
Definition: Restartable.h:269
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:1436
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:1510
bool _skip_refine_when_use_split
Whether or not to skip uniform refinements when using a pre-split mesh.
Definition: MooseMesh.h:1460
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1819
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1828
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1822
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseMesh.h:1586
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:1871
bool _parallel_type_overridden
Definition: MooseMesh.h:1430
Restartable(const MooseObject *moose_object, const std::string &system_name)
Class constructor.
Definition: Restartable.C:18
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:1571
bool _partitioner_overridden
Definition: MooseMesh.h:1437
bool _is_displaced
Whether this mesh is displaced.
Definition: MooseMesh.h:1849
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition: MooseMesh.h:1463
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1825
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:1562
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:195
PerfGraphInterface(const MooseObject *moose_object)
For objects that are MooseObjects with a default prefix of type()
void paramWarning(const std::string &param, Args... args) const
Emits a warning prefixed with the file and line number of the given param (from the input file) along...
Definition: MooseBase.h:442
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1861
bool _distribution_overridden
Definition: MooseMesh.h:1429
unsigned int _ghosting_patch_size
The number of nearest neighbors to consider for ghosting purposes when iteration patch update strateg...
Definition: MooseMesh.h:1565
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1577

◆ MooseMesh() [2/3]

MooseMesh::MooseMesh ( const MooseMesh other_mesh)

Definition at line 290 of file MooseMesh.C.

291  : MooseObject(other_mesh._pars),
292  Restartable(this, "Mesh"),
293  PerfGraphInterface(this, "CopiedMesh"),
295  _parallel_type(other_mesh._parallel_type),
299  _mesh(other_mesh.getMesh().clone()),
306  _is_nemesis(false),
309  _patch_size(other_mesh._patch_size),
311  _max_leaf_size(other_mesh._max_leaf_size),
314  _is_split(other_mesh._is_split),
317  _has_lower_d(other_mesh._has_lower_d),
318  _allow_recovery(other_mesh._allow_recovery),
320  _need_delete(other_mesh._need_delete),
323  _coord_sys(other_mesh._coord_sys),
324  _rz_coord_axis(other_mesh._rz_coord_axis),
329 {
330  // Note: this calls BoundaryInfo::operator= without changing the
331  // ownership semantics of either Mesh's BoundaryInfo object.
332  getMesh().get_boundary_info() = other_mesh.getMesh().get_boundary_info();
333 
334  const std::set<SubdomainID> & subdomains = other_mesh.meshSubdomains();
335  for (const auto & sbd_id : subdomains)
336  setSubdomainName(sbd_id, other_mesh.getMesh().subdomain_name(sbd_id));
337 
338  // Get references to BoundaryInfo objects to make the code below cleaner...
339  const BoundaryInfo & other_boundary_info = other_mesh.getMesh().get_boundary_info();
340  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
341 
342  // Use the other BoundaryInfo object to build the list of side boundary ids
343  std::vector<BoundaryID> side_boundaries;
344  other_boundary_info.build_side_boundary_ids(side_boundaries);
345 
346  // Assign those boundary ids in our BoundaryInfo object
347  for (const auto & side_bnd_id : side_boundaries)
348  boundary_info.sideset_name(side_bnd_id) = other_boundary_info.get_sideset_name(side_bnd_id);
349 
350  // Do the same thing for node boundary ids
351  std::vector<BoundaryID> node_boundaries;
352  other_boundary_info.build_node_boundary_ids(node_boundaries);
353 
354  for (const auto & node_bnd_id : node_boundaries)
355  boundary_info.nodeset_name(node_bnd_id) = other_boundary_info.get_nodeset_name(node_bnd_id);
356 
357  _bounds.resize(other_mesh._bounds.size());
358  for (std::size_t i = 0; i < _bounds.size(); ++i)
359  {
360  _bounds[i].resize(other_mesh._bounds[i].size());
361  for (std::size_t j = 0; j < _bounds[i].size(); ++j)
362  _bounds[i][j] = other_mesh._bounds[i][j];
363  }
364 
366 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1423
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1580
bool _node_to_elem_map_built
Definition: MooseMesh.h:1506
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1469
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:1874
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready...
Definition: MooseMesh.h:1837
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1457
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
std::string & nodeset_name(boundary_id_type id)
unsigned int _max_leaf_size
Definition: MooseMesh.h:1568
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1858
bool _custom_partitioner_requested
Definition: MooseMesh.h:1441
bool _doing_p_refinement
Whether we have p-refinement (as opposed to h-refinement)
Definition: MooseMesh.h:1877
MooseObject(const InputParameters &parameters)
Definition: MooseObject.C:45
bool _has_lower_d
Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces...
Definition: MooseMesh.h:1816
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:1436
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:1510
void build_side_boundary_ids(std::vector< boundary_id_type > &b_ids) const
bool _skip_refine_when_use_split
Whether or not to skip uniform refinements when using a pre-split mesh.
Definition: MooseMesh.h:1460
std::set< SubdomainID > _lower_d_boundary_blocks
Mesh blocks for boundary lower-d elements in different types.
Definition: MooseMesh.h:1808
const BoundaryInfo & get_boundary_info() const
virtual std::unique_ptr< MeshBase > clone() const=0
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1819
std::set< SubdomainID > _lower_d_interior_blocks
Mesh blocks for interior lower-d elements in different types.
Definition: MooseMesh.h:1806
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition: MooseMesh.C:4285
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428
bool _built_from_other_mesh
Whether or not this mesh was built from another mesh.
Definition: MooseMesh.h:1419
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1828
void setSubdomainName(SubdomainID subdomain_id, const SubdomainName &name)
This method sets the name for subdomain_id to name.
Definition: MooseMesh.C:1749
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1822
std::string & subdomain_name(subdomain_id_type id)
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseMesh.h:1586
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:3216
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:1871
bool _parallel_type_overridden
Definition: MooseMesh.h:1430
Restartable(const MooseObject *moose_object, const std::string &system_name)
Class constructor.
Definition: Restartable.C:18
std::string & sideset_name(boundary_id_type id)
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:1571
bool _partitioner_overridden
Definition: MooseMesh.h:1437
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition: MooseMesh.h:1463
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1825
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:1562
PerfGraphInterface(const MooseObject *moose_object)
For objects that are MooseObjects with a default prefix of type()
std::unordered_map< SubdomainID, std::pair< Point, RealVectorValue > > _subdomain_id_to_rz_coord_axis
Map of subdomain ID to general axisymmetric axis.
Definition: MooseMesh.h:1864
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1861
bool _distribution_overridden
Definition: MooseMesh.h:1429
unsigned int _ghosting_patch_size
The number of nearest neighbors to consider for ghosting purposes when iteration patch update strateg...
Definition: MooseMesh.h:1565
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1577
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3171

◆ MooseMesh() [3/3]

MooseMesh::MooseMesh ( )
delete

◆ ~MooseMesh()

MooseMesh::~MooseMesh ( )
virtual

Definition at line 368 of file MooseMesh.C.

369 {
370  freeBndNodes();
371  freeBndElems();
373 }
void freeBndElems()
Definition: MooseMesh.C:395
void clearQuadratureNodes()
Clear out any existing quadrature nodes.
Definition: MooseMesh.C:1680
void freeBndNodes()
Definition: MooseMesh.C:376

Member Function Documentation

◆ activeLocalElementsBegin() [1/2]

MeshBase::element_iterator MooseMesh::activeLocalElementsBegin ( )

Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.

Definition at line 3051 of file MooseMesh.C.

Referenced by FEProblemBase::checkDisplacementOrders(), and hasSecondOrderElements().

3052 {
3053  return getMesh().active_local_elements_begin();
3054 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ activeLocalElementsBegin() [2/2]

MeshBase::const_element_iterator MooseMesh::activeLocalElementsBegin ( ) const

Definition at line 3063 of file MooseMesh.C.

3064 {
3065  return getMesh().active_local_elements_begin();
3066 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ activeLocalElementsEnd() [1/2]

const MeshBase::element_iterator MooseMesh::activeLocalElementsEnd ( )

Definition at line 3057 of file MooseMesh.C.

Referenced by FEProblemBase::checkDisplacementOrders(), and hasSecondOrderElements().

3058 {
3059  return getMesh().active_local_elements_end();
3060 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ activeLocalElementsEnd() [2/2]

const MeshBase::const_element_iterator MooseMesh::activeLocalElementsEnd ( ) const

Definition at line 3069 of file MooseMesh.C.

3070 {
3071  return getMesh().active_local_elements_end();
3072 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ addGhostedBoundary()

void MooseMesh::addGhostedBoundary ( BoundaryID  boundary_id)

This will add the boundary ids to be ghosted to this processor.

Definition at line 3229 of file MooseMesh.C.

Referenced by FEProblemBase::addGhostedBoundary().

3230 {
3231  _ghosted_boundaries.insert(boundary_id);
3232 }
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:1558

◆ addPeriodicVariable()

void MooseMesh::addPeriodicVariable ( unsigned int  var_num,
BoundaryID  primary,
BoundaryID  secondary 
)

For "regular orthogonal" meshes, determine if variable var_num is periodic with respect to the primary and secondary BoundaryIDs, record this fact in the _periodic_dim data structure.

Definition at line 2217 of file MooseMesh.C.

Referenced by AddPeriodicBCAction::setPeriodicVars().

2218 {
2220  return;
2221 
2222  _periodic_dim[var_num].resize(dimension());
2223 
2224  _half_range = Point(dimensionWidth(0) / 2.0, dimensionWidth(1) / 2.0, dimensionWidth(2) / 2.0);
2225 
2226  bool component_found = false;
2227  for (unsigned int component = 0; component < dimension(); ++component)
2228  {
2229  const std::pair<BoundaryID, BoundaryID> * boundary_ids = getPairedBoundaryMapping(component);
2230 
2231  if (boundary_ids != nullptr &&
2232  ((boundary_ids->first == primary && boundary_ids->second == secondary) ||
2233  (boundary_ids->first == secondary && boundary_ids->second == primary)))
2234  {
2235  _periodic_dim[var_num][component] = true;
2236  component_found = true;
2237  }
2238  }
2239  if (!component_found)
2240  mooseWarning("Could not find a match between boundary '",
2241  getBoundaryName(primary),
2242  "' and '",
2243  getBoundaryName(secondary),
2244  "' to set periodic boundary conditions for variable (index:",
2245  var_num,
2246  ") in either the X, Y or Z direction. The periodic dimension of the mesh for this "
2247  "variable will not be stored.");
2248 }
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:1631
const std::string & getBoundaryName(BoundaryID boundary_id)
Return the name of the boundary given the id.
Definition: MooseMesh.C:1792
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2928
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping(unsigned int component)
This function attempts to return the paired boundary ids for the given component. ...
Definition: MooseMesh.C:2293
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition: MooseMesh.C:2193
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Definition: MooseBase.h:295
std::map< unsigned int, std::vector< bool > > _periodic_dim
A map of vectors indicating which dimensions are periodic in a regular orthogonal mesh for the specif...
Definition: MooseMesh.h:1626
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1577

◆ addQuadratureNode()

Node * MooseMesh::addQuadratureNode ( const Elem elem,
const unsigned short int  side,
const unsigned int  qp,
BoundaryID  bid,
const Point point 
)

Adds a fictitious "QuadratureNode".

This doesn't actually add it to the libMesh mesh... we just keep track of these here in MooseMesh.

QuadratureNodes are fictitious "Nodes" that are located at quadrature points. This is useful for using the geometric search system to do searches based on quadrature point locations....

Parameters
elemThe element
sideThe side number on which we want to add a quadrature node
qpThe number of the quadrature point
bidThe boundary ID for the point to be added with
pointThe physical location of the point

Definition at line 1610 of file MooseMesh.C.

Referenced by GeometricSearchData::generateQuadratureNodes().

1615 {
1616  Node * qnode;
1617 
1618  if (_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) ==
1620  {
1621  // Create a new node id starting from the max node id and counting down. This will be the least
1622  // likely to collide with an existing node id.
1623  // Note that we are using numeric_limits<unsigned>::max even
1624  // though max_id is stored as a dof_id_type. I tried this with
1625  // numeric_limits<dof_id_type>::max and it broke several tests in
1626  // MOOSE. So, this is some kind of a magic number that we will
1627  // just continue to use...
1629  dof_id_type new_id = max_id - _quadrature_nodes.size();
1630 
1631  if (new_id <= getMesh().max_node_id())
1632  mooseError("Quadrature node id collides with existing node id!");
1633 
1634  qnode = new Node(point, new_id);
1635 
1636  // Keep track of this new node in two different ways for easy lookup
1637  _quadrature_nodes[new_id] = qnode;
1638  _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp] = qnode;
1639 
1640  if (elem->active())
1641  {
1642  _node_to_elem_map[new_id].push_back(elem->id());
1643  _node_to_active_semilocal_elem_map[new_id].push_back(elem->id());
1644  }
1645  }
1646  else
1647  qnode = _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
1648 
1649  BndNode * bnode = new BndNode(qnode, bid);
1650  _bnd_nodes.push_back(bnode);
1651  _bnd_node_ids[bid].insert(qnode->id());
1652 
1653  _extra_bnd_nodes.push_back(*bnode);
1654 
1655  // Do this so the range will be regenerated next time it is accessed
1656  _bnd_node_range.reset();
1657 
1658  return qnode;
1659 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:1547
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
A map of all of the current nodes to the elements that they are connected to.
Definition: MooseMesh.h:1505
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
Map of sets of node IDs in each boundary.
Definition: MooseMesh.h:1537
auto max(const L &left, const R &right)
dof_id_type id() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1533
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:1550
std::map< dof_id_type, std::map< unsigned int, std::map< dof_id_type, Node * > > > _elem_to_side_to_qp_to_quadrature_nodes
Definition: MooseMesh.h:1549
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
bool active() const
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
A map of all of the current nodes to the active elements that they are connected to.
Definition: MooseMesh.h:1509
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:1500
uint8_t dof_id_type

◆ addUniqueNode()

const Node * MooseMesh::addUniqueNode ( const Point p,
Real  tol = 1e-6 
)

Add a new node to the mesh.

If there is already a node located at the point passed then the node will not be added. In either case a reference to the node at that location will be returned

Looping through the mesh nodes each time we add a point is very slow. To speed things up we keep a local data structure

Definition at line 1576 of file MooseMesh.C.

1577 {
1582  if (getMesh().n_nodes() != _node_map.size())
1583  {
1584  _node_map.clear();
1585  _node_map.reserve(getMesh().n_nodes());
1586  for (const auto & node : getMesh().node_ptr_range())
1587  _node_map.push_back(node);
1588  }
1589 
1590  Node * node = nullptr;
1591  for (unsigned int i = 0; i < _node_map.size(); ++i)
1592  {
1593  if (p.relative_fuzzy_equals(*_node_map[i], tol))
1594  {
1595  node = _node_map[i];
1596  break;
1597  }
1598  }
1599  if (node == nullptr)
1600  {
1601  node = getMesh().add_node(new Node(p));
1602  _node_map.push_back(node);
1603  }
1604 
1605  mooseAssert(node != nullptr, "Node is NULL");
1606  return node;
1607 }
const dof_id_type n_nodes
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::vector< Node * > _node_map
Vector of all the Nodes in the mesh for determining when to add a new point.
Definition: MooseMesh.h:1574
virtual Node * add_node(Node *n)=0
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:820
bool relative_fuzzy_equals(const TypeVector< Real > &rhs, Real tol=TOLERANCE) const

◆ allFaceInfo()

const std::vector< FaceInfo > & MooseMesh::allFaceInfo ( ) const
inline

Accessor for all FaceInfo objects.

Definition at line 2179 of file MooseMesh.h.

2180 {
2181  return _all_face_info;
2182 }
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1604

◆ allowRecovery()

void MooseMesh::allowRecovery ( bool  allow)
inline

Set whether or not this mesh is allowed to read a recovery file.

Definition at line 1031 of file MooseMesh.h.

1031 { _allow_recovery = allow; }
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1819

◆ allowRemoteElementRemoval() [1/2]

void MooseMesh::allowRemoteElementRemoval ( bool  allow_removal)

Set whether to allow remote element removal.

Definition at line 3915 of file MooseMesh.C.

3916 {
3917  _allow_remote_element_removal = allow_remote_element_removal;
3918  if (_mesh)
3919  _mesh->allow_remote_element_removal(allow_remote_element_removal);
3920 
3921  if (!allow_remote_element_removal)
3922  // If we're not allowing remote element removal now, then we will need deletion later after
3923  // late geoemetric ghosting functors have been added (late geometric ghosting functor addition
3924  // happens when algebraic ghosting functors are added)
3925  _need_delete = true;
3926 }
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1828
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1825

◆ allowRemoteElementRemoval() [2/2]

bool MooseMesh::allowRemoteElementRemoval ( ) const
inline

Whether we are allow remote element removal.

Definition at line 1094 of file MooseMesh.h.

Referenced by MooseMesh().

bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1828

◆ areElemIDsIdentical()

bool MooseMesh::areElemIDsIdentical ( const std::string &  id_name1,
const std::string &  id_name2 
) const
inline

Whether or not two extra element integers are identical.

Definition at line 2165 of file MooseMesh.h.

2166 {
2167  auto id1 = getElementIDIndex(id_name1);
2168  auto id2 = getElementIDIndex(id_name2);
2169  return _id_identical_flag[id1][id2];
2170 }
std::vector< std::vector< bool > > _id_identical_flag
Flags to indicate whether or not any two extra element integers are the same.
Definition: MooseMesh.h:1846
unsigned int getElementIDIndex(const std::string &id_name) const
Return the accessing integer for an extra element integer with its name.
Definition: MooseMesh.h:2157

◆ bndElemsBegin()

MooseMesh::bnd_elem_iterator MooseMesh::bndElemsBegin ( )
virtual

Return iterators to the beginning/end of the boundary elements list.

Definition at line 1561 of file MooseMesh.C.

Referenced by getBoundaryElementRange(), and MeshInfo::possiblyAddSidesetInfo().

1562 {
1564  return bnd_elem_iterator(_bnd_elems.begin(), _bnd_elems.end(), p);
1565 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1540

◆ bndElemsEnd()

MooseMesh::bnd_elem_iterator MooseMesh::bndElemsEnd ( )
virtual

Definition at line 1569 of file MooseMesh.C.

Referenced by getBoundaryElementRange(), and MeshInfo::possiblyAddSidesetInfo().

1570 {
1572  return bnd_elem_iterator(_bnd_elems.end(), _bnd_elems.end(), p);
1573 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1540

◆ bndNodesBegin()

MooseMesh::bnd_node_iterator MooseMesh::bndNodesBegin ( )
virtual

Return iterators to the beginning/end of the boundary nodes list.

Definition at line 1545 of file MooseMesh.C.

Referenced by getBoundaryNodeRange().

1546 {
1548  return bnd_node_iterator(_bnd_nodes.begin(), _bnd_nodes.end(), p);
1549 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1533

◆ bndNodesEnd()

MooseMesh::bnd_node_iterator MooseMesh::bndNodesEnd ( )
virtual

Definition at line 1553 of file MooseMesh.C.

Referenced by getBoundaryNodeRange().

1554 {
1556  return bnd_node_iterator(_bnd_nodes.end(), _bnd_nodes.end(), p);
1557 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1533

◆ boundaryLowerDBlocks()

const std::set<SubdomainID>& MooseMesh::boundaryLowerDBlocks ( ) const
inline
Returns
The set of lower-dimensional blocks for boundary sides

Definition at line 1407 of file MooseMesh.h.

Referenced by FEProblemBase::adaptMesh(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), NonlinearSystemBase::checkKernelCoverage(), HFEMDirichletBC::HFEMDirichletBC(), FEProblemBase::initialAdaptMesh(), and LowerDIntegratedBC::LowerDIntegratedBC().

1407 { return _lower_d_boundary_blocks; }
std::set< SubdomainID > _lower_d_boundary_blocks
Mesh blocks for boundary lower-d elements in different types.
Definition: MooseMesh.h:1808

◆ buildActiveSideList()

std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > MooseMesh::buildActiveSideList ( ) const

Calls BoundaryInfo::build_active_side_list.

Returns
A container of active (element, side, id) tuples.

Definition at line 3015 of file MooseMesh.C.

Referenced by buildFiniteVolumeInfo(), and PenetrationLocator::detectPenetration().

3016 {
3018 }
void build_active_side_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &side_list, std::vector< boundary_id_type > &bc_id_list) const
const BoundaryInfo & get_boundary_info() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ buildBndElemList()

void MooseMesh::buildBndElemList ( )

Definition at line 1155 of file MooseMesh.C.

Referenced by update().

1156 {
1157  TIME_SECTION("buildBndElemList", 5, "Building Boundary Elements List");
1158 
1159  freeBndElems();
1160 
1161  auto bc_tuples = getMesh().get_boundary_info().build_active_side_list();
1162 
1163  int n = bc_tuples.size();
1164  _bnd_elems.clear();
1165  _bnd_elems.reserve(n);
1166  for (const auto & t : bc_tuples)
1167  {
1168  auto elem_id = std::get<0>(t);
1169  auto side_id = std::get<1>(t);
1170  auto bc_id = std::get<2>(t);
1171 
1172  _bnd_elems.push_back(new BndElement(getMesh().elem_ptr(elem_id), side_id, bc_id));
1173  _bnd_elem_ids[bc_id].insert(elem_id);
1174  }
1175 }
void freeBndElems()
Definition: MooseMesh.C:395
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:1545
const boundary_id_type side_id
void build_active_side_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &side_list, std::vector< boundary_id_type > &bc_id_list) const
const BoundaryInfo & get_boundary_info() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1540

◆ buildCoarseningMap()

void MooseMesh::buildCoarseningMap ( const Elem elem,
libMesh::QBase qrule,
libMesh::QBase qrule_face,
int  input_side 
)
private

Build the coarsening map for a given element type.

This will tell you what quadrature points to copy from and to for stateful material properties on newly created elements from Adaptivity.

Parameters
elemThe element that represents the element type you need the coarsening map for.
qruleThe quadrature rule in use.
qrule_faceThe current face quadrature rule
input_sideThe side to map

TODO: When running with parallel mesh + stateful adaptivty we will need to make sure that each processor has a complete map. This may require parallel communication. This is likely to happen when running on a mixed element mesh.

Definition at line 2551 of file MooseMesh.C.

Referenced by buildHRefinementAndCoarseningMaps().

2552 {
2553  TIME_SECTION("buildCoarseningMap", 5, "Building Coarsening Map");
2554 
2555  std::pair<int, ElemType> the_pair(input_side, elem.type());
2556 
2557  if (_elem_type_to_coarsening_map.find(the_pair) != _elem_type_to_coarsening_map.end())
2558  mooseError("Already built a qp coarsening map!");
2559 
2560  std::vector<std::vector<QpMap>> refinement_map;
2561  std::vector<std::pair<unsigned int, QpMap>> & coarsen_map =
2562  _elem_type_to_coarsening_map[the_pair];
2563 
2564  // The -1 here is for a specific child. We don't do that for coarsening maps
2565  // Also note that we're always mapping the same side to the same side (which is guaranteed by
2566  // libMesh).
2568  &elem, qrule, qrule_face, refinement_map, coarsen_map, input_side, -1, input_side);
2569 
2576 }
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::pair< unsigned int, QpMap > > > _elem_type_to_coarsening_map
Holds mappings for volume to volume and parent side to child side Map key:
Definition: MooseMesh.h:1779
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
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)
Given an elem type, get maps that tell us what qp&#39;s are closest to each other between a parent and it...
Definition: MooseMesh.C:2621
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
virtual ElemType type() const=0

◆ buildElemIDInfo()

void MooseMesh::buildElemIDInfo ( )
private

Build extra data for faster access to the information of extra element integers.

Definition at line 1059 of file MooseMesh.C.

Referenced by update().

1060 {
1061  unsigned int n = getMesh().n_elem_integers() + 1;
1062 
1063  _block_id_mapping.clear();
1064  _max_ids.clear();
1065  _min_ids.clear();
1066  _id_identical_flag.clear();
1067 
1068  _block_id_mapping.resize(n);
1071  _id_identical_flag.resize(n, std::vector<bool>(n, true));
1072  for (const auto & elem : getMesh().active_local_element_ptr_range())
1073  for (unsigned int i = 0; i < n; ++i)
1074  {
1075  auto id = (i == n - 1 ? elem->subdomain_id() : elem->get_extra_integer(i));
1076  _block_id_mapping[i][elem->subdomain_id()].insert(id);
1077  if (id > _max_ids[i])
1078  _max_ids[i] = id;
1079  if (id < _min_ids[i])
1080  _min_ids[i] = id;
1081  for (unsigned int j = 0; j < n; ++j)
1082  {
1083  auto idj = (j == n - 1 ? elem->subdomain_id() : elem->get_extra_integer(j));
1084  if (i != j && _id_identical_flag[i][j] && id != idj)
1085  _id_identical_flag[i][j] = false;
1086  }
1087  }
1088 
1089  for (unsigned int i = 0; i < n; ++i)
1090  {
1091  for (auto & blk : meshSubdomains())
1092  comm().set_union(_block_id_mapping[i][blk]);
1093  comm().min(_id_identical_flag[i]);
1094  }
1095  comm().max(_max_ids);
1096  comm().min(_min_ids);
1097 }
std::vector< dof_id_type > _min_ids
Minimum integer ID for each extra element integer.
Definition: MooseMesh.h:1844
unsigned int n_elem_integers() const
std::vector< std::vector< bool > > _id_identical_flag
Flags to indicate whether or not any two extra element integers are the same.
Definition: MooseMesh.h:1846
const Parallel::Communicator & comm() const
auto max(const L &left, const R &right)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
void min(const T &r, T &o, Request &req) const
std::vector< dof_id_type > _max_ids
Maximum integer ID for each extra element integer.
Definition: MooseMesh.h:1842
subdomain_id_type subdomain_id() const
void max(const T &r, T &o, Request &req) const
std::vector< std::unordered_map< SubdomainID, std::set< dof_id_type > > > _block_id_mapping
Unique element integer IDs for each subdomain and each extra element integers.
Definition: MooseMesh.h:1840
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
auto min(const L &left, const R &right)
dof_id_type get_extra_integer(const unsigned int index) const
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3171
void set_union(T &data, const unsigned int root_id) const

◆ buildFiniteVolumeInfo()

void MooseMesh::buildFiniteVolumeInfo ( ) const

Builds the face and elem info vectors that store meta-data needed for looping over and doing calculations based on mesh faces and elements in a finite volume setting.

This should only be called when finite volume variables are used in the problem or when the face and elem info objects are necessary for functor-based evaluations.

Definition at line 3739 of file MooseMesh.C.

Referenced by setupFiniteVolumeMeshData().

3740 {
3741  mooseAssert(!Threads::in_threads,
3742  "This routine has not been implemented for threads. Please query this routine before "
3743  "a threaded region or contact a MOOSE developer to discuss.");
3744  _finite_volume_info_dirty = false;
3745 
3746  using Keytype = std::pair<const Elem *, unsigned short int>;
3747 
3748  // create a map from elem/side --> boundary ids
3749  std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> side_list =
3751  std::map<Keytype, std::set<boundary_id_type>> side_map;
3752  for (auto & [elem_id, side, bc_id] : side_list)
3753  {
3754  const Elem * elem = _mesh->elem_ptr(elem_id);
3755  Keytype key(elem, side);
3756  auto & bc_set = side_map[key];
3757  bc_set.insert(bc_id);
3758  }
3759 
3760  _face_info.clear();
3761  _all_face_info.clear();
3762  _elem_side_to_face_info.clear();
3763 
3764  _elem_to_elem_info.clear();
3765  _elem_info.clear();
3766 
3767  // by performing the element ID comparison check in the below loop, we are ensuring that we never
3768  // double count face contributions. If a face lies along a process boundary, the only process that
3769  // will contribute to both sides of the face residuals/Jacobians will be the process that owns the
3770  // element with the lower ID.
3771  auto begin = getMesh().active_elements_begin();
3772  auto end = getMesh().active_elements_end();
3773 
3774  // We prepare a map connecting the Elem* and the corresponding ElemInfo
3775  // for the active elements.
3776  for (const Elem * elem : as_range(begin, end))
3777  _elem_to_elem_info.emplace(elem->id(), elem);
3778 
3779  dof_id_type face_index = 0;
3780  for (const Elem * elem : as_range(begin, end))
3781  {
3782  for (unsigned int side = 0; side < elem->n_sides(); ++side)
3783  {
3784  // get the neighbor element
3785  const Elem * neighbor = elem->neighbor_ptr(side);
3786 
3787  // Check if the FaceInfo shall belong to the element. If yes,
3788  // create and initialize the FaceInfo. We need this to ensure that
3789  // we do not duplicate FaceInfo-s.
3790  if (Moose::FV::elemHasFaceInfo(*elem, neighbor))
3791  {
3792  mooseAssert(!neighbor || (neighbor->level() < elem->level() ? neighbor->active() : true),
3793  "If the neighbor is coarser than the element, we expect that the neighbor must "
3794  "be active.");
3795 
3796  // We construct the faceInfo using the elementinfo and side index
3797  _all_face_info.emplace_back(&_elem_to_elem_info[elem->id()], side, face_index++);
3798 
3799  auto & fi = _all_face_info.back();
3800 
3801  // get all the sidesets that this face is contained in and cache them
3802  // in the face info.
3803  std::set<boundary_id_type> & boundary_ids = fi.boundaryIDs();
3804  boundary_ids.clear();
3805 
3806  // We initialize the weights/other information in faceInfo. If the neighbor does not exist
3807  // or is remote (so when we are on some sort of mesh boundary), we initialize the ghost
3808  // cell and use it to compute the weights corresponding to the faceInfo.
3809  if (!neighbor || neighbor == libMesh::remote_elem)
3810  fi.computeBoundaryCoefficients();
3811  else
3812  fi.computeInternalCoefficients(&_elem_to_elem_info[neighbor->id()]);
3813 
3814  auto lit = side_map.find(Keytype(&fi.elem(), fi.elemSideID()));
3815  if (lit != side_map.end())
3816  boundary_ids.insert(lit->second.begin(), lit->second.end());
3817 
3818  if (fi.neighborPtr())
3819  {
3820  auto rit = side_map.find(Keytype(fi.neighborPtr(), fi.neighborSideID()));
3821  if (rit != side_map.end())
3822  boundary_ids.insert(rit->second.begin(), rit->second.end());
3823  }
3824  }
3825  }
3826  }
3827 
3828  // Build the local face info and elem_side to face info maps. We need to do this after
3829  // _all_face_info is finished being constructed because emplace_back invalidates all iterators and
3830  // references if ever the new size exceeds capacity
3831  for (auto & fi : _all_face_info)
3832  {
3833  const Elem * const elem = &fi.elem();
3834  const auto side = fi.elemSideID();
3835 
3836 #ifndef NDEBUG
3837  auto pair_it =
3838 #endif
3839  _elem_side_to_face_info.emplace(std::make_pair(elem, side), &fi);
3840  mooseAssert(pair_it.second, "We should be adding unique FaceInfo objects.");
3841 
3842  // We will add the faces on processor boundaries to the list of face infos on each
3843  // associated processor.
3844  if (fi.elem().processor_id() == this->processor_id() ||
3845  (fi.neighborPtr() && (fi.neighborPtr()->processor_id() == this->processor_id())))
3846  _face_info.push_back(&fi);
3847  }
3848 
3849  for (auto & ei : _elem_to_elem_info)
3850  if (ei.second.elem()->processor_id() == this->processor_id())
3851  _elem_info.push_back(&ei.second);
3852 }
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1604
std::vector< const FaceInfo * > _face_info
Holds only those FaceInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1608
bool elemHasFaceInfo(const Elem &elem, const Elem *const neighbor)
This function infers based on elements if the faceinfo between them belongs to the element or not...
Definition: FVUtils.C:21
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1615
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList() const
Calls BoundaryInfo::build_active_side_list.
Definition: MooseMesh.C:3015
std::vector< const ElemInfo * > _elem_info
Holds only those ElemInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1600
std::unordered_map< std::pair< const Elem *, unsigned int >, FaceInfo * > _elem_side_to_face_info
Map from elem-side pair to FaceInfo.
Definition: MooseMesh.h:1612
dof_id_type id() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
std::unordered_map< dof_id_type, ElemInfo > _elem_to_elem_info
Map connecting elems with their corresponding ElemInfo, we use the element ID as the key...
Definition: MooseMesh.h:1596
virtual unsigned int n_sides() const=0
const Elem * neighbor_ptr(unsigned int i) const
unsigned int level() const
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
processor_id_type processor_id() const
bool active() const
uint8_t dof_id_type
const RemoteElem * remote_elem

◆ buildHRefinementAndCoarseningMaps()

void MooseMesh::buildHRefinementAndCoarseningMaps ( Assembly assembly)
private

Definition at line 2311 of file MooseMesh.C.

Referenced by buildRefinementAndCoarseningMaps().

2312 {
2313  std::map<ElemType, Elem *> canonical_elems;
2314 
2315  // First, loop over all elements and find a canonical element for each type
2316  // Doing it this way guarantees that this is going to work in parallel
2317  for (const auto & elem : getMesh().element_ptr_range()) // TODO: Thread this
2318  {
2319  ElemType type = elem->type();
2320 
2321  if (canonical_elems.find(type) ==
2322  canonical_elems.end()) // If we haven't seen this type of elem before save it
2323  canonical_elems[type] = elem;
2324  else
2325  {
2326  Elem * stored = canonical_elems[type];
2327  if (elem->id() < stored->id()) // Arbitrarily keep the one with a lower id
2328  canonical_elems[type] = elem;
2329  }
2330  }
2331  // Now build the maps using these templates
2332  // Note: This MUST be done NOT threaded!
2333  for (const auto & can_it : canonical_elems)
2334  {
2335  Elem * elem = can_it.second;
2336 
2337  // Need to do this just once to get the right qrules put in place
2338  assembly->setCurrentSubdomainID(elem->subdomain_id());
2339  assembly->reinit(elem);
2340  assembly->reinit(elem, 0);
2341  auto && qrule = assembly->writeableQRule();
2342  auto && qrule_face = assembly->writeableQRuleFace();
2343 
2344  // Volume to volume projection for refinement
2345  buildRefinementMap(*elem, *qrule, *qrule_face, -1, -1, -1);
2346 
2347  // Volume to volume projection for coarsening
2348  buildCoarseningMap(*elem, *qrule, *qrule_face, -1);
2349 
2350  // Map the sides of children
2351  for (unsigned int side = 0; side < elem->n_sides(); side++)
2352  {
2353  // Side to side for sides that match parent's sides
2354  buildRefinementMap(*elem, *qrule, *qrule_face, side, -1, side);
2355  buildCoarseningMap(*elem, *qrule, *qrule_face, side);
2356  }
2357 
2358  // Child side to parent volume mapping for "internal" child sides
2359  for (unsigned int child = 0; child < elem->n_children(); ++child)
2360  for (unsigned int side = 0; side < elem->n_sides();
2361  ++side) // Assume children have the same number of sides!
2362  if (!elem->is_child_on_side(child, side)) // Otherwise we already computed that map
2363  buildRefinementMap(*elem, *qrule, *qrule_face, -1, child, side);
2364  }
2365 }
ElemType
libMesh::QBase *const & writeableQRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:224
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const=0
virtual unsigned int n_children() const=0
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
dof_id_type id() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:89
void buildRefinementMap(const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int parent_side, int child, int child_side)
Build the refinement map for a given element type.
Definition: MooseMesh.C:2472
void buildCoarseningMap(const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int input_side)
Build the coarsening map for a given element type.
Definition: MooseMesh.C:2551
virtual unsigned int n_sides() const=0
void setCurrentSubdomainID(SubdomainID i)
set the current subdomain ID
Definition: Assembly.h:385
subdomain_id_type subdomain_id() const
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
virtual ElemType type() const=0
libMesh::QBase *const & writeableQRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:300

◆ buildLowerDMesh()

void MooseMesh::buildLowerDMesh ( )
private

Build lower-d mesh for all sides.

Definition at line 658 of file MooseMesh.C.

Referenced by init().

659 {
660  auto & mesh = getMesh();
661 
662  if (!mesh.is_serial())
663  mooseError(
664  "Hybrid finite element method must use replicated mesh.\nCurrently lower-dimensional mesh "
665  "does not support mesh re-partitioning and a debug assertion being hit related with "
666  "neighbors of lower-dimensional element, with distributed mesh.");
667 
668  // Lower-D element build requires neighboring element information
669  if (!mesh.is_prepared())
671 
672  // maximum number of sides of all elements
673  unsigned int max_n_sides = 0;
674 
675  // remove existing lower-d element first
676  std::set<Elem *> deleteable_elems;
677  for (auto & elem : mesh.element_ptr_range())
680  deleteable_elems.insert(elem);
681  else if (elem->n_sides() > max_n_sides)
682  max_n_sides = elem->n_sides();
683 
684  for (auto & elem : deleteable_elems)
686  for (const auto & id : _lower_d_interior_blocks)
687  _mesh_subdomains.erase(id);
688  for (const auto & id : _lower_d_boundary_blocks)
689  _mesh_subdomains.erase(id);
690  _lower_d_interior_blocks.clear();
691  _lower_d_boundary_blocks.clear();
692 
693  mesh.comm().max(max_n_sides);
694 
695  deleteable_elems.clear();
696 
697  // get all side types
698  std::set<int> interior_side_types;
699  std::set<int> boundary_side_types;
700  for (const auto & elem : mesh.active_element_ptr_range())
701  for (const auto side : elem->side_index_range())
702  {
703  Elem * neig = elem->neighbor_ptr(side);
704  std::unique_ptr<Elem> side_elem(elem->build_side_ptr(side));
705  if (neig)
706  interior_side_types.insert(side_elem->type());
707  else
708  boundary_side_types.insert(side_elem->type());
709  }
710  mesh.comm().set_union(interior_side_types);
711  mesh.comm().set_union(boundary_side_types);
712 
713  // assign block ids for different side types
714  std::map<ElemType, SubdomainID> interior_block_ids;
715  std::map<ElemType, SubdomainID> boundary_block_ids;
716  // we assume this id is not used by the mesh
718  for (const auto & tpid : interior_side_types)
719  {
720  const auto type = ElemType(tpid);
721  mesh.subdomain_name(id) = "INTERNAL_SIDE_LOWERD_SUBDOMAIN_" + Utility::enum_to_string(type);
722  interior_block_ids[type] = id;
723  _lower_d_interior_blocks.insert(id);
724  if (_mesh_subdomains.count(id) > 0)
725  mooseError("Trying to add a mesh block with id ", id, " that has existed in the mesh");
726  _mesh_subdomains.insert(id);
727  --id;
728  }
729  for (const auto & tpid : boundary_side_types)
730  {
731  const auto type = ElemType(tpid);
732  mesh.subdomain_name(id) = "BOUNDARY_SIDE_LOWERD_SUBDOMAIN_" + Utility::enum_to_string(type);
733  boundary_block_ids[type] = id;
734  _lower_d_boundary_blocks.insert(id);
735  if (_mesh_subdomains.count(id) > 0)
736  mooseError("Trying to add a mesh block with id ", id, " that has existed in the mesh");
737  _mesh_subdomains.insert(id);
738  --id;
739  }
740 
741  dof_id_type max_elem_id = mesh.max_elem_id();
742  unique_id_type max_unique_id = mesh.parallel_max_unique_id();
743 
744  std::vector<Elem *> side_elems;
746  for (const auto & elem : mesh.active_element_ptr_range())
747  {
748  // skip existing lower-d elements
749  if (elem->interior_parent())
750  continue;
751 
752  for (const auto side : elem->side_index_range())
753  {
754  Elem * neig = elem->neighbor_ptr(side);
755 
756  bool build_side = false;
757  if (!neig)
758  build_side = true;
759  else
760  {
761  mooseAssert(!neig->is_remote(), "We error if the mesh is not serial");
762  if (!neig->active())
763  build_side = true;
764  else if (neig->level() == elem->level() && elem->id() < neig->id())
765  build_side = true;
766  }
767 
768  if (build_side)
769  {
770  std::unique_ptr<Elem> side_elem(elem->build_side_ptr(side));
771 
772  // The side will be added with the same processor id as the parent.
773  side_elem->processor_id() = elem->processor_id();
774 
775  // Add subdomain ID
776  if (neig)
777  side_elem->subdomain_id() = interior_block_ids.at(side_elem->type());
778  else
779  side_elem->subdomain_id() = boundary_block_ids.at(side_elem->type());
780 
781  // set ids consistently across processors (these ids will be temporary)
782  side_elem->set_id(max_elem_id + elem->id() * max_n_sides + side);
783  side_elem->set_unique_id(max_unique_id + elem->id() * max_n_sides + side);
784 
785  // Also assign the side's interior parent, so it is always
786  // easy to figure out the Elem we came from.
787  // Note: the interior parent could be a ghost element.
788  side_elem->set_interior_parent(elem);
789 
790  side_elems.push_back(side_elem.release());
791 
792  // add link between higher d element to lower d element
793  auto pair = std::make_pair(elem, side);
794  auto link = std::make_pair(pair, side_elems.back());
795  auto ilink = std::make_pair(side_elems.back(), side);
798  }
799  }
800  }
801 
802  // finally, add the lower-dimensional element to the mesh
803  // Note: lower-d interior element will exist on a processor if its associated interior
804  // parent exists on a processor whether or not being a ghost. Lower-d elements will
805  // get its interior parent's processor id.
806  for (auto & elem : side_elems)
807  mesh.add_elem(elem);
808 
809  // we do all the stuff in prepare_for_use such as renumber_nodes_and_elements(),
810  // update_parallel_id_counts(), cache_elem_dims(), etc. except partitioning here.
811  const bool skip_partitioning_old = mesh.skip_partitioning();
812  mesh.skip_partitioning(true);
813  // Finding neighbors is ambiguous for lower-dimensional elements on interior faces
814  mesh.allow_find_neighbors(false);
816  mesh.skip_partitioning(skip_partitioning_old);
817 }
ElemType
bool is_prepared() const
virtual unique_id_type parallel_max_unique_id() const=0
const Elem * interior_parent() const
IntRange< unsigned short > side_index_range() const
void skip_partitioning(bool skip)
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
Definition: MooseMesh.h:1812
void prepare_for_use(const bool skip_renumber_nodes_and_elements, const bool skip_find_neighbors)
MeshBase & mesh
std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > _higher_d_elem_side_to_lower_d_elem
Holds a map from a high-order element side to its corresponding lower-d element.
Definition: MooseMesh.h:1811
const Parallel::Communicator & comm() const
std::set< SubdomainID > _lower_d_boundary_blocks
Mesh blocks for boundary lower-d elements in different types.
Definition: MooseMesh.h:1808
std::set< SubdomainID > _lower_d_interior_blocks
Mesh blocks for interior lower-d elements in different types.
Definition: MooseMesh.h:1806
virtual bool is_serial() const
static const subdomain_id_type invalid_subdomain_id
virtual void find_neighbors(const bool reset_remote_elements=false, const bool reset_current_list=true)=0
virtual void delete_elem(Elem *e)=0
dof_id_type id() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual Elem * add_elem(Elem *e)=0
virtual dof_id_type max_elem_id() const=0
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:89
virtual bool is_remote() const
std::string & subdomain_name(subdomain_id_type id)
void allow_find_neighbors(bool allow)
std::string enum_to_string(const T e)
virtual unsigned int n_sides() const=0
const Elem * neighbor_ptr(unsigned int i) const
unsigned int level() const
subdomain_id_type subdomain_id() const
void max(const T &r, T &o, Request &req) const
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1516
bool active() const
processor_id_type processor_id() const
uint8_t unique_id_type
uint8_t dof_id_type
void set_union(T &data, const unsigned int root_id) const

◆ buildMesh()

virtual void MooseMesh::buildMesh ( )
pure virtual

Must be overridden by child classes.

This is where the Mesh object is actually created and filled in.

Implemented in MFEMMesh, PatternedMesh, StitchedMesh, MeshGeneratorMesh, AnnularMesh, ConcentricCircleMesh, GeneratedMesh, RinglebMesh, SpiralAnnularMesh, ImageMesh, FileMesh, and TiledMesh.

Referenced by init().

◆ buildMeshBaseObject()

std::unique_ptr< MeshBase > MooseMesh::buildMeshBaseObject ( unsigned int  dim = libMesh::invalid_uint)

Method to construct a libMesh::MeshBase object that is normally set and used by the MooseMesh object during the "init()" phase.

If the parameter dim is not provided, then its value will be taken from the input file mesh block.

Definition at line 2856 of file MooseMesh.C.

Referenced by MeshGenerator::buildMeshBaseObject(), and init().

2857 {
2858  std::unique_ptr<MeshBase> mesh;
2860  mesh = buildTypedMesh<DistributedMesh>(dim);
2861  else
2862  mesh = buildTypedMesh<ReplicatedMesh>(dim);
2863 
2864  return mesh;
2865 }
MeshBase & mesh
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428

◆ buildNodeList()

void MooseMesh::buildNodeList ( )

Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in those lists.

Allocates memory which is cleaned up in the freeBndNodes()/freeBndElems() functions.

Definition at line 1025 of file MooseMesh.C.

Referenced by update().

1026 {
1027  TIME_SECTION("buildNodeList", 5, "Building Node List");
1028 
1029  freeBndNodes();
1030 
1031  auto bc_tuples = getMesh().get_boundary_info().build_node_list();
1032 
1033  int n = bc_tuples.size();
1034  _bnd_nodes.clear();
1035  _bnd_nodes.reserve(n);
1036  for (const auto & t : bc_tuples)
1037  {
1038  auto node_id = std::get<0>(t);
1039  auto bc_id = std::get<1>(t);
1040 
1041  _bnd_nodes.push_back(new BndNode(getMesh().node_ptr(node_id), bc_id));
1042  _node_set_nodes[bc_id].push_back(node_id);
1043  _bnd_node_ids[bc_id].insert(node_id);
1044  }
1045 
1046  _bnd_nodes.reserve(_bnd_nodes.size() + _extra_bnd_nodes.size());
1047  for (unsigned int i = 0; i < _extra_bnd_nodes.size(); i++)
1048  {
1049  BndNode * bnode = new BndNode(_extra_bnd_nodes[i]._node, _extra_bnd_nodes[i]._bnd_id);
1050  _bnd_nodes.push_back(bnode);
1051  _bnd_node_ids[std::get<1>(bc_tuples[i])].insert(_extra_bnd_nodes[i]._node->id());
1052  }
1053 
1054  // This sort is here so that boundary conditions are always applied in the same order
1055  std::sort(_bnd_nodes.begin(), _bnd_nodes.end(), BndNodeCompare());
1056 }
Helper class for sorting Boundary Nodes so that we always get the same order of application for bound...
Definition: MooseMesh.C:1001
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
Map of sets of node IDs in each boundary.
Definition: MooseMesh.h:1537
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids] ...
Definition: MooseMesh.h:1556
const BoundaryInfo & get_boundary_info() const
void build_node_list(std::vector< dof_id_type > &node_id_list, std::vector< boundary_id_type > &bc_id_list) const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1533
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:1550
void freeBndNodes()
Definition: MooseMesh.C:376

◆ buildNodeListFromSideList()

void MooseMesh::buildNodeListFromSideList ( )

Calls BoundaryInfo::build_node_list_from_side_list().

Definition at line 2983 of file MooseMesh.C.

Referenced by prepare(), and update().

2984 {
2987 }
void build_node_list_from_side_list()
const BoundaryInfo & get_boundary_info() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1822

◆ buildPeriodicNodeMap()

void MooseMesh::buildPeriodicNodeMap ( std::multimap< dof_id_type, dof_id_type > &  periodic_node_map,
unsigned int  var_number,
libMesh::PeriodicBoundaries pbs 
) const

This routine builds a multimap of boundary ids to matching boundary ids across all periodic boundaries in the system.

Definition at line 1813 of file MooseMesh.C.

1816 {
1817  TIME_SECTION("buildPeriodicNodeMap", 5);
1818 
1819  // clear existing map
1820  periodic_node_map.clear();
1821 
1822  // get periodic nodes
1823  std::vector<PeriodicNodeInfo> periodic_nodes;
1824  for (const auto & t : getMesh().get_boundary_info().build_node_list())
1825  {
1826  // unfortunately libMesh does not give us a pointer, so we have to look it up ourselves
1827  auto node = _mesh->node_ptr(std::get<0>(t));
1828  mooseAssert(node != nullptr,
1829  "libMesh::BoundaryInfo::build_node_list() returned an ID for a non-existing node");
1830  auto bc_id = std::get<1>(t);
1831  periodic_nodes.emplace_back(node, bc_id);
1832  }
1833 
1834  // sort by boundary id
1835  std::sort(periodic_nodes.begin(),
1836  periodic_nodes.end(),
1837  [](const PeriodicNodeInfo & a, const PeriodicNodeInfo & b) -> bool
1838  { return a.second > b.second; });
1839 
1840  // build kd-tree
1841  using KDTreeType = nanoflann::KDTreeSingleIndexAdaptor<
1842  nanoflann::L2_Simple_Adaptor<Real, PointListAdaptor<PeriodicNodeInfo>, Real, std::size_t>,
1844  LIBMESH_DIM,
1845  std::size_t>;
1846  const unsigned int max_leaf_size = 20; // slightly affects runtime
1847  auto point_list =
1848  PointListAdaptor<PeriodicNodeInfo>(periodic_nodes.begin(), periodic_nodes.end());
1849  auto kd_tree = std::make_unique<KDTreeType>(
1850  LIBMESH_DIM, point_list, nanoflann::KDTreeSingleIndexAdaptorParams(max_leaf_size));
1851  mooseAssert(kd_tree != nullptr, "KDTree was not properly initialized.");
1852  kd_tree->buildIndex();
1853 
1854  // data structures for kd-tree search
1855  nanoflann::SearchParameters search_params;
1856  std::vector<nanoflann::ResultItem<std::size_t, Real>> ret_matches;
1857 
1858  // iterate over periodic nodes (boundary ids are in contiguous blocks)
1859  libMesh::PeriodicBoundaryBase * periodic = nullptr;
1860  BoundaryID current_bc_id = BoundaryInfo::invalid_id;
1861  for (auto & pair : periodic_nodes)
1862  {
1863  // entering a new block of boundary IDs
1864  if (pair.second != current_bc_id)
1865  {
1866  current_bc_id = pair.second;
1867  periodic = pbs->boundary(current_bc_id);
1868  if (periodic && !periodic->is_my_variable(var_number))
1869  periodic = nullptr;
1870  }
1871 
1872  // variable is not periodic at this node, skip
1873  if (!periodic)
1874  continue;
1875 
1876  // clear result buffer
1877  ret_matches.clear();
1878 
1879  // id of the current node
1880  const auto id = pair.first->id();
1881 
1882  // position where we expect a periodic partner for the current node and boundary
1883  Point search_point = periodic->get_corresponding_pos(*pair.first);
1884 
1885  // search at the expected point
1886  kd_tree->radiusSearch(&(search_point)(0), libMesh::TOLERANCE, ret_matches, search_params);
1887  for (auto & match_pair : ret_matches)
1888  {
1889  const auto & match = periodic_nodes[match_pair.first];
1890  // add matched node if the boundary id is the corresponding id in the periodic pair
1891  if (match.second == periodic->pairedboundary)
1892  periodic_node_map.emplace(id, match.first->id());
1893  }
1894  }
1895 }
static constexpr Real TOLERANCE
boundary_id_type pairedboundary
PeriodicBoundaryBase * boundary(boundary_id_type id)
virtual Point get_corresponding_pos(const Point &pt) const=0
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::pair< const Node *, BoundaryID > PeriodicNodeInfo
Helper type for building periodic node maps.
Definition: MooseMesh.h:1074
boundary_id_type BoundaryID
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
bool is_my_variable(unsigned int var_num) const
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:820
SearchParams SearchParameters

◆ buildPeriodicNodeSets()

void MooseMesh::buildPeriodicNodeSets ( std::map< BoundaryID, std::set< dof_id_type >> &  periodic_node_sets,
unsigned int  var_number,
libMesh::PeriodicBoundaries pbs 
) const

This routine builds a datastructure of node ids organized by periodic boundary ids.

Definition at line 1898 of file MooseMesh.C.

1901 {
1902  TIME_SECTION("buildPeriodicNodeSets", 5);
1903 
1904  periodic_node_sets.clear();
1905 
1906  // Loop over all the boundary nodes adding the periodic nodes to the appropriate set
1907  for (const auto & t : getMesh().get_boundary_info().build_node_list())
1908  {
1909  auto node_id = std::get<0>(t);
1910  auto bc_id = std::get<1>(t);
1911 
1912  // Is this current node on a known periodic boundary?
1913  if (periodic_node_sets.find(bc_id) != periodic_node_sets.end())
1914  periodic_node_sets[bc_id].insert(node_id);
1915  else // This still might be a periodic node but we just haven't seen this boundary_id yet
1916  {
1917  const libMesh::PeriodicBoundaryBase * periodic = pbs->boundary(bc_id);
1918  if (periodic && periodic->is_my_variable(var_number))
1919  periodic_node_sets[bc_id].insert(node_id);
1920  }
1921  }
1922 }
PeriodicBoundaryBase * boundary(boundary_id_type id)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
bool is_my_variable(unsigned int var_num) const

◆ buildPRefinementAndCoarseningMaps()

void MooseMesh::buildPRefinementAndCoarseningMaps ( Assembly assembly)

Definition at line 2368 of file MooseMesh.C.

Referenced by buildRefinementAndCoarseningMaps(), and FEProblemBase::meshChanged().

2369 {
2374 
2375  std::map<ElemType, std::pair<Elem *, unsigned int>> elems_and_max_p_level;
2376 
2377  for (const auto & elem : getMesh().active_element_ptr_range())
2378  {
2379  const auto type = elem->type();
2380  auto & [picked_elem, max_p_level] = elems_and_max_p_level[type];
2381  if (!picked_elem)
2382  picked_elem = elem;
2383  max_p_level = std::max(max_p_level, elem->p_level());
2384  }
2385 
2386  // The only requirement on the FEType is that it can be arbitrarily p-refined
2387  const FEType p_refinable_fe_type(CONSTANT, libMesh::MONOMIAL);
2388  std::vector<Point> volume_ref_points_coarse, volume_ref_points_fine, face_ref_points_coarse,
2389  face_ref_points_fine;
2390  std::vector<unsigned int> p_levels;
2391 
2392  for (auto & [elem_type, elem_p_level_pair] : elems_and_max_p_level)
2393  {
2394  auto & [moose_elem, max_p_level] = elem_p_level_pair;
2395  const auto dim = moose_elem->dim();
2396  // Need to do this just once to get the right qrules put in place
2397  assembly->setCurrentSubdomainID(moose_elem->subdomain_id());
2398  assembly->reinit(moose_elem);
2399  assembly->reinit(moose_elem, 0);
2400  auto & qrule = assembly->writeableQRule();
2401  auto & qrule_face = assembly->writeableQRuleFace();
2402 
2403  libMesh::Parallel::Communicator self_comm{};
2404  ReplicatedMesh mesh(self_comm);
2406  for (const auto & nd : moose_elem->node_ref_range())
2407  mesh.add_point(nd);
2408 
2409  Elem * const elem = mesh.add_elem(Elem::build(elem_type).release());
2410  for (const auto i : elem->node_index_range())
2411  elem->set_node(i, mesh.node_ptr(i));
2412 
2413  std::unique_ptr<FEBase> fe_face(FEBase::build(dim, p_refinable_fe_type));
2414  fe_face->get_phi();
2415  const auto & face_phys_points = fe_face->get_xyz();
2416  fe_face->attach_quadrature_rule(qrule_face);
2417 
2418  qrule->init(*elem);
2419  volume_ref_points_coarse = qrule->get_points();
2420  fe_face->reinit(elem, (unsigned int)0);
2421  libMesh::FEMap::inverse_map(dim, elem, face_phys_points, face_ref_points_coarse);
2422 
2423  p_levels.resize(max_p_level + 1);
2424  std::iota(p_levels.begin(), p_levels.end(), 0);
2425  libMesh::MeshRefinement mesh_refinement(mesh);
2426 
2427  for (const auto p_level : p_levels)
2428  {
2429  mesh_refinement.uniformly_p_refine(1);
2430  qrule->init(*elem);
2431  volume_ref_points_fine = qrule->get_points();
2432  fe_face->reinit(elem, (unsigned int)0);
2433  libMesh::FEMap::inverse_map(dim, elem, face_phys_points, face_ref_points_fine);
2434 
2435  const auto map_key = std::make_pair(elem_type, p_level);
2436  auto & volume_refine_map = _elem_type_to_p_refinement_map[map_key];
2437  auto & face_refine_map = _elem_type_to_p_refinement_side_map[map_key];
2438  auto & volume_coarsen_map = _elem_type_to_p_coarsening_map[map_key];
2439  auto & face_coarsen_map = _elem_type_to_p_coarsening_side_map[map_key];
2440 
2441  auto fill_maps = [this](const auto & coarse_ref_points,
2442  const auto & fine_ref_points,
2443  auto & coarsen_map,
2444  auto & refine_map)
2445  {
2446  mapPoints(fine_ref_points, coarse_ref_points, refine_map);
2447  mapPoints(coarse_ref_points, fine_ref_points, coarsen_map);
2448  };
2449 
2450  fill_maps(
2451  volume_ref_points_coarse, volume_ref_points_fine, volume_coarsen_map, volume_refine_map);
2452  fill_maps(face_ref_points_coarse, face_ref_points_fine, face_coarsen_map, face_refine_map);
2453 
2454  // With this level's maps filled our fine points now become our coarse points
2455  volume_ref_points_fine.swap(volume_ref_points_coarse);
2456  face_ref_points_fine.swap(face_ref_points_coarse);
2457  }
2458  }
2459 }
std::unique_ptr< FEGenericBase< Real > > build(const unsigned int dim, const FEType &fet)
virtual Node *& set_node(const unsigned int i)
libMesh::QBase *const & writeableQRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:224
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
MeshBase & mesh
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
unsigned int p_level() const
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_side_map
Definition: MooseMesh.h:1784
virtual Node * add_point(const Point &p, const dof_id_type id=DofObject::invalid_id, const processor_id_type proc_id=DofObject::invalid_processor_id)=0
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
auto max(const L &left, const R &right)
void mapPoints(const std::vector< Point > &from, const std::vector< Point > &to, std::vector< QpMap > &qp_map)
Find the closest points that map "from" to "to" and fill up "qp_map".
Definition: MooseMesh.C:2590
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual Elem * add_elem(Elem *e)=0
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:89
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
Definition: MooseMesh.h:1758
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
Definition: MooseMesh.h:1782
void set_mesh_dimension(unsigned char d)
void setCurrentSubdomainID(SubdomainID i)
set the current subdomain ID
Definition: Assembly.h:385
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
Definition: MooseMesh.h:1756
IntRange< unsigned short > node_index_range() const
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
virtual const Node * node_ptr(const dof_id_type i) const=0
virtual ElemType type() const=0
libMesh::QBase *const & writeableQRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:300

◆ buildRefinementAndCoarseningMaps()

void MooseMesh::buildRefinementAndCoarseningMaps ( Assembly assembly)

Create the refinement and coarsening maps necessary for projection of stateful material properties when using adaptivity.

Parameters
assemblyPointer to the Assembly object for this Mesh.

Definition at line 2462 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup().

2463 {
2464  TIME_SECTION("buildRefinementAndCoarseningMaps", 5, "Building Refinement And Coarsening Maps");
2465  if (doingPRefinement())
2467  else
2469 }
void buildHRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2311
bool doingPRefinement() const
Query whether we have p-refinement.
Definition: MooseMesh.h:1352
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2368

◆ buildRefinementMap()

void MooseMesh::buildRefinementMap ( const Elem elem,
libMesh::QBase qrule,
libMesh::QBase qrule_face,
int  parent_side,
int  child,
int  child_side 
)
private

Build the refinement map for a given element type.

This will tell you what quadrature points to copy from and to for stateful material properties on newly created elements from Adaptivity.

Parameters
elemThe element that represents the element type you need the refinement map for.
qruleThe quadrature rule in use.
qrule_faceThe current face quadrature rule
parent_sideThe side of the parent to map (-1 if not mapping parent sides)
childThe child number (-1 if not mapping child internal sides)
child_sideThe side number of the child (-1 if not mapping sides)

Definition at line 2472 of file MooseMesh.C.

Referenced by buildHRefinementAndCoarseningMaps().

2478 {
2479  TIME_SECTION("buildRefinementMap", 5, "Building Refinement Map");
2480 
2481  if (child == -1) // Doing volume mapping or parent side mapping
2482  {
2483  mooseAssert(parent_side == child_side,
2484  "Parent side must match child_side if not passing a specific child!");
2485 
2486  std::pair<int, ElemType> the_pair(parent_side, elem.type());
2487 
2488  if (_elem_type_to_refinement_map.find(the_pair) != _elem_type_to_refinement_map.end())
2489  mooseError("Already built a qp refinement map!");
2490 
2491  std::vector<std::pair<unsigned int, QpMap>> coarsen_map;
2492  std::vector<std::vector<QpMap>> & refinement_map = _elem_type_to_refinement_map[the_pair];
2494  &elem, qrule, qrule_face, refinement_map, coarsen_map, parent_side, child, child_side);
2495  }
2496  else // Need to map a child side to parent volume qps
2497  {
2498  std::pair<int, int> child_pair(child, child_side);
2499 
2502  _elem_type_to_child_side_refinement_map[elem.type()].find(child_pair) !=
2504  mooseError("Already built a qp refinement map!");
2505 
2506  std::vector<std::pair<unsigned int, QpMap>> coarsen_map;
2507  std::vector<std::vector<QpMap>> & refinement_map =
2510  &elem, qrule, qrule_face, refinement_map, coarsen_map, parent_side, child, child_side);
2511  }
2512 }
std::map< libMesh::ElemType, std::map< std::pair< int, int >, std::vector< std::vector< QpMap > > > > _elem_type_to_child_side_refinement_map
Holds mappings for "internal" child sides to parent volume. The second key is (child, child_side).
Definition: MooseMesh.h:1762
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::vector< QpMap > > > _elem_type_to_refinement_map
Holds mappings for volume to volume and parent side to child side Map key:
Definition: MooseMesh.h:1753
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
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)
Given an elem type, get maps that tell us what qp&#39;s are closest to each other between a parent and it...
Definition: MooseMesh.C:2621
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
virtual ElemType type() const=0

◆ buildSideList() [1/2]

void MooseMesh::buildSideList ( std::vector< dof_id_type > &  el,
std::vector< unsigned short int > &  sl,
std::vector< boundary_id_type > &  il 
)

Calls BoundaryInfo::build_side_list().

Fills in the three passed vectors with list logical (element, side, id) tuples. This function will eventually be deprecated in favor of the one below, which returns a single std::vector of (elem-id, side-id, bc-id) tuples instead.

Definition at line 2990 of file MooseMesh.C.

Referenced by InterfaceQpUserObjectBase::initialSetup().

2993 {
2994 #ifdef LIBMESH_ENABLE_DEPRECATED
2995  mooseDeprecated("The version of MooseMesh::buildSideList() taking three arguments is "
2996  "deprecated, call the version that returns a vector of tuples instead.");
2997  getMesh().get_boundary_info().build_side_list(el, sl, il);
2998 #else
2999  libmesh_ignore(el);
3000  libmesh_ignore(sl);
3001  libmesh_ignore(il);
3002  mooseError("The version of MooseMesh::buildSideList() taking three "
3003  "arguments is not available in your version of libmesh, call the "
3004  "version that returns a vector of tuples instead.");
3005 #endif
3006 }
const BoundaryInfo & get_boundary_info() const
void build_side_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &side_list, std::vector< boundary_id_type > &bc_id_list) const
void libmesh_ignore(const Args &...)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
void mooseDeprecated(Args &&... args) const
Definition: MooseBase.h:310
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ buildSideList() [2/2]

std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > MooseMesh::buildSideList ( )

As above, but uses the non-deprecated std::tuple interface.

Definition at line 3009 of file MooseMesh.C.

3010 {
3012 }
const BoundaryInfo & get_boundary_info() const
void build_side_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &side_list, std::vector< boundary_id_type > &bc_id_list) const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ buildTypedMesh()

template<typename T >
std::unique_ptr< T > MooseMesh::buildTypedMesh ( unsigned int  dim = libMesh::invalid_uint)

Shortcut method to construct a unique pointer to a libMesh mesh instance.

The created derived-from-MeshBase object will have its allow_remote_element_removal flag set to whatever our value is. We will also attach any geometric RelationshipManagers that have been requested by our simulation objects to the MeshBase object. If the parameter dim is not provided, then its value will be taken from the input file mesh block.

Definition at line 2090 of file MooseMesh.h.

Referenced by MeshGenerator::buildDistributedMesh(), and MeshGenerator::buildReplicatedMesh().

2091 {
2092  // If the requested mesh type to build doesn't match our current value for _use_distributed_mesh,
2093  // then we need to make sure to make our state consistent because other objects, like the periodic
2094  // boundary condition action, will be querying isDistributedMesh()
2095  if (_use_distributed_mesh != std::is_same<T, libMesh::DistributedMesh>::value)
2096  {
2097  if (getMeshPtr())
2098  mooseError("A MooseMesh object is being asked to build a libMesh mesh that is a different "
2099  "parallel type than the libMesh mesh that it wraps. This is not allowed. Please "
2100  "create another MooseMesh object to wrap the new libMesh mesh");
2101  setParallelType(MeshType<T>::value);
2102  }
2103 
2104  if (dim == libMesh::invalid_uint)
2105  {
2106  if (isParamValid("dim"))
2107  dim = getParam<MooseEnum>("dim");
2108  else
2109  // Legacy selection of the default for the 'dim' parameter
2110  dim = 1;
2111  }
2112 
2113  auto mesh = std::make_unique<T>(_communicator, dim);
2114 
2115  if (!getParam<bool>("allow_renumbering"))
2116  mesh->allow_renumbering(false);
2117 
2118  mesh->allow_remote_element_removal(_allow_remote_element_removal);
2119  _app.attachRelationshipManagers(*mesh, *this);
2120 
2122  {
2123  // Check of partitioner is supplied (not allowed if custom partitioner is used)
2124  if (!parameters().isParamSetByAddParam("partitioner"))
2125  mooseError("If partitioner block is provided, partitioner keyword cannot be used!");
2126  // Set custom partitioner
2127  if (!_custom_partitioner.get())
2128  mooseError("Custom partitioner requested but not set!");
2129  mesh->partitioner() = _custom_partitioner->clone();
2130  }
2131  else
2132  setPartitionerHelper(mesh.get());
2133 
2134  return mesh;
2135 }
const unsigned int invalid_uint
void setParallelType(ParallelType parallel_type)
Allow to change parallel type.
Definition: MooseMesh.h:2144
bool _custom_partitioner_requested
Definition: MooseMesh.h:1441
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:127
MeshBase & mesh
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
const Parallel::Communicator & _communicator
void setPartitionerHelper(MeshBase *mesh=nullptr)
Definition: MooseMesh.C:3628
void attachRelationshipManagers(Moose::RelationshipManagerType rm_type, bool attach_geometric_rm_final=false)
Attach the relationship managers of the given type Note: Geometric relationship managers that are sup...
Definition: MooseApp.C:3237
const MeshBase * getMeshPtr() const
Definition: MooseMesh.C:3442
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1828
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:353
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:195
std::unique_ptr< libMesh::Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:1440

◆ cacheChangedLists()

void MooseMesh::cacheChangedLists ( )

Cache information about what elements were refined and coarsened in the previous step.

Definition at line 913 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged().

914 {
915  TIME_SECTION("cacheChangedLists", 5, "Caching Changed Lists");
916 
917  ConstElemRange elem_range(getMesh().local_elements_begin(), getMesh().local_elements_end(), 1);
918  CacheChangedListsThread cclt(*this);
919  Threads::parallel_reduce(elem_range, cclt);
920 
922 
923  _refined_elements = std::make_unique<ConstElemPointerRange>(cclt._refined_elements.begin(),
924  cclt._refined_elements.end());
925  _coarsened_elements = std::make_unique<ConstElemPointerRange>(cclt._coarsened_elements.begin(),
926  cclt._coarsened_elements.end());
927  _coarsened_element_children = cclt._coarsened_element_children;
928 }
void parallel_reduce(const Range &range, Body &body, const Partitioner &)
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:1475
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:1478
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
Map of Parent elements to child elements for elements that were just coarsened.
Definition: MooseMesh.h:1485

◆ cacheFaceInfoVariableOwnership()

void MooseMesh::cacheFaceInfoVariableOwnership ( ) const

Cache if variables live on the elements connected by the FaceInfo objects.

The following paragraph of code assigns the VarFaceNeighbors

  1. The face is an internal face of this variable if it is defined on the elem and neighbor subdomains
  2. The face is an invalid face of this variable if it is neither defined on the elem nor the neighbor subdomains
  3. If not 1. or 2. then this is a boundary for this variable and the else clause applies

Definition at line 3941 of file MooseMesh.C.

Referenced by setupFiniteVolumeMeshData().

3942 {
3943  mooseAssert(
3944  !Threads::in_threads,
3945  "Performing writes to faceInfo variable association maps. This must be done unthreaded!");
3946 
3947  const unsigned int num_eqs = _app.feProblem().es().n_systems();
3948 
3949  auto face_lambda = [this](const SubdomainID elem_subdomain_id,
3950  const SubdomainID neighbor_subdomain_id,
3951  SystemBase & sys,
3952  std::vector<std::vector<FaceInfo::VarFaceNeighbors>> & face_type_vector)
3953  {
3954  face_type_vector[sys.number()].resize(sys.nVariables(), FaceInfo::VarFaceNeighbors::NEITHER);
3955  const auto & variables = sys.getVariables(0);
3956 
3957  for (const auto & var : variables)
3958  {
3959  const unsigned int var_num = var->number();
3960  const unsigned int sys_num = var->sys().number();
3961  std::set<SubdomainID> var_subdomains = var->blockIDs();
3971  bool var_defined_elem = var_subdomains.find(elem_subdomain_id) != var_subdomains.end();
3972  bool var_defined_neighbor =
3973  var_subdomains.find(neighbor_subdomain_id) != var_subdomains.end();
3974  if (var_defined_elem && var_defined_neighbor)
3975  face_type_vector[sys_num][var_num] = FaceInfo::VarFaceNeighbors::BOTH;
3976  else if (!var_defined_elem && !var_defined_neighbor)
3977  face_type_vector[sys_num][var_num] = FaceInfo::VarFaceNeighbors::NEITHER;
3978  else
3979  {
3980  // this is a boundary face for this variable, set elem or neighbor
3981  if (var_defined_elem)
3982  face_type_vector[sys_num][var_num] = FaceInfo::VarFaceNeighbors::ELEM;
3983  else if (var_defined_neighbor)
3984  face_type_vector[sys_num][var_num] = FaceInfo::VarFaceNeighbors::NEIGHBOR;
3985  else
3986  mooseError("Should never get here");
3987  }
3988  }
3989  };
3990 
3991  // We loop through the faces and check if they are internal, boundary or external to
3992  // the variables in the problem
3993  for (FaceInfo & face : _all_face_info)
3994  {
3995  const SubdomainID elem_subdomain_id = face.elemSubdomainID();
3996  const SubdomainID neighbor_subdomain_id = face.neighborSubdomainID();
3997 
3998  auto & face_type_vector = face.faceType();
3999 
4000  face_type_vector.clear();
4001  face_type_vector.resize(num_eqs);
4002 
4003  // First, we check the variables in the solver systems (linear/nonlinear)
4004  for (const auto i : make_range(_app.feProblem().numSolverSystems()))
4005  face_lambda(elem_subdomain_id,
4006  neighbor_subdomain_id,
4008  face_type_vector);
4009 
4010  // Then we check the variables in the auxiliary system
4011  face_lambda(elem_subdomain_id,
4012  neighbor_subdomain_id,
4014  face_type_vector);
4015  }
4016 }
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1604
unsigned int n_systems() const
Base class for a system (of equations)
Definition: SystemBase.h:84
FEProblemBase & feProblem() const
Definition: MooseApp.C:1960
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:36
virtual libMesh::EquationSystems & es() override
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:353
AuxiliarySystem & getAuxiliarySystem()
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
SolverSystem & getSolverSystem(unsigned int sys_num)
Get non-constant reference to a solver system.
virtual std::size_t numSolverSystems() const override

◆ cacheFVElementalDoFs()

void MooseMesh::cacheFVElementalDoFs ( ) const

Cache the DoF indices for FV variables on each element.

These indices are used to speed up the setup loops of finite volume systems.

Definition at line 4019 of file MooseMesh.C.

Referenced by setupFiniteVolumeMeshData().

4020 {
4021  mooseAssert(!Threads::in_threads,
4022  "Performing writes to elemInfo dof indices. This must be done unthreaded!");
4023 
4024  auto elem_lambda = [](const ElemInfo & elem_info,
4025  SystemBase & sys,
4026  std::vector<std::vector<dof_id_type>> & dof_vector)
4027  {
4028  if (sys.nFVVariables())
4029  {
4030  dof_vector[sys.number()].resize(sys.nVariables(), libMesh::DofObject::invalid_id);
4031  const auto & variables = sys.getVariables(0);
4032 
4033  for (const auto & var : variables)
4034  if (var->isFV())
4035  {
4036  const auto & var_subdomains = var->blockIDs();
4037 
4038  // We will only cache for FV variables and if they live on the current subdomain
4039  if (var_subdomains.find(elem_info.subdomain_id()) != var_subdomains.end())
4040  {
4041  std::vector<dof_id_type> indices;
4042  var->dofMap().dof_indices(elem_info.elem(), indices, var->number());
4043  mooseAssert(indices.size() == 1, "We expect to have only one dof per element!");
4044  dof_vector[sys.number()][var->number()] = indices[0];
4045  }
4046  }
4047  }
4048  };
4049 
4050  const unsigned int num_eqs = _app.feProblem().es().n_systems();
4051 
4052  // We loop through the elements in the mesh and cache the dof indices
4053  // for the corresponding variables.
4054  for (auto & ei_pair : _elem_to_elem_info)
4055  {
4056  auto & elem_info = ei_pair.second;
4057  auto & dof_vector = elem_info.dofIndices();
4058 
4059  dof_vector.clear();
4060  dof_vector.resize(num_eqs);
4061 
4062  // First, we cache the dof indices for the variables in the solver systems (linear, nonlinear)
4063  for (const auto i : make_range(_app.feProblem().numSolverSystems()))
4064  elem_lambda(elem_info, _app.feProblem().getSolverSystem(i), dof_vector);
4065 
4066  // Then we cache the dof indices for the auxvariables
4067  elem_lambda(elem_info, _app.feProblem().getAuxiliarySystem(), dof_vector);
4068  }
4069 }
unsigned int n_systems() const
const Elem * elem() const
Definition: ElemInfo.h:34
Base class for a system (of equations)
Definition: SystemBase.h:84
FEProblemBase & feProblem() const
Definition: MooseApp.C:1960
virtual libMesh::EquationSystems & es() override
static const dof_id_type invalid_id
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:353
AuxiliarySystem & getAuxiliarySystem()
std::unordered_map< dof_id_type, ElemInfo > _elem_to_elem_info
Map connecting elems with their corresponding ElemInfo, we use the element ID as the key...
Definition: MooseMesh.h:1596
const std::vector< std::vector< dof_id_type > > & dofIndices() const
Definition: ElemInfo.h:39
IntRange< T > make_range(T beg, T end)
SolverSystem & getSolverSystem(unsigned int sys_num)
Get non-constant reference to a solver system.
Class used for caching additional information for elements such as the volume and centroid...
Definition: ElemInfo.h:25
virtual std::size_t numSolverSystems() const override
SubdomainID subdomain_id() const
We return the subdomain ID of the corresponding libmesh element.
Definition: ElemInfo.h:43

◆ cacheInfo()

void MooseMesh::cacheInfo ( )
protected

Definition at line 1407 of file MooseMesh.C.

Referenced by update().

1408 {
1409  TIME_SECTION("cacheInfo", 3);
1410 
1411  _has_lower_d = false;
1412  _sub_to_data.clear();
1414  _block_node_list.clear();
1417  _lower_d_interior_blocks.clear();
1418  _lower_d_boundary_blocks.clear();
1419 
1420  auto & mesh = getMesh();
1421 
1422  // TODO: Thread this!
1423  for (const auto & elem : mesh.element_ptr_range())
1424  {
1425  const Elem * ip_elem = elem->interior_parent();
1426 
1427  if (ip_elem)
1428  {
1429  if (elem->active())
1430  _sub_to_data[elem->subdomain_id()].is_lower_d = true;
1431  unsigned int ip_side = ip_elem->which_side_am_i(elem);
1432 
1433  // For some grid sequencing tests: ip_side == libMesh::invalid_uint
1434  if (ip_side != libMesh::invalid_uint)
1435  {
1436  auto pair = std::make_pair(ip_elem, ip_side);
1438  std::pair<std::pair<const Elem *, unsigned short int>, const Elem *>(pair, elem));
1440  std::pair<const Elem *, unsigned short int>(elem, ip_side));
1441 
1442  auto id = elem->subdomain_id();
1443  if (ip_elem->neighbor_ptr(ip_side))
1444  {
1445  if (mesh.subdomain_name(id).find("INTERNAL_SIDE_LOWERD_SUBDOMAIN_") != std::string::npos)
1446  _lower_d_interior_blocks.insert(id);
1447  }
1448  else
1449  {
1450  if (mesh.subdomain_name(id).find("BOUNDARY_SIDE_LOWERD_SUBDOMAIN_") != std::string::npos)
1451  _lower_d_boundary_blocks.insert(id);
1452  }
1453  }
1454  }
1455 
1456  for (unsigned int nd = 0; nd < elem->n_nodes(); ++nd)
1457  {
1458  Node & node = *elem->node_ptr(nd);
1459  _block_node_list[node.id()].insert(elem->subdomain_id());
1460  }
1461  }
1464 
1465  for (const auto & elem : mesh.active_local_element_ptr_range())
1466  {
1467  SubdomainID subdomain_id = elem->subdomain_id();
1468  auto & sub_data = _sub_to_data[subdomain_id];
1469  for (unsigned int side = 0; side < elem->n_sides(); side++)
1470  {
1471  std::vector<BoundaryID> boundary_ids = getBoundaryIDs(elem, side);
1472  sub_data.boundary_ids.insert(boundary_ids.begin(), boundary_ids.end());
1473 
1474  Elem * neig = elem->neighbor_ptr(side);
1475  if (neig)
1476  {
1477  _neighbor_subdomain_boundary_ids[neig->subdomain_id()].insert(boundary_ids.begin(),
1478  boundary_ids.end());
1479  SubdomainID neighbor_subdomain_id = neig->subdomain_id();
1480  if (neighbor_subdomain_id != subdomain_id)
1481  sub_data.neighbor_subs.insert(neighbor_subdomain_id);
1482  }
1483  }
1484  }
1485 
1486  for (const auto blk_id : _mesh_subdomains)
1487  {
1488  auto & sub_data = _sub_to_data[blk_id];
1489  _communicator.set_union(sub_data.neighbor_subs);
1490  _communicator.set_union(sub_data.boundary_ids);
1491  _communicator.max(sub_data.is_lower_d);
1492  if (sub_data.is_lower_d)
1493  _has_lower_d = true;
1495  }
1496 }
const std::set< BoundaryID > & getBoundaryIDs() const
Returns a const reference to a set of all user-specified boundary IDs.
Definition: MooseMesh.C:2977
const unsigned int invalid_uint
const Elem * interior_parent() const
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
Definition: MooseMesh.h:1812
unsigned int which_side_am_i(const Elem *e) const
MeshBase & mesh
std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > _higher_d_elem_side_to_lower_d_elem
Holds a map from a high-order element side to its corresponding lower-d element.
Definition: MooseMesh.h:1811
bool _has_lower_d
Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces...
Definition: MooseMesh.h:1816
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:1553
const Parallel::Communicator & _communicator
std::set< SubdomainID > _lower_d_boundary_blocks
Mesh blocks for boundary lower-d elements in different types.
Definition: MooseMesh.h:1808
std::unordered_map< SubdomainID, std::set< BoundaryID > > _neighbor_subdomain_boundary_ids
Holds a map from neighbor subomdain ids to the boundary ids that are attached to it.
Definition: MooseMesh.h:1803
std::set< SubdomainID > _lower_d_interior_blocks
Mesh blocks for interior lower-d elements in different types.
Definition: MooseMesh.h:1806
dof_id_type id() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual unsigned int n_nodes() const=0
std::string & subdomain_name(subdomain_id_type id)
virtual unsigned int n_sides() const=0
const Elem * neighbor_ptr(unsigned int i) const
subdomain_id_type subdomain_id() const
void max(const T &r, T &o, Request &req) const
const Node * node_ptr(const unsigned int i) const
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:820
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1516
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1800
bool active() const
void set_union(T &data, const unsigned int root_id) const

◆ callMooseError() [1/2]

void MooseBase::callMooseError ( std::string  msg,
const bool  with_prefix,
const hit::Node *  node = nullptr 
) const
inherited

External method for calling moose error with added object context.

Parameters
msgThe message
with_prefixIf true, add the prefix from messagePrefix(), which is the object information (type, name, etc)
nodeOptional hit node to add file path context as a prefix

Definition at line 102 of file MooseBase.C.

Referenced by InputParameters::callMooseError(), MooseBase::mooseDocumentedError(), MooseBase::mooseError(), and MooseBase::mooseErrorNonPrefixed().

105 {
106  callMooseError(&_app, _pars, msg, with_prefix, node);
107 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
External method for calling moose error with added object context.
Definition: MooseBase.C:102
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:353

◆ callMooseError() [2/2]

void MooseBase::callMooseError ( MooseApp *const  app,
const InputParameters params,
std::string  msg,
const bool  with_prefix,
const hit::Node *  node 
)
staticinherited

External method for calling moose error with added object context.

Needed so that objects without the MooseBase context (InputParameters) can call errors with context

Parameters
appThe app pointer (if available); adds multiapp context and clears the console
paramsThe parameters, needed to obtain object information
msgThe message
with_prefixIf true, add the prefix from messagePrefix(), which is the object information (type, name, etc)
nodeOptional hit node to add file path context as a prefix

Definition at line 110 of file MooseBase.C.

115 {
116  if (!node)
117  node = MooseBase::getHitNode(params);
118 
119  std::string multiapp_prefix = "";
120  if (app)
121  {
122  if (!app->isUltimateMaster())
123  multiapp_prefix = app->name();
125  }
126 
127  if (with_prefix)
128  // False here because the hit context will get processed by the node
129  msg = messagePrefix(params, false) + msg;
130 
131  moose::internal::mooseErrorRaw(msg, multiapp_prefix, node);
132 }
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:813
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
void mooseErrorRaw(std::string msg, const std::string &prefix="", const hit::Node *node=nullptr)
Main callback for emitting a moose error.
Definition: MooseError.C:53
void mooseConsole()
Send current output buffer to Console output objects.
const hit::Node * getHitNode() const
Definition: MooseBase.h:132
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:2442
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:252

◆ changeBoundaryId() [1/2]

void MooseMesh::changeBoundaryId ( const boundary_id_type  old_id,
const boundary_id_type  new_id,
bool  delete_prev 
)

Change all the boundary IDs for a given side from old_id to new_id.

If delete_prev is true, also actually remove the side with old_id from the BoundaryInfo object.

Definition at line 2762 of file MooseMesh.C.

2765 {
2766  TIME_SECTION("changeBoundaryId", 6);
2767  changeBoundaryId(getMesh(), old_id, new_id, delete_prev);
2768 }
void changeBoundaryId(const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
Change all the boundary IDs for a given side from old_id to new_id.
Definition: MooseMesh.C:2762
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ changeBoundaryId() [2/2]

static void MooseMesh::changeBoundaryId ( MeshBase &  mesh,
const boundary_id_type  old_id,
const boundary_id_type  new_id,
bool  delete_prev 
)
static

Change all the boundary IDs for a given side from old_id to new_id for the given mesh.

If delete_prev is true, also actually remove the side with old_id from the BoundaryInfo object.

◆ checkCoordinateSystems()

void MooseMesh::checkCoordinateSystems ( )

Performs a sanity check for every element in the mesh.

If an element dimension is 3 and the corresponding coordinate system is RZ, then this will error. If an element dimension is greater than 1 and the corresponding system is RPSHERICAL then this will error

Definition at line 4307 of file MooseMesh.C.

Referenced by FEProblemBase::checkCoordinateSystems().

4308 {
4309  for (const auto & elem : getMesh().element_ptr_range())
4310  {
4311  SubdomainID sid = elem->subdomain_id();
4312  if (_coord_sys[sid] == Moose::COORD_RZ && elem->dim() == 3)
4313  mooseError("An RZ coordinate system was requested for subdomain " + Moose::stringify(sid) +
4314  " which contains 3D elements.");
4315  if (_coord_sys[sid] == Moose::COORD_RSPHERICAL && elem->dim() > 1)
4316  mooseError("An RSPHERICAL coordinate system was requested for subdomain " +
4317  Moose::stringify(sid) + " which contains 2D or 3D elements.");
4318  }
4319 }
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1858
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
subdomain_id_type subdomain_id() const
virtual unsigned short dim() const=0
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ checkDuplicateSubdomainNames()

void MooseMesh::checkDuplicateSubdomainNames ( )
private

Loop through all subdomain IDs and check if there is name duplication used for the subdomains with same ID.

Throw out an error if any name duplication is found.

Definition at line 4337 of file MooseMesh.C.

Referenced by prepare().

4338 {
4339  std::map<SubdomainName, SubdomainID> subdomain;
4340  for (const auto & sbd_id : _mesh_subdomains)
4341  {
4342  std::string sub_name = getSubdomainName(sbd_id);
4343  if (!sub_name.empty() && subdomain.count(sub_name) > 0)
4344  mooseError("The subdomain name ",
4345  sub_name,
4346  " is used for both subdomain with ID=",
4347  subdomain[sub_name],
4348  " and ID=",
4349  sbd_id,
4350  ", Please rename one of them!");
4351  else
4352  subdomain[sub_name] = sbd_id;
4353  }
4354 }
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1763
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1516

◆ clearQuadratureNodes()

void MooseMesh::clearQuadratureNodes ( )

Clear out any existing quadrature nodes.

Most likely called before re-adding them.

Definition at line 1680 of file MooseMesh.C.

Referenced by DisplacedProblem::meshChanged(), GeometricSearchData::reinit(), and ~MooseMesh().

1681 {
1682  // Delete all the quadrature nodes
1683  for (auto & it : _quadrature_nodes)
1684  delete it.second;
1685 
1686  _quadrature_nodes.clear();
1688  _extra_bnd_nodes.clear();
1689 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:1547
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:1550
std::map< dof_id_type, std::map< unsigned int, std::map< dof_id_type, Node * > > > _elem_to_side_to_qp_to_quadrature_nodes
Definition: MooseMesh.h:1549

◆ clone()

MooseMesh & MooseMesh::clone ( ) const
virtual

Clone method.

Allocates memory you are responsible to clean up.

Definition at line 2822 of file MooseMesh.C.

Referenced by TiledMesh::buildMesh().

2823 {
2824  mooseError("MooseMesh::clone() is no longer supported, use MooseMesh::safeClone() instead.");
2825 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ coarsenedElementChildren()

const std::vector< const Elem * > & MooseMesh::coarsenedElementChildren ( const Elem elem) const

Get the newly removed children element ids for an element that was just coarsened.

Parameters
elemPointer to the parent element that was coarsened to.
Returns
The child element ids in Elem::child() order.

Definition at line 943 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged(), ProjectMaterialProperties::onBoundary(), and ProjectMaterialProperties::onElement().

944 {
945  auto elem_to_child_pair = _coarsened_element_children.find(elem);
946  mooseAssert(elem_to_child_pair != _coarsened_element_children.end(), "Missing element in map");
947  return elem_to_child_pair->second;
948 }
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
Map of Parent elements to child elements for elements that were just coarsened.
Definition: MooseMesh.h:1485

◆ coarsenedElementRange()

ConstElemPointerRange * MooseMesh::coarsenedElementRange ( ) const

Return a range that is suitable for threaded execution over elements that were just coarsened.

Note that these are the Parent elements that are now set to be INACTIVE. Their children are the elements that were just removed. Use coarsenedElementChildren() to get the element IDs for the children that were just removed for a particular parent element.

Definition at line 937 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged().

938 {
939  return _coarsened_elements.get();
940 }
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:1478

◆ computeFiniteVolumeCoords()

void MooseMesh::computeFiniteVolumeCoords ( ) const

Compute the face coordinate value for all FaceInfo and ElemInfo objects.

'Coordinate' here means a coordinate value associated with the coordinate system. For Cartesian coordinate systems, 'coordinate' is simply '1'; in RZ, '2*pi*r', and in spherical, '4*pi*r^2'

Definition at line 3877 of file MooseMesh.C.

Referenced by setupFiniteVolumeMeshData().

3878 {
3880  mooseError("Trying to compute face- and elem-info coords when the information is dirty");
3881 
3882  for (auto & fi : _all_face_info)
3883  {
3884  // get elem & neighbor elements, and set subdomain ids
3885  const SubdomainID elem_subdomain_id = fi.elemSubdomainID();
3886  const SubdomainID neighbor_subdomain_id = fi.neighborSubdomainID();
3887 
3889  *this, elem_subdomain_id, fi.faceCentroid(), fi.faceCoord(), neighbor_subdomain_id);
3890  }
3891 
3892  for (auto & ei : _elem_to_elem_info)
3894  *this, ei.second.subdomain_id(), ei.second.centroid(), ei.second.coordFactor());
3895 }
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1604
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1615
void coordTransformFactor(const SubProblem &s, SubdomainID sub_id, const P &point, C &factor, SubdomainID neighbor_sub_id=libMesh::Elem::invalid_subdomain_id)
Computes a conversion multiplier for use when computing integraals for the current coordinate system ...
Definition: Assembly.C:41
std::unordered_map< dof_id_type, ElemInfo > _elem_to_elem_info
Map connecting elems with their corresponding ElemInfo, we use the element ID as the key...
Definition: MooseMesh.h:1596
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ connectControllableParams()

void MooseBase::connectControllableParams ( const std::string &  parameter,
const std::string &  object_type,
const std::string &  object_name,
const std::string &  object_parameter 
) const
inherited

Connect controllable parameter of this action with the controllable parameters of the objects added by this action.

Parameters
parameterName of the controllable parameter of this action
object_typeType of the object added by this action.
object_nameName of the object added by this action.
object_parameterName of the parameter of the object.

Definition at line 74 of file MooseBase.C.

78 {
79  auto & factory = _app.getFactory();
80  auto & ip_warehouse = _app.getInputParameterWarehouse();
81 
82  MooseObjectParameterName primary_name(uniqueName(), parameter);
83  const auto base_type = factory.getValidParams(object_type).getBase();
84  MooseObjectParameterName secondary_name(base_type, object_name, object_parameter);
85  ip_warehouse.addControllableParameterConnection(primary_name, secondary_name);
86 
87  const auto & tags = _pars.get<std::vector<std::string>>("control_tags");
88  for (const auto & tag : tags)
89  {
90  if (!tag.empty())
91  {
92  // Only adds the parameter with the different control tags if the derived class
93  // properly registers the parameter to its own syntax
94  MooseObjectParameterName tagged_name(tag, name(), parameter);
95  ip_warehouse.addControllableParameterConnection(
96  tagged_name, secondary_name, /*error_on_empty=*/false);
97  }
98  }
99 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition: MooseApp.C:2900
MooseObjectName uniqueName() const
Definition: MooseBase.C:66
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition: MooseApp.h:394
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:353
A class for storing an input parameter name.

◆ coordTransform()

MooseAppCoordTransform & MooseMesh::coordTransform ( )
inline
Returns
the coordinate transformation object that describes how to transform this problem's coordinate system into the canonical/reference coordinate system

Definition at line 1888 of file MooseMesh.h.

Referenced by FEProblemBase::checkProblemIntegrity(), and FEProblemBase::coordTransform().

1889 {
1890  mooseAssert(_coord_transform, "The coordinate transformation object is null.");
1891  return *_coord_transform;
1892 }
std::unique_ptr< MooseAppCoordTransform > _coord_transform
A coordinate transformation object that describes how to transform this problem&#39;s coordinate system i...
Definition: MooseMesh.h:1868

◆ declareManagedRestartableDataWithContext()

template<typename T , typename... Args>
Restartable::ManagedValue< T > Restartable::declareManagedRestartableDataWithContext ( const std::string &  data_name,
void context,
Args &&...  args 
)
protectedinherited

Declares a piece of "managed" restartable data and initialize it.

Here, "managed" restartable data means that the caller can destruct this data upon destruction of the return value of this method. Therefore, this ManagedValue<T> wrapper should survive after the final calls to dataStore() for it. That is... at the very end.

This is needed for objects whose destruction ordering is important, and enables natural c++ destruction in reverse construction order of the object that declares it.

See delcareRestartableData and declareRestartableDataWithContext for more information.

Definition at line 276 of file Restartable.h.

279 {
280  auto & data_ptr =
281  declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...);
282  return Restartable::ManagedValue<T>(data_ptr);
283 }
Wrapper class for restartable data that is "managed.
Definition: Restartable.h:42

◆ declareRecoverableData()

template<typename T , typename... Args>
T & Restartable::declareRecoverableData ( const std::string &  data_name,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "recoverable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

Note - this data will NOT be restored on Restart!

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
argsArguments to forward to the constructor of the data

Definition at line 351 of file Restartable.h.

352 {
353  const auto full_name = restartableName(data_name);
354 
356 
357  return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
358 }
std::string restartableName(const std::string &data_name) const
Gets the name of a piece of restartable data given a data name, adding the system name and object nam...
Definition: Restartable.C:66
void registerRestartableNameWithFilterOnApp(const std::string &name, Moose::RESTARTABLE_FILTER filter)
Helper function for actually registering the restartable data.
Definition: Restartable.C:59

◆ declareRestartableData()

template<typename T , typename... Args>
T & Restartable::declareRestartableData ( const std::string &  data_name,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
argsArguments to forward to the constructor of the data

Definition at line 269 of file Restartable.h.

270 {
271  return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
272 }

◆ declareRestartableDataWithContext()

template<typename T , typename... Args>
T & Restartable::declareRestartableDataWithContext ( const std::string &  data_name,
void context,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
contextContext pointer that will be passed to the load and store functions
argsArguments to forward to the constructor of the data

Definition at line 294 of file Restartable.h.

297 {
298  return declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...).set();
299 }

◆ declareRestartableDataWithObjectName()

template<typename T , typename... Args>
T & Restartable::declareRestartableDataWithObjectName ( const std::string &  data_name,
const std::string &  object_name,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.
argsArguments to forward to the constructor of the data

Definition at line 323 of file Restartable.h.

326 {
327  return declareRestartableDataWithObjectNameWithContext<T>(
328  data_name, object_name, nullptr, std::forward<Args>(args)...);
329 }

◆ declareRestartableDataWithObjectNameWithContext()

template<typename T , typename... Args>
T & Restartable::declareRestartableDataWithObjectNameWithContext ( const std::string &  data_name,
const std::string &  object_name,
void context,
Args &&...  args 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.
contextContext pointer that will be passed to the load and store functions
argsArguments to forward to the constructor of the data

Definition at line 333 of file Restartable.h.

337 {
338  std::string old_name = _restartable_name;
339 
340  _restartable_name = object_name;
341 
342  T & value = declareRestartableDataWithContext<T>(data_name, context, std::forward<Args>(args)...);
343 
344  _restartable_name = old_name;
345 
346  return value;
347 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:243
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ deleteRemoteElements()

void MooseMesh::deleteRemoteElements ( )

Delete remote elements.

Definition at line 3929 of file MooseMesh.C.

3930 {
3932  if (!_mesh)
3933  mooseError("Cannot delete remote elements because we have not yet attached a MeshBase");
3934 
3935  _mesh->allow_remote_element_removal(true);
3936 
3937  _mesh->delete_remote_elements();
3938 }
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1828
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ detectOrthogonalDimRanges()

bool MooseMesh::detectOrthogonalDimRanges ( Real  tol = 1e-6)

This routine determines whether the Mesh is a regular orthogonal mesh (i.e.

square in 2D, cubic in 3D). If it is, then we can use a number of convenience functions when periodic boundary conditions are applied. This routine populates the _range vector which is necessary for these convenience functions.

Note: This routine can potentially identify meshes with concave faces that still "fit" in the convex hull of the corresponding regular orthogonal mesh. This case is highly unlikely in practice and if a user does this, well.... release the kicker!

Definition at line 1925 of file MooseMesh.C.

Referenced by AddPeriodicBCAction::autoTranslationBoundaries(), and prepare().

1926 {
1927  TIME_SECTION("detectOrthogonalDimRanges", 5);
1928 
1930  return true;
1931 
1932  std::vector<Real> min(3, std::numeric_limits<Real>::max());
1933  std::vector<Real> max(3, std::numeric_limits<Real>::min());
1934  unsigned int dim = getMesh().mesh_dimension();
1935 
1936  // Find the bounding box of our mesh
1937  for (const auto & node : getMesh().node_ptr_range())
1938  // Check all coordinates, we don't know if this mesh might be lying in a higher dim even if the
1939  // mesh dimension is lower.
1940  for (const auto i : make_range(Moose::dim))
1941  {
1942  if ((*node)(i) < min[i])
1943  min[i] = (*node)(i);
1944  if ((*node)(i) > max[i])
1945  max[i] = (*node)(i);
1946  }
1947 
1948  this->comm().max(max);
1949  this->comm().min(min);
1950 
1951  _extreme_nodes.resize(8); // 2^LIBMESH_DIM
1952  // Now make sure that there are actual nodes at all of the extremes
1953  std::vector<bool> extreme_matches(8, false);
1954  std::vector<unsigned int> comp_map(3);
1955  for (const auto & node : getMesh().node_ptr_range())
1956  {
1957  // See if the current node is located at one of the extremes
1958  unsigned int coord_match = 0;
1959 
1960  for (const auto i : make_range(Moose::dim))
1961  {
1962  if (std::abs((*node)(i)-min[i]) < tol)
1963  {
1964  comp_map[i] = MIN;
1965  ++coord_match;
1966  }
1967  else if (std::abs((*node)(i)-max[i]) < tol)
1968  {
1969  comp_map[i] = MAX;
1970  ++coord_match;
1971  }
1972  }
1973 
1974  if (coord_match == LIBMESH_DIM) // Found a coordinate at one of the extremes
1975  {
1976  _extreme_nodes[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = node;
1977  extreme_matches[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = true;
1978  }
1979  }
1980 
1981  // See if we matched all of the extremes for the mesh dimension
1982  this->comm().max(extreme_matches);
1983  if (std::count(extreme_matches.begin(), extreme_matches.end(), true) == (1 << dim))
1984  _regular_orthogonal_mesh = true;
1985 
1986  // Set the bounds
1987  _bounds.resize(LIBMESH_DIM);
1988  for (const auto i : make_range(Moose::dim))
1989  {
1990  _bounds[i].resize(2);
1991  _bounds[i][MIN] = min[i];
1992  _bounds[i][MAX] = max[i];
1993  }
1994 
1995  return _regular_orthogonal_mesh;
1996 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1580
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
Definition: EigenADReal.h:42
std::vector< Node * > _extreme_nodes
A vector containing the nodes at the corners of a regular orthogonal mesh.
Definition: MooseMesh.h:1634
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
const Parallel::Communicator & comm() const
auto max(const L &left, const R &right)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
void min(const T &r, T &o, Request &req) const
void max(const T &r, T &o, Request &req) const
IntRange< T > make_range(T beg, T end)
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:820
unsigned int mesh_dimension() const
auto min(const L &left, const R &right)
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1577

◆ detectPairedSidesets()

void MooseMesh::detectPairedSidesets ( )
private

This routine detects paired sidesets of a regular orthogonal mesh (.i.e.

parallel sidesets "across" from one and other). The _paired_boundary datastructure is populated with this information.

Definition at line 1999 of file MooseMesh.C.

Referenced by getPairedBoundaryMapping().

2000 {
2001  TIME_SECTION("detectPairedSidesets", 5);
2002 
2003  // Loop over level-0 elements (since boundary condition information
2004  // is only directly stored for them) and find sidesets with normals
2005  // that point in the -x, +x, -y, +y, and -z, +z direction. If there
2006  // is a unique sideset id for each direction, then the paired
2007  // sidesets consist of (-x,+x), (-y,+y), (-z,+z). If there are
2008  // multiple sideset ids for a given direction, then we can't pick a
2009  // single pair for that direction. In that case, we'll just return
2010  // as was done in the original algorithm.
2011 
2012  // Points used for direction comparison
2013  const Point minus_x(-1, 0, 0), plus_x(1, 0, 0), minus_y(0, -1, 0), plus_y(0, 1, 0),
2014  minus_z(0, 0, -1), plus_z(0, 0, 1);
2015 
2016  // we need to test all element dimensions from dim down to 1
2017  const unsigned int dim = getMesh().mesh_dimension();
2018 
2019  // boundary id sets for elements of different dimensions
2020  std::vector<std::set<BoundaryID>> minus_x_ids(dim), plus_x_ids(dim), minus_y_ids(dim),
2021  plus_y_ids(dim), minus_z_ids(dim), plus_z_ids(dim);
2022 
2023  std::vector<std::unique_ptr<FEBase>> fe_faces(dim);
2024  std::vector<std::unique_ptr<libMesh::QGauss>> qfaces(dim);
2025  for (unsigned side_dim = 0; side_dim < dim; ++side_dim)
2026  {
2027  // Face is assumed to be flat, therefore normal is assumed to be
2028  // constant over the face, therefore only compute it at 1 qp.
2029  qfaces[side_dim] = std::unique_ptr<libMesh::QGauss>(new libMesh::QGauss(side_dim, CONSTANT));
2030 
2031  // A first-order Lagrange FE for the face.
2032  fe_faces[side_dim] = FEBase::build(side_dim + 1, FEType(FIRST, libMesh::LAGRANGE));
2033  fe_faces[side_dim]->attach_quadrature_rule(qfaces[side_dim].get());
2034  }
2035 
2036  // We need this to get boundary ids for each boundary face we encounter.
2037  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
2038  std::vector<boundary_id_type> face_ids;
2039 
2040  for (auto & elem : as_range(getMesh().level_elements_begin(0), getMesh().level_elements_end(0)))
2041  {
2042  // dimension of the current element and its normals
2043  unsigned int side_dim = elem->dim() - 1;
2044  const std::vector<Point> & normals = fe_faces[side_dim]->get_normals();
2045 
2046  // loop over element sides
2047  for (unsigned int s = 0; s < elem->n_sides(); s++)
2048  {
2049  // If side is on the boundary
2050  if (elem->neighbor_ptr(s) == nullptr)
2051  {
2052  std::unique_ptr<Elem> side = elem->build_side_ptr(s);
2053 
2054  fe_faces[side_dim]->reinit(elem, s);
2055 
2056  // Get the boundary ID(s) for this side. If there is more
2057  // than 1 boundary id, then we already can't determine a
2058  // unique pairing of sides in this direction, but we'll just
2059  // keep going to keep the logic simple.
2060  boundary_info.boundary_ids(elem, s, face_ids);
2061 
2062  // x-direction faces
2063  if (normals[0].absolute_fuzzy_equals(minus_x))
2064  minus_x_ids[side_dim].insert(face_ids.begin(), face_ids.end());
2065  else if (normals[0].absolute_fuzzy_equals(plus_x))
2066  plus_x_ids[side_dim].insert(face_ids.begin(), face_ids.end());
2067 
2068  // y-direction faces
2069  else if (normals[0].absolute_fuzzy_equals(minus_y))
2070  minus_y_ids[side_dim].insert(face_ids.begin(), face_ids.end());
2071  else if (normals[0].absolute_fuzzy_equals(plus_y))
2072  plus_y_ids[side_dim].insert(face_ids.begin(), face_ids.end());
2073 
2074  // z-direction faces
2075  else if (normals[0].absolute_fuzzy_equals(minus_z))
2076  minus_z_ids[side_dim].insert(face_ids.begin(), face_ids.end());
2077  else if (normals[0].absolute_fuzzy_equals(plus_z))
2078  plus_z_ids[side_dim].insert(face_ids.begin(), face_ids.end());
2079  }
2080  }
2081  }
2082 
2083  // For a distributed mesh, boundaries may be distributed as well. We therefore collect information
2084  // from everyone. If the mesh is already serial, then there is no need to do an allgather. Note
2085  // that this is just going to gather information about what the periodic bc ids are. We are not
2086  // gathering any remote elements or anything like that. It's just that the GhostPointNeighbors
2087  // ghosting functor currently relies on the fact that every process agrees on whether we have
2088  // periodic boundaries; every process that thinks there are periodic boundaries will call
2089  // MeshBase::sub_point_locator which makes a parallel_object_only() assertion (right or wrong). So
2090  // we all need to go there (or not go there)
2091  if (_use_distributed_mesh && !_mesh->is_serial())
2092  {
2093  // Pack all data together so that we send them via one communication
2094  // pair: boundary side --> boundary ids.
2095  std::vector<std::pair<boundary_id_type, boundary_id_type>> vecdata;
2096  // We check boundaries on all dimensions
2097  for (unsigned side_dim = 0; side_dim < dim; ++side_dim)
2098  {
2099  // "6" means: we have at most 6 boundaries. It is true for generated simple mesh
2100  // "detectPairedSidesets" is designed for only simple meshes
2101  for (auto bd = minus_x_ids[side_dim].begin(); bd != minus_x_ids[side_dim].end(); bd++)
2102  vecdata.emplace_back(side_dim * 6 + 0, *bd);
2103 
2104  for (auto bd = plus_x_ids[side_dim].begin(); bd != plus_x_ids[side_dim].end(); bd++)
2105  vecdata.emplace_back(side_dim * 6 + 1, *bd);
2106 
2107  for (auto bd = minus_y_ids[side_dim].begin(); bd != minus_y_ids[side_dim].end(); bd++)
2108  vecdata.emplace_back(side_dim * 6 + 2, *bd);
2109 
2110  for (auto bd = plus_y_ids[side_dim].begin(); bd != plus_y_ids[side_dim].end(); bd++)
2111  vecdata.emplace_back(side_dim * 6 + 3, *bd);
2112 
2113  for (auto bd = minus_z_ids[side_dim].begin(); bd != minus_z_ids[side_dim].end(); bd++)
2114  vecdata.emplace_back(side_dim * 6 + 4, *bd);
2115 
2116  for (auto bd = plus_z_ids[side_dim].begin(); bd != plus_z_ids[side_dim].end(); bd++)
2117  vecdata.emplace_back(side_dim * 6 + 5, *bd);
2118  }
2119 
2120  _communicator.allgather(vecdata, false);
2121 
2122  // Unpack data, and add them into minus/plus_x/y_ids
2123  for (auto pair = vecdata.begin(); pair != vecdata.end(); pair++)
2124  {
2125  // Convert data from the long vector, and add data to separated sets
2126  auto side_dim = pair->first / 6;
2127  auto side = pair->first % 6;
2128 
2129  switch (side)
2130  {
2131  case 0:
2132  minus_x_ids[side_dim].insert(pair->second);
2133  break;
2134  case 1:
2135  plus_x_ids[side_dim].insert(pair->second);
2136  break;
2137  case 2:
2138  minus_y_ids[side_dim].insert(pair->second);
2139  break;
2140  case 3:
2141  plus_y_ids[side_dim].insert(pair->second);
2142  break;
2143  case 4:
2144  minus_z_ids[side_dim].insert(pair->second);
2145  break;
2146  case 5:
2147  plus_z_ids[side_dim].insert(pair->second);
2148  break;
2149  default:
2150  mooseError("Unknown boundary side ", side);
2151  }
2152  }
2153 
2154  } // end if (_use_distributed_mesh && !_need_ghost_ghosted_boundaries)
2155 
2156  for (unsigned side_dim = 0; side_dim < dim; ++side_dim)
2157  {
2158  // If unique pairings were found, fill up the _paired_boundary data
2159  // structure with that information.
2160  if (minus_x_ids[side_dim].size() == 1 && plus_x_ids[side_dim].size() == 1)
2161  _paired_boundary.emplace_back(
2162  std::make_pair(*(minus_x_ids[side_dim].begin()), *(plus_x_ids[side_dim].begin())));
2163  else
2165  "For side dimension " + std::to_string(side_dim) +
2166  " we did not find paired boundaries (sidesets) in X due to the presence of " +
2167  std::to_string(minus_x_ids[side_dim].size()) + " -X normal and " +
2168  std::to_string(plus_x_ids[side_dim].size()) + " +X normal boundaries.");
2169 
2170  if (minus_y_ids[side_dim].size() == 1 && plus_y_ids[side_dim].size() == 1)
2171  _paired_boundary.emplace_back(
2172  std::make_pair(*(minus_y_ids[side_dim].begin()), *(plus_y_ids[side_dim].begin())));
2173  else
2175  "For side dimension " + std::to_string(side_dim) +
2176  " we did not find paired boundaries (sidesets) in Y due to the presence of " +
2177  std::to_string(minus_y_ids[side_dim].size()) + " -Y normal and " +
2178  std::to_string(plus_y_ids[side_dim].size()) + " +Y normal boundaries.");
2179 
2180  if (minus_z_ids[side_dim].size() == 1 && plus_z_ids[side_dim].size() == 1)
2181  _paired_boundary.emplace_back(
2182  std::make_pair(*(minus_z_ids[side_dim].begin()), *(plus_z_ids[side_dim].begin())));
2183  else
2185  "For side dimension " + std::to_string(side_dim) +
2186  " we did not find paired boundaries (sidesets) in Z due to the presence of " +
2187  std::to_string(minus_z_ids[side_dim].size()) + " -Z normal and " +
2188  std::to_string(plus_z_ids[side_dim].size()) + " +Z normal boundaries.");
2189  }
2190 }
std::unique_ptr< FEGenericBase< Real > > build(const unsigned int dim, const FEType &fet)
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
void mooseInfoRepeated(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:408
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
void boundary_ids(const Node *node, std::vector< boundary_id_type > &vec_to_fill) const
const Parallel::Communicator & _communicator
const BoundaryInfo & get_boundary_info() const
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
virtual unsigned int n_sides() const=0
const Elem * neighbor_ptr(unsigned int i) const
bool absolute_fuzzy_equals(const T &var1, const T2 &var2, const Real tol=TOLERANCE *TOLERANCE)
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
virtual unsigned short dim() const=0
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
unsigned int mesh_dimension() const
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition: MooseMesh.h:1583

◆ determineUseDistributedMesh()

void MooseMesh::determineUseDistributedMesh ( )

Determine whether to use a distributed mesh.

Should be called during construction

Definition at line 2828 of file MooseMesh.C.

Referenced by MooseMesh(), and setParallelType().

2829 {
2830  switch (_parallel_type)
2831  {
2832  case ParallelType::DEFAULT:
2833  // The user did not specify 'parallel_type = XYZ' in the input file,
2834  // so we allow the --distributed-mesh command line arg to possibly turn
2835  // on DistributedMesh. If the command line arg is not present, we pick ReplicatedMesh.
2837  _use_distributed_mesh = true;
2838  break;
2842  _use_distributed_mesh = false;
2843  break;
2845  _use_distributed_mesh = true;
2846  break;
2847  }
2848 
2849  // If the user specifies 'nemesis = true' in the Mesh block, or they are using --use-split,
2850  // we must use DistributedMesh.
2851  if (_is_nemesis || _is_split)
2852  _use_distributed_mesh = true;
2853 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1423
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1469
bool getDistributedMeshOnCommandLine() const
Returns true if the user specified –distributed-mesh (or –parallel-mesh, for backwards compatibilit...
Definition: MooseApp.h:453
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseMesh.h:1586
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:353
bool _parallel_type_overridden
Definition: MooseMesh.h:1430

◆ dimension()

unsigned int MooseMesh::dimension ( ) const
virtual

◆ dimensionWidth()

Real MooseMesh::dimensionWidth ( unsigned int  component) const

Returns the width of the requested dimension.

Definition at line 2193 of file MooseMesh.C.

Referenced by addPeriodicVariable(), AddPeriodicBCAction::autoTranslationBoundaries(), and effectiveSpatialDimension().

2194 {
2195  return getMaxInDimension(component) - getMinInDimension(component);
2196 }
virtual Real getMaxInDimension(unsigned int component) const
Definition: MooseMesh.C:2208
virtual Real getMinInDimension(unsigned int component) const
Returns the min or max of the requested dimension respectively.
Definition: MooseMesh.C:2199

◆ doingPRefinement() [1/2]

void MooseMesh::doingPRefinement ( bool  doing_p_refinement)
inline

Indicate whether the kind of adaptivity we're doing is p-refinement.

Definition at line 1347 of file MooseMesh.h.

Referenced by SubProblem::doingPRefinement(), Adaptivity::init(), FEProblemBase::init(), ProjectMaterialProperties::onBoundary(), CacheChangedListsThread::onElement(), and ProjectMaterialProperties::onElement().

1347 { _doing_p_refinement = doing_p_refinement; }
bool _doing_p_refinement
Whether we have p-refinement (as opposed to h-refinement)
Definition: MooseMesh.h:1877

◆ doingPRefinement() [2/2]

bool MooseMesh::doingPRefinement ( ) const
inline

Query whether we have p-refinement.

Definition at line 1352 of file MooseMesh.h.

Referenced by buildRefinementAndCoarseningMaps().

1352 { return _doing_p_refinement; }
bool _doing_p_refinement
Whether we have p-refinement (as opposed to h-refinement)
Definition: MooseMesh.h:1877

◆ effectiveSpatialDimension()

unsigned int MooseMesh::effectiveSpatialDimension ( ) const
virtual

Returns the effective spatial dimension determined by the coordinates actually used by the mesh.

This means that a 1D mesh that has non-zero z or y coordinates is actually a 2D or 3D mesh, respectively. Likewise a 2D mesh that has non-zero z coordinates is actually 3D mesh.

Definition at line 2934 of file MooseMesh.C.

2935 {
2936  const Real abs_zero = 1e-12;
2937 
2938  // See if the mesh is completely containd in the z and y planes to calculate effective spatial
2939  // dim
2940  for (unsigned int dim = LIBMESH_DIM; dim >= 1; --dim)
2941  if (dimensionWidth(dim - 1) >= abs_zero)
2942  return dim;
2943 
2944  // If we get here, we have a 1D mesh on the x-axis.
2945  return 1;
2946 }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition: MooseMesh.C:2193

◆ elem() [1/2]

Elem * MooseMesh::elem ( const dof_id_type  i)
virtual

◆ elem() [2/2]

const Elem * MooseMesh::elem ( const dof_id_type  i) const
virtual

Definition at line 3106 of file MooseMesh.C.

3107 {
3108  mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
3109  return elemPtr(i);
3110 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:3113
void mooseDeprecated(Args &&... args) const
Definition: MooseBase.h:310

◆ elemInfo()

const ElemInfo & MooseMesh::elemInfo ( const dof_id_type  id) const

Accessor for the elemInfo object for a given element ID.

Definition at line 3871 of file MooseMesh.C.

Referenced by MooseLinearVariableFV< Real >::evaluate(), and MooseLinearVariableFV< Real >::evaluateGradient().

3872 {
3873  return libmesh_map_find(_elem_to_elem_info, id);
3874 }
std::unordered_map< dof_id_type, ElemInfo > _elem_to_elem_info
Map connecting elems with their corresponding ElemInfo, we use the element ID as the key...
Definition: MooseMesh.h:1596

◆ elemInfoVector()

const std::vector<const ElemInfo *>& MooseMesh::elemInfoVector ( ) const
inline

Accessor for the element info objects owned by this process.

Definition at line 1181 of file MooseMesh.h.

1181 { return _elem_info; }
std::vector< const ElemInfo * > _elem_info
Holds only those ElemInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1600

◆ elemPtr() [1/2]

Elem * MooseMesh::elemPtr ( const dof_id_type  i)
virtual

Definition at line 3113 of file MooseMesh.C.

Referenced by FEProblemBase::addGhostedElem(), SystemBase::augmentSendList(), NodalPatchRecoveryAuxBase::blockRestrictElements(), NodalPatchRecovery::compute(), BoundaryMarker::computeElementMarker(), ProjectionAux::computeValue(), NodalPatchRecoveryAuxBase::computeValue(), elem(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), ActivateElementsUserObjectBase::execute(), NonlinearSystemBase::findImplicitGeometricCouplingEntries(), NearestNodeLocator::findNodes(), ElementSubdomainModifierBase::findReinitializedElemsAndNodes(), ElementSubdomainModifierBase::gatherMovingBoundaryChanges(), NodeElemConstraint::getConnectedDofIndices(), NodeFaceConstraint::getConnectedDofIndices(), FEProblemBase::getDiracElements(), PenetrationThread::getInfoForFacesWithCommonNodes(), ActivateElementsUserObjectBase::getNewlyActivatedElementRange(), ActivateElementsUserObjectBase::getNewlyActivatedNodeRange(), DiracKernelBase::hasPointsOnElem(), ActivateElementsUserObjectBase::isNewlyActivated(), Moose::Mortar::loopOverMortarSegments(), ElementSubdomainModifierBase::nodeIsNewlyReinitialized(), SecondaryNeighborhoodThread::operator()(), PenetrationThread::operator()(), FEProblemBase::prepareFace(), FEProblemBase::reinitDirac(), FEProblemBase::reinitElem(), FEProblemBase::reinitElemFaceRef(), FEProblemBase::reinitElemNeighborAndLowerD(), ElementSubdomainModifierBase::reinitializedElemRange(), FEProblemBase::reinitLowerDElem(), FEProblemBase::reinitNeighbor(), FEProblemBase::reinitNeighborFaceRef(), NonlinearSystemBase::reinitNodeFace(), FEProblemBase::setCurrentLowerDElem(), and NearestNodeLocator::updatePatch().

3114 {
3115  return getMesh().elem_ptr(i);
3116 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual const Elem * elem_ptr(const dof_id_type i) const=0

◆ elemPtr() [2/2]

const Elem * MooseMesh::elemPtr ( const dof_id_type  i) const
virtual

Definition at line 3119 of file MooseMesh.C.

3120 {
3121  return getMesh().elem_ptr(i);
3122 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual const Elem * elem_ptr(const dof_id_type i) const=0

◆ elemTypes()

MooseEnum MooseMesh::elemTypes ( )
static

returns MooseMesh element type options

Definition at line 3906 of file MooseMesh.C.

3907 {
3909  "EDGE EDGE2 EDGE3 EDGE4 QUAD QUAD4 QUAD8 QUAD9 TRI3 TRI6 HEX HEX8 HEX20 HEX27 TET4 TET10 "
3910  "PRISM6 PRISM15 PRISM18 PYRAMID5 PYRAMID13 PYRAMID14");
3911  return elemTypes;
3912 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
static MooseEnum elemTypes()
returns MooseMesh element type options
Definition: MooseMesh.C:3906

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 39 of file MooseObject.h.

Referenced by EigenKernel::enabled().

39 { return _enabled; }
const bool & _enabled
Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.
Definition: MooseObject.h:50

◆ errorIfDistributedMesh()

void MooseMesh::errorIfDistributedMesh ( std::string  name) const

Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.

Clients of MooseMesh can use this function to throw an error if they know they don't work with DistributedMesh.

See, for example, the NodalVariableValue class.

Definition at line 3617 of file MooseMesh.C.

Referenced by BoundaryPreservedMarker::BoundaryPreservedMarker(), ElementsAlongLine::ElementsAlongLine(), ElementsAlongPlane::ElementsAlongPlane(), FunctorPositions::initialize(), FunctorTimes::initialize(), IntersectionPointsAlongLine::IntersectionPointsAlongLine(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodeElemConstraintBase::NodeElemConstraintBase(), NonlocalIntegratedBC::NonlocalIntegratedBC(), NonlocalKernel::NonlocalKernel(), PatternedMesh::PatternedMesh(), StitchedMesh::StitchedMesh(), and TiledMesh::TiledMesh().

3618 {
3620  mooseError("Cannot use ",
3621  name,
3622  " with DistributedMesh!\n",
3623  "Consider specifying parallel_type = 'replicated' in your input file\n",
3624  "to prevent it from being run with DistributedMesh.");
3625 }
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ errorPrefix()

std::string MooseBase::errorPrefix ( const std::string &  ) const
inlineinherited

Deprecated message prefix; the error type is no longer used.

Definition at line 260 of file MooseBase.h.

260 { return messagePrefix(); }
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:252

◆ faceInfo() [1/2]

const std::vector< const FaceInfo * > & MooseMesh::faceInfo ( ) const
inline

Accessor for local FaceInfo objects.

Definition at line 2173 of file MooseMesh.h.

Referenced by LayeredSideDiffusiveFluxAverage::computeQpIntegral(), SideIntegralVariableUserObject::computeQpIntegral(), InterfaceUserObject::execute(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), SideUserObject::getFaceInfos(), and InternalSideUserObject::getFaceInfos().

2174 {
2175  return _face_info;
2176 }
std::vector< const FaceInfo * > _face_info
Holds only those FaceInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1608

◆ faceInfo() [2/2]

const FaceInfo* MooseMesh::faceInfo ( const Elem *  elem,
unsigned int  side 
) const

Accessor for the local FaceInfo object on the side of one element. Returns null if ghosted.

◆ findAdaptivityQpMaps()

void MooseMesh::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 
)
private

Given an elem type, get maps that tell us what qp's are closest to each other between a parent and it's children.

This is mainly used for mapping stateful material properties during adaptivity.

There are 3 cases here:

  1. Volume to volume (parent_side = -1, child = -1, child_side = -1)
  2. Parent side to child side (parent_side = 0+, child = -1, child_side = 0+)
  3. Child side to parent volume (parent_side = -1, child = 0+, child_side = 0+)

Case 3 only happens under refinement (need to invent data at internal child sides).

Parameters
template_elemAn element of the type that we need to find the maps for
qruleThe quadrature rule that we need to find the maps for
qrule_faceThe face quadrature rule that we need to find the maps for
refinement_mapThe map to use when an element gets split
coarsen_mapThe map to use when an element is coarsened.
parent_side- the id of the parent's side
child- the id of the child element
child_side- The id of the child's side

Definition at line 2621 of file MooseMesh.C.

Referenced by buildCoarseningMap(), and buildRefinementMap().

2629 {
2630  TIME_SECTION("findAdaptivityQpMaps", 5);
2631 
2633  mesh.skip_partitioning(true);
2634 
2635  unsigned int dim = template_elem->dim();
2637 
2638  for (unsigned int i = 0; i < template_elem->n_nodes(); ++i)
2639  mesh.add_point(template_elem->point(i));
2640 
2641  Elem * elem = mesh.add_elem(Elem::build(template_elem->type()).release());
2642 
2643  for (unsigned int i = 0; i < template_elem->n_nodes(); ++i)
2644  elem->set_node(i, mesh.node_ptr(i));
2645 
2646  std::unique_ptr<FEBase> fe(FEBase::build(dim, FEType()));
2647  fe->get_phi();
2648  const std::vector<Point> & q_points_volume = fe->get_xyz();
2649 
2650  std::unique_ptr<FEBase> fe_face(FEBase::build(dim, FEType()));
2651  fe_face->get_phi();
2652  const std::vector<Point> & q_points_face = fe_face->get_xyz();
2653 
2654  fe->attach_quadrature_rule(&qrule);
2655  fe_face->attach_quadrature_rule(&qrule_face);
2656 
2657  // The current q_points (locations in *physical* space)
2658  const std::vector<Point> * q_points;
2659 
2660  if (parent_side != -1)
2661  {
2662  fe_face->reinit(elem, parent_side);
2663  q_points = &q_points_face;
2664  }
2665  else
2666  {
2667  fe->reinit(elem);
2668  q_points = &q_points_volume;
2669  }
2670 
2671  std::vector<Point> parent_ref_points;
2672 
2673  libMesh::FEMap::inverse_map(elem->dim(), elem, *q_points, parent_ref_points);
2674  libMesh::MeshRefinement mesh_refinement(mesh);
2675  mesh_refinement.uniformly_refine(1);
2676 
2677  // A map from the child element index to the locations of all the child's quadrature points in
2678  // *reference* space. Note that we use a map here instead of a vector because the caller can
2679  // pass an explicit child index. We are not guaranteed to have a sequence from [0, n_children)
2680  std::map<unsigned int, std::vector<Point>> child_to_ref_points;
2681 
2682  unsigned int n_children = elem->n_children();
2683 
2684  refinement_map.resize(n_children);
2685 
2686  std::vector<unsigned int> children;
2687 
2688  if (child != -1) // Passed in a child explicitly
2689  children.push_back(child);
2690  else
2691  {
2692  children.resize(n_children);
2693  for (unsigned int child = 0; child < n_children; ++child)
2694  children[child] = child;
2695  }
2696 
2697  for (unsigned int i = 0; i < children.size(); ++i)
2698  {
2699  unsigned int child = children[i];
2700 
2701  if ((parent_side != -1 && !elem->is_child_on_side(child, parent_side)))
2702  continue;
2703 
2704  const Elem * child_elem = elem->child_ptr(child);
2705 
2706  if (child_side != -1)
2707  {
2708  fe_face->reinit(child_elem, child_side);
2709  q_points = &q_points_face;
2710  }
2711  else
2712  {
2713  fe->reinit(child_elem);
2714  q_points = &q_points_volume;
2715  }
2716 
2717  std::vector<Point> child_ref_points;
2718 
2719  libMesh::FEMap::inverse_map(elem->dim(), elem, *q_points, child_ref_points);
2720  child_to_ref_points[child] = child_ref_points;
2721 
2722  std::vector<QpMap> & qp_map = refinement_map[child];
2723 
2724  // Find the closest parent_qp to each child_qp
2725  mapPoints(child_ref_points, parent_ref_points, qp_map);
2726  }
2727 
2728  coarsen_map.resize(parent_ref_points.size());
2729 
2730  // For each parent qp find the closest child qp
2731  for (unsigned int child = 0; child < n_children; child++)
2732  {
2733  if (parent_side != -1 && !elem->is_child_on_side(child, child_side))
2734  continue;
2735 
2736  std::vector<Point> & child_ref_points = child_to_ref_points[child];
2737 
2738  std::vector<QpMap> qp_map;
2739 
2740  // Find all of the closest points from parent_qp to _THIS_ child's qp
2741  mapPoints(parent_ref_points, child_ref_points, qp_map);
2742 
2743  // Check those to see if they are closer than what we currently have for each point
2744  for (unsigned int parent_qp = 0; parent_qp < parent_ref_points.size(); ++parent_qp)
2745  {
2746  std::pair<unsigned int, QpMap> & child_and_map = coarsen_map[parent_qp];
2747  unsigned int & closest_child = child_and_map.first;
2748  QpMap & closest_map = child_and_map.second;
2749 
2750  QpMap & current_map = qp_map[parent_qp];
2751 
2752  if (current_map._distance < closest_map._distance)
2753  {
2754  closest_child = child;
2755  closest_map = current_map;
2756  }
2757  }
2758  }
2759 }
std::unique_ptr< FEGenericBase< Real > > build(const unsigned int dim, const FEType &fet)
virtual Node *& set_node(const unsigned int i)
void skip_partitioning(bool skip)
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const=0
MeshBase & mesh
Helper object for holding qp mapping info.
Definition: MooseMesh.h:69
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
virtual unsigned int n_children() const=0
const Parallel::Communicator & _communicator
virtual Node * add_point(const Point &p, const dof_id_type id=DofObject::invalid_id, const processor_id_type proc_id=DofObject::invalid_processor_id)=0
void mapPoints(const std::vector< Point > &from, const std::vector< Point > &to, std::vector< QpMap > &qp_map)
Find the closest points that map "from" to "to" and fill up "qp_map".
Definition: MooseMesh.C:2590
virtual unsigned int n_nodes() const=0
virtual Elem * add_elem(Elem *e)=0
void set_mesh_dimension(unsigned char d)
virtual unsigned short dim() const=0
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
virtual const Node * node_ptr(const dof_id_type i) const=0
virtual ElemType type() const=0
const Point & point(const unsigned int i) const
Real _distance
The distance between them.
Definition: MooseMesh.h:81
const Elem * child_ptr(unsigned int i) const

◆ freeBndElems()

void MooseMesh::freeBndElems ( )
protected

Definition at line 395 of file MooseMesh.C.

Referenced by buildBndElemList(), and ~MooseMesh().

396 {
397  // free memory
398  for (auto & belem : _bnd_elems)
399  delete belem;
400 
401  for (auto & it : _bnd_elem_ids)
402  it.second.clear();
403 
404  _bnd_elem_ids.clear();
405  _bnd_elem_range.reset();
406 }
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:1502
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:1545
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1540

◆ freeBndNodes()

void MooseMesh::freeBndNodes ( )
protected

Definition at line 376 of file MooseMesh.C.

Referenced by buildNodeList(), and ~MooseMesh().

377 {
378  // free memory
379  for (auto & bnode : _bnd_nodes)
380  delete bnode;
381 
382  for (auto & it : _node_set_nodes)
383  it.second.clear();
384 
385  _node_set_nodes.clear();
386 
387  for (auto & it : _bnd_node_ids)
388  it.second.clear();
389 
390  _bnd_node_ids.clear();
391  _bnd_node_range.reset();
392 }
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
Map of sets of node IDs in each boundary.
Definition: MooseMesh.h:1537
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids] ...
Definition: MooseMesh.h:1556
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1533
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:1500

◆ getActiveLocalElementRange()

ConstElemRange * MooseMesh::getActiveLocalElementRange ( )

Return pointers to range objects for various types of ranges (local nodes, boundary elems, etc.).

Definition at line 1238 of file MooseMesh.C.

Referenced by AuxiliarySystem::computeElementalVarsHelper(), FEProblemBase::computeIndicators(), FEProblemBase::computeMarkers(), FEProblemBase::computeUserObjectsInternal(), PointwiseRenormalizeVector::execute(), FEProblemBase::getCurrentAlgebraicElementRange(), FEProblemBase::initialSetup(), meshChanged(), DOFMapOutput::output(), MeshInfo::possiblyAddSubdomainInfo(), FEProblemBase::projectSolution(), SystemBase::setVariableGlobalDoFs(), FixedPointSolve::solve(), TransientMultiApp::solveStep(), updateActiveSemiLocalNodeRange(), Adaptivity::updateErrorVectors(), FEProblemBase::updateMaxQps(), and SystemBase::zeroVariables().

1239 {
1241  {
1242  TIME_SECTION("getActiveLocalElementRange", 5);
1243 
1244  _active_local_elem_range = std::make_unique<ConstElemRange>(
1245  getMesh().active_local_elements_begin(), getMesh().active_local_elements_end(), GRAIN_SIZE);
1246  }
1247 
1248  return _active_local_elem_range.get();
1249 }
std::unique_ptr< libMesh::ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:1494
static const int GRAIN_SIZE
Definition: MooseMesh.C:67
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ getActiveNodeRange()

NodeRange * MooseMesh::getActiveNodeRange ( )

Definition at line 1252 of file MooseMesh.C.

Referenced by VariableCondensationPreconditioner::getDofToCondense(), and meshChanged().

1253 {
1254  if (!_active_node_range)
1255  {
1256  TIME_SECTION("getActiveNodeRange", 5);
1257 
1258  _active_node_range = std::make_unique<NodeRange>(
1259  getMesh().active_nodes_begin(), getMesh().active_nodes_end(), GRAIN_SIZE);
1260  }
1261 
1262  return _active_node_range.get();
1263 }
std::unique_ptr< libMesh::NodeRange > _active_node_range
Definition: MooseMesh.h:1497
static const int GRAIN_SIZE
Definition: MooseMesh.C:67
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ getActiveSemiLocalNodeRange()

SemiLocalNodeRange * MooseMesh::getActiveSemiLocalNodeRange ( ) const

Definition at line 1266 of file MooseMesh.C.

1267 {
1268  mooseAssert(_active_semilocal_node_range,
1269  "_active_semilocal_node_range has not been created yet!");
1270 
1271  return _active_semilocal_node_range.get();
1272 }
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:1496

◆ getAllElemIDs()

std::set< dof_id_type > MooseMesh::getAllElemIDs ( unsigned int  elem_id_index) const

Return all the unique element IDs for an extra element integer with its index.

Definition at line 1129 of file MooseMesh.C.

Referenced by getElemIDMapping().

1130 {
1131  std::set<dof_id_type> unique_ids;
1132  for (auto & pair : _block_id_mapping[elem_id_index])
1133  for (auto & id : pair.second)
1134  unique_ids.insert(id);
1135  return unique_ids;
1136 }
std::vector< std::unordered_map< SubdomainID, std::set< dof_id_type > > > _block_id_mapping
Unique element integer IDs for each subdomain and each extra element integers.
Definition: MooseMesh.h:1840

◆ getAxisymmetricRadialCoord()

unsigned int MooseMesh::getAxisymmetricRadialCoord ( ) const

Returns the desired radial direction for RZ coordinate transformation.

Returns
The coordinate direction for the radial direction

Definition at line 4294 of file MooseMesh.C.

Referenced by SubProblem::getAxisymmetricRadialCoord(), and ComputeLinearFVGreenGaussGradientVolumeThread::operator()().

4295 {
4297  mooseError("getAxisymmetricRadialCoord() should not be called if "
4298  "setGeneralAxisymmetricCoordAxes() has been called.");
4299 
4300  if (_rz_coord_axis == 0)
4301  return 1; // if the rotation axis is x (0), then the radial direction is y (1)
4302  else
4303  return 0; // otherwise the radial direction is assumed to be x, i.e., the rotation axis is y
4304 }
bool usingGeneralAxisymmetricCoordAxes() const
Returns true if general axisymmetric coordinate axes are being used.
Definition: MooseMesh.C:4279
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1861

◆ getBase()

const std::string& MooseBase::getBase ( ) const
inlineinherited
Returns
The registered base for this object (set via InputParameters::registerBase())

Definition at line 143 of file MooseBase.h.

Referenced by Factory::copyConstruct(), and MooseBase::uniqueParameterName().

143 { return _pars.getBase(); }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
const std::string & getBase() const

◆ getBlockConnectedBlocks()

const std::set< SubdomainID > & MooseMesh::getBlockConnectedBlocks ( const SubdomainID  subdomain_id) const

Get the list of subdomains neighboring a given subdomain.

Parameters
subdomain_idThe boundary ID you want to get the subdomain IDs for.
Returns
All subdomain IDs neighboring a given subdomain

Definition at line 3554 of file MooseMesh.C.

3555 {
3556  const auto it = _sub_to_data.find(subdomain_id);
3557 
3558  if (it == _sub_to_data.end())
3559  mooseError("Unable to find subdomain ID: ", subdomain_id, '.');
3560 
3561  return it->second.neighbor_subs;
3562 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1800

◆ getBlocksMaxDimension()

unsigned int MooseMesh::getBlocksMaxDimension ( const std::vector< SubdomainName > &  blocks) const

Returns the maximum element dimension on the given blocks.

Definition at line 2949 of file MooseMesh.C.

Referenced by BlockRestrictable::initializeBlockRestrictable().

2950 {
2951  const auto & mesh = getMesh();
2952 
2953  // Take a shortcut if possible
2954  if (const auto & elem_dims = mesh.elem_dimensions(); mesh.is_prepared() && elem_dims.size() == 1)
2955  return *elem_dims.begin();
2956 
2957  unsigned short dim = 0;
2958  const auto subdomain_ids = getSubdomainIDs(blocks);
2959  const std::set<SubdomainID> subdomain_ids_set(subdomain_ids.begin(), subdomain_ids.end());
2960  for (const auto & elem : mesh.active_subdomain_set_elements_ptr_range(subdomain_ids_set))
2961  dim = std::max(dim, elem->dim());
2962 
2963  // Get the maximumal globally
2965  return dim;
2966 }
bool is_prepared() const
char ** blocks
MeshBase & mesh
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
const Parallel::Communicator & _communicator
std::vector< SubdomainID > getSubdomainIDs(const std::vector< SubdomainName > &subdomain_names) const
Get the associated subdomainIDs for the subdomain names that are passed in.
Definition: MooseMesh.C:1737
auto max(const L &left, const R &right)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
const std::set< unsigned char > & elem_dimensions() const
void max(const T &r, T &o, Request &req) const
virtual unsigned short dim() const=0
virtual SimpleRange< element_iterator > active_subdomain_set_elements_ptr_range(std::set< subdomain_id_type > ss)=0
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ getBoundariesToActiveSemiLocalElemIds()

const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & MooseMesh::getBoundariesToActiveSemiLocalElemIds ( ) const

Returns a map of boundaries to ids of elements on the boundary.

Definition at line 1325 of file MooseMesh.C.

Referenced by getBoundariesToElems().

1326 {
1327  return _bnd_elem_ids;
1328 }
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:1545

◆ getBoundariesToElems()

const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & MooseMesh::getBoundariesToElems ( ) const

Returns a map of boundaries to ids of elements on the boundary.

Definition at line 1317 of file MooseMesh.C.

1318 {
1319  mooseDeprecated("MooseMesh::getBoundariesToElems is deprecated, "
1320  "use MooseMesh::getBoundariesToActiveSemiLocalElemIds");
1322 }
void mooseDeprecated(Args &&... args) const
Definition: MooseBase.h:310
const std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > & getBoundariesToActiveSemiLocalElemIds() const
Returns a map of boundaries to ids of elements on the boundary.
Definition: MooseMesh.C:1325

◆ getBoundaryActiveNeighborElemIds()

std::unordered_set< dof_id_type > MooseMesh::getBoundaryActiveNeighborElemIds ( BoundaryID  bid) const

Return all ids of neighbors of elements which have a side which is part of a sideset.

Note that boundaries are sided, this is on the neighbor side. For the sideset side, use getBoundariesActiveLocalElemIds. Note that while the element is local and active, the neighbor is not guaranteed to be local, it could be ghosted. Note that if the neighbor is not ghosted, is a remote_elem, then it will not be included

Parameters
bidthe id of the sideset of interest

Definition at line 1342 of file MooseMesh.C.

1343 {
1344  // Vector of boundary elems is updated every mesh update
1345  std::unordered_set<dof_id_type> neighbor_elems;
1346  for (const auto & bnd_elem : _bnd_elems)
1347  {
1348  const auto & [elem_ptr, elem_side, elem_bid] = *bnd_elem;
1349  if (elem_bid == bid)
1350  {
1351  const auto * neighbor = elem_ptr->neighbor_ptr(elem_side);
1352  // Dont add fully remote elements, ghosted is fine
1353  if (neighbor && neighbor != libMesh::remote_elem)
1354  {
1355  // handle mesh refinement, only return active elements near the boundary
1356  if (neighbor->active())
1357  neighbor_elems.insert(neighbor->id());
1358  else
1359  {
1360  std::vector<const Elem *> family;
1361  neighbor->active_family_tree_by_neighbor(family, elem_ptr);
1362  for (const auto & child_neighbor : family)
1363  neighbor_elems.insert(child_neighbor->id());
1364  }
1365  }
1366  }
1367  }
1368 
1369  return neighbor_elems;
1370 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1540
const RemoteElem * remote_elem

◆ getBoundaryActiveSemiLocalElemIds()

std::unordered_set< dof_id_type > MooseMesh::getBoundaryActiveSemiLocalElemIds ( BoundaryID  bid) const

Return all ids of elements which have a side which is part of a sideset.

Note that boundaries are sided.

Parameters
bidthe id of the sideset of interest

Definition at line 1331 of file MooseMesh.C.

1332 {
1333  // The boundary to element map is computed on every mesh update
1334  const auto it = _bnd_elem_ids.find(bid);
1335  if (it == _bnd_elem_ids.end())
1336  // Boundary is not local to this domain, return an empty set
1337  return std::unordered_set<dof_id_type>{};
1338  return it->second;
1339 }
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:1545

◆ getBoundaryConnectedBlocks()

std::set< SubdomainID > MooseMesh::getBoundaryConnectedBlocks ( const BoundaryID  bid) const

Get the list of subdomains associated with the given boundary.

Parameters
bidThe boundary ID you want to get the subdomain IDs for.
Returns
All subdomain IDs associated with given boundary ID

Definition at line 3521 of file MooseMesh.C.

Referenced by DomainUserObject::DomainUserObject(), getInterfaceConnectedBlocks(), and NodeFaceConstraint::getSecondaryConnectedBlocks().

3522 {
3523  std::set<SubdomainID> subdomain_ids;
3524  for (const auto & [sub_id, data] : _sub_to_data)
3525  if (data.boundary_ids.find(bid) != data.boundary_ids.end())
3526  subdomain_ids.insert(sub_id);
3527 
3528  return subdomain_ids;
3529 }
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1800

◆ getBoundaryConnectedSecondaryBlocks()

std::set< SubdomainID > MooseMesh::getBoundaryConnectedSecondaryBlocks ( const BoundaryID  bid) const

Get the list of subdomains associated with the given boundary of its secondary side.

Parameters
bidThe boundary ID you want to get the subdomain IDs for.
Returns
All subdomain IDs associated with given boundary ID

Definition at line 3532 of file MooseMesh.C.

Referenced by DomainUserObject::DomainUserObject().

3533 {
3534  std::set<SubdomainID> subdomain_ids;
3535  for (const auto & it : _neighbor_subdomain_boundary_ids)
3536  if (it.second.find(bid) != it.second.end())
3537  subdomain_ids.insert(it.first);
3538 
3539  return subdomain_ids;
3540 }
std::unordered_map< SubdomainID, std::set< BoundaryID > > _neighbor_subdomain_boundary_ids
Holds a map from neighbor subomdain ids to the boundary ids that are attached to it.
Definition: MooseMesh.h:1803

◆ getBoundaryElementRange()

ConstBndElemRange * MooseMesh::getBoundaryElementRange ( )

Definition at line 1303 of file MooseMesh.C.

Referenced by AuxiliarySystem::computeElementalVarsHelper(), DMMooseGetEmbedding_Private(), GeometricSearchData::generateQuadratureNodes(), FEProblemBase::initialSetup(), meshChanged(), and GeometricSearchData::updateQuadratureNodes().

1304 {
1305  if (!_bnd_elem_range)
1306  {
1307  TIME_SECTION("getBoundaryElementRange", 5);
1308 
1309  _bnd_elem_range =
1310  std::make_unique<ConstBndElemRange>(bndElemsBegin(), bndElemsEnd(), GRAIN_SIZE);
1311  }
1312 
1313  return _bnd_elem_range.get();
1314 }
virtual bnd_elem_iterator bndElemsEnd()
Definition: MooseMesh.C:1569
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:1502
virtual bnd_elem_iterator bndElemsBegin()
Return iterators to the beginning/end of the boundary elements list.
Definition: MooseMesh.C:1561
static const int GRAIN_SIZE
Definition: MooseMesh.C:67

◆ getBoundaryID()

BoundaryID MooseMesh::getBoundaryID ( const BoundaryName &  boundary_name) const

Get the associated BoundaryID for the boundary name.

Returns
param boundary_name The name of the boundary.
the boundary id from the passed boundary name.

Definition at line 1692 of file MooseMesh.C.

Referenced by AddPeriodicBCAction::act(), TiledMesh::buildMesh(), StitchedMesh::buildMesh(), PatternedMesh::buildMesh(), DMSetUp_Moose_Pre(), GeometricSearchData::getNearestNodeLocator(), GeometricSearchData::getPenetrationLocator(), GeometricSearchData::getQuadratureNearestNodeLocator(), GeometricSearchData::getQuadraturePenetrationLocator(), LinearNodalConstraint::LinearNodalConstraint(), LowerBoundNodalKernel::LowerBoundNodalKernel(), NodalScalarKernel::NodalScalarKernel(), prepare(), EqualValueBoundaryConstraint::updateConstrainedNodes(), and UpperBoundNodalKernel::UpperBoundNodalKernel().

1693 {
1694  if (boundary_name == "ANY_BOUNDARY_ID")
1695  mooseError("Please use getBoundaryIDs() when passing \"ANY_BOUNDARY_ID\"");
1696 
1697  return MooseMeshUtils::getBoundaryID(boundary_name, getMesh());
1698 }
BoundaryID getBoundaryID(const BoundaryName &boundary_name, const MeshBase &mesh)
Gets the boundary ID associated with the given BoundaryName.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ getBoundaryIDs() [1/3]

std::vector<BoundaryID> MooseMesh::getBoundaryIDs ( const Elem *const  elem,
const unsigned short int  side 
) const

◆ getBoundaryIDs() [2/3]

const std::set< BoundaryID > & MooseMesh::getBoundaryIDs ( ) const

Returns a const reference to a set of all user-specified boundary IDs.

On a distributed mesh this will only include boundary IDs which exist on local or ghosted elements; a copy and a call to _communicator.set_union() will be necessary to get the global ID set.

Definition at line 2977 of file MooseMesh.C.

Referenced by cacheInfo().

2978 {
2980 }
const BoundaryInfo & get_boundary_info() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
const std::set< boundary_id_type > & get_boundary_ids() const

◆ getBoundaryIDs() [3/3]

std::vector< BoundaryID > MooseMesh::getBoundaryIDs ( const std::vector< BoundaryName > &  boundary_name,
bool  generate_unknown = false 
) const

Get the associated BoundaryID for the boundary names that are passed in.

Returns
param boundary_name The names of the boundaries.
the boundary ids from the passed boundary names.

Definition at line 1723 of file MooseMesh.C.

1725 {
1727  getMesh(), boundary_name, generate_unknown, _mesh_boundary_ids);
1728 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::vector< BoundaryID > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown, const std::set< BoundaryID > &mesh_boundary_ids)
Gets the boundary IDs with their names.
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:1524

◆ getBoundaryName()

const std::string & MooseMesh::getBoundaryName ( BoundaryID  boundary_id)

Return the name of the boundary given the id.

Definition at line 1792 of file MooseMesh.C.

Referenced by addPeriodicVariable(), FEProblemBase::initialSetup(), and NonlinearThread::printBoundaryExecutionInformation().

1793 {
1794  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1795 
1796  // We need to figure out if this boundary is a sideset or nodeset
1797  if (boundary_info.get_side_boundary_ids().count(boundary_id))
1798  return boundary_info.get_sideset_name(boundary_id);
1799  else
1800  return boundary_info.get_nodeset_name(boundary_id);
1801 }
const std::set< boundary_id_type > & get_side_boundary_ids() const
const BoundaryInfo & get_boundary_info() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
const std::string & get_nodeset_name(boundary_id_type id) const
const std::string & get_sideset_name(boundary_id_type id) const

◆ getBoundaryNodeRange()

ConstBndNodeRange * MooseMesh::getBoundaryNodeRange ( )

Definition at line 1289 of file MooseMesh.C.

Referenced by AuxiliarySystem::computeMortarNodalVars(), AuxiliarySystem::computeNodalVarsHelper(), DMMooseGetEmbedding_Private(), NearestNodeLocator::findNodes(), FEProblemBase::getCurrentAlgebraicBndNodeRange(), ActivateElementsUserObjectBase::getNewlyActivatedBndNodeRange(), FEProblemBase::initialSetup(), meshChanged(), FEProblemBase::projectSolution(), ElementSubdomainModifierBase::reinitializedBndNodeRange(), and NearestNodeLocator::updatePatch().

1290 {
1291  if (!_bnd_node_range)
1292  {
1293  TIME_SECTION("getBoundaryNodeRange", 5);
1294 
1295  _bnd_node_range =
1296  std::make_unique<ConstBndNodeRange>(bndNodesBegin(), bndNodesEnd(), GRAIN_SIZE);
1297  }
1298 
1299  return _bnd_node_range.get();
1300 }
virtual bnd_node_iterator bndNodesEnd()
Definition: MooseMesh.C:1553
virtual bnd_node_iterator bndNodesBegin()
Return iterators to the beginning/end of the boundary nodes list.
Definition: MooseMesh.C:1545
static const int GRAIN_SIZE
Definition: MooseMesh.C:67
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:1500

◆ getCheckedPointerParam()

template<typename T >
T MooseBase::getCheckedPointerParam ( const std::string &  name,
const std::string &  error_string = "" 
) const
inherited

Verifies that the requested parameter exists and is not NULL and returns it to the caller.

The template parameter must be a pointer or an error will be thrown.

Definition at line 428 of file MooseBase.h.

429 {
430  return _pars.getCheckedPointerParam<T>(name, error_string);
431 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99

◆ getCoarseningMap()

const std::vector< std::pair< unsigned int, QpMap > > & MooseMesh::getCoarseningMap ( const Elem elem,
int  input_side 
)

Get the coarsening map for a given element type.

This will tell you what quadrature points to copy from and to for stateful material properties on newly created elements from Adaptivity.

Parameters
elemThe element that represents the element type you need the coarsening map for.
input_sideThe side to map

Definition at line 2579 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onBoundary(), and ProjectMaterialProperties::onElement().

2580 {
2581  std::pair<int, ElemType> the_pair(input_side, elem.type());
2582 
2583  if (_elem_type_to_coarsening_map.find(the_pair) == _elem_type_to_coarsening_map.end())
2584  mooseError("Could not find a suitable qp refinement map!");
2585 
2586  return _elem_type_to_coarsening_map[the_pair];
2587 }
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::pair< unsigned int, QpMap > > > _elem_type_to_coarsening_map
Holds mappings for volume to volume and parent side to child side Map key:
Definition: MooseMesh.h:1779
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
virtual ElemType type() const=0

◆ getConstructNodeListFromSideList()

bool MooseMesh::getConstructNodeListFromSideList ( )
inline

Return construct node list from side list boolean.

Definition at line 1409 of file MooseMesh.h.

Referenced by SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater().

bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1822

◆ getCoordSystem() [1/2]

Moose::CoordinateSystemType MooseMesh::getCoordSystem ( SubdomainID  sid) const

Get the coordinate system type, e.g.

xyz, rz, or r-spherical, for the provided subdomain id sid

Definition at line 4175 of file MooseMesh.C.

Referenced by SubProblem::getCoordSystem(), and ComputeLinearFVGreenGaussGradientVolumeThread::operator()().

4176 {
4177  auto it = _coord_sys.find(sid);
4178  if (it != _coord_sys.end())
4179  return (*it).second;
4180  else
4181  mooseError("Requested subdomain ", sid, " does not exist.");
4182 }
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1858
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ getCoordSystem() [2/2]

const std::map< SubdomainID, Moose::CoordinateSystemType > & MooseMesh::getCoordSystem ( ) const

Get the map from subdomain ID to coordinate system type, e.g.

xyz, rz, or r-spherical

Definition at line 4207 of file MooseMesh.C.

Referenced by setGeneralAxisymmetricCoordAxes().

4208 {
4209  return _coord_sys;
4210 }
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1858

◆ getDataFileName()

std::string DataFileInterface::getDataFileName ( const std::string &  param) const
inherited

Deprecated method.

The data file paths are now automatically set within the InputParameters object, so using getParam<DataFileName>("param_name") is now sufficient.

Definition at line 21 of file DataFileInterface.C.

22 {
23  _parent.mooseDeprecated("getDataFileName() is deprecated. The file path is now directly set "
24  "within the InputParameters.\nUse getParam<DataFileName>(\"",
25  param,
26  "\") instead.");
27  return _parent.getParam<DataFileName>(param);
28 }
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseBase.h:384
void mooseDeprecated(Args &&... args) const
Definition: MooseBase.h:310
const ParallelParamObject & _parent

◆ getDataFileNameByName()

std::string DataFileInterface::getDataFileNameByName ( const std::string &  relative_path) const
inherited

Deprecated method.

Use getDataFilePath() instead.

Definition at line 31 of file DataFileInterface.C.

32 {
33  _parent.mooseDeprecated("getDataFileNameByName() is deprecated. Use getDataFilePath(\"",
34  relative_path,
35  "\") instead.");
36  return getDataFilePath(relative_path);
37 }
std::string getDataFilePath(const std::string &relative_path) const
Returns the path of a data file for a given relative file path.
void mooseDeprecated(Args &&... args) const
Definition: MooseBase.h:310
const ParallelParamObject & _parent

◆ getDataFilePath()

std::string DataFileInterface::getDataFilePath ( const std::string &  relative_path) const
inherited

Returns the path of a data file for a given relative file path.

This can be used for hardcoded datafile names and will search the same locations as getDataFileName

Definition at line 40 of file DataFileInterface.C.

Referenced by DataFileInterface::getDataFileNameByName().

41 {
42  // This should only ever be used with relative paths. There is no point to
43  // use this search path with an absolute path.
44  if (std::filesystem::path(relative_path).is_absolute())
45  _parent.mooseWarning("While using getDataFilePath(\"",
46  relative_path,
47  "\"): This API should not be used for absolute paths.");
48 
49  // Throw on error so that if getPath() fails, we can throw an error
50  // with the context of _parent.mooseError()
51  const auto throw_on_error_before = Moose::_throw_on_error;
53  std::optional<std::string> error;
54 
55  // This will search the data paths for this relative path
56  Moose::DataFileUtils::Path found_path;
57  try
58  {
59  found_path = Moose::DataFileUtils::getPath(relative_path);
60  }
61  catch (std::exception & e)
62  {
63  error = e.what();
64  }
65 
66  Moose::_throw_on_error = throw_on_error_before;
67  if (error)
68  _parent.mooseError(*error);
69 
70  mooseAssert(found_path.context == Moose::DataFileUtils::Context::DATA,
71  "Should only ever obtain data");
72  mooseAssert(found_path.data_name, "Should be set");
73 
74  const std::string msg =
75  "Using data file '" + found_path.path + "' from " + *found_path.data_name + " data";
76  _parent.mooseInfo(msg);
77 
78  return found_path.path;
79 }
void mooseInfo(Args &&... args) const
Definition: MooseBase.h:317
Context context
Context for the file (where it came from)
Definition: DataFileUtils.h:48
Representation of a data file path.
Definition: DataFileUtils.h:36
Path getPath(std::string path, const std::optional< std::string > &base=std::optional< std::string >())
Get the data path for a given path, searching the registered data.
Definition: DataFileUtils.C:22
std::optional< std::string > data_name
The name of the data registry the file came from (with context == DATA)
Definition: DataFileUtils.h:50
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Definition: MooseBase.h:295
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
bool _throw_on_error
Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or wh...
Definition: Moose.C:780
const ParallelParamObject & _parent

◆ getElementIDIndex()

unsigned int MooseMesh::getElementIDIndex ( const std::string &  id_name) const
inline

Return the accessing integer for an extra element integer with its name.

Definition at line 2157 of file MooseMesh.h.

Referenced by areElemIDsIdentical().

2158 {
2159  if (!hasElementID(id_name))
2160  mooseError("Mesh does not have element ID for ", id_name);
2161  return getMesh().get_elem_integer_index(id_name);
2162 }
bool hasElementID(const std::string &id_name) const
Whether mesh has an extra element integer with a given name.
Definition: MooseMesh.h:2151
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ getElemIDMapping()

std::unordered_map< dof_id_type, std::set< dof_id_type > > MooseMesh::getElemIDMapping ( const std::string &  from_id_name,
const std::string &  to_id_name 
) const

Definition at line 1100 of file MooseMesh.C.

1101 {
1102  auto & mesh_base = getMesh();
1103 
1104  if (!mesh_base.has_elem_integer(from_id_name))
1105  mooseError("Mesh does not have the element integer name '", from_id_name, "'");
1106  if (!mesh_base.has_elem_integer(to_id_name))
1107  mooseError("Mesh does not have the element integer name '", to_id_name, "'");
1108 
1109  const auto id1 = mesh_base.get_elem_integer_index(from_id_name);
1110  const auto id2 = mesh_base.get_elem_integer_index(to_id_name);
1111 
1112  std::unordered_map<dof_id_type, std::set<dof_id_type>> id_map;
1113  for (const auto id : getAllElemIDs(id1))
1114  id_map[id] = std::set<dof_id_type>();
1115 
1116  for (const auto & elem : mesh_base.active_local_element_ptr_range())
1117  id_map[elem->get_extra_integer(id1)].insert(elem->get_extra_integer(id2));
1118 
1119  for (auto & [id, ids] : id_map)
1120  {
1121  libmesh_ignore(id); // avoid overzealous gcc 9.4 unused var warning
1122  comm().set_union(ids);
1123  }
1124 
1125  return id_map;
1126 }
const Parallel::Communicator & comm() const
void libmesh_ignore(const Args &...)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::set< dof_id_type > getAllElemIDs(unsigned int elem_id_index) const
Return all the unique element IDs for an extra element integer with its index.
Definition: MooseMesh.C:1129
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
dof_id_type get_extra_integer(const unsigned int index) const
void set_union(T &data, const unsigned int root_id) const

◆ getElemIDsOnBlocks()

std::set< dof_id_type > MooseMesh::getElemIDsOnBlocks ( unsigned int  elem_id_index,
const std::set< SubdomainID > &  blks 
) const

Return all the unique element IDs for an extra element integer with its index on a set of subdomains.

Definition at line 1139 of file MooseMesh.C.

1140 {
1141  std::set<dof_id_type> unique_ids;
1142  for (auto & blk : blks)
1143  {
1144  auto it = _block_id_mapping[elem_id_index].find(blk);
1145  if (it == _block_id_mapping[elem_id_index].end())
1146  mooseError("Block ", blk, " is not available on the mesh");
1147 
1148  for (auto & mid : it->second)
1149  unique_ids.insert(mid);
1150  }
1151  return unique_ids;
1152 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
std::vector< std::unordered_map< SubdomainID, std::set< dof_id_type > > > _block_id_mapping
Unique element integer IDs for each subdomain and each extra element integers.
Definition: MooseMesh.h:1840

◆ getFileName()

virtual std::string MooseMesh::getFileName ( ) const
inlinevirtual

Returns the name of the mesh file read to produce this mesh if any or an empty string otherwise.

Reimplemented in FileMesh, and TiledMesh.

Definition at line 1071 of file MooseMesh.h.

1071 { return ""; }

◆ getGeneralAxisymmetricCoordAxis()

const std::pair< Point, RealVectorValue > & MooseMesh::getGeneralAxisymmetricCoordAxis ( SubdomainID  subdomain_id) const

Gets the general axisymmetric coordinate axis for a block.

Parameters
[in]subdomain_idSubdomain ID for which to get axisymmetric coordinate axis

Definition at line 4269 of file MooseMesh.C.

4270 {
4271  auto it = _subdomain_id_to_rz_coord_axis.find(subdomain_id);
4272  if (it != _subdomain_id_to_rz_coord_axis.end())
4273  return (*it).second;
4274  else
4275  mooseError("Requested subdomain ", subdomain_id, " does not exist.");
4276 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
std::unordered_map< SubdomainID, std::pair< Point, RealVectorValue > > _subdomain_id_to_rz_coord_axis
Map of subdomain ID to general axisymmetric axis.
Definition: MooseMesh.h:1864

◆ getGhostedBoundaries()

const std::set< unsigned int > & MooseMesh::getGhostedBoundaries ( ) const

Return a writable reference to the set of ghosted boundary IDs.

Definition at line 3241 of file MooseMesh.C.

3242 {
3243  return _ghosted_boundaries;
3244 }
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:1558

◆ getGhostedBoundaryInflation()

const std::vector< Real > & MooseMesh::getGhostedBoundaryInflation ( ) const

Return a writable reference to the _ghosted_boundaries_inflation vector.

Definition at line 3247 of file MooseMesh.C.

Referenced by NearestNodeLocator::findNodes(), and NearestNodeLocator::updatePatch().

3248 {
3250 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:1559

◆ getGhostingPatchSize()

unsigned int MooseMesh::getGhostingPatchSize ( ) const
inline

Getter for the ghosting_patch_size parameter.

Definition at line 626 of file MooseMesh.h.

Referenced by NearestNodeLocator::findNodes(), and NearestNodeLocator::updatePatch().

626 { return _ghosting_patch_size; }
unsigned int _ghosting_patch_size
The number of nearest neighbors to consider for ghosting purposes when iteration patch update strateg...
Definition: MooseMesh.h:1565

◆ getHigherDSide()

unsigned int MooseMesh::getHigherDSide ( const Elem elem) const

Returns the local side ID of the interior parent aligned with the lower dimensional element.

Definition at line 1712 of file MooseMesh.C.

1713 {
1714  auto it = _lower_d_elem_to_higher_d_elem_side.find(elem);
1715 
1716  if (it != _lower_d_elem_to_higher_d_elem_side.end())
1717  return it->second;
1718  else
1719  return libMesh::invalid_uint;
1720 }
const unsigned int invalid_uint
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
Definition: MooseMesh.h:1812
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ getHitNode()

const hit::Node* MooseBase::getHitNode ( ) const
inlineinherited
Returns
The block-level hit node for this object, if any

Definition at line 132 of file MooseBase.h.

Referenced by FEProblemBase::addAnyRedistributers(), MooseBase::callMooseError(), MooseBase::getHitNode(), and MooseBase::messagePrefix().

132 { return getHitNode(_pars); }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
const hit::Node * getHitNode() const
Definition: MooseBase.h:132

◆ getInflatedProcessorBoundingBox()

BoundingBox MooseMesh::getInflatedProcessorBoundingBox ( Real  inflation_multiplier = 0.01) const

Get a (slightly inflated) processor bounding box.

Parameters
inflation_multiplierThis amount will be multiplied by the length of the diagonal of the bounding box to find the amount to inflate the bounding box by in all directions.

Definition at line 3419 of file MooseMesh.C.

Referenced by PositionsFunctorValueSampler::execute(), PointVariableSamplerBase::execute(), CartesianGridDivision::initialize(), and RadialAverage::updateCommunicationLists().

3420 {
3421  // Grab a bounding box to speed things up. Note that
3422  // local_bounding_box is *not* equivalent to processor_bounding_box
3423  // with processor_id() except in serial.
3425 
3426  // Inflate the bbox just a bit to deal with roundoff
3427  // Adding 1% of the diagonal size in each direction on each end
3428  Real inflation_amount = inflation_multiplier * (bbox.max() - bbox.min()).norm();
3429  Point inflation(inflation_amount, inflation_amount, inflation_amount);
3430 
3431  bbox.first -= inflation; // min
3432  bbox.second += inflation; // max
3433 
3434  return bbox;
3435 }
libMesh::BoundingBox create_local_bounding_box(const MeshBase &mesh)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
const Point & min() const
auto norm(const T &a) -> decltype(std::abs(a))
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Point & max() const

◆ getInterfaceConnectedBlocks()

std::set< SubdomainID > MooseMesh::getInterfaceConnectedBlocks ( const BoundaryID  bid) const

Get the list of subdomains contacting the given boundary.

Parameters
bidThe boundary ID you want to get the subdomain IDs for.
Returns
All subdomain IDs contacting given boundary ID

Definition at line 3543 of file MooseMesh.C.

3544 {
3545  std::set<SubdomainID> subdomain_ids = getBoundaryConnectedBlocks(bid);
3546  for (const auto & it : _neighbor_subdomain_boundary_ids)
3547  if (it.second.find(bid) != it.second.end())
3548  subdomain_ids.insert(it.first);
3549 
3550  return subdomain_ids;
3551 }
std::unordered_map< SubdomainID, std::set< BoundaryID > > _neighbor_subdomain_boundary_ids
Holds a map from neighbor subomdain ids to the boundary ids that are attached to it.
Definition: MooseMesh.h:1803
std::set< SubdomainID > getBoundaryConnectedBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary.
Definition: MooseMesh.C:3521

◆ getLocalNodeRange()

ConstNodeRange * MooseMesh::getLocalNodeRange ( )

Definition at line 1275 of file MooseMesh.C.

Referenced by AuxiliarySystem::computeNodalVarsHelper(), FEProblemBase::computeUserObjectsInternal(), FEProblemBase::getCurrentAlgebraicNodeRange(), FEProblemBase::initialSetup(), and meshChanged().

1276 {
1277  if (!_local_node_range)
1278  {
1279  TIME_SECTION("getLocalNodeRange", 5);
1280 
1281  _local_node_range = std::make_unique<ConstNodeRange>(
1282  getMesh().local_nodes_begin(), getMesh().local_nodes_end(), GRAIN_SIZE);
1283  }
1284 
1285  return _local_node_range.get();
1286 }
static const int GRAIN_SIZE
Definition: MooseMesh.C:67
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::unique_ptr< libMesh::ConstNodeRange > _local_node_range
Definition: MooseMesh.h:1498

◆ getLowerDElem()

const Elem * MooseMesh::getLowerDElem ( const Elem ,
unsigned short  int 
) const

Returns a const pointer to a lower dimensional element that corresponds to a side of a higher dimensional element.

This relationship is established through an internal_parent; if there is no lowerDElem, nullptr is returned.

Definition at line 1701 of file MooseMesh.C.

Referenced by GhostLowerDElems::operator()(), DisplacedProblem::reinitElemNeighborAndLowerD(), and FEProblemBase::reinitElemNeighborAndLowerD().

1702 {
1703  auto it = _higher_d_elem_side_to_lower_d_elem.find(std::make_pair(elem, side));
1704 
1705  if (it != _higher_d_elem_side_to_lower_d_elem.end())
1706  return it->second;
1707  else
1708  return nullptr;
1709 }
std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > _higher_d_elem_side_to_lower_d_elem
Holds a map from a high-order element side to its corresponding lower-d element.
Definition: MooseMesh.h:1811
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ getLowerDElemMap()

const std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > & MooseMesh::getLowerDElemMap ( ) const
inline

This function attempts to return the map from a high-order element side to its corresponding lower-d element.

Definition at line 2191 of file MooseMesh.h.

2192 {
2194 }
std::unordered_map< std::pair< const Elem *, unsigned short int >, const Elem * > _higher_d_elem_side_to_lower_d_elem
Holds a map from a high-order element side to its corresponding lower-d element.
Definition: MooseMesh.h:1811

◆ getMaxInDimension()

Real MooseMesh::getMaxInDimension ( unsigned int  component) const
virtual

Reimplemented in AnnularMesh, and GeneratedMesh.

Definition at line 2208 of file MooseMesh.C.

Referenced by dimensionWidth(), GeneratedMesh::getMaxInDimension(), AnnularMesh::getMaxInDimension(), and PropertyReadFile::PropertyReadFile().

2209 {
2210  mooseAssert(_mesh, "The MeshBase has not been constructed");
2211  mooseAssert(component < _bounds.size(), "Requested dimension out of bounds");
2212 
2213  return _bounds[component][MAX];
2214 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1580
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ getMaxLeafSize()

unsigned int MooseMesh::getMaxLeafSize ( ) const
inline

Getter for the maximum leaf size parameter.

Definition at line 631 of file MooseMesh.h.

Referenced by NearestNodeLocator::findNodes(), and NearestNodeLocator::updatePatch().

631 { return _max_leaf_size; }
unsigned int _max_leaf_size
Definition: MooseMesh.h:1568

◆ getMesh() [1/4]

MeshBase & MooseMesh::getMesh ( )

Accessor for the underlying libMesh Mesh object.

Definition at line 3448 of file MooseMesh.C.

Referenced by CopyMeshPartitioner::_do_partition(), AddPeriodicBCAction::act(), activeLocalElementsBegin(), activeLocalElementsEnd(), Adaptivity::adaptMesh(), FEProblemBase::addAnyRedistributers(), addQuadratureNode(), addUniqueNode(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), NonlinearSystemBase::assembleScalingVector(), Assembly::Assembly(), AuxKernelTempl< Real >::AuxKernelTempl(), buildActiveSideList(), buildBndElemList(), MFEMMesh::buildDummyMooseMesh(), buildElemIDInfo(), buildFiniteVolumeInfo(), buildHRefinementAndCoarseningMaps(), buildLowerDMesh(), TiledMesh::buildMesh(), FileMesh::buildMesh(), AnnularMesh::buildMesh(), ConcentricCircleMesh::buildMesh(), RinglebMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), GeneratedMesh::buildMesh(), StitchedMesh::buildMesh(), PatternedMesh::buildMesh(), ImageMesh::buildMesh2D(), ImageMesh::buildMesh3D(), buildNodeList(), buildNodeListFromSideList(), buildPeriodicNodeMap(), buildPeriodicNodeSets(), buildPRefinementAndCoarseningMaps(), buildSideList(), cacheChangedLists(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), cacheInfo(), changeBoundaryId(), checkCoordinateSystems(), NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), MortarData::createMortarInterface(), detectOrthogonalDimRanges(), detectPairedSidesets(), dimension(), ExtraElementIntegerDivision::divisionIndex(), FunctorBinnedValuesDivision::divisionIndex(), SubdomainsDivision::divisionIndex(), DumpObjectsProblem::dumpVariableHelper(), ElementalVariableValue::ElementalVariableValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementMaterialSampler::ElementMaterialSampler(), elemPtr(), ElemSideNeighborLayersTester::execute(), NodalNormalsCorner::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppUserObjectTransfer::execute(), NodalNormalsPreprocessor::execute(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), SidesetAroundSubdomainUpdater::finalize(), ActivateElementsUserObjectBase::finalize(), ElementSubdomainModifierBase::gatherMovingBoundaryChanges(), ElementSubdomainModifierBase::gatherMovingBoundaryChangesHelper(), getActiveLocalElementRange(), getActiveNodeRange(), getBlocksMaxDimension(), getBoundaryID(), getBoundaryIDs(), getBoundaryName(), getElementIDIndex(), getElemIDMapping(), FEProblemBase::getEvaluableElementRange(), getInflatedProcessorBoundingBox(), getLocalNodeRange(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), getNodeList(), FEProblemBase::getNonlinearEvaluableElementRange(), getPointLocator(), getSubdomainID(), getSubdomainIDs(), getSubdomainName(), ghostGhostedBoundaries(), Exodus::handleExodusIOMeshRenumbering(), hasElementID(), init(), DisplacedProblem::UpdateDisplacedMeshThread::init(), VerifyElementUniqueID::initialize(), VerifyNodalUniqueID::initialize(), ExtraElementIntegerDivision::initialize(), ElementCentroidPositions::initialize(), ElementGroupCentroidPositions::initialize(), FunctorPositions::initialize(), FunctorTimes::initialize(), QuadraturePointsPositions::initialize(), FunctorExtremaPositions::initialize(), ParsedDownSelectionPositions::initialize(), MultiAppDofCopyTransfer::initialSetup(), NodalVariableValue::initialSetup(), FEProblemBase::initialSetup(), SampledOutput::initSample(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), LinearNodalConstraint::LinearNodalConstraint(), localNodesBegin(), localNodesEnd(), Moose::Mortar::loopOverMortarSegments(), maxElemId(), maxNodeId(), GhostingUserObject::meshChanged(), RadialAverage::meshChanged(), DisplacedProblem::meshChanged(), FEProblemBase::meshChanged(), MooseMesh(), nElem(), nNodes(), NodalPatchRecovery::NodalPatchRecovery(), NodalVariableValue::NodalVariableValue(), nodeToActiveSemilocalElemMap(), nodeToElemMap(), ComputeNodalUserObjectsThread::onNode(), ProxyRelationshipManager::operator()(), MortarUserObjectThread::operator()(), ComputeMortarFunctor::operator()(), XDA::output(), Exodus::outputEmptyTimestep(), Exodus::outputNodalVariables(), prepare(), BoundaryPreservedMarker::preserveBoundary(), printInfo(), queryElemPtr(), queryNodePtr(), FileMesh::read(), PropertyReadFile::readData(), RedistributeProperties::redistribute(), SubProblem::restrictionBoundaryCheckName(), SubProblem::restrictionSubdomainCheckName(), setBoundaryName(), NonlinearSystemBase::setConstraintSecondaryValues(), XFEMInterface::setDisplacedMesh(), ActivateElementsUserObjectBase::setNewBoundayName(), setPartitionerHelper(), setSubdomainName(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), sideWithBoundaryID(), MoveNodesToGeometryModifierBase::snapNodes(), MultiAppDofCopyTransfer::transfer(), DisplacedProblem::undisplaceMesh(), update(), updateActiveSemiLocalNodeRange(), EqualValueBoundaryConstraint::updateConstrainedNodes(), Adaptivity::updateErrorVectors(), RandomData::updateGenerators(), DisplacedProblem::updateMesh(), SampledOutput::updateSample(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

3449 {
3450  mooseAssert(_mesh, "Mesh hasn't been created");
3451  return *_mesh;
3452 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ getMesh() [2/4]

MeshBase& MooseMesh::getMesh ( const std::string &  name)

◆ getMesh() [3/4]

const MeshBase & MooseMesh::getMesh ( ) const

Definition at line 3455 of file MooseMesh.C.

3456 {
3457  mooseAssert(_mesh, "Mesh hasn't been created");
3458  return *_mesh;
3459 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ getMesh() [4/4]

const MeshBase& MooseMesh::getMesh ( const std::string &  name) const

◆ getMeshPtr()

const MeshBase * MooseMesh::getMeshPtr ( ) const

Definition at line 3442 of file MooseMesh.C.

Referenced by buildTypedMesh(), RelationshipManager::init(), and GhostBoundary::operator()().

3443 {
3444  return _mesh.get();
3445 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ getMinInDimension()

Real MooseMesh::getMinInDimension ( unsigned int  component) const
virtual

Returns the min or max of the requested dimension respectively.

Reimplemented in AnnularMesh, and GeneratedMesh.

Definition at line 2199 of file MooseMesh.C.

Referenced by dimensionWidth(), GeneratedMesh::getMinInDimension(), AnnularMesh::getMinInDimension(), and PropertyReadFile::PropertyReadFile().

2200 {
2201  mooseAssert(_mesh, "The MeshBase has not been constructed");
2202  mooseAssert(component < _bounds.size(), "Requested dimension out of bounds");
2203 
2204  return _bounds[component][MIN];
2205 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1580
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ getMooseApp()

MooseApp& MooseBase::getMooseApp ( ) const
inlineinherited

Get the MooseApp this class is associated with.

Definition at line 83 of file MooseBase.h.

Referenced by ChainControlSetupAction::act(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), FEProblemBase::advanceState(), ParsedChainControl::buildFunction(), ReporterTransferInterface::checkHasReporterValue(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), Coupleable::checkWritableVar(), ComponentPhysicsInterface::ComponentPhysicsInterface(), Coupleable::Coupleable(), MortarData::createMortarInterface(), EigenProblem::doFreeNonlinearPowerIterations(), Terminator::execute(), FEProblemSolve::FEProblemSolve(), SolutionInvalidInterface::flagInvalidSolutionInternal(), ChainControl::getChainControlDataSystem(), DefaultConvergenceBase::getSharedExecutionerParam(), ChainControlDataPostprocessor::initialSetup(), MaterialPropertyInterface::MaterialPropertyInterface(), MooseVariableDataFV< OutputType >::MooseVariableDataFV(), ProgressOutput::output(), PetscOutputInterface::petscLinearOutput(), PetscOutputInterface::petscNonlinearOutput(), PetscOutputInterface::PetscOutputInterface(), PostprocessorInterface::postprocessorsAdded(), MultiApp::preTransfer(), Reporter::Reporter(), ReporterInterface::reportersAdded(), MultiApp::restore(), and VectorPostprocessorInterface::vectorPostprocessorsAdded().

83 { return _app; }
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:353

◆ getNodeBlockIds()

const std::set< SubdomainID > & MooseMesh::getNodeBlockIds ( const Node node) const

Return list of blocks to which the given node belongs.

Definition at line 1499 of file MooseMesh.C.

Referenced by ComputeNodalUserObjectsThread::onNode(), ComputeNodalKernelsThread::onNode(), ComputeNodalKernelJacobiansThread::onNode(), ComputeInitialConditionThread::operator()(), and MoveNodesToGeometryModifierBase::snapNodes().

1500 {
1501  auto it = _block_node_list.find(node.id());
1502 
1503  if (it == _block_node_list.end())
1504  mooseError("Unable to find node: ", node.id(), " in any block list.");
1505 
1506  return it->second;
1507 }
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:1553
dof_id_type id() const
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:820
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ getNodeList()

const std::vector< dof_id_type > & MooseMesh::getNodeList ( boundary_id_type  nodeset_id) const

Return a writable reference to a vector of node IDs that belong to nodeset_id.

Definition at line 3470 of file MooseMesh.C.

Referenced by LinearNodalConstraint::LinearNodalConstraint(), NodalScalarKernel::NodalScalarKernel(), MoveNodesToGeometryModifierBase::snapNodes(), and EqualValueBoundaryConstraint::updateConstrainedNodes().

3471 {
3472  std::map<boundary_id_type, std::vector<dof_id_type>>::const_iterator it =
3473  _node_set_nodes.find(nodeset_id);
3474 
3475  if (it == _node_set_nodes.end())
3476  {
3477  // On a distributed mesh we might not know about a remote nodeset,
3478  // so we'll return an empty vector and hope the nodeset exists
3479  // elsewhere.
3480  if (!getMesh().is_serial())
3481  {
3482  static const std::vector<dof_id_type> empty_vec;
3483  return empty_vec;
3484  }
3485  // On a replicated mesh we should know about every nodeset and if
3486  // we're asked for one that doesn't exist then it must be a bug.
3487  else
3488  {
3489  mooseError("Unable to nodeset ID: ", nodeset_id, '.');
3490  }
3491  }
3492 
3493  return it->second;
3494 }
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids] ...
Definition: MooseMesh.h:1556
virtual bool is_serial() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ getNormalByBoundaryID()

const RealVectorValue & MooseMesh::getNormalByBoundaryID ( BoundaryID  id) const

Returns the normal vector associated with a given BoundaryID.

It's only valid to call this when AddAllSideSetsByNormals is active.

Definition at line 2812 of file MooseMesh.C.

2813 {
2814  mooseAssert(_boundary_to_normal_map.get() != nullptr, "Boundary To Normal Map not built!");
2815 
2816  // Note: Boundaries that are not in the map (existing boundaries) will default
2817  // construct a new RealVectorValue - (x,y,z)=(0, 0, 0)
2818  return (*_boundary_to_normal_map)[id];
2819 }
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
The boundary to normal map - valid only when AddAllSideSetsByNormals is active.
Definition: MooseMesh.h:1530

◆ getPairedBoundaryMapping()

const std::pair< BoundaryID, BoundaryID > * MooseMesh::getPairedBoundaryMapping ( unsigned int  component)

This function attempts to return the paired boundary ids for the given component.

For example, in a generated 2D mesh, passing 0 for the "x" component will return (3, 1).

Parameters
component- An integer representing the desired component (dimension)
Returns
std::pair pointer - The matching boundary pairs for the passed component

Definition at line 2293 of file MooseMesh.C.

Referenced by addPeriodicVariable(), and AddPeriodicBCAction::autoTranslationBoundaries().

2294 {
2296  mooseError("Trying to retrieve automatic paired mapping for a mesh that is not regular and "
2297  "orthogonal");
2298 
2299  mooseAssert(component < dimension(), "Requested dimension out of bounds");
2300 
2301  if (_paired_boundary.empty())
2303 
2304  if (component < _paired_boundary.size())
2305  return &_paired_boundary[component];
2306  else
2307  return nullptr;
2308 }
void detectPairedSidesets()
This routine detects paired sidesets of a regular orthogonal mesh (.i.e.
Definition: MooseMesh.C:1999
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2928
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition: MooseMesh.h:1583
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1577

◆ getParallelType()

ParallelType MooseMesh::getParallelType ( ) const
inline
Returns
The parallel type

Definition at line 1016 of file MooseMesh.h.

Referenced by MultiAppDofCopyTransfer::initialSetup().

1016 { return _parallel_type; }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1423

◆ getParam() [1/2]

template<typename T >
const T & MooseBase::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

Parameters
nameThe name of the parameter
Returns
The value of the parameter

Definition at line 384 of file MooseBase.h.

Referenced by CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), FEProblemBase::addOutput(), DiffusionPhysicsBase::addPostprocessors(), ADNodalKernel::ADNodalKernel(), ArrayParsedAux::ArrayParsedAux(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), ComponentPhysicsInterface::ComponentPhysicsInterface(), FunctorAux::computeValue(), Console::Console(), FEProblemBase::createTagSolutions(), CutMeshByLevelSetGenerator::CutMeshByLevelSetGenerator(), DebugResidualAux::DebugResidualAux(), AccumulateReporter::declareLateValues(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), FEProblemSolve::FEProblemSolve(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), ParsedSubdomainGeneratorBase::functionInitialize(), FVInterfaceKernel::FVInterfaceKernel(), BoundaryLayerSubdomainGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), CoarsenBlockGenerator::generate(), GeneratedMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), BlockDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), MeshExtruderGenerator::generate(), GenericConstantRankTwoTensorTempl< is_ad >::GenericConstantRankTwoTensorTempl(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::GenericConstantSymmetricRankTwoTensorTempl(), MooseApp::getCheckpointDirectories(), DataFileInterface::getDataFileName(), ExecutorInterface::getExecutor(), GhostingUserObject::GhostingUserObject(), FixedPointIterationAdaptiveDT::init(), TimeSequenceStepper::init(), IterationAdaptiveDT::init(), AdvancedOutput::init(), AttribThread::initFrom(), AttribSysNum::initFrom(), AttribResidualObject::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), SampledOutput::initSample(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MooseMesh(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MultiSystemSolveObject::MultiSystemSolveObject(), NEML2ModelExecutor::NEML2ModelExecutor(), NestedDivision::NestedDivision(), PerfGraphOutput::output(), Console::outputSystemInformation(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedGenerateNodeset::ParsedGenerateNodeset(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterialTempl< is_ad >::ParsedMaterialTempl(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseConstantByBlockMaterialTempl< is_ad >::PiecewiseConstantByBlockMaterialTempl(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), Moose::FV::setInterpolationMethod(), SetupMeshAction::setupMesh(), Output::setWallTimeIntervalFromCommandLineParam(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorOfPostprocessors::VectorOfPostprocessors().

385 {
386  return InputParameters::getParamHelper<T>(name, _pars);
387 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99

◆ getParam() [2/2]

template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > MooseBase::getParam ( const std::string &  param1,
const std::string &  param2 
) const
inherited

Retrieve two parameters and provide pair of parameters for the object.

Parameters
param1The name of first parameter
param2The name of second parameter
Returns
Vector of pairs of first and second parameters

Definition at line 421 of file MooseBase.h.

422 {
423  return _pars.get<T1, T2>(param1, param2);
424 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.

◆ getPatchSize()

unsigned int MooseMesh::getPatchSize ( ) const

Getter for the patch_size parameter.

Definition at line 3401 of file MooseMesh.C.

Referenced by NearestNodeLocator::findNodes(), and NearestNodeLocator::updatePatch().

3402 {
3403  return _patch_size;
3404 }
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:1562

◆ getPatchUpdateStrategy()

const Moose::PatchUpdateType & MooseMesh::getPatchUpdateStrategy ( ) const

Get the current patch update strategy.

Definition at line 3413 of file MooseMesh.C.

Referenced by FEProblemBase::possiblyRebuildGeomSearchPatches().

3414 {
3415  return _patch_update_strategy;
3416 }
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:1571

◆ getPCoarseningMap()

const std::vector< QpMap > & MooseMesh::getPCoarseningMap ( const Elem elem) const

Get the map describing for each volumetric quadrature point (qp) on the coarse level which qp on the previous finer level the coarse qp is closest to.

Definition at line 4390 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onElement().

4391 {
4393 }
const std::vector< QpMap > & getPCoarseningMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4368
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
Definition: MooseMesh.h:1782
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ getPCoarseningMapHelper()

const std::vector< QpMap > & MooseMesh::getPCoarseningMapHelper ( const Elem elem,
const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &   
) const
private

Definition at line 4368 of file MooseMesh.C.

Referenced by getPCoarseningMap(), and getPCoarseningSideMap().

4371 {
4372  mooseAssert(elem.active() && elem.p_refinement_flag() == Elem::JUST_COARSENED,
4373  "These are the conditions that should be met for requesting a coarsening map");
4374  return libmesh_map_find(map, std::make_pair(elem.type(), elem.p_level()));
4375 }
RefinementState p_refinement_flag() const
unsigned int p_level() const
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
bool active() const
virtual ElemType type() const=0

◆ getPCoarseningSideMap()

const std::vector< QpMap > & MooseMesh::getPCoarseningSideMap ( const Elem elem) const

Get the map describing for each side quadrature point (qp) on the coarse level which qp on the previous finer level the coarse qp is closest to.

Definition at line 4396 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onBoundary().

4397 {
4399 }
const std::vector< QpMap > & getPCoarseningMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4368
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_side_map
Definition: MooseMesh.h:1784
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ getPointLocator()

std::unique_ptr< libMesh::PointLocatorBase > MooseMesh::getPointLocator ( ) const
virtual

Proxy function to get a (sub)PointLocator from either the underlying libMesh mesh (default), or to allow derived meshes to return a custom point locator.

Definition at line 3733 of file MooseMesh.C.

Referenced by CopyMeshPartitioner::_do_partition(), PointValue::execute(), MultiAppVariableValueSampleTransfer::execute(), ElementsAlongLine::execute(), IntersectionPointsAlongLine::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), FindValueOnLine::initialize(), PointSamplerBase::initialize(), PiecewiseConstantFromCSV::initialSetup(), and ReporterPointMarker::markerSetup().

3734 {
3735  return getMesh().sub_point_locator();
3736 }
std::unique_ptr< PointLocatorBase > sub_point_locator() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ getPRefinementMap()

const std::vector< QpMap > & MooseMesh::getPRefinementMap ( const Elem elem) const

Get the map describing for each volumetric quadrature point (qp) on the refined level which qp on the previous coarser level the fine qp is closest to.

Definition at line 4378 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onElement().

4379 {
4381 }
const std::vector< QpMap > & getPRefinementMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4357
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
Definition: MooseMesh.h:1756
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ getPRefinementMapHelper()

const std::vector< QpMap > & MooseMesh::getPRefinementMapHelper ( const Elem elem,
const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &   
) const
private

Definition at line 4357 of file MooseMesh.C.

Referenced by getPRefinementMap(), and getPRefinementSideMap().

4360 {
4361  // We are actually seeking the map stored with the p_level - 1 key, e.g. the refinement map that
4362  // maps from the previous p_level to this element's p_level
4363  return libmesh_map_find(map,
4364  std::make_pair(elem.type(), cast_int<unsigned int>(elem.p_level() - 1)));
4365 }
unsigned int p_level() const
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
virtual ElemType type() const=0

◆ getPRefinementSideMap()

const std::vector< QpMap > & MooseMesh::getPRefinementSideMap ( const Elem elem) const

Get the map describing for each side quadrature point (qp) on the refined level which qp on the previous coarser level the fine qp is closest to.

Definition at line 4384 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onBoundary().

4385 {
4387 }
const std::vector< QpMap > & getPRefinementMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4357
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
Definition: MooseMesh.h:1758
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ getQuadratureNode()

Node * MooseMesh::getQuadratureNode ( const Elem elem,
const unsigned short int  side,
const unsigned int  qp 
)

Get a specified quadrature node.

Parameters
elemThe element the quadrature point is on
sideThe side the quadrature point is on
qpThe quadrature point number associated with the point

Definition at line 1662 of file MooseMesh.C.

Referenced by GapValueAux::computeValue(), NearestNodeDistanceAux::computeValue(), PenetrationAux::computeValue(), and GeometricSearchData::updateQuadratureNodes().

1665 {
1666  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes.find(elem->id()) !=
1668  "Elem has no quadrature nodes!");
1669  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()].find(side) !=
1671  "Side has no quadrature nodes!");
1672  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) !=
1674  "qp not found on side!");
1675 
1676  return _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
1677 }
dof_id_type id() const
std::map< dof_id_type, std::map< unsigned int, std::map< dof_id_type, Node * > > > _elem_to_side_to_qp_to_quadrature_nodes
Definition: MooseMesh.h:1549
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ getRefinementMap()

const std::vector< std::vector< QpMap > > & MooseMesh::getRefinementMap ( const Elem elem,
int  parent_side,
int  child,
int  child_side 
)

Get the refinement map for a given element type.

This will tell you what quadrature points to copy from and to for stateful material properties on newly created elements from Adaptivity.

Parameters
elemThe element that represents the element type you need the refinement map for.
parent_sideThe side of the parent to map (-1 if not mapping parent sides)
childThe child number (-1 if not mapping child internal sides)
child_sideThe side number of the child (-1 if not mapping sides)

TODO: When running with parallel mesh + stateful adaptivty we will need to make sure that each processor has a complete map. This may require parallel communication. This is likely to happen when running on a mixed element mesh.

Definition at line 2515 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onBoundary(), ProjectMaterialProperties::onElement(), and ProjectMaterialProperties::onInternalSide().

2516 {
2517  if (child == -1) // Doing volume mapping or parent side mapping
2518  {
2519  mooseAssert(parent_side == child_side,
2520  "Parent side must match child_side if not passing a specific child!");
2521 
2522  std::pair<int, ElemType> the_pair(parent_side, elem.type());
2523 
2524  if (_elem_type_to_refinement_map.find(the_pair) == _elem_type_to_refinement_map.end())
2525  mooseError("Could not find a suitable qp refinement map!");
2526 
2527  return _elem_type_to_refinement_map[the_pair];
2528  }
2529  else // Need to map a child side to parent volume qps
2530  {
2531  std::pair<int, int> child_pair(child, child_side);
2532 
2535  _elem_type_to_child_side_refinement_map[elem.type()].find(child_pair) ==
2537  mooseError("Could not find a suitable qp refinement map!");
2538 
2539  return _elem_type_to_child_side_refinement_map[elem.type()][child_pair];
2540  }
2541 
2548 }
std::map< libMesh::ElemType, std::map< std::pair< int, int >, std::vector< std::vector< QpMap > > > > _elem_type_to_child_side_refinement_map
Holds mappings for "internal" child sides to parent volume. The second key is (child, child_side).
Definition: MooseMesh.h:1762
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::vector< QpMap > > > _elem_type_to_refinement_map
Holds mappings for volume to volume and parent side to child side Map key:
Definition: MooseMesh.h:1753
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
virtual ElemType type() const=0

◆ getRenamedParam()

template<typename T >
const T & MooseBase::getRenamedParam ( const std::string &  old_name,
const std::string &  new_name 
) const
inherited

Retrieve a renamed parameter for the object.

This helper makes sure we check both names before erroring, and that only one parameter is passed to avoid silent errors

Parameters
old_namethe old name for the parameter
new_namethe new name for the parameter

Definition at line 398 of file MooseBase.h.

399 {
400  // Most important: accept new parameter
401  if (isParamSetByUser(new_name) && !isParamValid(old_name))
402  return getParam<T>(new_name);
403  // Second most: accept old parameter
404  if (isParamValid(old_name) && !isParamSetByUser(new_name))
405  return getParam<T>(old_name);
406  // Third most: accept default for new parameter
407  if (isParamValid(new_name) && !isParamValid(old_name))
408  return getParam<T>(new_name);
409  // Refuse: no default, no value passed
410  if (!isParamValid(old_name) && !isParamValid(new_name))
411  mooseError("parameter '" + new_name +
412  "' is being retrieved without being set.\nDid you misspell it?");
413  // Refuse: both old and new parameters set by user
414  else
415  mooseError("Parameter '" + new_name + "' may not be provided alongside former parameter '" +
416  old_name + "'");
417 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:195
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
Definition: MooseBase.h:201

◆ getRestartableData()

template<typename T , typename... Args>
const T & Restartable::getRestartableData ( const std::string &  data_name) const
protectedinherited

Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but returns a const reference to the object.

Forwarded arguments are not allowed in this case because we assume that the object is restarted and we won't need different constructors to initialize it.

NOTE: This returns a const reference! Make sure you store it in a const reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)

Definition at line 287 of file Restartable.h.

288 {
289  return declareRestartableDataHelper<T>(data_name, nullptr).get();
290 }

◆ getSharedPtr() [1/2]

std::shared_ptr< MooseObject > MooseObject::getSharedPtr ( )
inherited

Get another shared pointer to this object that has the same ownership group.

Wrapper around shared_from_this().

Definition at line 61 of file MooseObject.C.

Referenced by MFEMProblem::addBoundaryCondition(), MFEMProblem::addKernel(), and MFEMProblem::addMFEMSolver().

62 {
63  try
64  {
65  return shared_from_this();
66  }
67  catch (std::bad_weak_ptr &)
68  {
69  mooseError(not_shared_error);
70  }
71 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ getSharedPtr() [2/2]

std::shared_ptr< const MooseObject > MooseObject::getSharedPtr ( ) const
inherited

Definition at line 74 of file MooseObject.C.

75 {
76  try
77  {
78  return shared_from_this();
79  }
80  catch (std::bad_weak_ptr &)
81  {
82  mooseError(not_shared_error);
83  }
84 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267

◆ getSubdomainBoundaryIds()

const std::set< BoundaryID > & MooseMesh::getSubdomainBoundaryIds ( const SubdomainID  subdomain_id) const

Get the list of boundary ids associated with the given subdomain id.

Parameters
subdomain_idThe subdomain ID you want to get the boundary ids for.
Returns
All boundary IDs connected to elements in the give

Definition at line 3497 of file MooseMesh.C.

Referenced by getSubdomainInterfaceBoundaryIds(), and FEProblemBase::prepareMaterials().

3498 {
3499  const auto it = _sub_to_data.find(subdomain_id);
3500 
3501  if (it == _sub_to_data.end())
3502  mooseError("Unable to find subdomain ID: ", subdomain_id, '.');
3503 
3504  return it->second.boundary_ids;
3505 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1800

◆ getSubdomainID()

SubdomainID MooseMesh::getSubdomainID ( const SubdomainName &  subdomain_name) const

Get the associated subdomain ID for the subdomain name.

Parameters
subdomain_nameThe name of the subdomain
Returns
The subdomain id from the passed subdomain name.

Definition at line 1731 of file MooseMesh.C.

Referenced by SystemBase::addVariable(), FEProblemBase::checkProblemIntegrity(), FVInterfaceKernel::FVInterfaceKernel(), TimedSubdomainModifier::getSubdomainIDAndCheck(), SolutionIC::initialSetup(), ElementSubdomainModifierBase::initialSetup(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseConstantByBlockMaterialTempl< is_ad >::PiecewiseConstantByBlockMaterialTempl(), prepare(), setCoordSystem(), and setGeneralAxisymmetricCoordAxes().

1732 {
1733  return MooseMeshUtils::getSubdomainID(subdomain_name, getMesh());
1734 }
SubdomainID getSubdomainID(const SubdomainName &subdomain_name, const MeshBase &mesh)
Gets the subdomain ID associated with the given SubdomainName.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ getSubdomainIDs() [1/2]

std::vector< SubdomainID > MooseMesh::getSubdomainIDs ( const std::vector< SubdomainName > &  subdomain_names) const

Get the associated subdomainIDs for the subdomain names that are passed in.

Parameters
subdomain_namesThe names of the subdomains
Returns
The subdomain ids from the passed subdomain names.

Definition at line 1737 of file MooseMesh.C.

Referenced by FEProblemBase::addAuxVariable(), FEProblemBase::addVariable(), MultiAppUserObjectTransfer::execute(), getBlocksMaxDimension(), BlockRestrictable::hasBlocks(), SubdomainsDivision::initialize(), BlockRestrictable::initializeBlockRestrictable(), ElementSubdomainModifierBase::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), and LayeredBase::LayeredBase().

1738 {
1739  return MooseMeshUtils::getSubdomainIDs(getMesh(), subdomain_name);
1740 }
std::vector< subdomain_id_type > getSubdomainIDs(const libMesh::MeshBase &mesh, const std::vector< SubdomainName > &subdomain_name)
Get the associated subdomainIDs for the subdomain names that are passed in.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ getSubdomainIDs() [2/2]

std::set< SubdomainID > MooseMesh::getSubdomainIDs ( const std::set< SubdomainName > &  subdomain_names) const

Definition at line 1743 of file MooseMesh.C.

1744 {
1745  return MooseMeshUtils::getSubdomainIDs(getMesh(), subdomain_name);
1746 }
std::vector< subdomain_id_type > getSubdomainIDs(const libMesh::MeshBase &mesh, const std::vector< SubdomainName > &subdomain_name)
Get the associated subdomainIDs for the subdomain names that are passed in.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ getSubdomainInterfaceBoundaryIds()

std::set< BoundaryID > MooseMesh::getSubdomainInterfaceBoundaryIds ( const SubdomainID  subdomain_id) const

Get the list of boundaries that contact the given subdomain.

Parameters
subdomain_idThe subdomain ID you want to get the boundary ids for.
Returns
All boundary IDs connected to elements in the given subdomain

Definition at line 3508 of file MooseMesh.C.

3509 {
3510  const auto & bnd_ids = getSubdomainBoundaryIds(subdomain_id);
3511  std::set<BoundaryID> boundary_ids(bnd_ids.begin(), bnd_ids.end());
3512  std::unordered_map<SubdomainID, std::set<BoundaryID>>::const_iterator it =
3513  _neighbor_subdomain_boundary_ids.find(subdomain_id);
3514 
3515  boundary_ids.insert(it->second.begin(), it->second.end());
3516 
3517  return boundary_ids;
3518 }
const std::set< BoundaryID > & getSubdomainBoundaryIds(const SubdomainID subdomain_id) const
Get the list of boundary ids associated with the given subdomain id.
Definition: MooseMesh.C:3497
std::unordered_map< SubdomainID, std::set< BoundaryID > > _neighbor_subdomain_boundary_ids
Holds a map from neighbor subomdain ids to the boundary ids that are attached to it.
Definition: MooseMesh.h:1803

◆ getSubdomainName()

const std::string & MooseMesh::getSubdomainName ( SubdomainID  subdomain_id) const

◆ getSubdomainNames()

std::vector< SubdomainName > MooseMesh::getSubdomainNames ( const std::vector< SubdomainID > &  subdomain_ids) const

Get the associated subdomainNames for the subdomain ids that are passed in.

Parameters
subdomain_idsThe ids of the subdomains
Returns
The subdomain names from the passed subdomain ids.

Definition at line 1769 of file MooseMesh.C.

Referenced by NonlinearSystemBase::checkKernelCoverage(), FEProblemBase::checkProblemIntegrity(), SampledOutput::cloneMesh(), BlockRestrictable::initializeBlockRestrictable(), and SolutionIC::initialSetup().

1770 {
1771  std::vector<SubdomainName> names(subdomain_ids.size());
1772 
1773  for (unsigned int i = 0; i < subdomain_ids.size(); i++)
1774  names[i] = getSubdomainName(subdomain_ids[i]);
1775 
1776  return names;
1777 }
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1763

◆ getUniqueCoordSystem()

Moose::CoordinateSystemType MooseMesh::getUniqueCoordSystem ( ) const

Get the coordinate system from the mesh, it must be the same in all subdomains otherwise this will error.

Definition at line 4185 of file MooseMesh.C.

Referenced by HDGKernel::HDGKernel().

4186 {
4187  const auto unique_system = _coord_sys.find(*meshSubdomains().begin())->second;
4188  // Check that it is actually unique
4189  bool result = std::all_of(
4190  std::next(_coord_sys.begin()),
4191  _coord_sys.end(),
4192  [unique_system](
4193  typename std::unordered_map<SubdomainID, Moose::CoordinateSystemType>::const_reference
4194  item) { return (item.second == unique_system); });
4195  if (!result)
4196  mooseError("The unique coordinate system of the mesh was requested by the mesh contains "
4197  "multiple blocks with different coordinate systems");
4198 
4200  mooseError("General axisymmetric coordinate axes are being used, and it is currently "
4201  "conservatively assumed that in this case there is no unique coordinate system.");
4202 
4203  return unique_system;
4204 }
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1858
bool usingGeneralAxisymmetricCoordAxes() const
Returns true if general axisymmetric coordinate axes are being used.
Definition: MooseMesh.C:4279
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3171

◆ ghostGhostedBoundaries()

void MooseMesh::ghostGhostedBoundaries ( )

Actually do the ghosting of boundaries that need to be ghosted to this processor.

Definition at line 3314 of file MooseMesh.C.

Referenced by FEProblemBase::ghostGhostedBoundaries().

3315 {
3316  // No need to do this if using a serial mesh
3317  // We do not need to ghost boundary elements when _need_ghost_ghosted_boundaries
3318  // is not true. _need_ghost_ghosted_boundaries can be set by a mesh generator
3319  // where boundaries are already ghosted accordingly
3321  return;
3322 
3323  TIME_SECTION("GhostGhostedBoundaries", 3);
3324 
3325  parallel_object_only();
3326 
3327  DistributedMesh & mesh = dynamic_cast<DistributedMesh &>(getMesh());
3328 
3329  // We clear ghosted elements that were added by previous invocations of this
3330  // method but leave ghosted elements that were added by other code, e.g.
3331  // OversampleOutput, untouched
3332  mesh.clear_extra_ghost_elems(_ghost_elems_from_ghost_boundaries);
3334 
3335  std::set<const Elem *, CompareElemsByLevel> boundary_elems_to_ghost;
3336  std::set<Node *> connected_nodes_to_ghost;
3337 
3338  std::vector<const Elem *> family_tree;
3339 
3340  for (const auto & t : mesh.get_boundary_info().build_side_list())
3341  {
3342  auto elem_id = std::get<0>(t);
3343  auto bc_id = std::get<2>(t);
3344 
3345  if (_ghosted_boundaries.find(bc_id) != _ghosted_boundaries.end())
3346  {
3347  Elem * elem = mesh.elem_ptr(elem_id);
3348 
3349 #ifdef LIBMESH_ENABLE_AMR
3350  elem->family_tree(family_tree);
3351  Elem * parent = elem->parent();
3352  while (parent)
3353  {
3354  family_tree.push_back(parent);
3355  parent = parent->parent();
3356  }
3357 #else
3358  family_tree.clear();
3359  family_tree.push_back(elem);
3360 #endif
3361  for (const auto & felem : family_tree)
3362  {
3363  boundary_elems_to_ghost.insert(felem);
3364 
3365  // The entries of connected_nodes_to_ghost need to be
3366  // non-constant, so that they will work in things like
3367  // UpdateDisplacedMeshThread. The container returned by
3368  // family_tree contains const Elems even when the Elem
3369  // it is called on is non-const, so once that interface
3370  // gets fixed we can remove this const_cast.
3371  for (unsigned int n = 0; n < felem->n_nodes(); ++n)
3372  connected_nodes_to_ghost.insert(const_cast<Node *>(felem->node_ptr(n)));
3373  }
3374  }
3375  }
3376 
3377  // We really do want to store this by value instead of by reference
3378  const auto prior_ghost_elems = mesh.extra_ghost_elems();
3379 
3381  connected_nodes_to_ghost.begin(),
3382  connected_nodes_to_ghost.end(),
3383  extra_ghost_elem_inserter<Node>(mesh));
3384 
3386  boundary_elems_to_ghost.begin(),
3387  boundary_elems_to_ghost.end(),
3388  extra_ghost_elem_inserter<Elem>(mesh));
3389 
3390  const auto & current_ghost_elems = mesh.extra_ghost_elems();
3391 
3392  std::set_difference(current_ghost_elems.begin(),
3393  current_ghost_elems.end(),
3394  prior_ghost_elems.begin(),
3395  prior_ghost_elems.end(),
3396  std::inserter(_ghost_elems_from_ghost_boundaries,
3398 }
const Elem * parent() const
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready...
Definition: MooseMesh.h:1837
void family_tree(std::vector< const Elem * > &family, bool reset=true) const
MeshBase & mesh
const Parallel::Communicator & comm() const
void allgather_packed_range(Context *context, Iter range_begin, const Iter range_end, OutputIter out, std::size_t approx_buffer_size=1000000) const
const BoundaryInfo & get_boundary_info() const
std::set< Elem * > _ghost_elems_from_ghost_boundaries
Set of elements ghosted by ghostGhostedBoundaries.
Definition: MooseMesh.h:1831
void build_side_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &side_list, std::vector< boundary_id_type > &bc_id_list) const
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
void family_tree(T elem, std::vector< T > &family, bool reset=true)
virtual const Elem * elem_ptr(const dof_id_type i) const=0
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:1558

◆ hasBase()

bool MooseBase::hasBase ( ) const
inlineinherited
Returns
Whether or not this object has a registered base (set via InputParameters::registerBase())

Definition at line 138 of file MooseBase.h.

138 { return _pars.hasBase(); }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
bool hasBase() const

◆ hasElementID()

bool MooseMesh::hasElementID ( const std::string &  id_name) const
inline

Whether mesh has an extra element integer with a given name.

Definition at line 2151 of file MooseMesh.h.

Referenced by getElementIDIndex().

2152 {
2153  return getMesh().has_elem_integer(id_name);
2154 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ hasLowerD()

bool MooseMesh::hasLowerD ( ) const
inline
Returns
Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces

Definition at line 1398 of file MooseMesh.h.

Referenced by GhostLowerDElems::operator()().

1398 { return _has_lower_d; }
bool _has_lower_d
Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces...
Definition: MooseMesh.h:1816

◆ hasMeshBase()

bool MooseMesh::hasMeshBase ( ) const
inline

Whether mesh base object was constructed or not.

Definition at line 1104 of file MooseMesh.h.

Referenced by MeshGeneratorMesh::buildMesh().

1104 { return _mesh.get() != nullptr; }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ hasSecondOrderElements()

bool MooseMesh::hasSecondOrderElements ( )

check if the mesh has SECOND order elements

Definition at line 3711 of file MooseMesh.C.

Referenced by Assembly::adCurvatures(), Assembly::Assembly(), Assembly::havePRefinement(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), and SolutionUserObjectBase::SolutionUserObjectBase().

3712 {
3713  bool mesh_has_second_order_elements = false;
3714  for (auto it = activeLocalElementsBegin(), end = activeLocalElementsEnd(); it != end; ++it)
3715  if ((*it)->default_order() == SECOND)
3716  {
3717  mesh_has_second_order_elements = true;
3718  break;
3719  }
3720 
3721  // We checked our local elements, so take the max over all processors.
3722  comm().max(mesh_has_second_order_elements);
3723  return mesh_has_second_order_elements;
3724 }
const Parallel::Communicator & comm() const
SECOND
MeshBase::element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:3051
void max(const T &r, T &o, Request &req) const
const MeshBase::element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:3057

◆ init()

void MooseMesh::init ( )
virtual

Initialize the Mesh object.

Most of the time this will turn around and call build_mesh so the child class can build the Mesh object.

However, during Recovery this will read the CPA file...

If the mesh base hasn't been constructed by the time init is called, just do it here. This can happen if somebody builds a mesh outside of the normal Action system. Forcing developers to create, construct the MeshBase, and then init separately is a bit much for casual use but it gives us the ability to run MeshGenerators in-between.

Definition at line 2875 of file MooseMesh.C.

2876 {
2883  if (!_mesh)
2885 
2887  mooseError("You cannot use the mesh splitter capability with DistributedMesh!");
2888 
2889  TIME_SECTION("init", 2);
2890 
2892  {
2893  // Some partitioners are not idempotent. Some recovery data
2894  // files require partitioning to match mesh partitioning. This
2895  // means that, when recovering, we can't safely repartition.
2896  const bool skip_partitioning_later = getMesh().skip_partitioning();
2897  getMesh().skip_partitioning(true);
2898  const bool allow_renumbering_later = getMesh().allow_renumbering();
2899  getMesh().allow_renumbering(false);
2900 
2901  // For now, only read the recovery mesh on the Ultimate Master..
2902  // sub-apps need to just build their mesh like normal
2903  {
2904  TIME_SECTION("readRecoveredMesh", 2);
2906  }
2907 
2908  getMesh().allow_renumbering(allow_renumbering_later);
2909  getMesh().skip_partitioning(skip_partitioning_later);
2910  }
2911  else // Normally just build the mesh
2912  {
2913  // Don't allow partitioning during building
2914  if (_app.isSplitMesh())
2915  getMesh().skip_partitioning(true);
2916  buildMesh();
2917 
2918  // Re-enable partitioning so the splitter can partition!
2919  if (_app.isSplitMesh())
2920  getMesh().skip_partitioning(false);
2921 
2922  if (getParam<bool>("build_all_side_lowerd_mesh"))
2923  buildLowerDMesh();
2924  }
2925 }
static const std::string & checkpointSuffix()
The file suffix for the checkpoint mesh.
Definition: MooseApp.C:3072
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false)=0
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:813
void allow_renumbering(bool allow)
void skip_partitioning(bool skip)
void buildLowerDMesh()
Build lower-d mesh for all sides.
Definition: MooseMesh.C:658
virtual void buildMesh()=0
Must be overridden by child classes.
bool isSplitMesh() const
Whether or not this is a split mesh operation.
Definition: MooseApp.C:1813
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1819
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::unique_ptr< MeshBase > buildMeshBaseObject(unsigned int dim=libMesh::invalid_uint)
Method to construct a libMesh::MeshBase object that is normally set and used by the MooseMesh object ...
Definition: MooseMesh.C:2856
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:353
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:1801
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
Definition: MooseApp.h:487

◆ interiorLowerDBlocks()

const std::set<SubdomainID>& MooseMesh::interiorLowerDBlocks ( ) const
inline

◆ isBoundaryElem() [1/2]

bool MooseMesh::isBoundaryElem ( dof_id_type  elem_id) const

Returns true if the requested element is in the list of boundary elements, false otherwise.

Definition at line 3591 of file MooseMesh.C.

Referenced by BoundaryMarker::computeElementMarker().

3592 {
3593  bool found_elem = false;
3594  for (const auto & it : _bnd_elem_ids)
3595  {
3596  if (it.second.find(elem_id) != it.second.end())
3597  {
3598  found_elem = true;
3599  break;
3600  }
3601  }
3602  return found_elem;
3603 }
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:1545

◆ isBoundaryElem() [2/2]

bool MooseMesh::isBoundaryElem ( dof_id_type  elem_id,
BoundaryID  bnd_id 
) const

Returns true if the requested element is in the list of boundary elements for the specified boundary, false otherwise.

Definition at line 3606 of file MooseMesh.C.

3607 {
3608  bool found_elem = false;
3609  auto it = _bnd_elem_ids.find(bnd_id);
3610  if (it != _bnd_elem_ids.end())
3611  if (it->second.find(elem_id) != it->second.end())
3612  found_elem = true;
3613  return found_elem;
3614 }
std::unordered_map< boundary_id_type, std::unordered_set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:1545

◆ isBoundaryFullyExternalToSubdomains()

bool MooseMesh::isBoundaryFullyExternalToSubdomains ( BoundaryID  bid,
const std::set< SubdomainID > &  blk_group 
) const

Returns whether a boundary (given by its id) is not crossing through a group of blocks, by which we mean that elements on both sides of the boundary are in those blocks.

Parameters
bidthe id of the boundary of interest
blk_groupthe group of blocks potentially traversed
Returns
whether the boundary does not cross between the subdomains in the group

Definition at line 1373 of file MooseMesh.C.

1375 {
1376  mooseAssert(_bnd_elem_range, "Boundary element range is not initialized");
1377 
1378  // Loop over all side elements of the mesh, select those on the boundary
1379  for (const auto & bnd_elem : *_bnd_elem_range)
1380  {
1381  const auto & [elem_ptr, elem_side, elem_bid] = *bnd_elem;
1382  if (elem_bid == bid)
1383  {
1384  // If an element is internal to the group of subdomain, check the neighbor
1385  if (blk_group.find(elem_ptr->subdomain_id()) != blk_group.end())
1386  {
1387  const auto * const neighbor = elem_ptr->neighbor_ptr(elem_side);
1388 
1389  // If we did not ghost the neighbor, we cannot decide
1390  if (neighbor == libMesh::remote_elem)
1391  mooseError("Insufficient level of geometrical ghosting to determine "
1392  "if a boundary is internal to the mesh");
1393  // If the neighbor does not exist, then we are on the edge of the mesh
1394  if (!neighbor)
1395  continue;
1396  // If the neighbor is also in the group of subdomain,
1397  // then the boundary cuts the subdomains
1398  if (blk_group.find(neighbor->subdomain_id()) != blk_group.end())
1399  return false;
1400  }
1401  }
1402  }
1403  return true;
1404 }
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:1502
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
const RemoteElem * remote_elem

◆ isBoundaryNode() [1/2]

bool MooseMesh::isBoundaryNode ( dof_id_type  node_id) const

Returns true if the requested node is in the list of boundary nodes, false otherwise.

Definition at line 3565 of file MooseMesh.C.

Referenced by LowerBoundNodalKernel::computeQpJacobian(), UpperBoundNodalKernel::computeQpJacobian(), LowerBoundNodalKernel::computeQpOffDiagJacobian(), UpperBoundNodalKernel::computeQpOffDiagJacobian(), LowerBoundNodalKernel::computeQpResidual(), UpperBoundNodalKernel::computeQpResidual(), and NodalNormalsPreprocessor::execute().

3566 {
3567  bool found_node = false;
3568  for (const auto & it : _bnd_node_ids)
3569  {
3570  if (it.second.find(node_id) != it.second.end())
3571  {
3572  found_node = true;
3573  break;
3574  }
3575  }
3576  return found_node;
3577 }
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
Map of sets of node IDs in each boundary.
Definition: MooseMesh.h:1537

◆ isBoundaryNode() [2/2]

bool MooseMesh::isBoundaryNode ( dof_id_type  node_id,
BoundaryID  bnd_id 
) const

Returns true if the requested node is in the list of boundary nodes for the specified boundary, false otherwise.

Definition at line 3580 of file MooseMesh.C.

3581 {
3582  bool found_node = false;
3583  std::map<boundary_id_type, std::set<dof_id_type>>::const_iterator it = _bnd_node_ids.find(bnd_id);
3584  if (it != _bnd_node_ids.end())
3585  if (it->second.find(node_id) != it->second.end())
3586  found_node = true;
3587  return found_node;
3588 }
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
Map of sets of node IDs in each boundary.
Definition: MooseMesh.h:1537

◆ isCustomPartitionerRequested()

bool MooseMesh::isCustomPartitionerRequested ( ) const

Setter and getter for _custom_partitioner_requested.

Definition at line 3705 of file MooseMesh.C.

3706 {
3708 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:1441

◆ isDisplaced() [1/2]

void MooseMesh::isDisplaced ( bool  is_displaced)
inline

Set whether this mesh is a displaced mesh.

Definition at line 1208 of file MooseMesh.h.

1208 { _is_displaced = is_displaced; }
bool _is_displaced
Whether this mesh is displaced.
Definition: MooseMesh.h:1849

◆ isDisplaced() [2/2]

bool MooseMesh::isDisplaced ( ) const
inline

whether this mesh is a displaced mesh

Definition at line 1213 of file MooseMesh.h.

1213 { return _is_displaced; }
bool _is_displaced
Whether this mesh is displaced.
Definition: MooseMesh.h:1849

◆ isDistributedMesh()

virtual bool MooseMesh::isDistributedMesh ( ) const
inlinevirtual

◆ isFiniteVolumeInfoDirty()

bool MooseMesh::isFiniteVolumeInfoDirty ( ) const
inline
Returns
whether the finite volume information is dirty

Definition at line 1304 of file MooseMesh.h.

Referenced by SideIntegralPostprocessor::initialSetup(), and FEProblemBase::meshChanged().

1304 { return _finite_volume_info_dirty; }
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1615

◆ isLowerD()

bool MooseMesh::isLowerD ( const SubdomainID  subdomain_id) const
inline
Returns
Whether the subdomain indicated by subdomain_id is a lower-dimensional manifold of some higher-dimensional subdomain, or in implementation speak, whether the elements of this subdomain have non-null interior parents

Definition at line 2197 of file MooseMesh.h.

Referenced by ProjectionAux::computeValue(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), MooseVariableBase::MooseVariableBase(), and ProjectionAux::ProjectionAux().

2198 {
2199  return libmesh_map_find(_sub_to_data, subdomain_id).is_lower_d;
2200 }
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1800

◆ isParallelTypeForced()

bool MooseMesh::isParallelTypeForced ( ) const
inline

Tell the user if the distribution was overriden for any reason.

Definition at line 1006 of file MooseMesh.h.

1006 { return _parallel_type_overridden; }
bool _parallel_type_overridden
Definition: MooseMesh.h:1430

◆ isParamSetByUser()

bool MooseBase::isParamSetByUser ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is set by a user, as opposed to not set or set to default.

Parameters
nameThe name of the parameter to test

Definition at line 201 of file MooseBase.h.

Referenced by SetupDebugAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEBCs(), DiffusionPhysicsBase::addInitialConditions(), MFEMMesh::buildMesh(), LibtorchNeuralNetControl::conditionalParameterError(), MooseApp::copyInputs(), DiffusionPhysicsBase::DiffusionPhysicsBase(), ElementSubdomainModifierBase::ElementSubdomainModifierBase(), MooseApp::errorCheck(), MooseBase::getRenamedParam(), DefaultConvergenceBase::getSharedExecutionerParam(), AddVariableAction::init(), PhysicsBase::initializePhysics(), ElementSubdomainModifierBase::initialSetup(), MatrixSymmetryCheck::MatrixSymmetryCheck(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), SolutionInvalidityOutput::output(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PetscExternalPartitioner::partition(), PiecewiseTabularBase::PiecewiseTabularBase(), prepare(), SolutionUserObjectBase::readXda(), PhysicsBase::reportPotentiallyMissedParameters(), MooseApp::runInputFile(), MooseApp::runInputs(), MFEMSolverBase::setPreconditioner(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), TimedSubdomainModifier::TimedSubdomainModifier(), and XYDelaunayGenerator::XYDelaunayGenerator().

202  {
203  return _pars.isParamSetByUser(name);
204  }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.

◆ isParamValid()

bool MooseBase::isParamValid ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 195 of file MooseBase.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), GridPartitioner::_do_partition(), CopyNodalVarsAction::act(), SetupMeshAction::act(), SetupDebugAction::act(), ComposeTimeStepperAction::act(), CreateDisplacedProblemAction::act(), SetAdaptivityOptionsAction::act(), AddVariableAction::act(), CommonOutputAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEKernels(), DiffusionFV::addFVBCs(), DiffusionFV::addFVKernels(), DiffusionPhysicsBase::addInitialConditions(), CylinderComponent::addMeshGenerators(), AddPeriodicBCAction::AddPeriodicBCAction(), DiffusionPhysicsBase::addPostprocessors(), AdvectiveFluxAux::AdvectiveFluxAux(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayVarReductionAux::ArrayVarReductionAux(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), TimedSubdomainModifier::buildFromFile(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromJSON(), ParsedChainControl::buildFunction(), GeneratedMesh::buildMesh(), buildTypedMesh(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), LibmeshPartitioner::clone(), SampledOutput::cloneMesh(), CombinerGenerator::CombinerGenerator(), FunctorAux::computeValue(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), FEProblemSolve::convergenceSetup(), CopyMeshPartitioner::CopyMeshPartitioner(), CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(), CutMeshByLevelSetGeneratorBase::CutMeshByLevelSetGeneratorBase(), ConstantReporter::declareConstantReporterValue(), ConstantReporter::declareConstantReporterValues(), DGKernelBase::DGKernelBase(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), Eigenvalue::Eigenvalue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), PIDTransientControl::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FileOutput::FileOutput(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), FunctionDT::FunctionDT(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FVInterfaceKernel::FVInterfaceKernel(), FVMassMatrix::FVMassMatrix(), FileMeshGenerator::generate(), AddMetaDataGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ElementGenerator::generate(), ExtraNodesetGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), BlockDeletionGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), MeshExtruderGenerator::generate(), ParsedExtraElementIDGenerator::generate(), XYZDelaunayGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), SubdomainBoundingBoxGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), PropertyReadFile::getFileNames(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::getRenamedParam(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), Terminator::handleMessage(), HFEMDirichletBC::HFEMDirichletBC(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), Eigenvalue::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), MultiAppCloneReporterTransfer::initialSetup(), SolutionIC::initialSetup(), MultiAppVariableValueSampleTransfer::initialSetup(), PiecewiseTabularBase::initialSetup(), ParsedConvergence::initialSetup(), SolutionScalarAux::initialSetup(), SolutionAux::initialSetup(), Console::initialSetup(), MooseParsedVectorFunction::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), SampledOutput::initSample(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MassMatrix::MassMatrix(), MatCoupledForce::MatCoupledForce(), MatDiffusionBase< Real >::MatDiffusionBase(), MeshGeneratorComponent::MeshGeneratorComponent(), MFEMProblemSolve::MFEMProblemSolve(), MooseMesh(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MooseVariableFV< Real >::MooseVariableFV(), MortarConstraintBase::MortarConstraintBase(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldNearestLocationTransfer::MultiAppGeneralFieldNearestLocationTransfer(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiSystemSolveObject::MultiSystemSolveObject(), NodeSetsGeneratorBase::NodeSetsGeneratorBase(), EigenExecutionerBase::normalizeSolution(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), ParsedCurveGenerator::ParsedCurveGenerator(), PetscOutput::PetscOutput(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularBase::PiecewiseTabularBase(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), prepare(), MooseBase::queryParam(), MultiApp::readCommandLineArguments(), SolutionUserObjectBase::readExodusII(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), ReporterPointSource::ReporterPointSource(), PhysicsBase::reportPotentiallyMissedParameters(), ParsedSubdomainMeshGenerator::setBlockName(), setCoordSystem(), FileOutput::setFileBase(), FileOutput::setFileBaseInternal(), Split::setup(), SideSetsGeneratorBase::setup(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), Output::setWallTimeIntervalFromCommandLineParam(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideSetsGeneratorBase::SideSetsGeneratorBase(), SolutionUserObjectBase::SolutionUserObjectBase(), WebServerControl::startServer(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), TransientBase::TransientBase(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), WebServerControl::WebServerControl(), XYDelaunayGenerator::XYDelaunayGenerator(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

195 { return _pars.isParamValid(name); }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ isPartitionerForced()

bool MooseMesh::isPartitionerForced ( ) const
inline

Tell the user if the partitioner was overriden for any reason.

Definition at line 1026 of file MooseMesh.h.

1026 { return _partitioner_overridden; }
bool _partitioner_overridden
Definition: MooseMesh.h:1437

◆ isRegularOrthogonal()

bool MooseMesh::isRegularOrthogonal ( )
inline

Getter to query if the mesh was detected to be regular and orthogonal.

Definition at line 1056 of file MooseMesh.h.

Referenced by AddPeriodicBCAction::setPeriodicVars().

1056 { return _regular_orthogonal_mesh; }
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1577

◆ isSemiLocal()

bool MooseMesh::isSemiLocal ( Node *const  node) const

Returns true if the node is semi-local.

Parameters
nodeNode pointer
Returns
true is the node is semi-local, false otherwise

Definition at line 992 of file MooseMesh.C.

993 {
994  return _semilocal_node_list.find(node) != _semilocal_node_list.end();
995 }
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:1488
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:820

◆ isSplit()

bool MooseMesh::isSplit ( ) const
inline
Returns
Whether or not this mesh comes from a split mesh

Definition at line 1327 of file MooseMesh.h.

1327 { return _is_split; }
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseMesh.h:1586

◆ isTranslatedPeriodic()

bool MooseMesh::isTranslatedPeriodic ( unsigned int  nonlinear_var_num,
unsigned int  component 
) const

Returns whether this generated mesh is periodic in the given dimension for the given variable.

Parameters
nonlinear_var_num- The nonlinear variable number
component- An integer representing the desired component (dimension)

Definition at line 2251 of file MooseMesh.C.

Referenced by minPeriodicVector().

2252 {
2253  mooseAssert(component < dimension(), "Requested dimension out of bounds");
2254 
2255  if (_periodic_dim.find(nonlinear_var_num) != _periodic_dim.end())
2256  return _periodic_dim.at(nonlinear_var_num)[component];
2257  else
2258  return false;
2259 }
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2928
std::map< unsigned int, std::vector< bool > > _periodic_dim
A map of vectors indicating which dimensions are periodic in a regular orthogonal mesh for the specif...
Definition: MooseMesh.h:1626

◆ lengthUnit()

const MooseUnits & MooseMesh::lengthUnit ( ) const
Returns
the length unit of this mesh provided through the coordinate transformation object

Definition at line 4330 of file MooseMesh.C.

4331 {
4332  mooseAssert(_coord_transform, "This must be non-null");
4333  return _coord_transform->lengthUnit();
4334 }
std::unique_ptr< MooseAppCoordTransform > _coord_transform
A coordinate transformation object that describes how to transform this problem&#39;s coordinate system i...
Definition: MooseMesh.h:1868

◆ localNodesBegin() [1/2]

MeshBase::node_iterator MooseMesh::localNodesBegin ( )

Calls local_nodes_begin/end() on the underlying libMesh mesh object.

Definition at line 3027 of file MooseMesh.C.

3028 {
3029  return getMesh().local_nodes_begin();
3030 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ localNodesBegin() [2/2]

MeshBase::const_node_iterator MooseMesh::localNodesBegin ( ) const

Definition at line 3039 of file MooseMesh.C.

3040 {
3041  return getMesh().local_nodes_begin();
3042 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ localNodesEnd() [1/2]

MeshBase::node_iterator MooseMesh::localNodesEnd ( )

Definition at line 3033 of file MooseMesh.C.

3034 {
3035  return getMesh().local_nodes_end();
3036 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ localNodesEnd() [2/2]

MeshBase::const_node_iterator MooseMesh::localNodesEnd ( ) const

Definition at line 3045 of file MooseMesh.C.

3046 {
3047  return getMesh().local_nodes_end();
3048 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ mapPoints()

void MooseMesh::mapPoints ( const std::vector< Point > &  from,
const std::vector< Point > &  to,
std::vector< QpMap > &  qp_map 
)
private

Find the closest points that map "from" to "to" and fill up "qp_map".

Essentially, for each point in "from" find the closest point in "to".

Parameters
fromThe reference positions in the parent of the the points we're mapping from
toThe reference positions in the parent of the the points we're mapping to
qp_mapThis will be filled with QpMap objects holding the mappings.

Definition at line 2590 of file MooseMesh.C.

Referenced by buildPRefinementAndCoarseningMaps(), and findAdaptivityQpMaps().

2593 {
2594  unsigned int n_from = from.size();
2595  unsigned int n_to = to.size();
2596 
2597  qp_map.resize(n_from);
2598 
2599  for (unsigned int i = 0; i < n_from; ++i)
2600  {
2601  const Point & from_point = from[i];
2602 
2603  QpMap & current_map = qp_map[i];
2604 
2605  for (unsigned int j = 0; j < n_to; ++j)
2606  {
2607  const Point & to_point = to[j];
2608  Real distance = (from_point - to_point).norm();
2609 
2610  if (distance < current_map._distance)
2611  {
2612  current_map._distance = distance;
2613  current_map._from = i;
2614  current_map._to = j;
2615  }
2616  }
2617  }
2618 }
Helper object for holding qp mapping info.
Definition: MooseMesh.h:69
unsigned int _to
The qp to map to.
Definition: MooseMesh.h:78
Real distance(const Point &p)
unsigned int _from
The qp to map from.
Definition: MooseMesh.h:75
auto norm(const T &a) -> decltype(std::abs(a))
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _distance
The distance between them.
Definition: MooseMesh.h:81

◆ markFiniteVolumeInfoDirty()

void MooseMesh::markFiniteVolumeInfoDirty ( )
inline

Mark the finite volume information as dirty.

Definition at line 1299 of file MooseMesh.h.

1299 { _finite_volume_info_dirty = true; }
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1615

◆ maxElementID()

dof_id_type MooseMesh::maxElementID ( unsigned int  elem_id_index) const
inline

Return the maximum element ID for an extra element integer with its accessing index.

Definition at line 1119 of file MooseMesh.h.

1119 { return _max_ids[elem_id_index]; }
std::vector< dof_id_type > _max_ids
Maximum integer ID for each extra element integer.
Definition: MooseMesh.h:1842

◆ maxElemId()

dof_id_type MooseMesh::maxElemId ( ) const
virtual

Definition at line 3093 of file MooseMesh.C.

Referenced by SolutionUserObjectBase::pointValueGradientWrapper(), and SolutionUserObjectBase::pointValueWrapper().

3094 {
3095  return getMesh().max_elem_id();
3096 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual dof_id_type max_elem_id() const=0

◆ maxHLevel()

unsigned int MooseMesh::maxHLevel ( ) const
inline

Returns the maximum h-refinement level of all elements.

Definition at line 1362 of file MooseMesh.h.

1362 { return _max_h_level; }
unsigned int _max_h_level
Maximum h-refinement level of all elements.
Definition: MooseMesh.h:1881

◆ maxNodeId()

dof_id_type MooseMesh::maxNodeId ( ) const
virtual

Calls max_node/elem_id() on the underlying libMesh mesh object.

This may be larger than n_nodes/elem() in cases where the id numbering is not contiguous.

Definition at line 3087 of file MooseMesh.C.

3088 {
3089  return getMesh().max_node_id();
3090 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual dof_id_type max_node_id() const=0

◆ maxPLevel()

unsigned int MooseMesh::maxPLevel ( ) const
inline

Returns the maximum p-refinement level of all elements.

Definition at line 1357 of file MooseMesh.h.

1357 { return _max_p_level; }
unsigned int _max_p_level
Maximum p-refinement level of all elements.
Definition: MooseMesh.h:1879

◆ meshBoundaryIds()

const std::set< BoundaryID > & MooseMesh::meshBoundaryIds ( ) const

Returns a read-only reference to the set of boundary IDs currently present in the Mesh.

Definition at line 3177 of file MooseMesh.C.

Referenced by BoundaryRestrictable::isBoundarySubset().

3178 {
3179  return _mesh_boundary_ids;
3180 }
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:1524

◆ meshChanged()

void MooseMesh::meshChanged ( )

Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.

Sets a flag so that clients of the MooseMesh also know when it has changed.

Definition at line 882 of file MooseMesh.C.

Referenced by DisplacedProblem::init(), FEProblemBase::init(), DisplacedProblem::meshChanged(), and FEProblemBase::meshChanged().

883 {
884  TIME_SECTION("meshChanged", 3, "Updating Because Mesh Changed");
885 
886  update();
887 
888  // Delete all of the cached ranges
889  _active_local_elem_range.reset();
890  _active_node_range.reset();
892  _local_node_range.reset();
893  _bnd_node_range.reset();
894  _bnd_elem_range.reset();
895 
896  // Rebuild the ranges
902 
903  // Call the callback function onMeshChanged
904  onMeshChanged();
905 }
std::unique_ptr< libMesh::NodeRange > _active_node_range
Definition: MooseMesh.h:1497
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1238
virtual void onMeshChanged()
Declares a callback function that is executed at the conclusion of meshChanged(). ...
Definition: MooseMesh.C:908
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:1502
std::unique_ptr< libMesh::ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:1494
libMesh::ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1275
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:619
libMesh::NodeRange * getActiveNodeRange()
Definition: MooseMesh.C:1252
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1303
std::unique_ptr< libMesh::ConstNodeRange > _local_node_range
Definition: MooseMesh.h:1498
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1289
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:1500
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:1496

◆ meshNodesetIds()

const std::set< BoundaryID > & MooseMesh::meshNodesetIds ( ) const

Returns a read-only reference to the set of nodesets currently present in the Mesh.

Definition at line 3189 of file MooseMesh.C.

Referenced by GeometricSearchData::GeometricSearchData(), and BoundaryRestrictable::initializeBoundaryRestrictable().

3190 {
3191  return _mesh_nodeset_ids;
3192 }
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:1526

◆ meshSidesetIds()

const std::set< BoundaryID > & MooseMesh::meshSidesetIds ( ) const

Returns a read-only reference to the set of sidesets currently present in the Mesh.

Definition at line 3183 of file MooseMesh.C.

Referenced by DGKernelBase::DGKernelBase(), and BoundaryRestrictable::initializeBoundaryRestrictable().

3184 {
3185  return _mesh_sideset_ids;
3186 }
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:1525

◆ meshSubdomains()

const std::set< SubdomainID > & MooseMesh::meshSubdomains ( ) const

◆ messagePrefix()

std::string MooseBase::messagePrefix ( const bool  hit_prefix = true) const
inlineinherited
Returns
A prefix to be used in messages that contain the input file location associated with this object (if any) and the name and type of the object.

Definition at line 252 of file MooseBase.h.

Referenced by MooseBase::callMooseError(), MooseBase::errorPrefix(), MooseBase::mooseDeprecated(), MooseBase::mooseInfo(), and MooseBase::mooseWarning().

253  {
254  return messagePrefix(_pars, hit_prefix);
255  }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:252

◆ minElementID()

dof_id_type MooseMesh::minElementID ( unsigned int  elem_id_index) const
inline

Return the minimum element ID for an extra element integer with its accessing index.

Definition at line 1124 of file MooseMesh.h.

1124 { return _min_ids[elem_id_index]; }
std::vector< dof_id_type > _min_ids
Minimum integer ID for each extra element integer.
Definition: MooseMesh.h:1844

◆ minPeriodicDistance()

Real MooseMesh::minPeriodicDistance ( unsigned int  nonlinear_var_num,
Point  p,
Point  q 
) const

This function returns the distance between two points on the mesh taking into account periodicity for the given variable number.

Parameters
nonlinear_var_num- The nonlinear variable number
p,q- The points for which to compute a minimum distance
Returns
Real - The L2 distance between p and q

Definition at line 2287 of file MooseMesh.C.

2288 {
2289  return minPeriodicVector(nonlinear_var_num, p, q).norm();
2290 }
auto norm() const -> decltype(std::norm(Real()))
RealVectorValue minPeriodicVector(unsigned int nonlinear_var_num, Point p, Point q) const
This function returns the minimum vector between two points on the mesh taking into account periodici...
Definition: MooseMesh.C:2262

◆ minPeriodicVector()

RealVectorValue MooseMesh::minPeriodicVector ( unsigned int  nonlinear_var_num,
Point  p,
Point  q 
) const

This function returns the minimum vector between two points on the mesh taking into account periodicity for the given variable number.

Parameters
nonlinear_var_num- The nonlinear variable number
p,q- The points between which to compute a minimum vector
Returns
RealVectorValue - The vector pointing from p to q

Definition at line 2262 of file MooseMesh.C.

Referenced by minPeriodicDistance().

2263 {
2264  for (unsigned int i = 0; i < dimension(); ++i)
2265  {
2266  // check to see if we're closer in real or periodic space in x, y, and z
2267  if (isTranslatedPeriodic(nonlinear_var_num, i))
2268  {
2269  // Need to test order before differencing
2270  if (p(i) > q(i))
2271  {
2272  if (p(i) - q(i) > _half_range(i))
2273  p(i) -= _half_range(i) * 2;
2274  }
2275  else
2276  {
2277  if (q(i) - p(i) > _half_range(i))
2278  p(i) += _half_range(i) * 2;
2279  }
2280  }
2281  }
2282 
2283  return q - p;
2284 }
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:1631
bool isTranslatedPeriodic(unsigned int nonlinear_var_num, unsigned int component) const
Returns whether this generated mesh is periodic in the given dimension for the given variable...
Definition: MooseMesh.C:2251
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2928

◆ mooseDeprecated()

template<typename... Args>
void MooseBase::mooseDeprecated ( Args &&...  args) const
inlineinherited

Definition at line 310 of file MooseBase.h.

Referenced by FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::advanceMultiApps(), MultiApp::appProblem(), buildSideList(), ChangeOverTimestepPostprocessor::ChangeOverTimestepPostprocessor(), AddVariableAction::determineType(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), elem(), UserForcingFunction::f(), FaceFaceConstraint::FaceFaceConstraint(), FunctionDT::FunctionDT(), RandomICBase::generateRandom(), getBoundariesToElems(), DataFileInterface::getDataFileName(), DataFileInterface::getDataFileNameByName(), Control::getExecuteOptions(), FEProblemBase::getNonlinearSystem(), MooseApp::getRecoverFileBase(), FEProblemBase::getUserObjects(), FEProblemBase::hasPostprocessor(), MooseApp::hasRecoverFileBase(), MatDiffusionBase< Real >::MatDiffusionBase(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalScalarKernel::NodalScalarKernel(), node(), FixedPointSolve::numPicardIts(), RelationshipManager::operator>=(), PercentChangePostprocessor::PercentChangePostprocessor(), ReferenceResidualConvergence::ReferenceResidualConvergence(), Residual::Residual(), setBoundaryToNormalMap(), Exodus::setOutputDimension(), MooseApp::setupOptions(), UserForcingFunction::UserForcingFunction(), and VariableResidual::VariableResidual().

311  {
313  _console, false, true, messagePrefix(true), std::forward<Args>(args)...);
314  }
void mooseDeprecatedStream(S &oss, const bool expired, const bool print_title, Args &&... args)
Definition: MooseError.h:275
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:252

◆ mooseDocumentedError()

template<typename... Args>
void MooseBase::mooseDocumentedError ( const std::string &  repo_name,
const unsigned int  issue_num,
Args &&...  args 
) const
inlineinherited

Definition at line 273 of file MooseBase.h.

Referenced by ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), DGLowerDKernel::DGLowerDKernel(), HFEMDirichletBC::HFEMDirichletBC(), and LowerDIntegratedBC::LowerDIntegratedBC().

276  {
278  repo_name, issue_num, argumentsToString(std::forward<Args>(args)...)),
279  /* with_prefix = */ true);
280  }
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
External method for calling moose error with added object context.
Definition: MooseBase.C:102
std::string formatMooseDocumentedError(const std::string &repo_name, const unsigned int issue_num, const std::string &msg)
Formats a documented error.
Definition: MooseError.C:105

◆ mooseError()

template<typename... Args>
void MooseBase::mooseError ( Args &&...  args) const
inlineinherited

Emits an error prefixed with object name and type and optionally a file path to the top-level block parameter if available.

Definition at line 267 of file MooseBase.h.

Referenced by CopyMeshPartitioner::_do_partition(), HierarchicalGridPartitioner::_do_partition(), GridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), MultiAppGeneralFieldTransfer::acceptPointInOriginMesh(), InitProblemAction::act(), CheckIntegrityAction::act(), AddBoundsVectorsAction::act(), AddVectorPostprocessorAction::act(), AutoCheckpointAction::act(), CheckFVBCAction::act(), SetupMeshCompleteAction::act(), CreateExecutionerAction::act(), AddFVICAction::act(), AddICAction::act(), AddMeshGeneratorAction::act(), CreateProblemDefaultAction::act(), CreateProblemAction::act(), CombineComponentsMeshes::act(), SetupMeshAction::act(), SplitMeshAction::act(), AdaptivityAction::act(), AddTimeStepperAction::act(), ChainControlSetupAction::act(), DeprecatedBlockAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), CreateDisplacedProblemAction::act(), MaterialDerivativeTestAction::act(), SetAdaptivityOptionsAction::act(), MaterialOutputAction::act(), AddMFEMSubMeshAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), Action::Action(), FEProblemBase::adaptMesh(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), MooseVariableFV< Real >::adCurlSln(), MooseVariableFV< Real >::adCurlSlnNeighbor(), AddActionComponentAction::AddActionComponentAction(), MFEMProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DiffusionCG::addBoundaryConditionsFromComponents(), PhysicsComponentInterface::addBoundaryConditionsFromComponents(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), DistributedRectilinearMeshGenerator::addElement(), MooseApp::addExecutor(), FEProblemBase::addFunction(), SubProblem::addFunctor(), FEProblemBase::addFVInitialCondition(), ADDGKernel::ADDGKernel(), FEProblemBase::addHDGKernel(), FEProblemBase::addInitialCondition(), PhysicsComponentInterface::addInitialConditionsFromComponents(), FEProblemBase::addInterfaceKernel(), MFEMProblem::addKernel(), FEProblemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addLineSearch(), MFEMProblem::addMaterial(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), FEProblemBase::addOutput(), SubProblem::addPiecewiseByBlockLambdaFunctor(), DiracKernelBase::addPoint(), DistributedRectilinearMeshGenerator::addPoint(), DiracKernelBase::addPointWithValidId(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), addQuadratureNode(), Action::addRelationshipManager(), FEProblemBase::addReporter(), FEProblemBase::addScalarKernel(), AddVariableAction::addVariable(), FEProblemBase::addVectorPostprocessor(), SubProblem::addVectorTag(), MooseLinearVariableFV< Real >::adError(), ADInterfaceKernelTempl< T >::ADInterfaceKernelTempl(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), MooseVariableScalar::adUDot(), Output::advancedExecuteOn(), AdvectiveFluxAux::AdvectiveFluxAux(), MooseVariableBase::allDofIndices(), NEML2ModelExecutor::applyPredictor(), MooseApp::appNameToLibName(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayConstantIC::ArrayConstantIC(), ArrayDGKernel::ArrayDGKernel(), ArrayDiffusion::ArrayDiffusion(), ArrayFunctionIC::ArrayFunctionIC(), ArrayReaction::ArrayReaction(), ArrayTimeDerivative::ArrayTimeDerivative(), MooseApp::attachRelationshipManagers(), AddPeriodicBCAction::autoTranslationBoundaries(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), buildCoarseningMap(), MultiApp::buildComm(), DistributedRectilinearMeshGenerator::buildCube(), TimedSubdomainModifier::buildFromFile(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromJSON(), TimedSubdomainModifier::buildFromParameters(), PiecewiseTabularBase::buildFromXY(), PiecewiseLinearBase::buildInterpolation(), buildLowerDMesh(), TiledMesh::buildMesh(), GeneratedMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), ImageMeshGenerator::buildMesh3D(), ImageMesh::buildMesh3D(), buildRefinementMap(), MaterialBase::buildRequiredMaterials(), buildSideList(), buildTypedMesh(), cacheFaceInfoVariableOwnership(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), PhysicsBase::checkBlockRestrictionIdentical(), ComponentBoundaryConditionInterface::checkBoundaryConditionsAllRequested(), SubProblem::checkBoundaryMatProps(), PhysicsBase::checkComponentType(), IterationCountConvergence::checkConvergence(), checkCoordinateSystems(), DiffusionLHDGAssemblyHelper::checkCoupling(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), FEProblemBase::checkDuplicatePostprocessorVariableNames(), DefaultConvergenceBase::checkDuplicateSetSharedExecutionerParams(), checkDuplicateSubdomainNames(), FEProblemBase::checkExceptionAndStopSolve(), NEML2ModelExecutor::checkExecutionStage(), MaterialBase::checkExecutionStage(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), Eigenvalue::checkIntegrity(), DefaultMultiAppFixedPointConvergence::checkIterationType(), DefaultNonlinearConvergence::checkIterationType(), DefaultSteadyStateConvergence::checkIterationType(), ExplicitTimeIntegrator::checkLinearConvergence(), MooseApp::checkMetaDataIntegrity(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), PostprocessorInterface::checkParam(), FEProblemBase::checkProblemIntegrity(), Sampler::checkReinitStatus(), MooseApp::checkReservedCapability(), MultiAppGeneralFieldNearestLocationTransfer::checkRestrictionsForSource(), MultiAppPostprocessorToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppScalarToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppPostprocessorTransfer::checkSiblingsTransferSupported(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), MultiAppMFEMCopyTransfer::checkSiblingsTransferSupported(), MultiAppCopyTransfer::checkSiblingsTransferSupported(), MultiAppTransfer::checkSiblingsTransferSupported(), MaterialBase::checkStatefulSanity(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), FEProblemBase::checkUserObjects(), Moose::PetscSupport::checkUserProvidedPetscOption(), DomainUserObject::checkVariable(), MultiAppTransfer::checkVariable(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), LibmeshPartitioner::clone(), clone(), CombinerGenerator::CombinerGenerator(), ComparisonPostprocessor::comparisonIsTrue(), MooseVariableFieldBase::componentName(), CompositeFunction::CompositeFunction(), ElementH1ErrorFunctionAux::compute(), NodalPatchRecovery::compute(), FEProblemBase::computeBounds(), VariableCondensationPreconditioner::computeDInverseDiag(), CompositionDT::computeDT(), ArrayDGKernel::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighResidual(), InternalSideIntegralPostprocessor::computeFaceInfoIntegral(), SideIntegralPostprocessor::computeFaceInfoIntegral(), MooseVariableFieldBase::computeFaceValues(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), computeFiniteVolumeCoords(), HistogramVectorPostprocessor::computeHistogram(), ArrayKernel::computeJacobian(), ArrayIntegratedBC::computeJacobian(), FVFluxKernel::computeJacobian(), NodalConstraint::computeJacobian(), FEProblemBase::computeJacobianTags(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), EigenProblem::computeMatricesTags(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), ArrayKernel::computeOffDiagJacobian(), ArrayIntegratedBC::computeOffDiagJacobian(), FVElementalKernel::computeOffDiagJacobian(), MortarScalarBase::computeOffDiagJacobianScalar(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), MaterialBase::computeProperties(), SideFVFluxBCIntegral::computeQpIntegral(), ScalarKernel::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), NodalEqualValueConstraint::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), NodeElemConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), ScalarKernel::computeQpResidual(), MassMatrix::computeQpResidual(), HDGKernel::computeQpResidual(), DiffusionLHDGDirichletBC::computeQpResidual(), NodalEqualValueConstraint::computeQpResidual(), DiffusionLHDGPrescribedGradientBC::computeQpResidual(), IPHDGBC::computeQpResidual(), KernelValue::computeQpResidual(), TorchScriptMaterial::computeQpValues(), InterfaceQpValueUserObject::computeRealValue(), ArrayKernel::computeResidual(), ArrayIntegratedBC::computeResidual(), FVFluxBC::computeResidual(), FVFluxKernel::computeResidual(), NodalConstraint::computeResidual(), FVFluxKernel::computeResidualAndJacobian(), ResidualObject::computeResidualAndJacobian(), FEProblemBase::computeResidualAndJacobian(), HDGKernel::computeResidualAndJacobianOnSide(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualTags(), FEProblemBase::computeResidualType(), KernelScalarBase::computeScalarOffDiagJacobian(), ADKernelScalarBase::computeScalarQpResidual(), ADMortarScalarBase::computeScalarQpResidual(), MortarScalarBase::computeScalarQpResidual(), KernelScalarBase::computeScalarQpResidual(), TimeStepper::computeStep(), ActuallyExplicitEuler::computeTimeDerivatives(), ExplicitEuler::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), BDF2::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), CentralDifference::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), AStableDirk4::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), MultiAppGeometricInterpolationTransfer::computeTransformation(), BuildArrayVariableAux::computeValue(), TagVectorArrayVariableAux::computeValue(), NearestNodeValueAux::computeValue(), ProjectionAux::computeValue(), PenetrationAux::computeValue(), ConcentricCircleMesh::ConcentricCircleMesh(), ConditionalEnableControl::ConditionalEnableControl(), TimeStepper::constrainStep(), LibtorchNeuralNetControl::controlNeuralNet(), TransientBase::convergedToSteadyState(), ParsedConvergence::convertRealToBool(), MooseApp::copyInputs(), CopyMeshPartitioner::CopyMeshPartitioner(), CoupledForceNodalKernel::CoupledForceNodalKernel(), MultiApp::createApp(), MooseApp::createExecutors(), AddVariableAction::createInitialConditionAction(), MooseApp::createRMFromTemplateAndInit(), Function::curl(), MooseVariableFV< Real >::curlPhi(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), SidesetInfoVectorPostprocessor::dataHelper(), ReporterTransferInterface::declareClone(), MeshGenerator::declareMeshProperty(), ReporterTransferInterface::declareVectorClone(), DefaultSteadyStateConvergence::DefaultSteadyStateConvergence(), FunctorRelationshipManager::delete_remote_elements(), deleteRemoteElements(), BicubicSplineFunction::derivative(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), detectPairedSidesets(), MooseApp::determineLibtorchDeviceType(), FEProblemBase::determineSolverSystem(), DGKernel::DGKernel(), MeshDiagnosticsGenerator::diagnosticsLog(), DistributedPositions::DistributedPositions(), Function::div(), FunctorBinnedValuesDivision::divisionIndex(), MooseVariableFV< Real >::divPhi(), FunctorRelationshipManager::dofmap_reinit(), EigenProblem::doFreeNonlinearPowerIterations(), FEProblemBase::duplicateVariableCheck(), MooseApp::dynamicAllRegistration(), MooseApp::dynamicAppRegistration(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementIntegerAux::ElementIntegerAux(), ElementMaterialSampler::ElementMaterialSampler(), ElementQualityAux::ElementQualityAux(), ElementSubdomainModifierBase::ElementSubdomainModifierBase(), ElementUOAux::ElementUOAux(), ExtraIDIntegralVectorPostprocessor::elementValue(), DistributedRectilinearMeshGenerator::elemId(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), EigenKernel::enabled(), MooseApp::errorCheck(), errorIfDistributedMesh(), MultiAppTransfer::errorIfObjectExecutesOnTransferInSourceApp(), SideIntegralPostprocessor::errorNoFaceInfo(), SideIntegralFunctorPostprocessorTempl< false >::errorNoFaceInfo(), SolutionUserObjectBase::evalMeshFunction(), SolutionUserObjectBase::evalMeshFunctionGradient(), SolutionUserObjectBase::evalMultiValuedMeshFunction(), SolutionUserObjectBase::evalMultiValuedMeshFunctionGradient(), FixedPointSolve::examineFixedPointConvergence(), MultiAppGeneralFieldTransfer::examineReceivedValueConflicts(), RealToBoolChainControl::execute(), RestartableDataReporter::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), NodalValueSampler::execute(), PositionsFunctorValueSampler::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppPostprocessorTransfer::execute(), ElementQualityChecker::execute(), MultiAppVariableValueSampleTransfer::execute(), GreaterThanLessThanPostprocessor::execute(), PointValue::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), FindValueOnLine::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppMFEMCopyTransfer::execute(), MultiAppCopyTransfer::execute(), MultiAppGeometricInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), InterfaceQpUserObjectBase::execute(), WebServerControl::execute(), TransientBase::execute(), LeastSquaresFit::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFitHistory::execute(), Eigenvalue::execute(), TimeExtremeValue::execute(), DomainUserObject::execute(), FEProblemBase::execute(), FEProblemBase::executeControls(), MooseApp::executeExecutioner(), MultiAppVectorPostprocessorTransfer::executeFromMultiapp(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), Exodus::Exodus(), ExplicitSSPRungeKutta::ExplicitSSPRungeKutta(), MultiAppGeneralFieldTransfer::extractOutgoingPoints(), NEML2ModelExecutor::extractOutputs(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemSolve::FEProblemSolve(), FileOutput::FileOutput(), NEML2ModelExecutor::fillInputs(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), VerifyNodalUniqueID::finalize(), VerifyElementUniqueID::finalize(), DiscreteElementUserObject::finalize(), ElementQualityChecker::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), DiscreteVariableResidualNorm::finalize(), NearestPointAverage::finalize(), NearestPointIntegralVariablePostprocessor::finalize(), MooseApp::finalizeRestore(), Transfer::find_sys(), BreakMeshByBlockGeneratorBase::findFreeBoundaryId(), FunctionDT::FunctionDT(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVMassMatrix::FVMassMatrix(), FVMatAdvection::FVMatAdvection(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), GapValueAux::GapValueAux(), WorkBalance::gather(), ElementOrderConversionGenerator::generate(), SideSetsFromNormalsGenerator::generate(), SmoothMeshGenerator::generate(), SubdomainPerElementGenerator::generate(), TiledMeshGenerator::generate(), BlockToMeshConverterGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), MoveNodeGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), SideSetsFromPointsGenerator::generate(), StitchMeshGenerator::generate(), GeneratedMeshGenerator::generate(), FlipSidesetGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), MeshDiagnosticsGenerator::generate(), MeshRepairGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), StackGenerator::generate(), XYZDelaunayGenerator::generate(), CombinerGenerator::generate(), MeshCollectionGenerator::generate(), AdvancedExtruderGenerator::generate(), AllSideSetsByNormalsGenerator::generate(), MeshExtruderGenerator::generate(), ParsedGenerateNodeset::generate(), SpiralAnnularMeshGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), CutMeshByLevelSetGeneratorBase::generate(), SubdomainBoundingBoxGenerator::generate(), PatternedMeshGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), MeshGenerator::generateData(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), MeshGenerator::generateInternal(), CircularBoundaryCorrectionGenerator::generateRadialCorrectionFactor(), RandomICBase::generateRandom(), GenericConstantMaterialTempl< is_ad >::GenericConstantMaterialTempl(), GenericConstantVectorMaterialTempl< is_ad >::GenericConstantVectorMaterialTempl(), GenericFunctionMaterialTempl< is_ad >::GenericFunctionMaterialTempl(), GenericFunctionVectorMaterialTempl< is_ad >::GenericFunctionVectorMaterialTempl(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), DisplacedProblem::getActualFieldVariable(), FEProblemBase::getActualFieldVariable(), DisplacedProblem::getArrayVariable(), FEProblemBase::getArrayVariable(), getAxisymmetricRadialCoord(), MFEMFESpace::getBasis(), NEML2BatchIndexGenerator::getBatchIndex(), getBlockConnectedBlocks(), VariableOldValueBounds::getBound(), getBoundaryID(), MultiApp::getBoundingBox(), ChainControl::getChainControlDataByName(), getCoarseningMap(), MultiApp::getCommandLineArgs(), MooseVariableBase::getContinuity(), Control::getControllableParameterByName(), FEProblemBase::getConvergence(), getCoordSystem(), PhysicsBase::getCoupledPhysics(), PropertyReadFile::getData(), DataFileInterface::getDataFilePath(), TransfiniteMeshGenerator::getDiscreteEdge(), FEProblemBase::getDistribution(), MooseVariableBase::getDofIndices(), VariableCondensationPreconditioner::getDofToCondense(), TransfiniteMeshGenerator::getEdge(), GhostingUserObject::getElementalValue(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), PropertyReadFile::getElementData(), getElementIDIndex(), Material::getElementIDNeighbor(), Material::getElementIDNeighborByName(), getElemIDMapping(), getElemIDsOnBlocks(), MultiAppFieldTransfer::getEquationSystem(), MultiApp::getExecutioner(), MooseApp::getExecutor(), MFEMVectorFESpace::getFECName(), MultiAppTransfer::getFromMultiApp(), MultiAppTransfer::getFromMultiAppInfo(), FEProblemBase::getFunction(), SubProblem::getFunctor(), FEProblemBase::getFVMatsAndDependencies(), getGeneralAxisymmetricCoordAxis(), DistributedRectilinearMeshGenerator::getGhostNeighbors(), DistributedRectilinearMeshGenerator::getIndices(), FEProblemBase::getLinearConvergenceNames(), SolutionUserObjectBase::getLocalVarIndex(), Material::getMaterialByName(), FEProblemBase::getMaterialData(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), AnnularMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MultiAppTransfer::getMultiApp(), FEProblemBase::getMultiAppFixedPointConvergenceName(), DistributedRectilinearMeshGenerator::getNeighbors(), Times::getNextTime(), getNodeBlockIds(), PropertyReadFile::getNodeData(), getNodeList(), FEProblemBase::getNonlinearConvergenceNames(), EigenProblem::getNonlinearEigenSystem(), FEProblemBase::getNonlinearSystem(), NEML2ModelExecutor::getOutput(), NEML2ModelExecutor::getOutputDerivative(), NEML2ModelExecutor::getOutputParameterDerivative(), getPairedBoundaryMapping(), MaterialOutputAction::getParams(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), PlaneIDMeshGenerator::getPlaneID(), Positions::getPosition(), Positions::getPositions(), FEProblemBase::getPositionsObject(), Positions::getPositionsVector2D(), Positions::getPositionsVector3D(), Positions::getPositionsVector4D(), PostprocessorInterface::getPostprocessorValueByNameInternal(), Times::getPreviousTime(), ComponentMaterialPropertyInterface::getPropertyValue(), InterfaceQpUserObjectBase::getQpValue(), getRefinementMap(), MooseBase::getRenamedParam(), ReporterInterface::getReporterContextBaseByName(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), MooseApp::getRMClone(), FEProblemBase::getSampler(), WebServerControl::getScalarJSONValue(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), MooseObject::getSharedPtr(), InterfaceQpUserObjectBase::getSideAverageValue(), PhysicsBase::getSolverSystem(), DisplacedProblem::getStandardVariable(), FEProblemBase::getStandardVariable(), FEProblemBase::getSteadyStateConvergenceName(), getSubdomainBoundaryIds(), TimedSubdomainModifier::getSubdomainIDAndCheck(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), Times::getTimeAtIndex(), FEProblemBase::getTimeFromStateArg(), TransientBase::getTimeIntegratorNames(), Times::getTimes(), MultiAppTransfer::getToMultiApp(), MultiAppTransfer::getToMultiAppInfo(), getUniqueCoordSystem(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), UserObjectInterface::getUserObjectBaseByName(), UserObjectInterface::getUserObjectName(), VectorPostprocessorComponent::getValue(), NumRelationshipManagers::getValue(), Residual::getValue(), SideAverageValue::getValue(), JSONFileReader::getValue(), LineValueSampler::getValue(), FindValueOnLine::getValueAtPoint(), SubProblem::getVariableHelper(), JSONFileReader::getVector(), VectorPostprocessorInterface::getVectorPostprocessorName(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), DisplacedProblem::getVectorVariable(), FEProblemBase::getVectorVariable(), GhostingFromUOAux::GhostingFromUOAux(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), Function::gradient(), FEProblemBase::handleException(), Terminator::handleMessage(), MooseVariableBase::hasDoFsOnNodes(), PostprocessorInterface::hasPostprocessor(), PostprocessorInterface::hasPostprocessorByName(), ReporterInterface::hasReporterValue(), ReporterInterface::hasReporterValueByName(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), HDGKernel::HDGKernel(), TransientBase::incrementStepOrReject(), FixedPointIterationAdaptiveDT::init(), CrankNicolson::init(), CSVTimeSequenceStepper::init(), EigenExecutionerBase::init(), ExplicitTimeIntegrator::init(), TransientBase::init(), FEProblem::init(), AddAuxVariableAction::init(), IterationAdaptiveDT::init(), Eigenvalue::init(), AddVariableAction::init(), init(), Sampler::init(), FEProblemBase::init(), MultiApp::init(), FEProblemBase::initialAdaptMesh(), NestedDivision::initialize(), DistributedPositions::initialize(), ReporterPositions::initialize(), TransformedPositions::initialize(), ElementGroupCentroidPositions::initialize(), FunctorPositions::initialize(), ReporterTimes::initialize(), FunctorTimes::initialize(), ParsedDownSelectionPositions::initialize(), ParsedConvergence::initializeConstantSymbol(), PhysicsBase::initializePhysics(), SteffensenSolve::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), SolutionIC::initialSetup(), ChainControlDataPostprocessor::initialSetup(), IntegralPreservingFunctionIC::initialSetup(), PiecewiseLinearBase::initialSetup(), MultiAppConservativeTransfer::initialSetup(), FullSolveMultiApp::initialSetup(), PiecewiseLinear::initialSetup(), CoarsenedPiecewiseLinear::initialSetup(), LinearFVDiffusion::initialSetup(), LinearFVAdvection::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), SolutionScalarAux::initialSetup(), ExplicitTimeIntegrator::initialSetup(), SolutionAux::initialSetup(), ReferenceResidualConvergence::initialSetup(), NodalVariableValue::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), CSV::initialSetup(), MooseParsedFunction::initialSetup(), SolutionUserObjectBase::initialSetup(), FEProblemBase::initialSetup(), SubProblem::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Function::integral(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), InterfaceTimeKernel::InterfaceTimeKernel(), InternalSideIndicatorBase::InternalSideIndicatorBase(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), Sampler::isAdaptiveSamplingCompleted(), isBoundaryFullyExternalToSubdomains(), MooseVariableBase::isNodal(), IterationAdaptiveDT::IterationAdaptiveDT(), IterationCountConvergence::IterationCountConvergence(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), MooseApp::libNameToAppName(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), LineSearch::lineSearch(), LineValueSampler::LineValueSampler(), MooseApp::loadLibraryAndDependencies(), MultiAppGeneralFieldTransfer::locatePointReceivers(), LowerBoundNodalKernel::LowerBoundNodalKernel(), MooseLinearVariableFV< Real >::lowerDError(), PNGOutput::makePNG(), ReporterPointMarker::markerSetup(), SubProblem::markFamilyPRefinement(), MassMatrix::MassMatrix(), Material::Material(), MaterialRealTensorValueAuxTempl< is_ad >::MaterialRealTensorValueAuxTempl(), MaterialRealVectorValueAuxTempl< T, is_ad, is_functor >::MaterialRealVectorValueAuxTempl(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), Distribution::median(), FunctorRelationshipManager::mesh_reinit(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshRepairGenerator::MeshRepairGenerator(), SetupMeshAction::modifyParamsForUseSplit(), MeshMetaDataInterface::mooseErrorInternal(), MooseLinearVariableFV< Real >::MooseLinearVariableFV(), MooseMesh(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MooseVariableConstMonomial::MooseVariableConstMonomial(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppMFEMCopyTransfer::MultiAppMFEMCopyTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), FEProblemBase::needsPreviousNewtonIteration(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), MooseVariableFV< Real >::nodalDofIndex(), MooseVariableFV< Real >::nodalDofIndexNeighbor(), MooseLinearVariableFV< Real >::nodalError(), MooseVariableFV< Real >::nodalMatrixTagValue(), NodalPatchRecoveryBase::nodalPatchRecovery(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalScalarKernel::NodalScalarKernel(), MooseVariableFV< Real >::nodalValueArray(), MooseVariableFV< Real >::nodalValueOldArray(), MooseVariableFV< Real >::nodalValueOlderArray(), NodalVariableValue::NodalVariableValue(), MooseVariableFV< Real >::nodalVectorTagValue(), DistributedRectilinearMeshGenerator::nodeId(), MooseVariableFV< Real >::numberOfDofsNeighbor(), NumDOFs::NumDOFs(), NumFailedTimeSteps::NumFailedTimeSteps(), DistributedRectilinearMeshGenerator::numNeighbors(), NumNonlinearIterations::NumNonlinearIterations(), NumVars::NumVars(), Output::onInterval(), FunctorRelationshipManager::operator()(), RelationshipManager::operator==(), ActionComponent::outerSurfaceArea(), ActionComponent::outerSurfaceBoundaries(), XDA::output(), SolutionHistory::output(), Exodus::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), MooseApp::outputMachineReadableData(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), Exodus::outputSetup(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), DistributedRectilinearMeshGenerator::paritionSquarely(), PiecewiseBilinear::parse(), ParsedConvergence::ParsedConvergence(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedODEKernel::ParsedODEKernel(), MultiAppConservativeTransfer::performAdjustment(), ExplicitTimeIntegrator::performExplicitSolve(), PetscExternalPartitioner::PetscExternalPartitioner(), MooseVariableFV< Real >::phiLowerSize(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PIDTransientControl::PIDTransientControl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMulticonstant::PiecewiseMulticonstant(), PiecewiseMultiInterpolation::PiecewiseMultiInterpolation(), PiecewiseTabularBase::PiecewiseTabularBase(), CutMeshByLevelSetGeneratorBase::pointPairLevelSetInterception(), SolutionUserObjectBase::pointValueGradientWrapper(), SolutionUserObjectBase::pointValueWrapper(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessorByName(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), ImplicitMidpoint::postResidual(), ExplicitTVDRK2::postResidual(), LStableDirk4::postResidual(), AStableDirk4::postResidual(), ExplicitRK2::postResidual(), EigenProblem::postScaleEigenVector(), VariableCondensationPreconditioner::preallocateCondensedJacobian(), ADKernelValueTempl< T >::precomputeQpJacobian(), Predictor::Predictor(), TransientBase::preExecute(), prepare(), prepared(), FixedPointSolve::printFixedPointConvergenceReason(), PseudoTimestep::PseudoTimestep(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObjectBase::readExodusII(), SolutionUserObjectBase::readXda(), CoarsenBlockGenerator::recursiveCoarsen(), MooseApp::recursivelyCreateExecutors(), FunctorRelationshipManager::redistribute(), ReferenceResidualConvergence::ReferenceResidualConvergence(), MooseApp::registerRestartableData(), MooseApp::registerRestartableNameWithFilter(), Sampler::reinit(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), MFEMTransient::relativeSolutionDifferenceNorm(), MooseApp::removeRelationshipManager(), PhysicsBase::reportPotentiallyMissedParameters(), MooseApp::restore(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), MooseApp::run(), MooseApp::runInputs(), PiecewiseMultiInterpolation::sample(), ScalarComponentIC::ScalarComponentIC(), MortarScalarBase::scalarVariable(), DistributedRectilinearMeshGenerator::scaleNodalPositions(), BicubicSplineFunction::secondDerivative(), MooseVariableFV< Real >::secondPhi(), MooseVariableFV< Real >::secondPhiFace(), MooseVariableFV< Real >::secondPhiFaceNeighbor(), MooseVariableFV< Real >::secondPhiNeighbor(), FunctorRelationshipManager::set_mesh(), MooseVariableBase::setActiveTags(), DistributedRectilinearMeshGenerator::setBoundaryNames(), setCoordSystem(), FEProblemBase::setCoupling(), PiecewiseBase::setData(), FileOutput::setFileBaseInternal(), setGeneralAxisymmetricCoordAxes(), FEProblemSolve::setInnerSolve(), MeshGenerator::setMeshProperty(), MooseApp::setMFEMDevice(), FVPointValueConstraint::setMyElem(), FEProblemBase::setNonlocalCouplingMatrix(), Sampler::setNumberOfCols(), Sampler::setNumberOfRandomSeeds(), Sampler::setNumberOfRows(), Exodus::setOutputDimensionInExodusWriter(), AddPeriodicBCAction::setPeriodicVars(), MFEMSolverBase::setPreconditioner(), MultiAppGeneralFieldTransfer::setSolutionVectorValues(), Split::setup(), TransientMultiApp::setupApp(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), TimeSequenceStepperBase::setupSequence(), TransientBase::setupTimeIntegrator(), TimePeriodBase::setupTimes(), IntegratedBCBase::shouldApply(), PhysicsBase::shouldCreateIC(), PhysicsBase::shouldCreateTimeDerivative(), PhysicsBase::shouldCreateVariable(), SideAdvectiveFluxIntegralTempl< is_ad >::SideAdvectiveFluxIntegralTempl(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), MooseVariableBase::sizeMatrixTagData(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObjectBase::SolutionUserObjectBase(), ExplicitTVDRK2::solve(), ExplicitRK2::solve(), TimeIntegrator::solve(), FEProblemBase::solverSysNum(), FullSolveMultiApp::solveStep(), SpatialAverageBase::SpatialAverageBase(), UserObject::spatialPoints(), NearestPointIntegralVariablePostprocessor::spatialValue(), NearestPointAverage::spatialValue(), MeshDivisionFunctorReductionVectorPostprocessor::spatialValue(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), WebServerControl::stringifyJSONType(), MultiAppGeometricInterpolationTransfer::subdomainIDsNode(), Constraint::subdomainSetup(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), MaterialBase::subdomainSetup(), FEProblemBase::swapBackMaterialsNeighbor(), DisplacedProblem::systemBaseLinear(), Console::systemInfoFlags(), FEProblemBase::systemNumForVariable(), TerminateChainControl::terminate(), Terminator::Terminator(), CutMeshByLevelSetGeneratorBase::tet4ElemCutter(), ThreadedGeneralUserObject::threadJoin(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), Function::timeDerivative(), TimedSubdomainModifier::TimedSubdomainModifier(), TimeExtremeValue::TimeExtremeValue(), Function::timeIntegral(), MooseLinearVariableFV< Real >::timeIntegratorError(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriodBase::TimePeriodBase(), VectorPostprocessorVisualizationAux::timestepSetup(), WebServerControl::toMiniJson(), MultiAppDofCopyTransfer::transfer(), MultiAppMFEMCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), TransformedPositions::TransformedPositions(), FEProblemBase::trustUserCouplingMatrix(), MooseVariableScalar::uDot(), MooseVariableScalar::uDotDot(), MooseVariableScalar::uDotDotOld(), FEProblemBase::uDotDotOldRequested(), MooseVariableScalar::uDotOld(), FEProblemBase::uDotOldRequested(), MooseBase::uniqueName(), Positions::unrollMultiDPositions(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), Checkpoint::updateCheckpointFiles(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObjectBase::updateExodusBracketingTimeIndices(), FEProblemBase::updateMaxQps(), MFEMHypreADS::updateSolver(), MFEMHypreAMS::updateSolver(), MFEMHypreBoomerAMG::updateSolver(), MFEMOperatorJacobiSmoother::updateSolver(), MFEMHypreFGMRES::updateSolver(), MFEMCGSolver::updateSolver(), MFEMHyprePCG::updateSolver(), MFEMGMRESSolver::updateSolver(), MFEMHypreGMRES::updateSolver(), MFEMSuperLU::updateSolver(), UpperBoundNodalKernel::UpperBoundNodalKernel(), NearestPointIntegralVariablePostprocessor::userObjectValue(), NearestPointAverage::userObjectValue(), BoundingBoxIC::value(), PiecewiseConstantFromCSV::value(), IntegralPreservingFunctionIC::value(), Axisymmetric2D3DSolutionFunction::value(), Function::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), AddVariableAction::variableType(), VariableValueVolumeHistogram::VariableValueVolumeHistogram(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), VectorNodalBC::VectorNodalBC(), SubProblem::vectorTagName(), SubProblem::vectorTagType(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), Function::vectorValue(), SubProblem::verifyVectorTags(), ActionComponent::volume(), VTKOutput::VTKOutput(), WebServerControl::WebServerControl(), MooseApp::writeRestartableMetaData(), DOFMapOutput::writeStreamToFile(), and Console::writeStreamToFile().

268  {
269  callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ true);
270  }
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
External method for calling moose error with added object context.
Definition: MooseBase.C:102

◆ mooseErrorNonPrefixed()

template<typename... Args>
void MooseBase::mooseErrorNonPrefixed ( Args &&...  args) const
inlineinherited

Emits an error without the prefixing included in mooseError().

Definition at line 286 of file MooseBase.h.

287  {
288  callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ false);
289  }
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
External method for calling moose error with added object context.
Definition: MooseBase.C:102

◆ mooseInfo()

template<typename... Args>
void MooseBase::mooseInfo ( Args &&...  args) const
inlineinherited

Definition at line 317 of file MooseBase.h.

Referenced by SetupRecoverFileBaseAction::act(), AStableDirk4::AStableDirk4(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MultiAppGeneralFieldNearestLocationTransfer::evaluateInterpValuesNearestNode(), PIDTransientControl::execute(), Executioner::Executioner(), ExplicitRK2::ExplicitRK2(), ExplicitTVDRK2::ExplicitTVDRK2(), DataFileInterface::getDataFilePath(), MFEMScalarFESpace::getFECName(), MultiAppTransfer::getPointInTargetAppFrame(), ImplicitMidpoint::ImplicitMidpoint(), ParsedDownSelectionPositions::initialize(), PropertyReadFile::initialize(), MultiAppGeneralFieldTransfer::initialSetup(), InversePowerMethod::InversePowerMethod(), LStableDirk2::LStableDirk2(), LStableDirk3::LStableDirk3(), LStableDirk4::LStableDirk4(), PNGOutput::makeMeshFunc(), NonlinearEigen::NonlinearEigen(), SolutionInvalidityOutput::output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), MooseBase::paramInfo(), ProjectionAux::ProjectionAux(), ReferenceResidualConvergence::ReferenceResidualConvergence(), MFEMDataCollection::registerFields(), FEProblemBase::setRestartFile(), MooseApp::setupOptions(), SolutionUserObjectBase::SolutionUserObjectBase(), SymmetryTransformGenerator::SymmetryTransformGenerator(), TransientBase::takeStep(), and TransientBase::TransientBase().

318  {
319  moose::internal::mooseInfoStream(_console, messagePrefix(true), std::forward<Args>(args)...);
320  }
void mooseInfoStream(S &oss, Args &&... args)
Definition: MooseError.h:268
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:252

◆ mooseWarning()

template<typename... Args>
void MooseBase::mooseWarning ( Args &&...  args) const
inlineinherited

Emits a warning prefixed with object name and type.

Definition at line 295 of file MooseBase.h.

Referenced by CopyMeshPartitioner::_do_partition(), AddKernelAction::act(), MeshOnlyAction::act(), AddFunctionAction::act(), MaterialOutputAction::act(), CommonOutputAction::act(), MFEMProblem::addFunction(), addPeriodicVariable(), DiracKernelBase::addPoint(), BoundaryMarker::BoundaryMarker(), DistributedRectilinearMeshGenerator::buildCube(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), CartesianMeshGenerator::CartesianMeshGenerator(), CheckOutputAction::checkConsoleOutput(), MultiAppTransfer::checkMultiAppExecuteOn(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), SampledOutput::cloneMesh(), MultiAppGeneralFieldTransfer::closestToPosition(), VariableValueElementSubdomainModifier::computeSubdomainID(), GapValueAux::computeValue(), MultiApp::createApp(), DebugResidualAux::DebugResidualAux(), MeshDiagnosticsGenerator::diagnosticsLog(), CartesianGridDivision::divisionIndex(), CylindricalGridDivision::divisionIndex(), SphericalGridDivision::divisionIndex(), ElementMaterialSampler::ElementMaterialSampler(), Postprocessor::evaluateDotWarning(), MeshDivisionFunctorReductionVectorPostprocessor::execute(), ElementQualityChecker::finalize(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), SubdomainPerElementGenerator::generate(), StitchMeshGenerator::generate(), ParsedGenerateSideset::generate(), MultiAppTransfer::getAppInfo(), FunctorBinnedValuesDivision::getBinIndex(), DataFileInterface::getDataFilePath(), PointSamplerBase::getLocalElemContainingPoint(), FEProblemBase::getMaterial(), LineValueSampler::getValue(), Terminator::handleMessage(), IndicatorMarker::IndicatorMarker(), CartesianGridDivision::initialize(), CylindricalGridDivision::initialize(), SphericalGridDivision::initialize(), ElementGroupCentroidPositions::initialize(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), BoundsBase::initialSetup(), ReferenceResidualConvergence::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), LeastSquaresFit::LeastSquaresFit(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MooseApp::loadLibraryAndDependencies(), FEProblemBase::mesh(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), NewmarkBeta::NewmarkBeta(), NodalPatchRecovery::NodalPatchRecovery(), NonlocalIntegratedBC::NonlocalIntegratedBC(), NonlocalKernel::NonlocalKernel(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), MooseBase::paramWarning(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), Executioner::problem(), PropertyReadFile::readData(), TestSourceStepper::rejectStep(), PhysicsBase::reportPotentiallyMissedParameters(), MaterialBase::resetQpProperties(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), setCoordSystem(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), FEProblemBase::sizeZeroes(), TransientMultiApp::solveStep(), Tecplot::Tecplot(), TimeDerivativeAux::TimeDerivativeAux(), Checkpoint::updateCheckpointFiles(), SampledOutput::updateSample(), PiecewiseConstantFromCSV::value(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

296  {
297  moose::internal::mooseWarningStream(_console, messagePrefix(true), std::forward<Args>(args)...);
298  }
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:220
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string messagePrefix(const bool hit_prefix=true) const
Definition: MooseBase.h:252

◆ mooseWarningNonPrefixed()

template<typename... Args>
void MooseBase::mooseWarningNonPrefixed ( Args &&...  args) const
inlineinherited

Emits a warning without the prefixing included in mooseWarning().

Definition at line 304 of file MooseBase.h.

305  {
306  moose::internal::mooseWarningStream(_console, std::forward<Args>(args)...);
307  }
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:220
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ nActiveElem()

virtual dof_id_type MooseMesh::nActiveElem ( ) const
inlinevirtual

Reimplemented in MFEMMesh.

Definition at line 325 of file MooseMesh.h.

325 { return _mesh->n_active_elem(); }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ nActiveLocalElem()

virtual dof_id_type MooseMesh::nActiveLocalElem ( ) const
inlinevirtual

Reimplemented in MFEMMesh.

Definition at line 326 of file MooseMesh.h.

326 { return _mesh->n_active_local_elem(); }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ name()

const std::string& MooseBase::name ( ) const
inlineinherited

Get the name of the class.

Returns
The name of the class

Definition at line 99 of file MooseBase.h.

Referenced by AddElementalFieldAction::act(), CopyNodalVarsAction::act(), AdaptivityAction::act(), AddTimeStepperAction::act(), DeprecatedBlockAction::act(), SetupTimeIntegratorAction::act(), AddActionComponentAction::act(), SetupResidualDebugAction::act(), DisplayGhostingAction::act(), MaterialOutputAction::act(), AddPeriodicBCAction::act(), FEProblemBase::addAnyRedistributers(), Executioner::addAttributeReporter(), MFEMProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), MFEMProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), PhysicsComponentInterface::addComponent(), FEProblemBase::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), Registry::addDataFilePath(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFESpace(), MFEMProblem::addFunction(), FEProblemBase::addFunction(), SubProblem::addFunctor(), MFEMProblem::addFunctorMaterial(), FEProblemBase::addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), ADDGKernel::ADDGKernel(), FEProblemBase::addHDGKernel(), FEProblemBase::addIndicator(), MFEMProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), DiffusionLHDGKernel::additionalROVariables(), IPHDGAssemblyHelper::additionalROVariables(), MFEMProblem::addKernel(), FEProblemBase::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), ComponentMaterialPropertyInterface::addMaterials(), FEProblemBase::addMeshDivision(), MooseApp::addMeshGenerator(), ComponentMeshTransformHelper::addMeshGenerators(), CylinderComponent::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMPreconditioner(), MFEMProblem::addMFEMSolver(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), InitialConditionWarehouse::addObject(), FEProblemBase::addObject(), ComponentPhysicsInterface::addPhysics(), SubProblem::addPiecewiseByBlockLambdaFunctor(), MFEMProblem::addPostprocessor(), FEProblemBase::addPostprocessor(), InitialConditionBase::addPostprocessorDependencyHelper(), UserObject::addPostprocessorDependencyHelper(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), MFEMProblem::addTransfer(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), InitialConditionBase::addUserObjectDependencyHelper(), UserObject::addUserObjectDependencyHelper(), AuxKernelTempl< Real >::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), UserObject::addVectorPostprocessorDependencyHelper(), MooseLinearVariableFV< Real >::adError(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), MooseVariableBase::allDofIndices(), MooseApp::appBinaryName(), MooseApp::appendMeshGenerator(), Registry::appNameFromAppPath(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), ArrayParsedAux::ArrayParsedAux(), PhysicsBase::assignBlocks(), AStableDirk4::AStableDirk4(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), MultiApp::backup(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), MFEMFESpace::buildFEC(), PiecewiseTabularBase::buildFromFile(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MooseBase::callMooseError(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), PhysicsBase::checkBlockRestrictionIdentical(), PhysicsBase::checkComponentType(), ParsedConvergence::checkConvergence(), DefaultNonlinearConvergence::checkConvergence(), FEProblemBase::checkDependMaterialsHelper(), SamplerBase::checkForStandardFieldVariableType(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), Material::checkMaterialProperty(), MooseApp::checkMetaDataIntegrity(), Damper::checkMinDamping(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), Checkpoint::checkpointInfo(), DomainUserObject::checkVariable(), BlockRestrictable::checkVariable(), Coupleable::checkWritableVar(), MooseVariableFieldBase::componentName(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), FEProblemBase::computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBase::connectControllableParams(), ConstantPostprocessor::ConstantPostprocessor(), Coupleable::coupledName(), CommonOutputAction::create(), MultiApp::createApp(), MooseApp::createExecutors(), MeshGeneratorSystem::createMeshGeneratorOrder(), MooseApp::createRecoverablePerfGraph(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), DebugResidualAux::DebugResidualAux(), MaterialBase::declareADProperty(), MeshGenerator::declareMeshesForSubByName(), MeshGenerator::declareNullMeshName(), MaterialBase::declareProperty(), DOFMapOutput::demangle(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), Registry::determineDataFilePath(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DomainUserObject::DomainUserObject(), DumpObjectsProblem::dumpObjectHelper(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementMaterialSampler::ElementMaterialSampler(), ElementValueSampler::ElementValueSampler(), EigenKernel::enabled(), errorIfDistributedMesh(), SolutionUserObjectBase::evalMeshFunction(), SolutionUserObjectBase::evalMeshFunctionGradient(), SolutionUserObjectBase::evalMultiValuedMeshFunction(), SolutionUserObjectBase::evalMultiValuedMeshFunctionGradient(), SideValueSampler::execute(), RestartableDataReporter::execute(), GreaterThanLessThanPostprocessor::execute(), PointValue::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppUserObjectTransfer::execute(), WebServerControl::execute(), MultiAppGeneralFieldTransfer::execute(), ActionWarehouse::executeActionsWithAction(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), MultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), PointSamplerBase::finalize(), ChainControl::fullControlDataName(), FunctionArrayAux::FunctionArrayAux(), FunctionDT::FunctionDT(), FunctionIC::functionName(), FVFunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), GapValueAux::GapValueAux(), MooseServer::gatherDocumentSymbols(), BoundaryDeletionGenerator::generate(), UniqueExtraIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), StitchBoundaryMeshGenerator::generate(), StitchMeshGenerator::generate(), BreakMeshByBlockGenerator::generate(), ParsedExtraElementIDGenerator::generate(), XYDelaunayGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), MeshGenerator::generateInternal(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MultiApp::getBoundingBox(), MooseBase::getCheckedPointerParam(), MooseApp::getCheckpointDirectories(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), FEProblemBase::getConvergence(), Registry::getDataFilePath(), UserObject::getDependObjects(), DistributionInterface::getDistribution(), FEProblemBase::getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), MooseApp::getExecutor(), FEProblemBase::getExecutor(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), SubProblem::getFunctor(), NodalPatchRecovery::getGenericMaterialProperty(), InterfaceMaterial::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), AuxKernelTempl< Real >::getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialPropertyByName(), Material::getGenericOptionalMaterialProperty(), MaterialBase::getGenericZeroMaterialProperty(), MFEMProblem::getGridFunction(), SolutionUserObjectBase::getLocalVarIndex(), Marker::getMarkerValue(), Material::getMaterial(), FEProblemBase::getMaterial(), Material::getMaterialByName(), NodalPatchRecovery::getMaterialProperty(), InterfaceMaterial::getMaterialProperty(), Material::getMaterialProperty(), AuxKernelTempl< Real >::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), InterfaceMaterial::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), AuxKernelTempl< Real >::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), InterfaceMaterial::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), AuxKernelTempl< Real >::getMaterialPropertyOlder(), MFEMGeneralUserObject::getMatrixCoefficient(), MFEMGeneralUserObject::getMatrixCoefficientByName(), MeshGenerator::getMesh(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshesByName(), MooseApp::getMeshGenerator(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), ActionWarehouse::getMooseAppName(), MultiAppTransfer::getMultiApp(), InterfaceMaterial::getNeighborADMaterialProperty(), InterfaceMaterial::getNeighborMaterialProperty(), InterfaceMaterial::getNeighborMaterialPropertyOld(), InterfaceMaterial::getNeighborMaterialPropertyOlder(), MooseServer::getObjectParameters(), Material::getOptionalADMaterialProperty(), Material::getOptionalMaterialProperty(), Material::getOptionalMaterialPropertyOld(), Material::getOptionalMaterialPropertyOlder(), OutputWarehouse::getOutput(), MooseBase::getParam(), FEProblemBase::getPositionsObject(), FEProblemBase::getPostprocessorValueByName(), ComponentMaterialPropertyInterface::getPropertyValue(), ReporterData::getReporterInfo(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), FEProblemBase::getSampler(), MFEMGeneralUserObject::getScalarCoefficient(), MFEMGeneralUserObject::getScalarCoefficientByName(), TransientBase::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), MFEMGeneralUserObject::getVectorCoefficient(), MFEMGeneralUserObject::getVectorCoefficientByName(), Terminator::handleMessage(), Control::hasControllableParameterByName(), FEProblemBase::hasConvergence(), FEProblemBase::hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), MooseApp::hasMeshGenerator(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasPostprocessorValueByName(), MooseApp::hasRelationshipManager(), MooseApp::hasRestartableDataMap(), MooseApp::hasRestartableMetaData(), FEProblemBase::hasUserObject(), IterationAdaptiveDT::init(), AddVariableAction::init(), AdvancedOutput::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), BoundaryRestrictable::initializeBoundaryRestrictable(), JSONOutput::initialSetup(), SideFVFluxBCIntegral::initialSetup(), SolutionScalarAux::initialSetup(), MultiAppProjectionTransfer::initialSetup(), NodalVariableValue::initialSetup(), Console::initialSetup(), SolutionUserObjectBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), Function::integral(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), MeshGenerator::isChildMeshGenerator(), DerivativeMaterialInterface< MortarScalarBase >::isNotObjectVariable(), MeshGenerator::isNullMeshName(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), FEProblemBase::logAdd(), MooseLinearVariableFV< Real >::lowerDError(), Marker::Marker(), MaterialBase::markMatPropRequested(), MatDiffusionBase< Real >::MatDiffusionBase(), Material::Material(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshGenerator::meshPropertyPrefix(), MooseBase::messagePrefix(), OutputWarehouse::mooseConsole(), MooseVariableBase::MooseVariableBase(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MooseLinearVariableFV< Real >::nodalError(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalValueSampler::NodalValueSampler(), Registry::objData(), MeshGenerator::Comparator::operator()(), ProgressOutput::output(), DOFMapOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), ConsoleUtils::outputExecutionInformation(), MaterialOutputAction::outputHelper(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), TableOutput::outputReporter(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedODEKernel::ParsedODEKernel(), ComponentPhysicsInterface::physicsExists(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), MooseApp::possiblyLoadRestartableMetaData(), PhysicsBase::prefix(), prepare(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), PerfGraphLivePrint::printStats(), MooseBase::queryParam(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), AppFactory::reg(), Registry::registerObjectsTo(), FEProblemBase::registerRandomInterface(), MooseApp::registerRestartableDataMapName(), MooseApp::registerRestartableNameWithFilter(), GlobalParamsAction::remove(), MaterialBase::resetQpProperties(), MultiApp::restore(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), GlobalParamsAction::setDoubleIndexParam(), OutputWarehouse::setFileNumbers(), GlobalParamsAction::setParam(), FEProblemBase::setPostprocessorValueByName(), FEProblemBase::setResidualObjectParamsAndLog(), GlobalParamsAction::setScalarParam(), setSubdomainName(), GlobalParamsAction::setTripleIndexParam(), NodeSetsGeneratorBase::setup(), Split::setup(), SideSetsGeneratorBase::setup(), TransientMultiApp::setupApp(), GlobalParamsAction::setVectorParam(), FullSolveMultiApp::showStatusMessage(), SideSetExtruderGenerator::SideSetExtruderGenerator(), TransientMultiApp::solveStep(), UserObject::spatialValue(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), MaterialBase::storeBoundaryZeroMatProp(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), MaterialBase::storeSubdomainZeroMatProp(), SubProblem::storeSubdomainZeroMatProp(), ConstraintWarehouse::subdomainsCovered(), MaterialBase::subdomainSetup(), TaggingInterface::TaggingInterface(), MooseLinearVariableFV< Real >::timeIntegratorError(), VectorPostprocessorVisualizationAux::timestepSetup(), to_json(), MultiAppDofCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), TransientMultiApp::TransientMultiApp(), MooseServer::traverseParseTreeAndFillSymbols(), MooseBase::typeAndName(), MooseBase::uniqueParameterName(), FVFluxBC::uOnGhost(), FVFluxBC::uOnUSub(), UserObject::UserObject(), UserObjectInterface::userObjectName(), ParsedAux::validateGenericVectorNames(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), Convergence::verboseOutput(), AdvancedOutput::wantOutput(), Coupleable::writableCoupledValue(), Coupleable::writableVariable(), Console::write(), and MooseApp::writeRestartableMetaData().

100  {
101  mooseAssert(_name.size(), "Empty name");
102  return _name;
103  }
const std::string & _name
The name of this class.
Definition: MooseBase.h:359

◆ needGhostGhostedBoundaries()

void MooseMesh::needGhostGhostedBoundaries ( bool  needghost)
inline

Whether or not we want to ghost ghosted boundaries.

Definition at line 616 of file MooseMesh.h.

Referenced by DistributedRectilinearMeshGenerator::generate().

616 { _need_ghost_ghosted_boundaries = needghost; }
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready...
Definition: MooseMesh.h:1837

◆ needsPrepareForUse()

void MooseMesh::needsPrepareForUse ( )

If this method is called, we will call libMesh's prepare_for_use method when we call Moose's prepare method.

This should only be set when the mesh structure is changed by MeshGenerators (i.e. Element deletion).

Definition at line 3165 of file MooseMesh.C.

3166 {
3167  prepared(false);
3168 }
bool prepared() const
Setter/getter for whether the mesh is prepared.
Definition: MooseMesh.C:3137

◆ needsRemoteElemDeletion() [1/2]

void MooseMesh::needsRemoteElemDeletion ( bool  need_delete)
inline

Set whether we need to delete remote elements.

Definition at line 1079 of file MooseMesh.h.

1079 { _need_delete = need_delete; }
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1825

◆ needsRemoteElemDeletion() [2/2]

bool MooseMesh::needsRemoteElemDeletion ( ) const
inline

Whether we need to delete remote elements.

Definition at line 1084 of file MooseMesh.h.

1084 { return _need_delete; }
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1825

◆ nElem()

dof_id_type MooseMesh::nElem ( ) const
virtual

Definition at line 3081 of file MooseMesh.C.

Referenced by PropertyReadFile::getElementData(), and PropertyReadFile::readData().

3082 {
3083  return getMesh().n_elem();
3084 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual dof_id_type n_elem() const=0

◆ nFace()

unsigned int MooseMesh::nFace ( ) const
inline

accessors for the FaceInfo objects

Definition at line 1147 of file MooseMesh.h.

1147 { return _face_info.size(); }
std::vector< const FaceInfo * > _face_info
Holds only those FaceInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1608

◆ nLocalNodes()

virtual dof_id_type MooseMesh::nLocalNodes ( ) const
inlinevirtual

Definition at line 324 of file MooseMesh.h.

324 { return _mesh->n_local_nodes(); }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ nNodes()

dof_id_type MooseMesh::nNodes ( ) const
virtual

Calls n_nodes/elem() on the underlying libMesh mesh object.

Definition at line 3075 of file MooseMesh.C.

Referenced by PropertyReadFile::getNodeData(), and PropertyReadFile::readData().

3076 {
3077  return getMesh().n_nodes();
3078 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual dof_id_type n_nodes() const=0

◆ node() [1/2]

const Node & MooseMesh::node ( const dof_id_type  i) const
virtual

Various accessors (pointers/references) for Node "i".

If the requested node is a remote node on a distributed mesh, only the query accessors are valid to call, and they return NULL.

Definition at line 820 of file MooseMesh.C.

Referenced by addUniqueNode(), GeneratedMesh::buildMesh(), buildPeriodicNodeMap(), cacheInfo(), detectOrthogonalDimRanges(), getNodeBlockIds(), isSemiLocal(), and updateActiveSemiLocalNodeRange().

821 {
822  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
823  return nodeRef(i);
824 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:834
void mooseDeprecated(Args &&... args) const
Definition: MooseBase.h:310

◆ node() [2/2]

Node & MooseMesh::node ( const dof_id_type  i)
virtual

Definition at line 827 of file MooseMesh.C.

828 {
829  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
830  return nodeRef(i);
831 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:834
void mooseDeprecated(Args &&... args) const
Definition: MooseBase.h:310

◆ nodePtr() [1/2]

const Node * MooseMesh::nodePtr ( const dof_id_type  i) const
virtual

Definition at line 848 of file MooseMesh.C.

849 {
850  return &nodeRef(i);
851 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:834

◆ nodePtr() [2/2]

Node * MooseMesh::nodePtr ( const dof_id_type  i)
virtual

Definition at line 854 of file MooseMesh.C.

855 {
856  return &nodeRef(i);
857 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:834

◆ nodeRef() [1/2]

const Node & MooseMesh::nodeRef ( const dof_id_type  i) const
virtual

◆ nodeRef() [2/2]

Node & MooseMesh::nodeRef ( const dof_id_type  i)
virtual

Definition at line 842 of file MooseMesh.C.

843 {
844  return const_cast<Node &>(const_cast<const MooseMesh *>(this)->nodeRef(i));
845 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:834
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88

◆ nodeSetNodes()

const std::map< boundary_id_type, std::vector< dof_id_type > > & MooseMesh::nodeSetNodes ( ) const
inline
Returns
A map from nodeset ids to the vector of node ids in the nodeset

Definition at line 2185 of file MooseMesh.h.

2186 {
2187  return _node_set_nodes;
2188 }
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids] ...
Definition: MooseMesh.h:1556

◆ nodeToActiveSemilocalElemMap()

const std::map< dof_id_type, std::vector< dof_id_type > > & MooseMesh::nodeToActiveSemilocalElemMap ( )

If not already created, creates a map from every node to all active semilocal elements to which they are connected.

Semilocal elements include local elements and elements that share at least one node with a local element.

Note
Extra ghosted elements are not included in this map!

Definition at line 1206 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup().

1207 {
1208  if (!_node_to_active_semilocal_elem_map_built) // Guard the creation with a double checked lock
1209  {
1210  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1211 
1212  // This is allowing the timing to be run even with threads
1213  // This is safe because all threads will be waiting on this section when it runs
1214  // NOTE: Do not copy this construction to other places without thinking REALLY hard about it
1215  // The PerfGraph is NOT threadsafe and will cause all kinds of havok if care isn't taken
1217  Threads::in_threads = false;
1218  TIME_SECTION("nodeToActiveSemilocalElemMap", 5, "Building SemiLocalElemMap");
1220 
1222  {
1223  for (const auto & elem :
1224  as_range(getMesh().semilocal_elements_begin(), getMesh().semilocal_elements_end()))
1225  if (elem->active())
1226  for (unsigned int n = 0; n < elem->n_nodes(); n++)
1228 
1230  true; // MUST be set at the end for double-checked locking to work!
1231  }
1232  }
1233 
1235 }
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:1510
bool in_threads
dof_id_type id() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual unsigned int n_nodes() const=0
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
bool active() const
dof_id_type node_id(const unsigned int i) const
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
A map of all of the current nodes to the active elements that they are connected to.
Definition: MooseMesh.h:1509

◆ nodeToElemMap()

const std::map< dof_id_type, std::vector< dof_id_type > > & MooseMesh::nodeToElemMap ( )

If not already created, creates a map from every node to all elements to which they are connected.

Definition at line 1178 of file MooseMesh.C.

Referenced by NodalPatchRecovery::compute(), NodalPatchRecoveryAuxBase::computeValue(), ProjectionAux::computeValue(), PenetrationLocator::detectPenetration(), DMMooseGetEmbedding_Private(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), NonlinearSystemBase::findImplicitGeometricCouplingEntries(), NearestNodeLocator::findNodes(), NodePositions::initialize(), ActivateElementsUserObjectBase::isNewlyActivated(), LinearNodalConstraint::LinearNodalConstraint(), ElementSubdomainModifierBase::nodeIsNewlyReinitialized(), GhostHigherDLowerDPointNeighbors::operator()(), EqualValueBoundaryConstraint::updateConstrainedNodes(), RandomData::updateGenerators(), and NearestNodeLocator::updatePatch().

1179 {
1180  if (!_node_to_elem_map_built) // Guard the creation with a double checked lock
1181  {
1182  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1183 
1185  {
1186  // This is allowing the timing to be run even with threads
1187  // This is safe because all threads will be waiting on this section when it runs
1188  // NOTE: Do not copy this construction to other places without thinking REALLY hard about it
1189  // The PerfGraph is NOT threadsafe and will cause all kinds of havok if care isn't taken
1191  Threads::in_threads = false;
1192  TIME_SECTION("nodeToElemMap", 5, "Building Node To Elem Map");
1194 
1195  for (const auto & elem : getMesh().active_element_ptr_range())
1196  for (unsigned int n = 0; n < elem->n_nodes(); n++)
1197  _node_to_elem_map[elem->node_id(n)].push_back(elem->id());
1198 
1199  _node_to_elem_map_built = true; // MUST be set at the end for double-checked locking to work!
1200  }
1201  }
1202  return _node_to_elem_map;
1203 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:1506
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
A map of all of the current nodes to the elements that they are connected to.
Definition: MooseMesh.h:1505
bool in_threads
dof_id_type id() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual unsigned int n_nodes() const=0
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
dof_id_type node_id(const unsigned int i) const

◆ nPartitions()

virtual unsigned int MooseMesh::nPartitions ( ) const
inlinevirtual

Definition at line 328 of file MooseMesh.h.

328 { return _mesh->n_partitions(); }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ nSubdomains()

virtual SubdomainID MooseMesh::nSubdomains ( ) const
inlinevirtual

Reimplemented in MFEMMesh.

Definition at line 327 of file MooseMesh.h.

327 { return _mesh->n_subdomains(); }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ onMeshChanged()

void MooseMesh::onMeshChanged ( )
virtual

Declares a callback function that is executed at the conclusion of meshChanged().

Ther user can implement actions required after changing the mesh here.

Definition at line 908 of file MooseMesh.C.

Referenced by meshChanged().

909 {
910 }

◆ operator const libMesh::MeshBase &()

MooseMesh::operator const libMesh::MeshBase & ( ) const

Definition at line 3439 of file MooseMesh.C.

3439 { return getMesh(); }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ operator libMesh::MeshBase &()

MooseMesh::operator libMesh::MeshBase & ( )

Implicit conversion operator from MooseMesh -> libMesh::MeshBase.

Definition at line 3437 of file MooseMesh.C.

3437 { return getMesh(); }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448

◆ operator=()

MooseMesh& MooseMesh::operator= ( const MooseMesh other_mesh)
delete

◆ ownedElemInfoBegin()

MooseMesh::elem_info_iterator MooseMesh::ownedElemInfoBegin ( )

Iterators to owned faceInfo objects.

These faceInfo-s are required for the face loops and to filter out the faceInfo-s that are not owned by this processor in case we have a distributed mesh and we included FaceInfo objects that are on processor boundaries

Definition at line 1528 of file MooseMesh.C.

Referenced by LinearSystem::computeGradients(), LinearSystem::computeLinearSystemInternal(), and FEProblemBase::projectSolution().

1529 {
1530  return elem_info_iterator(_elem_info.begin(),
1531  _elem_info.end(),
1533 }
std::vector< const ElemInfo * > _elem_info
Holds only those ElemInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1600

◆ ownedElemInfoEnd()

MooseMesh::elem_info_iterator MooseMesh::ownedElemInfoEnd ( )

Definition at line 1536 of file MooseMesh.C.

Referenced by LinearSystem::computeGradients(), LinearSystem::computeLinearSystemInternal(), and FEProblemBase::projectSolution().

1537 {
1538  return elem_info_iterator(_elem_info.end(),
1539  _elem_info.end(),
1541 }
std::vector< const ElemInfo * > _elem_info
Holds only those ElemInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1600

◆ ownedFaceInfoBegin()

MooseMesh::face_info_iterator MooseMesh::ownedFaceInfoBegin ( )

Iterators to owned faceInfo objects.

These faceInfo-s are required for the face loops and to filter out the faceInfo-s that are not owned by this processor in case we have a distributed mesh and we included FaceInfo objects that are on processor boundaries

Definition at line 1510 of file MooseMesh.C.

Referenced by LinearSystem::computeGradients(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), and NonlinearSystemBase::computeResidualInternal().

1511 {
1512  return face_info_iterator(
1513  _face_info.begin(),
1514  _face_info.end(),
1516 }
std::vector< const FaceInfo * > _face_info
Holds only those FaceInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1608
processor_id_type processor_id() const

◆ ownedFaceInfoEnd()

MooseMesh::face_info_iterator MooseMesh::ownedFaceInfoEnd ( )

Definition at line 1519 of file MooseMesh.C.

Referenced by LinearSystem::computeGradients(), NonlinearSystemBase::computeJacobianInternal(), LinearSystem::computeLinearSystemInternal(), NonlinearSystemBase::computeResidualAndJacobianInternal(), and NonlinearSystemBase::computeResidualInternal().

1520 {
1521  return face_info_iterator(
1522  _face_info.end(),
1523  _face_info.end(),
1525 }
std::vector< const FaceInfo * > _face_info
Holds only those FaceInfo objects that have processor_id equal to this process&#39;s id, e.g.
Definition: MooseMesh.h:1608
processor_id_type processor_id() const

◆ paramError()

template<typename... Args>
void MooseBase::paramError ( const std::string &  param,
Args...  args 
) const
inherited

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 435 of file MooseBase.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), AutoCheckpointAction::act(), SetupDebugAction::act(), CommonOutputAction::act(), AddPeriodicBCAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), NEML2ModelExecutor::addGatheredParameter(), NEML2ModelExecutor::addGatheredVariable(), ADDGKernel::ADDGKernel(), CylinderComponent::addMeshGenerators(), AddPeriodicBCAction::AddPeriodicBCAction(), ReporterPointSource::addPoints(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), ADNodalKernel::ADNodalKernel(), ADPenaltyPeriodicSegmentalConstraint::ADPenaltyPeriodicSegmentalConstraint(), ADPeriodicSegmentalConstraint::ADPeriodicSegmentalConstraint(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), ArrayBodyForce::ArrayBodyForce(), ArrayDGKernel::ArrayDGKernel(), ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayDirichletBC::ArrayDirichletBC(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), ArrayParsedAux::ArrayParsedAux(), ArrayPenaltyDirichletBC::ArrayPenaltyDirichletBC(), ArrayVacuumBC::ArrayVacuumBC(), ArrayVarReductionAux::ArrayVarReductionAux(), ParsedSubdomainIDsGenerator::assignElemSubdomainID(), AuxKernelTempl< Real >::AuxKernelTempl(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BlockDeletionGenerator::BlockDeletionGenerator(), BlockWeightedPartitioner::BlockWeightedPartitioner(), BoundsBase::BoundsBase(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BuildArrayVariableAux::BuildArrayVariableAux(), PiecewiseTabularBase::buildFromFile(), MFEMMesh::buildMesh(), CartesianGridDivision::CartesianGridDivision(), checkComponent(), MeshGenerator::checkGetMesh(), ComponentInitialConditionInterface::checkInitialConditionsAllRequested(), BatchMeshGeneratorAction::checkInputParameterType(), PhysicsBase::checkIntegrityEarly(), PostprocessorInterface::checkParam(), FEProblemBase::checkProblemIntegrity(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), Coupleable::checkVar(), MultiAppTransfer::checkVariable(), CircularBoundaryCorrectionGenerator::CircularBoundaryCorrectionGenerator(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), MultiAppGeneralFieldTransfer::closestToPosition(), CoarsenBlockGenerator::CoarsenBlockGenerator(), CombinerGenerator::CombinerGenerator(), ComponentInitialConditionInterface::ComponentInitialConditionInterface(), ComponentMaterialPropertyInterface::ComponentMaterialPropertyInterface(), CompositionDT::CompositionDT(), FunctorAux::computeValue(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), LibtorchNeuralNetControl::conditionalParameterError(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), ConstantVectorPostprocessor::ConstantVectorPostprocessor(), ContainsPointAux::ContainsPointAux(), CopyValueAux::CopyValueAux(), Coupleable::Coupleable(), CoupledForceTempl< is_ad >::CoupledForceTempl(), CoupledValueFunctionMaterialTempl< is_ad >::CoupledValueFunctionMaterialTempl(), MultiApp::createApp(), MeshGeneratorSystem::createMeshGenerator(), CylindricalGridDivision::CylindricalGridDivision(), DebugResidualAux::DebugResidualAux(), ConstantReporter::declareConstantReporterValue(), ConstantReporter::declareConstantReporterValues(), AccumulateReporter::declareLateValues(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DGLowerDKernel::DGLowerDKernel(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementLengthAux::ElementLengthAux(), ElementLpNormAux::ElementLpNormAux(), ExtraIDIntegralVectorPostprocessor::elementValue(), ElementValueSampler::ElementValueSampler(), ElementVectorL2Error::ElementVectorL2Error(), EqualValueEmbeddedConstraintTempl< is_ad >::EqualValueEmbeddedConstraintTempl(), ReporterPointSource::errorCheck(), StitchMeshGeneratorBase::errorMissingBoundary(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), ExtraElementIDAux::ExtraElementIDAux(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::FileMeshGenerator(), FillBetweenCurvesGenerator::FillBetweenCurvesGenerator(), FillBetweenSidesetsGenerator::FillBetweenSidesetsGenerator(), ReporterPointSource::fillPoint(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), InternalSideIndicatorBase::finalize(), ForcingFunctionAux::ForcingFunctionAux(), FullSolveMultiApp::FullSolveMultiApp(), FunctionArrayAux::FunctionArrayAux(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FunctorADConverterTempl< T >::FunctorADConverterTempl(), FunctorAux::FunctorAux(), FunctorBinnedValuesDivision::FunctorBinnedValuesDivision(), FunctorCoordinatesFunctionAux::FunctorCoordinatesFunctionAux(), FunctorElementalGradientAuxTempl< is_ad >::FunctorElementalGradientAuxTempl(), FunctorExtremaPositions::FunctorExtremaPositions(), FunctorIC::FunctorIC(), FunctorPositions::FunctorPositions(), FunctorVectorElementalAuxTempl< is_ad >::FunctorVectorElementalAuxTempl(), FVAdvection::FVAdvection(), FVFluxBC::FVFluxBC(), FVInterfaceKernel::FVInterfaceKernel(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), FVTwoVarContinuityConstraint::FVTwoVarContinuityConstraint(), BoundaryDeletionGenerator::generate(), UniqueExtraIDMeshGenerator::generate(), ExtraNodesetGenerator::generate(), AddMetaDataGenerator::generate(), ElementsToTetrahedronsConverter::generate(), BlockToMeshConverterGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), BlockDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), AdvancedExtruderGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), CombinerGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedCurveGenerator::generate(), ParsedExtraElementIDGenerator::generate(), StackGenerator::generate(), XYZDelaunayGenerator::generate(), BreakMeshByElementGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), GeneratedMeshGenerator::GeneratedMeshGenerator(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), PropertyReadFile::getBlockData(), ComponentBoundaryConditionInterface::getBoundaryCondition(), MultiApp::getCommandLineArgs(), PropertyReadFile::getData(), PropertyReadFile::getFileNames(), Sampler::getGlobalSamples(), ComponentInitialConditionInterface::getInitialCondition(), NEML2Action::getInputParameterMapping(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), Sampler::getLocalSamples(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), Sampler::getNextLocalRow(), FEProblemSolve::getParamFromNonlinearSystemVectorParam(), PostprocessorInterface::getPostprocessorNameInternal(), PostprocessorInterface::getPostprocessorValueInternal(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), UserObjectInterface::getUserObjectBase(), UserObjectInterface::getUserObjectName(), HFEMDirichletBC::HFEMDirichletBC(), AddVariableAction::init(), MultiApp::init(), DistributedPositions::initialize(), BlockWeightedPartitioner::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), PhysicsBase::initializePhysics(), JSONOutput::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), SolutionIC::initialSetup(), SideFVFluxBCIntegral::initialSetup(), ElementSubdomainModifierBase::initialSetup(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), HistogramVectorPostprocessor::initialSetup(), ReferenceResidualConvergence::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), SampledOutput::initSample(), AddMetaDataGenerator::inputChecker(), IntegratedBC::IntegratedBC(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceValueUserObjectAux::InterfaceValueUserObjectAux(), InternalSideIndicatorBase::InternalSideIndicatorBase(), InterpolatedStatefulMaterialTempl< T >::InterpolatedStatefulMaterialTempl(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), MultiApp::keepSolutionDuringRestore(), Kernel::Kernel(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationFunction::LinearCombinationFunction(), LinearFVAdvectionDiffusionFunctorRobinBC::LinearFVAdvectionDiffusionFunctorRobinBC(), LowerDIntegratedBC::LowerDIntegratedBC(), PNGOutput::makeMeshFunc(), MatCoupledForce::MatCoupledForce(), MaterialADConverterTempl< T >::MaterialADConverterTempl(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MatrixSymmetryCheck::MatrixSymmetryCheck(), PatternedMeshGenerator::mergeSubdomainNameMaps(), MeshCollectionGenerator::MeshCollectionGenerator(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshDivisionAux::MeshDivisionAux(), MeshGenerator::MeshGenerator(), MeshGeneratorComponent::MeshGeneratorComponent(), MFEMGenericFunctorMaterial::MFEMGenericFunctorMaterial(), MFEMGenericFunctorVectorMaterial::MFEMGenericFunctorVectorMaterial(), MooseLinearVariableFV< Real >::MooseLinearVariableFV(), UserObjectInterface::mooseObjectError(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MortarConstraintBase::MortarConstraintBase(), MortarNodalAuxKernelTempl< ComputeValueType >::MortarNodalAuxKernelTempl(), MultiApp::moveApp(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldNearestLocationTransfer::MultiAppGeneralFieldNearestLocationTransfer(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorToAuxScalarTransfer::MultiAppPostprocessorToAuxScalarTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppProjectionTransfer::MultiAppProjectionTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppScalarToAuxScalarTransfer::MultiAppScalarToAuxScalarTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiAppVectorPostprocessorTransfer::MultiAppVectorPostprocessorTransfer(), MultiSystemSolveObject::MultiSystemSolveObject(), NearestNodeValueAux::NearestNodeValueAux(), NEML2Action::NEML2Action(), NestedDivision::NestedDivision(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), NodalValueSampler::NodalValueSampler(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), ParsedPostprocessor::ParsedPostprocessor(), PatternedMeshGenerator::PatternedMeshGenerator(), PenaltyPeriodicSegmentalConstraint::PenaltyPeriodicSegmentalConstraint(), PeriodicSegmentalConstraint::PeriodicSegmentalConstraint(), PIDTransientControl::PIDTransientControl(), PlaneDeletionGenerator::PlaneDeletionGenerator(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), PolyLineMeshGenerator::PolyLineMeshGenerator(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessor(), LibmeshPartitioner::prepareBlocksForSubdomainPartitioner(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), ProjectionAux::ProjectionAux(), PropertyReadFile::PropertyReadFile(), RandomIC::RandomIC(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), RefineBlockGenerator::RefineBlockGenerator(), RefineSidesetGenerator::RefineSidesetGenerator(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), FEProblemBase::restoreSolutions(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), FEProblemBase::setLinearConvergenceNames(), FEProblemBase::setNonlinearConvergenceNames(), setPartitioner(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), NEML2Action::setupDerivativeMappings(), NEML2Action::setupParameterDerivativeMappings(), TimeSequenceStepperBase::setupSequence(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideValueSampler::SideValueSampler(), SingleRankPartitioner::SingleRankPartitioner(), SphericalGridDivision::SphericalGridDivision(), StitchBoundaryMeshGenerator::StitchBoundaryMeshGenerator(), StitchMeshGenerator::StitchMeshGenerator(), SymmetryTransformGenerator::SymmetryTransformGenerator(), Terminator::Terminator(), TimeDerivativeAux::TimeDerivativeAux(), Transfer::Transfer(), TransformGenerator::TransformGenerator(), TransientMultiApp::TransientMultiApp(), ParsedCurveGenerator::tSectionSpaceDefiner(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), UserObject::UserObject(), Checkpoint::validateExecuteOn(), ParsedAux::validateGenericVectorNames(), ParsedMaterialBase::validateVectorNames(), FunctorIC::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VolumeAux::VolumeAux(), WebServerControl::WebServerControl(), XYDelaunayGenerator::XYDelaunayGenerator(), XYMeshLineCutter::XYMeshLineCutter(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

436 {
437  _pars.paramError(param, std::forward<Args>(args)...);
438 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
void paramError(const std::string &param, Args... args) const
Emits a parameter error prefixed with the parameter location and object information if available...

◆ parameters()

const InputParameters& MooseBase::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 127 of file MooseBase.h.

Referenced by MeshOnlyAction::act(), SplitMeshAction::act(), SetupDebugAction::act(), AddActionComponentAction::act(), CommonOutputAction::act(), Action::Action(), FEProblemBase::addAnyRedistributers(), MFEMProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), MFEMProblem::addAuxVariable(), DisplacedProblem::addAuxVariable(), MFEMProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), FEProblemBase::addDefaultMultiAppFixedPointConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), FEProblemBase::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), FEProblemBase::addDefaultSteadyStateConvergence(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), MFEMProblem::addFESpace(), MFEMProblem::addFunction(), FEProblemBase::addFunction(), MFEMProblem::addFunctorMaterial(), FEProblemBase::addFunctorMaterial(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), MFEMProblem::addGridFunction(), FEProblemBase::addHDGKernel(), FEProblemBase::addIndicator(), MFEMProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DiffusionPhysicsBase::addInitialConditions(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), MFEMProblem::addKernel(), FEProblemBase::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMeshDivision(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), MFEMProblem::addMFEMPreconditioner(), MFEMProblem::addMFEMSolver(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), MFEMProblem::addPostprocessor(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), MFEMProblem::addSubMesh(), FEProblemBase::addTimeIntegrator(), MFEMProblem::addTransfer(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), MFEMProblem::addVariable(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), Action::associateWithParameter(), AuxKernelTempl< Real >::AuxKernelTempl(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), buildTypedMesh(), PostprocessorInterface::checkParam(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), SampledOutput::cloneMesh(), LibtorchNeuralNetControl::conditionalParameterError(), Console::Console(), CommonOutputAction::create(), MultiApp::createApp(), Postprocessor::declareValue(), DumpObjectsProblem::deduceNecessaryParameters(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::DumpObjectsProblem(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), ElementMaterialSampler::ElementMaterialSampler(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), Executor::Executor(), Exodus::Exodus(), FEProblem::FEProblem(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainGeneratorBase::generate(), ActionWarehouse::getCurrentActionName(), ExecutorInterface::getExecutor(), Material::getMaterial(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), MeshGeneratorSystem::hasDataDrivenAllowed(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), FEProblemBase::initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MFEMCGSolver::MFEMCGSolver(), MFEMGMRESSolver::MFEMGMRESSolver(), MFEMHypreADS::MFEMHypreADS(), MFEMHypreAMS::MFEMHypreAMS(), MFEMHypreBoomerAMG::MFEMHypreBoomerAMG(), MFEMHypreFGMRES::MFEMHypreFGMRES(), MFEMHypreGMRES::MFEMHypreGMRES(), MFEMHyprePCG::MFEMHyprePCG(), MFEMOperatorJacobiSmoother::MFEMOperatorJacobiSmoother(), MFEMSuperLU::MFEMSuperLU(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiApp::MultiApp(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NodeFaceConstraint::NodeFaceConstraint(), ConsoleUtils::outputLegacyInformation(), OverlayMeshGenerator::OverlayMeshGenerator(), MooseServer::parseDocumentForDiagnostics(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), NEML2Action::printSummary(), ProjectedStatefulMaterialStorageAction::processProperty(), PropertyReadFile::PropertyReadFile(), PseudoTimestep::PseudoTimestep(), RandomIC::RandomIC(), ReferenceResidualConvergence::ReferenceResidualConvergence(), InputParameterWarehouse::removeInputParameters(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), FEProblemBase::setResidualObjectParamsAndLog(), SideSetsGeneratorBase::setup(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), Moose::PetscSupport::storePetscOptions(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), TransientBase::TransientBase(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), and MooseApp::~MooseApp().

127 { return _pars; }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362

◆ paramInfo()

template<typename... Args>
void MooseBase::paramInfo ( const std::string &  param,
Args...  args 
) const
inherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 449 of file MooseBase.h.

Referenced by GridPartitioner::_do_partition(), ComboMarker::ComboMarker(), Control::Control(), FunctorIC::FunctorIC(), and TransientMultiApp::TransientMultiApp().

450 {
451  mooseInfo(_pars.paramMessage(param, std::forward<Args>(args)...));
452 }
std::string paramMessage(const std::string &param, Args... args) const
void mooseInfo(Args &&... args) const
Definition: MooseBase.h:317
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362

◆ paramWarning()

template<typename... Args>
void MooseBase::paramWarning ( const std::string &  param,
Args...  args 
) const
inherited

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 442 of file MooseBase.h.

Referenced by GridPartitioner::_do_partition(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), EigenProblem::checkProblemIntegrity(), CombinerGenerator::copyIntoMesh(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), MultiAppNearestNodeTransfer::execute(), FEProblemSolve::FEProblemSolve(), UniqueExtraIDMeshGenerator::generate(), PlaneIDMeshGenerator::generate(), Terminator::initialSetup(), SampledOutput::initSample(), MooseMesh(), FEProblemBase::setPreserveMatrixSparsityPattern(), and Terminator::Terminator().

443 {
444  mooseWarning(_pars.paramMessage(param, std::forward<Args>(args)...));
445 }
std::string paramMessage(const std::string &param, Args... args) const
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Definition: MooseBase.h:295

◆ partitionerName()

const MooseEnum& MooseMesh::partitionerName ( ) const
inline

Definition at line 1021 of file MooseMesh.h.

1021 { return _partitioner_name; }
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:1436

◆ partitioning()

MooseEnum MooseMesh::partitioning ( )
static

returns MooseMesh partitioning options so other classes can use it

Definition at line 3898 of file MooseMesh.C.

3899 {
3900  MooseEnum partitioning("default=-3 metis=-2 parmetis=-1 linear=0 centroid hilbert_sfc morton_sfc",
3901  "default");
3902  return partitioning;
3903 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
static MooseEnum partitioning()
returns MooseMesh partitioning options so other classes can use it
Definition: MooseMesh.C:3898

◆ perfGraph()

PerfGraph & PerfGraphInterface::perfGraph ( )
inherited

Get the PerfGraph.

Definition at line 78 of file PerfGraphInterface.C.

Referenced by CommonOutputAction::act(), PerfGraphData::finalize(), and PerfGraphOutput::output().

79 {
80  return _pg_moose_app.perfGraph();
81 }
MooseApp & _pg_moose_app
The MooseApp that owns the PerfGraph.
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Definition: MooseApp.h:166

◆ prepare()

bool MooseMesh::prepare ( const MeshBase mesh_to_clone)

Calls prepare_for_use() if the underlying MeshBase object isn't prepared, then communicates various boundary information on parallel meshes.

Also calls update() internally. Instead of calling prepare_for_use on the currently held MeshBase object, a mesh_to_clone can be provided. If it is provided (e.g. this method is given a non-null argument), then _mesh will be assigned a clone of the mesh_to_clone. The provided mesh_to_clone must already be prepared

Parameters
mesh_to_cloneIf nonnull, we will clone this mesh instead of preparing our current one
Returns
Whether the libMesh mesh was prepared. This should really only be relevant in MOOSE framework contexts where we need to make a decision about what to do with the displaced mesh. If the reference mesh base object has prepare_for_use called (e.g. this method returns true when called for the reference mesh), then we must pass the reference mesh base object into this method when we call this for the displaced mesh. This is because the displaced mesh must be an exact clone of the reference mesh. We have seen that prepare_for_use called on two previously identical meshes can result in two different meshes even with Metis partitioning

Definition at line 409 of file MooseMesh.C.

410 {
411  TIME_SECTION("prepare", 2, "Preparing Mesh", true);
412 
413  bool called_prepare_for_use = false;
414 
415  mooseAssert(_mesh, "The MeshBase has not been constructed");
416 
417  if (!dynamic_cast<DistributedMesh *>(&getMesh()) || _is_nemesis)
418  // For whatever reason we do not want to allow renumbering here nor ever in the future?
419  getMesh().allow_renumbering(false);
420 
421  if (mesh_to_clone)
422  {
423  mooseAssert(mesh_to_clone->is_prepared(),
424  "The mesh we wish to clone from must already be prepared");
425  _mesh = mesh_to_clone->clone();
426  _moose_mesh_prepared = false;
427  }
428  else if (!_mesh->is_prepared())
429  {
430  _mesh->prepare_for_use();
431  _moose_mesh_prepared = false;
432  called_prepare_for_use = true;
433  }
434 
436  return called_prepare_for_use;
437 
438  // Collect (local) subdomain IDs
439  _mesh_subdomains.clear();
440  for (const auto & elem : getMesh().element_ptr_range())
442 
443  // add explicitly requested subdomains
444  if (isParamValid("add_subdomain_ids") && !isParamValid("add_subdomain_names"))
445  {
446  // only subdomain ids are explicitly given
447  const auto & add_subdomain_id = getParam<std::vector<SubdomainID>>("add_subdomain_ids");
448  _mesh_subdomains.insert(add_subdomain_id.begin(), add_subdomain_id.end());
449  }
450  else if (isParamValid("add_subdomain_ids") && isParamValid("add_subdomain_names"))
451  {
452  const auto add_subdomain =
453  getParam<SubdomainID, SubdomainName>("add_subdomain_ids", "add_subdomain_names");
454  for (const auto & [sub_id, sub_name] : add_subdomain)
455  {
456  // add subdomain id
457  _mesh_subdomains.insert(sub_id);
458  // set name of the subdomain just added
459  setSubdomainName(sub_id, sub_name);
460  }
461  }
462  else if (isParamValid("add_subdomain_names"))
463  {
464  // the user has defined add_subdomain_names, but not add_subdomain_ids
465  const auto & add_subdomain_names = getParam<std::vector<SubdomainName>>("add_subdomain_names");
466 
467  // to define subdomain ids, we need the largest subdomain id defined yet.
468  subdomain_id_type offset = 0;
469  if (!_mesh_subdomains.empty())
470  offset = *_mesh_subdomains.rbegin();
471 
472  // add all subdomains (and auto-assign ids)
473  for (const SubdomainName & sub_name : add_subdomain_names)
474  {
475  // to avoid two subdomains with the same ID (notably on recover)
477  continue;
478  const auto sub_id = ++offset;
479  // add subdomain id
480  _mesh_subdomains.insert(sub_id);
481  // set name of the subdomain just added
482  setSubdomainName(sub_id, sub_name);
483  }
484  }
485 
486  // Make sure nodesets have been generated
488 
489  // Collect (local) boundary IDs
490  const std::set<BoundaryID> & local_bids = getMesh().get_boundary_info().get_boundary_ids();
491  _mesh_boundary_ids.insert(local_bids.begin(), local_bids.end());
492 
493  const std::set<BoundaryID> & local_node_bids =
495  _mesh_nodeset_ids.insert(local_node_bids.begin(), local_node_bids.end());
496 
497  const std::set<BoundaryID> & local_side_bids =
499  _mesh_sideset_ids.insert(local_side_bids.begin(), local_side_bids.end());
500 
501  // Add explicitly requested sidesets/nodesets
502  // This is done *after* the side boundaries (e.g. "right", ...) have been generated.
503  auto add_sets = [this](const bool sidesets, auto & set_ids)
504  {
505  const std::string type = sidesets ? "sideset" : "nodeset";
506  const std::string id_param = "add_" + type + "_ids";
507  const std::string name_param = "add_" + type + "_names";
508 
509  if (isParamValid(id_param))
510  {
511  const auto & add_ids = getParam<std::vector<BoundaryID>>(id_param);
512  _mesh_boundary_ids.insert(add_ids.begin(), add_ids.end());
513  set_ids.insert(add_ids.begin(), add_ids.end());
515  {
516  const auto & add_names = getParam<std::vector<BoundaryName>>(name_param);
517  mooseAssert(add_names.size() == add_ids.size(),
518  "Id and name sets must be the same size when adding.");
519  for (const auto i : index_range(add_ids))
520  setBoundaryName(add_ids[i], add_names[i]);
521  }
522  }
523  else if (isParamValid(name_param))
524  {
525  // the user has defined names, but not ids
526  const auto & add_names = getParam<std::vector<BoundaryName>>(name_param);
527 
528  auto & mesh_ids = sidesets ? _mesh_sideset_ids : _mesh_nodeset_ids;
529 
530  // to define ids, we need the largest id defined yet.
531  boundary_id_type offset = 0;
532  if (!mesh_ids.empty())
533  offset = *mesh_ids.rbegin();
534  if (!_mesh_boundary_ids.empty())
535  offset = std::max(offset, *_mesh_boundary_ids.rbegin());
536 
537  // add all sidesets/nodesets (and auto-assign ids)
538  for (const auto & name : add_names)
539  {
540  // to avoid two sets with the same ID (notably on recover)
542  continue;
543  const auto id = ++offset;
544  // add sideset id
545  _mesh_boundary_ids.insert(id);
546  set_ids.insert(id);
547  // set name of the sideset just added
548  setBoundaryName(id, name);
549  }
550  }
551  };
552 
553  add_sets(true, _mesh_sideset_ids);
554  add_sets(false, _mesh_nodeset_ids);
555 
556  // Communicate subdomain and boundary IDs if this is a parallel mesh
557  if (!getMesh().is_serial())
558  {
563  }
564 
566  {
567  if (!_coord_system_set)
568  setCoordSystem(_provided_coord_blocks, getParam<MultiMooseEnum>("coord_type"));
569  else if (_pars.isParamSetByUser("coord_type"))
570  mooseError(
571  "Trying to set coordinate system type information based on the user input file, but "
572  "the coordinate system type information has already been set programmatically! "
573  "Either remove your coordinate system type information from the input file, or contact "
574  "your application developer");
575  }
576 
577  // Set general axisymmetric axes if provided
578  if (isParamValid("rz_coord_blocks") && isParamValid("rz_coord_origins") &&
579  isParamValid("rz_coord_directions"))
580  {
581  const auto rz_coord_blocks = getParam<std::vector<SubdomainName>>("rz_coord_blocks");
582  const auto rz_coord_origins = getParam<std::vector<Point>>("rz_coord_origins");
583  const auto rz_coord_directions = getParam<std::vector<RealVectorValue>>("rz_coord_directions");
584  if (rz_coord_origins.size() == rz_coord_blocks.size() &&
585  rz_coord_directions.size() == rz_coord_blocks.size())
586  {
587  std::vector<std::pair<Point, RealVectorValue>> rz_coord_axes;
588  for (unsigned int i = 0; i < rz_coord_origins.size(); ++i)
589  rz_coord_axes.push_back(std::make_pair(rz_coord_origins[i], rz_coord_directions[i]));
590 
591  setGeneralAxisymmetricCoordAxes(rz_coord_blocks, rz_coord_axes);
592 
593  if (isParamSetByUser("rz_coord_axis"))
594  mooseError("The parameter 'rz_coord_axis' may not be provided if 'rz_coord_blocks', "
595  "'rz_coord_origins', and 'rz_coord_directions' are provided.");
596  }
597  else
598  mooseError("The parameters 'rz_coord_blocks', 'rz_coord_origins', and "
599  "'rz_coord_directions' must all have the same size.");
600  }
601  else if (isParamValid("rz_coord_blocks") || isParamValid("rz_coord_origins") ||
602  isParamValid("rz_coord_directions"))
603  mooseError("If any of the parameters 'rz_coord_blocks', 'rz_coord_origins', and "
604  "'rz_coord_directions' are provided, then all must be provided.");
605 
607 
608  update();
609 
610  // Check if there is subdomain name duplication for the same subdomain ID
612 
613  _moose_mesh_prepared = true;
614 
615  return called_prepare_for_use;
616 }
const std::set< boundary_id_type > & get_side_boundary_ids() const
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1469
static const std::string name_param
The name of the parameter that contains the object name.
Definition: MooseBase.h:55
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:1874
bool is_prepared() const
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
void checkDuplicateSubdomainNames()
Loop through all subdomain IDs and check if there is name duplication used for the subdomains with sa...
Definition: MooseMesh.C:4337
void allow_renumbering(bool allow)
const BoundaryID INVALID_BOUNDARY_ID
Definition: MooseTypes.C:22
const Parallel::Communicator & _communicator
const BoundaryInfo & get_boundary_info() const
virtual std::unique_ptr< MeshBase > clone() const=0
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:2983
auto max(const L &left, const R &right)
const std::set< boundary_id_type > & get_node_boundary_ids() const
static const subdomain_id_type invalid_subdomain_id
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
bool _built_from_other_mesh
Whether or not this mesh was built from another mesh.
Definition: MooseMesh.h:1419
int8_t boundary_id_type
void setSubdomainName(SubdomainID subdomain_id, const SubdomainName &name)
This method sets the name for subdomain_id to name.
Definition: MooseMesh.C:1749
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:619
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:89
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:1526
void setCoordSystem(const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
Set the coordinate system for the provided blocks to coord_sys.
Definition: MooseMesh.C:4081
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:1524
bool _moose_mesh_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:1472
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:1871
const std::set< boundary_id_type > & get_boundary_ids() const
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.
void setBoundaryName(BoundaryID boundary_id, BoundaryName name)
This method sets the boundary name of the boundary based on the id parameter.
Definition: MooseMesh.C:1780
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:1525
void setGeneralAxisymmetricCoordAxes(const std::vector< SubdomainName > &blocks, const std::vector< std::pair< Point, RealVectorValue >> &axes)
Sets the general coordinate axes for axisymmetric blocks.
Definition: MooseMesh.C:4221
bool detectOrthogonalDimRanges(Real tol=1e-6)
This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
Definition: MooseMesh.C:1925
subdomain_id_type subdomain_id() const
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:195
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1516
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
Definition: MooseBase.h:201
auto index_range(const T &sizable)
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:1692
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1731
void set_union(T &data, const unsigned int root_id) const

◆ prepared() [1/2]

bool MooseMesh::prepared ( ) const

Setter/getter for whether the mesh is prepared.

Definition at line 3137 of file MooseMesh.C.

Referenced by needsPrepareForUse(), GeneratedMesh::prepared(), and AnnularMesh::prepared().

3138 {
3139  return _mesh->is_prepared() && _moose_mesh_prepared;
3140 }
bool _moose_mesh_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:1472
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ prepared() [2/2]

void MooseMesh::prepared ( bool  state)
virtual

If we are explicitly setting the mesh to not prepared, then we've likely modified the mesh and can no longer make assumptions about orthogonality. We really should recheck.

Reimplemented in AnnularMesh, and GeneratedMesh.

Definition at line 3143 of file MooseMesh.C.

3144 {
3145  if (state)
3146  mooseError("We don't have any right to tell the libmesh mesh that it *is* prepared. Only a "
3147  "call to prepare_for_use should tell us that");
3148 
3149  // Some people may call this even before we have a MeshBase object. This isn't dangerous really
3150  // because when the MeshBase object is born, it knows it's in an unprepared state
3151  if (_mesh)
3152  _mesh->set_isnt_prepared();
3153 
3154  // If the libMesh mesh isn't preparead, then our MooseMesh wrapper is also no longer prepared
3155  _moose_mesh_prepared = false;
3156 
3161  _regular_orthogonal_mesh = false;
3162 }
bool _moose_mesh_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:1472
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1577

◆ printInfo()

void MooseMesh::printInfo ( std::ostream &  os = libMesh::out,
const unsigned int  verbosity = 0 
) const

Calls print_info() on the underlying Mesh.

Definition at line 3462 of file MooseMesh.C.

Referenced by Adaptivity::adaptMesh().

3463 {
3464  os << '\n';
3465  getMesh().print_info(os, verbosity);
3466  os << std::flush;
3467 }
std::basic_ostream< charT, traits > * os
Definition: InfixIterator.h:33
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
void print_info(std::ostream &os=libMesh::out, const unsigned int verbosity=0, const bool global=true) const

◆ queryElemPtr() [1/2]

Elem * MooseMesh::queryElemPtr ( const dof_id_type  i)
virtual

Definition at line 3125 of file MooseMesh.C.

Referenced by PointSamplerBase::getLocalElemContainingPoint(), NodePositions::initialize(), ElementalVariableValue::initialSetup(), DisplacedProblem::reinitElemPhys(), FEProblemBase::reinitElemPhys(), and EqualValueBoundaryConstraint::updateConstrainedNodes().

3126 {
3127  return getMesh().query_elem_ptr(i);
3128 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual const Elem * query_elem_ptr(const dof_id_type i) const=0

◆ queryElemPtr() [2/2]

const Elem * MooseMesh::queryElemPtr ( const dof_id_type  i) const
virtual

Definition at line 3131 of file MooseMesh.C.

3132 {
3133  return getMesh().query_elem_ptr(i);
3134 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual const Elem * query_elem_ptr(const dof_id_type i) const=0

◆ queryNodePtr() [1/2]

const Node * MooseMesh::queryNodePtr ( const dof_id_type  i) const
virtual

Definition at line 860 of file MooseMesh.C.

Referenced by NonlinearSystemBase::findImplicitGeometricCouplingEntries(), NodePositions::initialize(), nodeRef(), queryNodePtr(), and EqualValueBoundaryConstraint::updateConstrainedNodes().

861 {
862  if (i > getMesh().max_node_id())
863  {
864  auto it = _quadrature_nodes.find(i);
865  if (it == _quadrature_nodes.end())
866  return nullptr;
867  auto & node_ptr = it->second;
868  mooseAssert(node_ptr, "Uninitialized quadrature node");
869  return node_ptr;
870  }
871 
872  return getMesh().query_node_ptr(i);
873 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:1547
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual const Node * query_node_ptr(const dof_id_type i) const=0

◆ queryNodePtr() [2/2]

Node * MooseMesh::queryNodePtr ( const dof_id_type  i)
virtual

Definition at line 876 of file MooseMesh.C.

877 {
878  return const_cast<Node *>(const_cast<const MooseMesh *>(this)->queryNodePtr(i));
879 }
virtual const Node * queryNodePtr(const dof_id_type i) const
Definition: MooseMesh.C:860
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88

◆ queryParam()

template<typename T >
const T * MooseBase::queryParam ( const std::string &  name) const
inherited

Query a parameter for the object.

If the parameter is not valid, nullptr will be returned

Parameters
nameThe name of the parameter
Returns
A pointer to the parameter value, if it exists

Definition at line 391 of file MooseBase.h.

392 {
393  return isParamValid(name) ? &getParam<T>(name) : nullptr;
394 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:195

◆ refinedElementRange()

ConstElemPointerRange * MooseMesh::refinedElementRange ( ) const

Return a range that is suitable for threaded execution over elements that were just refined.

Returns
The Parent elements that are now set to be INACTIVE. Their children are the new elements.

Definition at line 931 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged().

932 {
933  return _refined_elements.get();
934 }
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:1475

◆ registerTimedSection() [1/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 53 of file PerfGraphInterface.C.

55 {
56  const auto timed_section_name = timedSectionName(section_name);
57  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
58  return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
59  else
60  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
61 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ registerTimedSection() [2/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level,
const std::string &  live_message,
const bool  print_dots = true 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
live_messageThe message to be printed to the screen during execution
print_dotsWhether or not progress dots should be printed for this section
Returns
The ID of the section - use when starting timing

Definition at line 64 of file PerfGraphInterface.C.

68 {
69  const auto timed_section_name = timedSectionName(section_name);
70  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
72  timedSectionName(section_name), level, live_message, print_dots);
73  else
74  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
75 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ restartableName()

std::string Restartable::restartableName ( const std::string &  data_name) const
protectedinherited

Gets the name of a piece of restartable data given a data name, adding the system name and object name prefix.

This should only be used in this interface and in testing.

Definition at line 66 of file Restartable.C.

Referenced by Restartable::declareRecoverableData(), and Restartable::declareRestartableDataHelper().

67 {
68  return _restartable_system_name + "/" + _restartable_name + "/" + data_name;
69 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:243
const std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:230

◆ safeClone()

virtual std::unique_ptr<MooseMesh> MooseMesh::safeClone ( ) const
pure virtual

A safer version of the clone() method that hands back an allocated object wrapped in a smart pointer.

This makes it much less likely that the caller will leak the memory in question.

Implemented in MFEMMesh, PatternedMesh, StitchedMesh, MeshGeneratorMesh, AnnularMesh, ConcentricCircleMesh, GeneratedMesh, RinglebMesh, SpiralAnnularMesh, ImageMesh, FileMesh, and TiledMesh.

Referenced by SetupMeshAction::act(), and SampledOutput::cloneMesh().

◆ setAxisymmetricCoordAxis()

void MooseMesh::setAxisymmetricCoordAxis ( const MooseEnum rz_coord_axis)

For axisymmetric simulations, set the symmetry coordinate axis.

For r in the x-direction, z in the y-direction the coordinate axis would be y

Definition at line 4213 of file MooseMesh.C.

Referenced by FEProblemBase::setAxisymmetricCoordAxis().

4214 {
4215  _rz_coord_axis = rz_coord_axis;
4216 
4218 }
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition: MooseMesh.C:4285
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1861

◆ setBoundaryName()

void MooseMesh::setBoundaryName ( BoundaryID  boundary_id,
BoundaryName  name 
)

This method sets the boundary name of the boundary based on the id parameter.

Definition at line 1780 of file MooseMesh.C.

Referenced by prepare(), and ActivateElementsUserObjectBase::setNewBoundayName().

1781 {
1782  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1783 
1784  // We need to figure out if this boundary is a sideset or nodeset
1785  if (boundary_info.get_side_boundary_ids().count(boundary_id))
1786  boundary_info.sideset_name(boundary_id) = name;
1787  else
1788  boundary_info.nodeset_name(boundary_id) = name;
1789 }
const std::set< boundary_id_type > & get_side_boundary_ids() const
std::string & nodeset_name(boundary_id_type id)
const BoundaryInfo & get_boundary_info() const
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::string & sideset_name(boundary_id_type id)

◆ setBoundaryToNormalMap() [1/2]

void MooseMesh::setBoundaryToNormalMap ( std::unique_ptr< std::map< BoundaryID, RealVectorValue >>  boundary_map)

Sets the mapping between BoundaryID and normal vector Is called by AddAllSideSetsByNormals.

Definition at line 3201 of file MooseMesh.C.

3203 {
3204  _boundary_to_normal_map = std::move(boundary_map);
3205 }
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
The boundary to normal map - valid only when AddAllSideSetsByNormals is active.
Definition: MooseMesh.h:1530

◆ setBoundaryToNormalMap() [2/2]

void MooseMesh::setBoundaryToNormalMap ( std::map< BoundaryID, RealVectorValue > *  boundary_map)

Definition at line 3208 of file MooseMesh.C.

3209 {
3210  mooseDeprecated("setBoundaryToNormalMap(std::map<BoundaryID, RealVectorValue> * boundary_map) is "
3211  "deprecated, use the unique_ptr version instead");
3212  _boundary_to_normal_map.reset(boundary_map);
3213 }
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
The boundary to normal map - valid only when AddAllSideSetsByNormals is active.
Definition: MooseMesh.h:1530
void mooseDeprecated(Args &&... args) const
Definition: MooseBase.h:310

◆ setCoordData()

void MooseMesh::setCoordData ( const MooseMesh other_mesh)

Set the coordinate system data to that of other_mesh.

Definition at line 4322 of file MooseMesh.C.

Referenced by DisplacedProblem::DisplacedProblem().

4323 {
4324  _coord_sys = other_mesh._coord_sys;
4325  _rz_coord_axis = other_mesh._rz_coord_axis;
4327 }
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1858
std::unordered_map< SubdomainID, std::pair< Point, RealVectorValue > > _subdomain_id_to_rz_coord_axis
Map of subdomain ID to general axisymmetric axis.
Definition: MooseMesh.h:1864
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1861

◆ setCoordSystem()

void MooseMesh::setCoordSystem ( const std::vector< SubdomainName > &  blocks,
const MultiMooseEnum coord_sys 
)

Set the coordinate system for the provided blocks to coord_sys.

Definition at line 4081 of file MooseMesh.C.

Referenced by prepare(), and FEProblemBase::setCoordSystem().

4083 {
4084  TIME_SECTION("setCoordSystem", 5, "Setting Coordinate System");
4086  {
4087  const std::string param_name = isParamValid("coord_block") ? "coord_block" : "block";
4088  mooseWarning("Supplied blocks in the 'setCoordSystem' method do not match the value of the "
4089  "'Mesh/",
4090  param_name,
4091  "' parameter. Did you provide different parameter values for 'Mesh/",
4092  param_name,
4093  "' and 'Problem/block'?. We will honor the parameter value from 'Mesh/",
4094  param_name,
4095  "'");
4096  mooseAssert(_coord_system_set,
4097  "If we are arriving here due to a bad specification in the Problem block, then we "
4098  "should have already set our coordinate system subdomains from the Mesh block");
4099  return;
4100  }
4101  if (_pars.isParamSetByUser("coord_type") && getParam<MultiMooseEnum>("coord_type") != coord_sys)
4102  mooseError("Supplied coordinate systems in the 'setCoordSystem' method do not match the value "
4103  "of the 'Mesh/coord_type' parameter. Did you provide different parameter values for "
4104  "'coord_type' to 'Mesh' and 'Problem'?");
4105 
4106  // If blocks contain ANY_BLOCK_ID, it should be the only block specified, and coord_sys should
4107  // have one and only one entry. In that case, the same coordinate system will be set for all
4108  // subdomains.
4109  if (blocks.size() == 1 && blocks[0] == "ANY_BLOCK_ID")
4110  {
4111  if (coord_sys.size() > 1)
4112  mooseError("If you specify ANY_BLOCK_ID as the only block, you must also specify a single "
4113  "coordinate system for it.");
4114  if (!_mesh->is_prepared())
4115  mooseError(
4116  "You cannot set the coordinate system for ANY_BLOCK_ID before the mesh is prepared. "
4117  "Please call this method after the mesh is prepared.");
4118  const auto coord_type = coord_sys.size() == 0
4120  : Moose::stringToEnum<Moose::CoordinateSystemType>(coord_sys[0]);
4121  for (const auto sid : meshSubdomains())
4122  _coord_sys[sid] = coord_type;
4123  return;
4124  }
4125 
4126  // If multiple blocks are specified, but one of them is ANY_BLOCK_ID, let's emit a helpful error
4127  if (std::find(blocks.begin(), blocks.end(), "ANY_BLOCK_ID") != blocks.end())
4128  mooseError("You cannot specify ANY_BLOCK_ID together with other blocks in the "
4129  "setCoordSystem() method. If you want to set the same coordinate system for all "
4130  "blocks, use ANY_BLOCK_ID as the only block.");
4131 
4132  auto subdomains = meshSubdomains();
4133  // It's possible that a user has called this API before the mesh is prepared and consequently we
4134  // don't yet have the subdomains in meshSubdomains()
4135  for (const auto & sub_name : blocks)
4136  {
4137  const auto sub_id = getSubdomainID(sub_name);
4138  subdomains.insert(sub_id);
4139  }
4140 
4141  if (coord_sys.size() <= 1)
4142  {
4143  // We will specify the same coordinate system for all blocks
4144  const auto coord_type = coord_sys.size() == 0
4146  : Moose::stringToEnum<Moose::CoordinateSystemType>(coord_sys[0]);
4147  for (const auto sid : subdomains)
4148  _coord_sys[sid] = coord_type;
4149  }
4150  else
4151  {
4152  if (blocks.size() != coord_sys.size())
4153  mooseError("Number of blocks and coordinate systems does not match.");
4154 
4155  for (const auto i : index_range(blocks))
4156  {
4157  SubdomainID sid = getSubdomainID(blocks[i]);
4158  Moose::CoordinateSystemType coord_type =
4159  Moose::stringToEnum<Moose::CoordinateSystemType>(coord_sys[i]);
4160  _coord_sys[sid] = coord_type;
4161  }
4162 
4163  for (const auto & sid : subdomains)
4164  if (_coord_sys.find(sid) == _coord_sys.end())
4165  mooseError("Subdomain '" + Moose::stringify(sid) +
4166  "' does not have a coordinate system specified.");
4167  }
4168 
4169  _coord_system_set = true;
4170 
4172 }
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:1874
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
char ** blocks
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1858
unsigned int size() const
Return the number of active items in the MultiMooseEnum.
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition: MooseMesh.C:4285
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:1871
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.
CoordinateSystemType
Definition: MooseTypes.h:810
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Definition: MooseBase.h:295
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:195
auto index_range(const T &sizable)
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3171
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1731

◆ setCustomPartitioner()

void MooseMesh::setCustomPartitioner ( libMesh::Partitioner partitioner)

Setter for custom partitioner.

Definition at line 3699 of file MooseMesh.C.

3700 {
3701  _custom_partitioner = partitioner->clone();
3702 }
virtual std::unique_ptr< Partitioner > clone() const=0
std::unique_ptr< libMesh::Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:1440

◆ setGeneralAxisymmetricCoordAxes()

void MooseMesh::setGeneralAxisymmetricCoordAxes ( const std::vector< SubdomainName > &  blocks,
const std::vector< std::pair< Point, RealVectorValue >> &  axes 
)

Sets the general coordinate axes for axisymmetric blocks.

This method must be used if any of the following are true:

  • There are multiple axisymmetric coordinate systems
  • Any axisymmetric coordinate system axis/direction is not the +X or +Y axis
  • Any axisymmetric coordinate system does not start at (0,0,0)
Parameters
[in]blocksSubdomain names
[in]axesPair of values defining the axisymmetric coordinate axis for each subdomain. The first value is the point on the axis corresponding to the origin. The second value is the direction vector of the axis (normalization not necessary).

Definition at line 4221 of file MooseMesh.C.

Referenced by prepare().

4224 {
4225  // Set the axes for the given blocks
4226  mooseAssert(blocks.size() == axes.size(), "Blocks and axes vectors must be the same length.");
4227  for (const auto i : index_range(blocks))
4228  {
4229  const auto subdomain_id = getSubdomainID(blocks[i]);
4230  const auto it = _coord_sys.find(subdomain_id);
4231  if (it == _coord_sys.end())
4232  mooseError("The block '",
4233  blocks[i],
4234  "' has not set a coordinate system. Make sure to call setCoordSystem() before "
4235  "setGeneralAxisymmetricCoordAxes().");
4236  else
4237  {
4238  if (it->second == Moose::COORD_RZ)
4239  {
4240  const auto direction = axes[i].second;
4241  if (direction.is_zero())
4242  mooseError("Only nonzero vectors may be supplied for RZ directions.");
4243 
4244  _subdomain_id_to_rz_coord_axis[subdomain_id] =
4245  std::make_pair(axes[i].first, direction.unit());
4246  }
4247  else
4248  mooseError("The block '",
4249  blocks[i],
4250  "' was provided in setGeneralAxisymmetricCoordAxes(), but the coordinate system "
4251  "for this block is not 'RZ'.");
4252  }
4253  }
4254 
4255  // Make sure there are no RZ blocks that still do not have axes
4256  const auto all_subdomain_ids = meshSubdomains();
4257  for (const auto subdomain_id : all_subdomain_ids)
4258  if (getCoordSystem(subdomain_id) == Moose::COORD_RZ &&
4259  !_subdomain_id_to_rz_coord_axis.count(subdomain_id))
4260  mooseError("The block '",
4261  getSubdomainName(subdomain_id),
4262  "' was specified to use the 'RZ' coordinate system but was not given in "
4263  "setGeneralAxisymmetricCoordAxes().");
4264 
4266 }
char ** blocks
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1858
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1763
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition: MooseMesh.C:4285
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem() const
Get the map from subdomain ID to coordinate system type, e.g.
Definition: MooseMesh.C:4207
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
std::unordered_map< SubdomainID, std::pair< Point, RealVectorValue > > _subdomain_id_to_rz_coord_axis
Map of subdomain ID to general axisymmetric axis.
Definition: MooseMesh.h:1864
auto index_range(const T &sizable)
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3171
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1731

◆ setGhostedBoundaryInflation()

void MooseMesh::setGhostedBoundaryInflation ( const std::vector< Real > &  inflation)

This sets the inflation amount for the bounding box for each partition for use in ghosting boundaries.

Definition at line 3235 of file MooseMesh.C.

3236 {
3237  _ghosted_boundaries_inflation = inflation;
3238 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:1559

◆ setIsCustomPartitionerRequested()

void MooseMesh::setIsCustomPartitionerRequested ( bool  cpr)

Definition at line 3727 of file MooseMesh.C.

3728 {
3730 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:1441

◆ setMeshBase()

void MooseMesh::setMeshBase ( std::unique_ptr< MeshBase mesh_base)

Method to set the mesh_base object.

If this method is NOT called prior to calling init(), a MeshBase object will be automatically constructed and set.

Definition at line 2868 of file MooseMesh.C.

2869 {
2870  _mesh = std::move(mesh_base);
2871  _mesh->allow_remote_element_removal(_allow_remote_element_removal);
2872 }
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1828
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ setMeshBoundaryIDs()

void MooseMesh::setMeshBoundaryIDs ( std::set< BoundaryID boundary_IDs)

Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.

Definition at line 3195 of file MooseMesh.C.

3196 {
3197  _mesh_boundary_ids = boundary_IDs;
3198 }
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:1524

◆ setParallelType()

void MooseMesh::setParallelType ( ParallelType  parallel_type)
inline

Allow to change parallel type.

Definition at line 2144 of file MooseMesh.h.

Referenced by buildTypedMesh().

2145 {
2146  _parallel_type = parallel_type;
2148 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1423
void determineUseDistributedMesh()
Determine whether to use a distributed mesh.
Definition: MooseMesh.C:2828

◆ setPartitioner()

void MooseMesh::setPartitioner ( MeshBase mesh_base,
MooseEnum partitioner,
bool  use_distributed_mesh,
const InputParameters params,
MooseObject context_obj 
)
static

Method for setting the partitioner on the passed in mesh_base object.

Definition at line 3640 of file MooseMesh.C.

Referenced by setPartitionerHelper().

3645 {
3646  // Set the partitioner based on partitioner name
3647  switch (partitioner)
3648  {
3649  case -3: // default
3650  // We'll use the default partitioner, but notify the user of which one is being used...
3651  if (use_distributed_mesh)
3652  partitioner = "parmetis";
3653  else
3654  partitioner = "metis";
3655  break;
3656 
3657  // No need to explicitily create the metis or parmetis partitioners,
3658  // They are the default for serial and parallel mesh respectively
3659  case -2: // metis
3660  case -1: // parmetis
3661  break;
3662 
3663  case 0: // linear
3664  mesh_base.partitioner().reset(new libMesh::LinearPartitioner);
3665  break;
3666  case 1: // centroid
3667  {
3668  if (!params.isParamValid("centroid_partitioner_direction"))
3669  context_obj.paramError(
3670  "centroid_partitioner_direction",
3671  "If using the centroid partitioner you _must_ specify centroid_partitioner_direction!");
3672 
3673  MooseEnum direction = params.get<MooseEnum>("centroid_partitioner_direction");
3674 
3675  if (direction == "x")
3676  mesh_base.partitioner().reset(
3678  else if (direction == "y")
3679  mesh_base.partitioner().reset(
3681  else if (direction == "z")
3682  mesh_base.partitioner().reset(
3684  else if (direction == "radial")
3685  mesh_base.partitioner().reset(
3687  break;
3688  }
3689  case 2: // hilbert_sfc
3690  mesh_base.partitioner().reset(new libMesh::HilbertSFCPartitioner);
3691  break;
3692  case 3: // morton_sfc
3693  mesh_base.partitioner().reset(new libMesh::MortonSFCPartitioner);
3694  break;
3695  }
3696 }
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition: MooseBase.h:435
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
virtual std::unique_ptr< Partitioner > & partitioner()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ setPartitionerHelper()

void MooseMesh::setPartitionerHelper ( MeshBase mesh = nullptr)
protected

Definition at line 3628 of file MooseMesh.C.

Referenced by buildTypedMesh().

3629 {
3630  if (_use_distributed_mesh && (_partitioner_name != "default" && _partitioner_name != "parmetis"))
3631  {
3632  _partitioner_name = "parmetis";
3633  _partitioner_overridden = true;
3634  }
3635 
3637 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
static void setPartitioner(MeshBase &mesh_base, MooseEnum &partitioner, bool use_distributed_mesh, const InputParameters &params, MooseObject &context_obj)
Method for setting the partitioner on the passed in mesh_base object.
Definition: MooseMesh.C:3640
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:1436
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1428
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
bool _partitioner_overridden
Definition: MooseMesh.h:1437

◆ setPatchUpdateStrategy()

void MooseMesh::setPatchUpdateStrategy ( Moose::PatchUpdateType  patch_update_strategy)

Set the patch size update strategy.

Definition at line 3407 of file MooseMesh.C.

3408 {
3409  _patch_update_strategy = patch_update_strategy;
3410 }
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:1571

◆ setSubdomainName() [1/2]

void MooseMesh::setSubdomainName ( SubdomainID  subdomain_id,
const SubdomainName &  name 
)

This method sets the name for subdomain_id to name.

Definition at line 1749 of file MooseMesh.C.

Referenced by MooseMesh(), and prepare().

1750 {
1751  mooseAssert(name != "ANY_BLOCK_ID", "Cannot set subdomain name to 'ANY_BLOCK_ID'");
1752  getMesh().subdomain_name(subdomain_id) = name;
1753 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
std::string & subdomain_name(subdomain_id_type id)

◆ setSubdomainName() [2/2]

static void MooseMesh::setSubdomainName ( MeshBase &  mesh,
SubdomainID  subdomain_id,
const SubdomainName &  name 
)
static

This method sets the name for subdomain_id on the provided mesh to name.

◆ setUniformRefineLevel()

void MooseMesh::setUniformRefineLevel ( unsigned int  level,
bool  deletion = true 
)

Set uniform refinement level.

Definition at line 3222 of file MooseMesh.C.

3223 {
3224  _uniform_refine_level = level;
3226 }
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1457
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition: MooseMesh.h:1463

◆ setupFiniteVolumeMeshData()

void MooseMesh::setupFiniteVolumeMeshData ( ) const

Sets up the additional data needed for finite volume computations.

This involves building FaceInfo and ElemInfo objects, caching variable associations and elemental DoF indices for FV variables.

Definition at line 4072 of file MooseMesh.C.

Referenced by DisplacedProblem::init(), FEProblemBase::init(), FEProblemBase::meshChanged(), and DisplacedProblem::updateMesh().

4073 {
4078 }
void cacheFVElementalDoFs() const
Cache the DoF indices for FV variables on each element.
Definition: MooseMesh.C:4019
void cacheFaceInfoVariableOwnership() const
Cache if variables live on the elements connected by the FaceInfo objects.
Definition: MooseMesh.C:3941
void buildFiniteVolumeInfo() const
Builds the face and elem info vectors that store meta-data needed for looping over and doing calculat...
Definition: MooseMesh.C:3739
void computeFiniteVolumeCoords() const
Compute the face coordinate value for all FaceInfo and ElemInfo objects.
Definition: MooseMesh.C:3877

◆ sideWithBoundaryID()

unsigned int MooseMesh::sideWithBoundaryID ( const Elem *const  elem,
const BoundaryID  boundary_id 
) const

Calls BoundaryInfo::side_with_boundary_id().

Definition at line 3021 of file MooseMesh.C.

3022 {
3023  return getMesh().get_boundary_info().side_with_boundary_id(elem, boundary_id);
3024 }
unsigned int side_with_boundary_id(const Elem *const elem, const boundary_id_type boundary_id) const
const BoundaryInfo & get_boundary_info() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099

◆ skipDeletionRepartitionAfterRefine()

bool MooseMesh::skipDeletionRepartitionAfterRefine ( ) const
inline

Return a flag indicating whether or not we should skip remote deletion and repartition after uniform refinements.

If the flag is true, uniform refinements will run more efficiently, but at the same time, there might be extra ghosting elements. The number of layers of additional ghosting elements depends on the number of uniform refinement levels. This flag should be used only when you have a "fine enough" coarse mesh and want to refine the mesh by a few levels. Otherwise, it might introduce an unbalanced workload and too large ghosting domain.

Definition at line 2138 of file MooseMesh.h.

2139 {
2141 }
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition: MooseMesh.h:1463

◆ skipNoncriticalPartitioning()

bool MooseMesh::skipNoncriticalPartitioning ( ) const
virtual

Definition at line 4402 of file MooseMesh.C.

4403 {
4404  return _mesh->skip_noncritical_partitioning();
4405 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ skipPartitioning()

virtual bool MooseMesh::skipPartitioning ( ) const
inlinevirtual

Definition at line 329 of file MooseMesh.h.

329 { return _mesh->skip_partitioning(); }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ skipRefineWhenUseSplit()

bool MooseMesh::skipRefineWhenUseSplit ( ) const
inline

Whether or not skip uniform refinements when using a pre-split mesh.

Definition at line 585 of file MooseMesh.h.

585 { return _skip_refine_when_use_split; }
bool _skip_refine_when_use_split
Whether or not to skip uniform refinements when using a pre-split mesh.
Definition: MooseMesh.h:1460

◆ spatialDimension()

virtual unsigned int MooseMesh::spatialDimension ( ) const
inlinevirtual

Returns MeshBase::spatial_dimension.

Reimplemented in MFEMMesh.

Definition at line 182 of file MooseMesh.h.

182 { return _mesh->spatial_dimension(); }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1433

◆ timedSectionName()

std::string PerfGraphInterface::timedSectionName ( const std::string &  section_name) const
protectedinherited
Returns
The name of the timed section with the name section_name.

Optionally adds a prefix if one is defined.

Definition at line 47 of file PerfGraphInterface.C.

Referenced by PerfGraphInterface::registerTimedSection().

48 {
49  return _prefix.empty() ? "" : (_prefix + "::") + section_name;
50 }
const std::string _prefix
A prefix to use for all sections.

◆ type()

const std::string& MooseBase::type ( ) const
inlineinherited

Get the type of this class.

Returns
the name of the type of this class

Definition at line 89 of file MooseBase.h.

Referenced by CreateProblemDefaultAction::act(), SetupDebugAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addConvergence(), FEProblemBase::addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addMeshDivision(), MooseApp::addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addObject(), MFEMProblem::addPostprocessor(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addTimeIntegrator(), MooseServer::addValuesToList(), DisplacedProblem::addVectorTag(), SubProblem::addVectorTag(), FEProblemBase::advanceMultiApps(), MooseApp::appendMeshGenerator(), AuxKernelTempl< Real >::AuxKernelTempl(), FEProblemBase::backupMultiApps(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BoundaryPreservedMarker::BoundaryPreservedMarker(), DistributedRectilinearMeshGenerator::buildCube(), buildHRefinementAndCoarseningMaps(), buildLowerDMesh(), buildPRefinementAndCoarseningMaps(), PhysicsBase::checkComponentType(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), ADDGKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighJacobian(), ADDGKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), ElemElemConstraint::computeElemNeighResidual(), ArrayDGKernel::computeElemNeighResidual(), LowerDIntegratedBC::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), DGLowerDKernel::computeLowerDJacobian(), ArrayDGLowerDKernel::computeLowerDJacobian(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpJacobian(), ArrayHFEMDiffusion::computeLowerDQpJacobian(), HFEMDirichletBC::computeLowerDQpJacobian(), HFEMDiffusion::computeLowerDQpJacobian(), ArrayHFEMDirichletBC::computeLowerDQpOffDiagJacobian(), HFEMDirichletBC::computeLowerDQpOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDQpOffDiagJacobian(), ArrayDGLowerDKernel::computeLowerDQpOffDiagJacobian(), FEProblemBase::computeMultiAppsDT(), ADDGKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), DGConvection::computeQpJacobian(), ScalarKernel::computeQpJacobian(), InterfaceDiffusion::computeQpJacobian(), InterfaceReaction::computeQpJacobian(), ArrayDGDiffusion::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGDiffusion::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), ArrayHFEMDiffusion::computeQpResidual(), DGConvection::computeQpResidual(), HFEMDiffusion::computeQpResidual(), ScalarKernel::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), ADMatInterfaceReaction::computeQpResidual(), InterfaceReaction::computeQpResidual(), ADDGAdvection::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), DGDiffusion::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), ADDGDiffusion::computeQpResidual(), HFEMTestJump::computeQpResidual(), HFEMTrialJump::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), FEProblemBase::computeSystems(), FEProblemBase::computeUserObjectByName(), FEProblemBase::computeUserObjects(), FEProblemBase::computeUserObjectsInternal(), DisplacedProblem::createQRules(), FEProblemBase::createQRules(), MooseApp::createRecoverablePerfGraph(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), FEProblemBase::execTransfers(), WebServerControl::execute(), SteadyBase::execute(), ActionWarehouse::executeActionsWithAction(), FEProblemBase::finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), MooseServer::gatherDocumentReferencesLocations(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), MooseServer::getInputLookupDefinitionNodes(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), FEProblemBase::getTransfers(), DisplacedProblem::getVectorTags(), SubProblem::getVectorTags(), CommonOutputAction::hasConsole(), FEProblemBase::hasMultiApps(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), MultiAppConservativeTransfer::initialSetup(), LinearFVAdvection::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), LinearFVDiffusion::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), FEProblemBase::logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MFEMProblem::mesh(), MooseObject::MooseObject(), MultiAppMFEMCopyTransfer::MultiAppMFEMCopyTransfer(), DisplacedProblem::numVectorTags(), SubProblem::numVectorTags(), Console::output(), AdvancedOutput::output(), ConsoleUtils::outputExecutionInformation(), SampledOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), MooseServer::parseDocumentForDiagnostics(), prepare(), ProjectedStatefulMaterialStorageAction::processProperty(), MooseApp::recursivelyCreateExecutors(), SolutionInvalidInterface::registerInvalidSolutionInternal(), FEProblemBase::restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), FEProblemBase::setCoupling(), MooseApp::setupOptions(), ExplicitTVDRK2::solve(), ExplicitRK2::solve(), WebServerControl::startServer(), Reporter::store(), MooseBase::typeAndName(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

90  {
91  mooseAssert(_type.size(), "Empty type");
92  return _type;
93  }
const std::string & _type
The type of this class.
Definition: MooseBase.h:356

◆ typeAndName()

std::string MooseBase::typeAndName ( ) const
inherited

Get the class's combined type and name; useful in error handling.

Returns
The type and name of this class in the form '<type()> "<name()>"'.

Definition at line 54 of file MooseBase.C.

Referenced by FEProblemBase::addPostprocessor(), MaterialPropertyStorage::addProperty(), FEProblemBase::addReporter(), FEProblemBase::addVectorPostprocessor(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< std::vector< T > >::finalize(), and ReporterData::getReporterInfo().

55 {
56  return type() + std::string(" \"") + name() + std::string("\"");
57 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:89

◆ uniformRefineLevel()

unsigned int MooseMesh::uniformRefineLevel ( ) const

Returns the level of uniform refinement requested (zero if AMR is disabled).

Definition at line 3216 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup(), and Adaptivity::uniformRefineWithProjection().

3217 {
3218  return _uniform_refine_level;
3219 }
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1457

◆ uniqueName()

MooseObjectName MooseBase::uniqueName ( ) const
inherited
Returns
The unique name for accessing input parameters of this object in the InputParameterWarehouse

Definition at line 66 of file MooseBase.C.

Referenced by MooseBase::connectControllableParams(), and Action::uniqueActionName().

67 {
68  if (!_pars.have_parameter<std::string>(unique_name_param))
69  mooseError("uniqueName(): Object does not have a unique name");
70  return MooseObjectName(_pars.get<std::string>(unique_name_param));
71 }
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:362
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
static const std::string unique_name_param
The name of the parameter that contains the unique object name.
Definition: MooseBase.h:57
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition: MooseBase.h:267
A class for storing the names of MooseObject by tag and object name.

◆ uniqueParameterName()

MooseObjectParameterName MooseBase::uniqueParameterName ( const std::string &  parameter_name) const
inherited
Returns
The unique parameter name of a valid parameter of this object for accessing parameter controls

Definition at line 60 of file MooseBase.C.

61 {
62  return MooseObjectParameterName(getBase(), name(), parameter_name);
63 }
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:99
A class for storing an input parameter name.
const std::string & getBase() const
Definition: MooseBase.h:143

◆ update()

void MooseMesh::update ( )

Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().

Definition at line 619 of file MooseMesh.C.

Referenced by meshChanged(), prepare(), and EqualValueBoundaryConstraint::updateConstrainedNodes().

620 {
621  TIME_SECTION("update", 3, "Updating Mesh", true);
622 
623  // Rebuild the boundary conditions
625 
626  // Update the node to elem map
627  _node_to_elem_map.clear();
628  _node_to_elem_map_built = false;
631 
632  buildNodeList();
634  cacheInfo();
635  buildElemIDInfo();
636 
637  // this will make moose mesh aware of p-refinement added by mesh generators including
638  // a file mesh generator loading a restart checkpoint file
639  _max_p_level = 0;
640  _max_h_level = 0;
641  for (const auto & elem : getMesh().active_local_element_ptr_range())
642  {
643  if (elem->p_level() > _max_p_level)
645  if (elem->level() > _max_h_level)
646  _max_h_level = elem->level();
647  }
648  comm().max(_max_p_level);
649  comm().max(_max_h_level);
650 
651  // the flag might have been set by calling doingPRefinement(true)
653 
655 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:1506
void buildElemIDInfo()
Build extra data for faster access to the information of extra element integers.
Definition: MooseMesh.C:1059
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1615
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
A map of all of the current nodes to the elements that they are connected to.
Definition: MooseMesh.h:1505
bool _doing_p_refinement
Whether we have p-refinement (as opposed to h-refinement)
Definition: MooseMesh.h:1877
const Parallel::Communicator & comm() const
unsigned int p_level() const
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:1510
void cacheInfo()
Definition: MooseMesh.C:1407
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:2983
unsigned int _max_h_level
Maximum h-refinement level of all elements.
Definition: MooseMesh.h:1881
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
unsigned int level() const
void max(const T &r, T &o, Request &req) const
void buildBndElemList()
Definition: MooseMesh.C:1155
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
void buildNodeList()
Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in t...
Definition: MooseMesh.C:1025
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
A map of all of the current nodes to the active elements that they are connected to.
Definition: MooseMesh.h:1509
unsigned int _max_p_level
Maximum p-refinement level of all elements.
Definition: MooseMesh.h:1879

◆ updateActiveSemiLocalNodeRange()

void MooseMesh::updateActiveSemiLocalNodeRange ( std::set< dof_id_type > &  ghosted_elems)

Clears the "semi-local" node list and rebuilds it.

Semi-local nodes consist of all nodes that belong to local and ghost elements.

Definition at line 951 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup(), FEProblemBase::meshChanged(), and FEProblemBase::possiblyRebuildGeomSearchPatches().

952 {
953  TIME_SECTION("updateActiveSemiLocalNodeRange", 5, "Updating ActiveSemiLocalNode Range");
954 
955  _semilocal_node_list.clear();
956 
957  // First add the nodes connected to local elems
958  ConstElemRange * active_local_elems = getActiveLocalElementRange();
959  for (const auto & elem : *active_local_elems)
960  {
961  for (unsigned int n = 0; n < elem->n_nodes(); ++n)
962  {
963  // Since elem is const here but we require a non-const Node * to
964  // store in the _semilocal_node_list (otherwise things like
965  // UpdateDisplacedMeshThread don't work), we are using a
966  // const_cast. A more long-term fix would be to have
967  // getActiveLocalElementRange return a non-const ElemRange.
968  Node * node = const_cast<Node *>(elem->node_ptr(n));
969 
970  _semilocal_node_list.insert(node);
971  }
972  }
973 
974  // Now add the nodes connected to ghosted_elems
975  for (const auto & ghost_elem_id : ghosted_elems)
976  {
977  Elem * elem = getMesh().elem_ptr(ghost_elem_id);
978  for (unsigned int n = 0; n < elem->n_nodes(); n++)
979  {
980  Node * node = elem->node_ptr(n);
981 
982  _semilocal_node_list.insert(node);
983  }
984  }
985 
986  // Now create the actual range
987  _active_semilocal_node_range = std::make_unique<SemiLocalNodeRange>(_semilocal_node_list.begin(),
988  _semilocal_node_list.end());
989 }
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:1488
libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1238
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3448
virtual unsigned int n_nodes() const=0
virtual const Elem * elem_ptr(const dof_id_type i) const=0
const Node * node_ptr(const unsigned int i) const
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:820
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:3099
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:1496

◆ updateCoordTransform()

void MooseMesh::updateCoordTransform ( )
private

Update the coordinate transformation object based on our coordinate system data.

The coordinate transformation will be created if it hasn't been already

Definition at line 4285 of file MooseMesh.C.

Referenced by MooseMesh(), setAxisymmetricCoordAxis(), setCoordSystem(), and setGeneralAxisymmetricCoordAxes().

4286 {
4287  if (!_coord_transform)
4288  _coord_transform = std::make_unique<MooseAppCoordTransform>(*this);
4289  else
4290  _coord_transform->setCoordinateSystem(*this);
4291 }
std::unique_ptr< MooseAppCoordTransform > _coord_transform
A coordinate transformation object that describes how to transform this problem&#39;s coordinate system i...
Definition: MooseMesh.h:1868

◆ usingGeneralAxisymmetricCoordAxes()

bool MooseMesh::usingGeneralAxisymmetricCoordAxes ( ) const

Returns true if general axisymmetric coordinate axes are being used.

Definition at line 4279 of file MooseMesh.C.

Referenced by getAxisymmetricRadialCoord(), and getUniqueCoordSystem().

4280 {
4281  return _subdomain_id_to_rz_coord_axis.size() > 0;
4282 }
std::unordered_map< SubdomainID, std::pair< Point, RealVectorValue > > _subdomain_id_to_rz_coord_axis
Map of subdomain ID to general axisymmetric axis.
Definition: MooseMesh.h:1864

◆ validParams()

InputParameters MooseMesh::validParams ( )
static

Typical "Moose-style" constructor and copy constructor.

Definition at line 84 of file MooseMesh.C.

Referenced by FileMesh::validParams(), TiledMesh::validParams(), SpiralAnnularMesh::validParams(), GeneratedMesh::validParams(), RinglebMesh::validParams(), AnnularMesh::validParams(), ConcentricCircleMesh::validParams(), MeshGeneratorMesh::validParams(), StitchedMesh::validParams(), and PatternedMesh::validParams().

85 {
87 
88  MooseEnum parallel_type("DEFAULT REPLICATED DISTRIBUTED", "DEFAULT");
89  params.addParam<MooseEnum>("parallel_type",
90  parallel_type,
91  "DEFAULT: Use libMesh::ReplicatedMesh unless --distributed-mesh is "
92  "specified on the command line "
93  "REPLICATED: Always use libMesh::ReplicatedMesh "
94  "DISTRIBUTED: Always use libMesh::DistributedMesh");
95 
96  params.addParam<bool>(
97  "allow_renumbering",
98  true,
99  "If allow_renumbering=false, node and element numbers are kept fixed until deletion");
100 
101  // TODO: this parameter does not belong here, it's only for FileMesh
102  params.addParam<bool>("nemesis",
103  false,
104  "If nemesis=true and file=foo.e, actually reads "
105  "foo.e.N.0, foo.e.N.1, ... foo.e.N.N-1, "
106  "where N = # CPUs, with NemesisIO.");
107 
108  params.addParam<MooseEnum>(
109  "partitioner",
110  partitioning(),
111  "Specifies a mesh partitioner to use when splitting the mesh for a parallel computation.");
112  MooseEnum direction("x y z radial");
113  params.addParam<MooseEnum>("centroid_partitioner_direction",
114  direction,
115  "Specifies the sort direction if using the centroid partitioner. "
116  "Available options: x, y, z, radial");
117 
118  MooseEnum patch_update_strategy("never always auto iteration", "never");
119  params.addParam<MooseEnum>(
120  "patch_update_strategy",
121  patch_update_strategy,
122  "How often to update the geometric search 'patch'. The default is to "
123  "never update it (which is the most efficient but could be a problem "
124  "with lots of relative motion). 'always' will update the patch for all "
125  "secondary nodes at the beginning of every timestep which might be time "
126  "consuming. 'auto' will attempt to determine at the start of which "
127  "timesteps the patch for all secondary nodes needs to be updated automatically."
128  "'iteration' updates the patch at every nonlinear iteration for a "
129  "subset of secondary nodes for which penetration is not detected. If there "
130  "can be substantial relative motion between the primary and secondary surfaces "
131  "during the nonlinear iterations within a timestep, it is advisable to use "
132  "'iteration' option to ensure accurate contact detection.");
133 
134  // Note: This parameter is named to match 'construct_side_list_from_node_list' in SetupMeshAction
135  params.addParam<bool>(
136  "construct_node_list_from_side_list",
137  true,
138  "Whether or not to generate nodesets from the sidesets (usually a good idea).");
139  params.addParam<unsigned int>(
140  "patch_size", 40, "The number of nodes to consider in the NearestNode neighborhood.");
141  params.addParam<unsigned int>("ghosting_patch_size",
142  "The number of nearest neighbors considered "
143  "for ghosting purposes when 'iteration' "
144  "patch update strategy is used. Default is "
145  "5 * patch_size.");
146  params.addParam<unsigned int>("max_leaf_size",
147  10,
148  "The maximum number of points in each leaf of the KDTree used in "
149  "the nearest neighbor search. As the leaf size becomes larger,"
150  "KDTree construction becomes faster but the nearest neighbor search"
151  "becomes slower.");
152 
153  params.addParam<bool>("build_all_side_lowerd_mesh",
154  false,
155  "True to build the lower-dimensional mesh for all sides.");
156 
157  params.addParam<bool>("skip_refine_when_use_split",
158  true,
159  "True to skip uniform refinements when using a pre-split mesh.");
160 
161  params.addParam<std::vector<SubdomainID>>(
162  "add_subdomain_ids",
163  "The listed subdomain ids will be assumed valid for the mesh. This permits setting up "
164  "subdomain restrictions for subdomains initially containing no elements, which can occur, "
165  "for example, in additive manufacturing simulations which dynamically add and remove "
166  "elements. Names for this subdomains may be provided using add_subdomain_names. In this case "
167  "this list and add_subdomain_names must contain the same number of items.");
168  params.addParam<std::vector<SubdomainName>>(
169  "add_subdomain_names",
170  "The listed subdomain names will be assumed valid for the mesh. This permits setting up "
171  "subdomain restrictions for subdomains initially containing no elements, which can occur, "
172  "for example, in additive manufacturing simulations which dynamically add and remove "
173  "elements. IDs for this subdomains may be provided using add_subdomain_ids. Otherwise IDs "
174  "are automatically assigned. In case add_subdomain_ids is set too, both lists must contain "
175  "the same number of items.");
176 
177  params.addParam<std::vector<BoundaryID>>(
178  "add_sideset_ids",
179  "The listed sideset ids will be assumed valid for the mesh. This permits setting up boundary "
180  "restrictions for sidesets initially containing no sides. Names for this sidesets may be "
181  "provided using add_sideset_names. In this case this list and add_sideset_names must contain "
182  "the same number of items.");
183  params.addParam<std::vector<BoundaryName>>(
184  "add_sideset_names",
185  "The listed sideset names will be assumed valid for the mesh. This permits setting up "
186  "boundary restrictions for sidesets initially containing no sides. Ids for this sidesets may "
187  "be provided using add_sideset_ids. In this case this list and add_sideset_ids must contain "
188  "the same number of items.");
189 
190  params.addParam<std::vector<BoundaryID>>(
191  "add_nodeset_ids",
192  "The listed nodeset ids will be assumed valid for the mesh. This permits setting up boundary "
193  "restrictions for node initially containing no sides. Names for this nodesets may be "
194  "provided using add_nodeset_names. In this case this list and add_nodeset_names must contain "
195  "the same number of items.");
196  params.addParam<std::vector<BoundaryName>>(
197  "add_nodeset_names",
198  "The listed nodeset names will be assumed valid for the mesh. This permits setting up "
199  "boundary restrictions for nodesets initially containing no sides. Ids for this nodesets may "
200  "be provided using add_nodesets_ids. In this case this list and add_nodesets_ids must "
201  "contain the same number of items.");
202 
204 
205  // This indicates that the derived mesh type accepts a MeshGenerator, and should be set to true in
206  // derived types that do so.
207  params.addPrivateParam<bool>("_mesh_generator_mesh", false);
208 
209  // Whether or not the mesh is pre split
210  params.addPrivateParam<bool>("_is_split", false);
211 
212  params.registerBase("MooseMesh");
213 
214  // groups
215  params.addParamNamesToGroup("patch_update_strategy patch_size max_leaf_size", "Geometric search");
216  params.addParamNamesToGroup("nemesis", "Advanced");
217  params.addParamNamesToGroup("add_subdomain_ids add_subdomain_names add_sideset_ids "
218  "add_sideset_names add_nodeset_ids add_nodeset_names",
219  "Pre-declaration of future mesh sub-entities");
220  params.addParamNamesToGroup("construct_node_list_from_side_list build_all_side_lowerd_mesh",
221  "Automatic definition of mesh element sides entities");
222  params.addParamNamesToGroup("partitioner centroid_partitioner_direction", "Partitioning");
223 
224  return params;
225 }
static InputParameters validParams()
Describes the parameters this object can take to setup transformations.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
static MooseEnum partitioning()
returns MooseMesh partitioning options so other classes can use it
Definition: MooseMesh.C:3898
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
static InputParameters validParams()
Definition: MooseObject.C:25

Member Data Documentation

◆ _action_factory

ActionFactory& ParallelParamObject::_action_factory
protectedinherited

◆ _active_local_elem_range

std::unique_ptr<libMesh::ConstElemRange> MooseMesh::_active_local_elem_range
protected

A range for use with threading.

We do this so that it doesn't have to get rebuilt all the time (which takes time).

Definition at line 1494 of file MooseMesh.h.

Referenced by getActiveLocalElementRange(), and meshChanged().

◆ _active_node_range

std::unique_ptr<libMesh::NodeRange> MooseMesh::_active_node_range
protected

Definition at line 1497 of file MooseMesh.h.

Referenced by getActiveNodeRange(), and meshChanged().

◆ _active_semilocal_node_range

std::unique_ptr<SemiLocalNodeRange> MooseMesh::_active_semilocal_node_range
protected

◆ _all_face_info

std::vector<FaceInfo> MooseMesh::_all_face_info
mutableprivate

FaceInfo object storing information for face based loops.

This container holds all the FaceInfo objects accessible from this process

Definition at line 1604 of file MooseMesh.h.

Referenced by allFaceInfo(), buildFiniteVolumeInfo(), cacheFaceInfoVariableOwnership(), and computeFiniteVolumeCoords().

◆ _allow_recovery

bool MooseMesh::_allow_recovery
private

Whether or not this Mesh is allowed to read a recovery file.

Definition at line 1819 of file MooseMesh.h.

Referenced by allowRecovery(), and init().

◆ _allow_remote_element_removal

bool MooseMesh::_allow_remote_element_removal
private

Whether to allow removal of remote elements.

Definition at line 1828 of file MooseMesh.h.

Referenced by allowRemoteElementRemoval(), buildTypedMesh(), deleteRemoteElements(), and setMeshBase().

◆ _app

MooseApp& MooseBase::_app
protectedinherited

The MOOSE application this is associated with.

Definition at line 353 of file MooseBase.h.

◆ _block_id_mapping

std::vector<std::unordered_map<SubdomainID, std::set<dof_id_type> > > MooseMesh::_block_id_mapping
private

Unique element integer IDs for each subdomain and each extra element integers.

Definition at line 1840 of file MooseMesh.h.

Referenced by buildElemIDInfo(), getAllElemIDs(), and getElemIDsOnBlocks().

◆ _block_node_list

std::map<dof_id_type, std::set<SubdomainID> > MooseMesh::_block_node_list
protected

list of nodes that belongs to a specified block (domain)

Definition at line 1553 of file MooseMesh.h.

Referenced by cacheInfo(), and getNodeBlockIds().

◆ _bnd_elem_ids

std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type> > MooseMesh::_bnd_elem_ids
protected

Map of set of elem IDs connected to each boundary.

Definition at line 1545 of file MooseMesh.h.

Referenced by buildBndElemList(), freeBndElems(), getBoundariesToActiveSemiLocalElemIds(), getBoundaryActiveSemiLocalElemIds(), and isBoundaryElem().

◆ _bnd_elem_range

std::unique_ptr<libMesh::StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *> > MooseMesh::_bnd_elem_range
protected

◆ _bnd_elems

std::vector<BndElement *> MooseMesh::_bnd_elems
protected

array of boundary elems

Definition at line 1540 of file MooseMesh.h.

Referenced by bndElemsBegin(), bndElemsEnd(), buildBndElemList(), freeBndElems(), and getBoundaryActiveNeighborElemIds().

◆ _bnd_node_ids

std::map<boundary_id_type, std::set<dof_id_type> > MooseMesh::_bnd_node_ids
protected

Map of sets of node IDs in each boundary.

Definition at line 1537 of file MooseMesh.h.

Referenced by addQuadratureNode(), buildNodeList(), freeBndNodes(), and isBoundaryNode().

◆ _bnd_node_range

std::unique_ptr<libMesh::StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *> > MooseMesh::_bnd_node_range
protected

Definition at line 1500 of file MooseMesh.h.

Referenced by addQuadratureNode(), freeBndNodes(), getBoundaryNodeRange(), and meshChanged().

◆ _bnd_nodes

std::vector<BndNode *> MooseMesh::_bnd_nodes
protected

array of boundary nodes

Definition at line 1533 of file MooseMesh.h.

Referenced by addQuadratureNode(), bndNodesBegin(), bndNodesEnd(), buildNodeList(), and freeBndNodes().

◆ _boundary_to_normal_map

std::unique_ptr<std::map<BoundaryID, RealVectorValue> > MooseMesh::_boundary_to_normal_map
protected

The boundary to normal map - valid only when AddAllSideSetsByNormals is active.

Definition at line 1530 of file MooseMesh.h.

Referenced by getNormalByBoundaryID(), and setBoundaryToNormalMap().

◆ _bounds

std::vector<std::vector<Real> > MooseMesh::_bounds
protected

The bounds in each dimension of the mesh for regular orthogonal meshes.

Definition at line 1580 of file MooseMesh.h.

Referenced by detectOrthogonalDimRanges(), getMaxInDimension(), getMinInDimension(), and MooseMesh().

◆ _built_from_other_mesh

bool MooseMesh::_built_from_other_mesh = false
protected

Whether or not this mesh was built from another mesh.

Definition at line 1419 of file MooseMesh.h.

Referenced by prepare().

◆ _coarsened_element_children

std::map<const Elem *, std::vector<const Elem *> > MooseMesh::_coarsened_element_children
protected

Map of Parent elements to child elements for elements that were just coarsened.

NOTE: the child element pointers ARE PROBABLY INVALID. Only use them for indexing!

Definition at line 1485 of file MooseMesh.h.

Referenced by cacheChangedLists(), and coarsenedElementChildren().

◆ _coarsened_elements

std::unique_ptr<ConstElemPointerRange> MooseMesh::_coarsened_elements
protected

The elements that were just coarsened.

Definition at line 1478 of file MooseMesh.h.

Referenced by cacheChangedLists(), and coarsenedElementRange().

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), MeshOnlyAction::act(), SetupDebugAction::act(), MaterialOutputAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), DefaultSteadyStateConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkRelativeConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), LinearSystem::computeLinearSystemTags(), FEProblemBase::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MFEMSteady::execute(), MessageFromInput::execute(), SteadyBase::execute(), Eigenvalue::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), ElementQualityChecker::finalize(), SidesetAroundSubdomainUpdater::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), CoarsenBlockGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), DefaultMultiAppFixedPointConvergence::initialize(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseBase::mooseDeprecated(), MooseBase::mooseInfo(), MooseBase::mooseWarning(), MooseBase::mooseWarningNonPrefixed(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), ReporterDebugOutput::output(), PerfGraphOutput::output(), SolutionInvalidityOutput::output(), MaterialPropertyDebugOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), PicardSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), FEProblemBase::restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), EigenProblem::solve(), FEProblemSolve::solve(), NonlinearSystem::solve(), FixedPointSolve::solve(), LinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), LStableDirk4::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), FixedPointSolve::solveStep(), PerfGraphLivePrint::start(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), MFEMTransient::takeStep(), TransientBase::takeStep(), TerminateChainControl::terminate(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _construct_node_list_from_side_list

bool MooseMesh::_construct_node_list_from_side_list
private

Whether or not to allow generation of nodesets from sidesets.

Definition at line 1822 of file MooseMesh.h.

Referenced by buildNodeListFromSideList(), and getConstructNodeListFromSideList().

◆ _coord_sys

std::map<SubdomainID, Moose::CoordinateSystemType>& MooseMesh::_coord_sys
private

Type of coordinate system per subdomain.

Definition at line 1858 of file MooseMesh.h.

Referenced by checkCoordinateSystems(), getCoordSystem(), getUniqueCoordSystem(), setCoordData(), setCoordSystem(), and setGeneralAxisymmetricCoordAxes().

◆ _coord_system_set

bool MooseMesh::_coord_system_set
private

Whether the coordinate system has been set.

Definition at line 1871 of file MooseMesh.h.

Referenced by prepare(), and setCoordSystem().

◆ _coord_transform

std::unique_ptr<MooseAppCoordTransform> MooseMesh::_coord_transform
private

A coordinate transformation object that describes how to transform this problem's coordinate system into the canonical/reference coordinate system.

Definition at line 1868 of file MooseMesh.h.

Referenced by coordTransform(), lengthUnit(), and updateCoordTransform().

◆ _custom_partitioner

std::unique_ptr<libMesh::Partitioner> MooseMesh::_custom_partitioner
protected

The custom partitioner.

Definition at line 1440 of file MooseMesh.h.

Referenced by buildTypedMesh(), and setCustomPartitioner().

◆ _custom_partitioner_requested

bool MooseMesh::_custom_partitioner_requested
protected

◆ _distribution_overridden

bool MooseMesh::_distribution_overridden
protected

Definition at line 1429 of file MooseMesh.h.

◆ _doing_p_refinement

bool MooseMesh::_doing_p_refinement
private

Whether we have p-refinement (as opposed to h-refinement)

Definition at line 1877 of file MooseMesh.h.

Referenced by doingPRefinement(), and update().

◆ _elem_info

std::vector<const ElemInfo *> MooseMesh::_elem_info
mutableprivate

Holds only those ElemInfo objects that have processor_id equal to this process's id, e.g.

the local ElemInfo objects

Definition at line 1600 of file MooseMesh.h.

Referenced by buildFiniteVolumeInfo(), elemInfoVector(), ownedElemInfoBegin(), and ownedElemInfoEnd().

◆ _elem_side_to_face_info

std::unordered_map<std::pair<const Elem *, unsigned int>, FaceInfo *> MooseMesh::_elem_side_to_face_info
mutableprivate

Map from elem-side pair to FaceInfo.

Definition at line 1612 of file MooseMesh.h.

Referenced by buildFiniteVolumeInfo().

◆ _elem_to_elem_info

std::unordered_map<dof_id_type, ElemInfo> MooseMesh::_elem_to_elem_info
mutableprivate

Map connecting elems with their corresponding ElemInfo, we use the element ID as the key.

Definition at line 1596 of file MooseMesh.h.

Referenced by buildFiniteVolumeInfo(), cacheFVElementalDoFs(), computeFiniteVolumeCoords(), and elemInfo().

◆ _elem_to_side_to_qp_to_quadrature_nodes

std::map<dof_id_type, std::map<unsigned int, std::map<dof_id_type, Node *> > > MooseMesh::_elem_to_side_to_qp_to_quadrature_nodes
protected

Definition at line 1549 of file MooseMesh.h.

Referenced by addQuadratureNode(), clearQuadratureNodes(), and getQuadratureNode().

◆ _elem_type_to_child_side_refinement_map

std::map<libMesh::ElemType, std::map<std::pair<int, int>, std::vector<std::vector<QpMap> > > > MooseMesh::_elem_type_to_child_side_refinement_map
private

Holds mappings for "internal" child sides to parent volume. The second key is (child, child_side).

Definition at line 1762 of file MooseMesh.h.

Referenced by buildRefinementMap(), and getRefinementMap().

◆ _elem_type_to_coarsening_map

std::map<std::pair<int, libMesh::ElemType>, std::vector<std::pair<unsigned int, QpMap> > > MooseMesh::_elem_type_to_coarsening_map
private

Holds mappings for volume to volume and parent side to child side Map key:

  • first member corresponds to element side. It's -1 for volume quadrature points
  • second member correponds to the element type Map value:
  • Vector is sized based on the number of quadrature points in the parent (e.g. coarser) element.
  • For each parent quadrature point we store a pair
    • The first member of the pair identifies which child holds the closest refined-level quadrature point
    • The second member of the pair is the QpMap. The _from data member will correspond to the parent quadrature point index. The _to data member will correspond to which child element quadrature point is closest to the parent quadrature point. And _distance is the distance between the two

Definition at line 1779 of file MooseMesh.h.

Referenced by buildCoarseningMap(), and getCoarseningMap().

◆ _elem_type_to_p_coarsening_map

std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap> > MooseMesh::_elem_type_to_p_coarsening_map
private

Definition at line 1782 of file MooseMesh.h.

Referenced by buildPRefinementAndCoarseningMaps(), and getPCoarseningMap().

◆ _elem_type_to_p_coarsening_side_map

std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap> > MooseMesh::_elem_type_to_p_coarsening_side_map
private

Definition at line 1784 of file MooseMesh.h.

Referenced by buildPRefinementAndCoarseningMaps(), and getPCoarseningSideMap().

◆ _elem_type_to_p_refinement_map

std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap> > MooseMesh::_elem_type_to_p_refinement_map
private

Definition at line 1756 of file MooseMesh.h.

Referenced by buildPRefinementAndCoarseningMaps(), and getPRefinementMap().

◆ _elem_type_to_p_refinement_side_map

std::map<std::pair<libMesh::ElemType, unsigned int>, std::vector<QpMap> > MooseMesh::_elem_type_to_p_refinement_side_map
private

Definition at line 1758 of file MooseMesh.h.

Referenced by buildPRefinementAndCoarseningMaps(), and getPRefinementSideMap().

◆ _elem_type_to_refinement_map

std::map<std::pair<int, libMesh::ElemType>, std::vector<std::vector<QpMap> > > MooseMesh::_elem_type_to_refinement_map
private

Holds mappings for volume to volume and parent side to child side Map key:

  • first member corresponds to element side. It's -1 for volume quadrature points
  • second member correponds to the element type Map value:
  • Outermost index is the child element index
  • Once we have indexed by the child element index, we have a std::vector of QpMaps. This vector is sized by the number of reference points in the child element. Then for each reference point in the child element we have a QpMap whose _from index corresponds to the child element reference point, a _to index which corresponds to the reference point on the parent element that the child element reference point is closest to, and a _distance member which is the distance between the mapped child and parent reference quadrature points

Definition at line 1753 of file MooseMesh.h.

Referenced by buildRefinementMap(), and getRefinementMap().

◆ _enabled

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.

Definition at line 50 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _extra_bnd_nodes

std::vector<BndNode> MooseMesh::_extra_bnd_nodes
protected

Definition at line 1550 of file MooseMesh.h.

Referenced by addQuadratureNode(), buildNodeList(), and clearQuadratureNodes().

◆ _extreme_nodes

std::vector<Node *> MooseMesh::_extreme_nodes
private

A vector containing the nodes at the corners of a regular orthogonal mesh.

Definition at line 1634 of file MooseMesh.h.

Referenced by detectOrthogonalDimRanges().

◆ _face_info

std::vector<const FaceInfo *> MooseMesh::_face_info
mutableprivate

Holds only those FaceInfo objects that have processor_id equal to this process's id, e.g.

the local FaceInfo objects

Definition at line 1608 of file MooseMesh.h.

Referenced by buildFiniteVolumeInfo(), faceInfo(), nFace(), ownedFaceInfoBegin(), and ownedFaceInfoEnd().

◆ _factory

Factory& ParallelParamObject::_factory
protectedinherited

◆ _finite_volume_info_dirty

bool MooseMesh::_finite_volume_info_dirty = true
mutableprivate

◆ _ghost_elems_from_ghost_boundaries

std::set<Elem *> MooseMesh::_ghost_elems_from_ghost_boundaries
private

Set of elements ghosted by ghostGhostedBoundaries.

Definition at line 1831 of file MooseMesh.h.

Referenced by ghostGhostedBoundaries().

◆ _ghosted_boundaries

std::set<unsigned int> MooseMesh::_ghosted_boundaries
protected

Definition at line 1558 of file MooseMesh.h.

Referenced by addGhostedBoundary(), getGhostedBoundaries(), and ghostGhostedBoundaries().

◆ _ghosted_boundaries_inflation

std::vector<Real> MooseMesh::_ghosted_boundaries_inflation
protected

Definition at line 1559 of file MooseMesh.h.

Referenced by getGhostedBoundaryInflation(), and setGhostedBoundaryInflation().

◆ _ghosting_functors

std::vector<std::unique_ptr<libMesh::GhostingFunctor> > MooseMesh::_ghosting_functors
protected

Deprecated (DO NOT USE)

Definition at line 1413 of file MooseMesh.h.

◆ _ghosting_patch_size

unsigned int MooseMesh::_ghosting_patch_size
protected

The number of nearest neighbors to consider for ghosting purposes when iteration patch update strategy is used.

Definition at line 1565 of file MooseMesh.h.

Referenced by getGhostingPatchSize().

◆ _half_range

RealVectorValue MooseMesh::_half_range
private

A convenience vector used to hold values in each dimension representing half of the range.

Definition at line 1631 of file MooseMesh.h.

Referenced by addPeriodicVariable(), and minPeriodicVector().

◆ _has_lower_d

bool MooseMesh::_has_lower_d
private

Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces.

Definition at line 1816 of file MooseMesh.h.

Referenced by cacheInfo(), and hasLowerD().

◆ _higher_d_elem_side_to_lower_d_elem

std::unordered_map<std::pair<const Elem *, unsigned short int>, const Elem *> MooseMesh::_higher_d_elem_side_to_lower_d_elem
private

Holds a map from a high-order element side to its corresponding lower-d element.

Definition at line 1811 of file MooseMesh.h.

Referenced by buildLowerDMesh(), cacheInfo(), getLowerDElem(), and getLowerDElemMap().

◆ _id_identical_flag

std::vector<std::vector<bool> > MooseMesh::_id_identical_flag
private

Flags to indicate whether or not any two extra element integers are the same.

Definition at line 1846 of file MooseMesh.h.

Referenced by areElemIDsIdentical(), and buildElemIDInfo().

◆ _is_changed

bool MooseMesh::_is_changed
protected

true if mesh is changed (i.e. after adaptivity step)

Definition at line 1466 of file MooseMesh.h.

◆ _is_displaced

bool MooseMesh::_is_displaced
private

Whether this mesh is displaced.

Definition at line 1849 of file MooseMesh.h.

Referenced by isDisplaced().

◆ _is_nemesis

bool MooseMesh::_is_nemesis
protected

True if a Nemesis Mesh was read in.

Definition at line 1469 of file MooseMesh.h.

Referenced by FileMesh::buildMesh(), determineUseDistributedMesh(), prepare(), and FileMesh::read().

◆ _is_split

const bool MooseMesh::_is_split
protected

Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)

Definition at line 1586 of file MooseMesh.h.

Referenced by determineUseDistributedMesh(), and isSplit().

◆ _linear_finite_volume_dofs_cached

bool MooseMesh::_linear_finite_volume_dofs_cached = false
mutableprivate

Definition at line 1620 of file MooseMesh.h.

◆ _local_node_range

std::unique_ptr<libMesh::ConstNodeRange> MooseMesh::_local_node_range
protected

Definition at line 1498 of file MooseMesh.h.

Referenced by getLocalNodeRange(), and meshChanged().

◆ _lower_d_boundary_blocks

std::set<SubdomainID> MooseMesh::_lower_d_boundary_blocks
private

Mesh blocks for boundary lower-d elements in different types.

Definition at line 1808 of file MooseMesh.h.

Referenced by boundaryLowerDBlocks(), buildLowerDMesh(), and cacheInfo().

◆ _lower_d_elem_to_higher_d_elem_side

std::unordered_map<const Elem *, unsigned short int> MooseMesh::_lower_d_elem_to_higher_d_elem_side
private

Definition at line 1812 of file MooseMesh.h.

Referenced by buildLowerDMesh(), cacheInfo(), and getHigherDSide().

◆ _lower_d_interior_blocks

std::set<SubdomainID> MooseMesh::_lower_d_interior_blocks
private

Mesh blocks for interior lower-d elements in different types.

Definition at line 1806 of file MooseMesh.h.

Referenced by buildLowerDMesh(), cacheInfo(), and interiorLowerDBlocks().

◆ _max_h_level

unsigned int MooseMesh::_max_h_level
private

Maximum h-refinement level of all elements.

Definition at line 1881 of file MooseMesh.h.

Referenced by maxHLevel(), and update().

◆ _max_ids

std::vector<dof_id_type> MooseMesh::_max_ids
private

Maximum integer ID for each extra element integer.

Definition at line 1842 of file MooseMesh.h.

Referenced by buildElemIDInfo(), and maxElementID().

◆ _max_leaf_size

unsigned int MooseMesh::_max_leaf_size
protected

Definition at line 1568 of file MooseMesh.h.

Referenced by getMaxLeafSize().

◆ _max_p_level

unsigned int MooseMesh::_max_p_level
private

Maximum p-refinement level of all elements.

Definition at line 1879 of file MooseMesh.h.

Referenced by maxPLevel(), and update().

◆ _mesh

std::unique_ptr<libMesh::MeshBase> MooseMesh::_mesh
protected

◆ _mesh_boundary_ids

std::set<BoundaryID> MooseMesh::_mesh_boundary_ids
protected

A set of boundary IDs currently present in the mesh.

In serial, this is equivalent to the values returned by _mesh.get_boundary_info().get_boundary_ids(). In parallel, it will contain off-processor boundary IDs as well.

Definition at line 1524 of file MooseMesh.h.

Referenced by getBoundaryIDs(), meshBoundaryIds(), prepare(), and setMeshBoundaryIDs().

◆ _mesh_nodeset_ids

std::set<BoundaryID> MooseMesh::_mesh_nodeset_ids
protected

Definition at line 1526 of file MooseMesh.h.

Referenced by meshNodesetIds(), and prepare().

◆ _mesh_sideset_ids

std::set<BoundaryID> MooseMesh::_mesh_sideset_ids
protected

Definition at line 1525 of file MooseMesh.h.

Referenced by meshSidesetIds(), and prepare().

◆ _mesh_subdomains

std::set<SubdomainID> MooseMesh::_mesh_subdomains
protected

A set of subdomain IDs currently present in the mesh.

For parallel meshes, includes subdomains defined on other processors as well.

Definition at line 1516 of file MooseMesh.h.

Referenced by buildLowerDMesh(), cacheInfo(), checkDuplicateSubdomainNames(), meshSubdomains(), and prepare().

◆ _min_ids

std::vector<dof_id_type> MooseMesh::_min_ids
private

Minimum integer ID for each extra element integer.

Definition at line 1844 of file MooseMesh.h.

Referenced by buildElemIDInfo(), and minElementID().

◆ _moose_mesh_prepared

bool MooseMesh::_moose_mesh_prepared = false
protected

True if prepare has been called on the mesh.

Definition at line 1472 of file MooseMesh.h.

Referenced by prepare(), and prepared().

◆ _name

const std::string& MooseBase::_name
protectedinherited

The name of this class.

Definition at line 359 of file MooseBase.h.

Referenced by AddBCAction::act(), AddConstraintAction::act(), AddPostprocessorAction::act(), PartitionerAction::act(), AddMeshGeneratorAction::act(), AddDamperAction::act(), AddFunctorMaterialAction::act(), AddFVInterfaceKernelAction::act(), AddMultiAppAction::act(), AddVectorPostprocessorAction::act(), AddNodalKernelAction::act(), AddMaterialAction::act(), AddTransferAction::act(), AddDiracKernelAction::act(), ReadExecutorParamsAction::act(), AddUserObjectAction::act(), AddFVInitialConditionAction::act(), AddKernelAction::act(), AddInterfaceKernelAction::act(), AddDGKernelAction::act(), AddMarkerAction::act(), AddInitialConditionAction::act(), AddIndicatorAction::act(), AddScalarKernelAction::act(), AddPositionsAction::act(), AddReporterAction::act(), AddTimesAction::act(), AddFieldSplitAction::act(), AddFVKernelAction::act(), AddFVBCAction::act(), SetupTimeIntegratorAction::act(), AddFunctionAction::act(), AddConvergenceAction::act(), AddMeshDivisionAction::act(), AddHDGKernelAction::act(), AddTimeStepperAction::act(), AddDistributionAction::act(), SetupPreconditionerAction::act(), AddOutputAction::act(), AddLinearFVBCAction::act(), AddLinearFVKernelAction::act(), AddCorrectorAction::act(), AddMeshModifiersAction::act(), AddSamplerAction::act(), AddControlAction::act(), AddMFEMFESpaceAction::act(), AddMFEMSubMeshAction::act(), AddMFEMPreconditionerAction::act(), AddMFEMSolverAction::act(), AddPeriodicBCAction::act(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromXY(), PiecewiseLinearBase::buildInterpolation(), CombinerGenerator::CombinerGenerator(), Executor::Executor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), FillBetweenPointVectorsGenerator::generate(), FillBetweenSidesetsGenerator::generate(), FillBetweenCurvesGenerator::generate(), MooseBase::MooseBase(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::name(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseBase::setData(), and AddVariableAction::varName().

◆ _need_delete

bool MooseMesh::_need_delete
private

Whether we need to delete remote elements after init'ing the EquationSystems.

Definition at line 1825 of file MooseMesh.h.

Referenced by allowRemoteElementRemoval(), and needsRemoteElemDeletion().

◆ _need_ghost_ghosted_boundaries

bool MooseMesh::_need_ghost_ghosted_boundaries
private

A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready.

We do not need to gather all boundaries to every single processor. In general, we should avoid using ghostGhostedBoundaries when possible since it is not scalable

Definition at line 1837 of file MooseMesh.h.

Referenced by ghostGhostedBoundaries(), and needGhostGhostedBoundaries().

◆ _neighbor_subdomain_boundary_ids

std::unordered_map<SubdomainID, std::set<BoundaryID> > MooseMesh::_neighbor_subdomain_boundary_ids
private

Holds a map from neighbor subomdain ids to the boundary ids that are attached to it.

Definition at line 1803 of file MooseMesh.h.

Referenced by cacheInfo(), getBoundaryConnectedSecondaryBlocks(), getInterfaceConnectedBlocks(), and getSubdomainInterfaceBoundaryIds().

◆ _node_map

std::vector<Node *> MooseMesh::_node_map
protected

Vector of all the Nodes in the mesh for determining when to add a new point.

Definition at line 1574 of file MooseMesh.h.

Referenced by addUniqueNode().

◆ _node_set_nodes

std::map<boundary_id_type, std::vector<dof_id_type> > MooseMesh::_node_set_nodes
protected

list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids]

Definition at line 1556 of file MooseMesh.h.

Referenced by buildNodeList(), freeBndNodes(), getNodeList(), and nodeSetNodes().

◆ _node_to_active_semilocal_elem_map

std::map<dof_id_type, std::vector<dof_id_type> > MooseMesh::_node_to_active_semilocal_elem_map
protected

A map of all of the current nodes to the active elements that they are connected to.

Definition at line 1509 of file MooseMesh.h.

Referenced by addQuadratureNode(), nodeToActiveSemilocalElemMap(), and update().

◆ _node_to_active_semilocal_elem_map_built

bool MooseMesh::_node_to_active_semilocal_elem_map_built
protected

Definition at line 1510 of file MooseMesh.h.

Referenced by nodeToActiveSemilocalElemMap(), and update().

◆ _node_to_elem_map

std::map<dof_id_type, std::vector<dof_id_type> > MooseMesh::_node_to_elem_map
protected

A map of all of the current nodes to the elements that they are connected to.

Definition at line 1505 of file MooseMesh.h.

Referenced by addQuadratureNode(), nodeToElemMap(), and update().

◆ _node_to_elem_map_built

bool MooseMesh::_node_to_elem_map_built
protected

Definition at line 1506 of file MooseMesh.h.

Referenced by nodeToElemMap(), and update().

◆ _paired_boundary

std::vector<std::pair<BoundaryID, BoundaryID> > MooseMesh::_paired_boundary
protected

A vector holding the paired boundaries for a regular orthogonal mesh.

Definition at line 1583 of file MooseMesh.h.

Referenced by detectPairedSidesets(), and getPairedBoundaryMapping().

◆ _parallel_type

ParallelType MooseMesh::_parallel_type
protected

Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.

Determines whether the underlying libMesh mesh is a ReplicatedMesh or DistributedMesh.

Definition at line 1423 of file MooseMesh.h.

Referenced by determineUseDistributedMesh(), getParallelType(), and setParallelType().

◆ _parallel_type_overridden

bool MooseMesh::_parallel_type_overridden
protected

Definition at line 1430 of file MooseMesh.h.

Referenced by determineUseDistributedMesh(), and isParallelTypeForced().

◆ _pars

const InputParameters& MooseBase::_pars
protectedinherited

The object's parameters.

Definition at line 362 of file MooseBase.h.

Referenced by AddFVICAction::act(), AddICAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupMeshAction::act(), ComposeTimeStepperAction::act(), SetupDebugAction::act(), AddAuxKernelAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), FunctorMaterial::addFunctorPropertyByBlocks(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), PiecewiseTabularBase::buildFromFile(), PNGOutput::calculateRescalingValues(), MooseBase::callMooseError(), MooseBase::connectControllableParams(), Console::Console(), MooseApp::copyInputs(), MaterialBase::declareADProperty(), MaterialBase::declareProperty(), FEProblemSolve::FEProblemSolve(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FileMeshGenerator::generate(), MooseBase::getBase(), MooseBase::getCheckedPointerParam(), MaterialBase::getGenericZeroMaterialProperty(), MooseBase::getHitNode(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::getParam(), MooseBase::hasBase(), MeshGenerator::hasGenerateData(), AddVariableAction::init(), AdvancedOutput::initExecutionTypes(), Console::initialSetup(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MultiApp::keepSolutionDuringRestore(), MooseBase::messagePrefix(), MooseBase::MooseBase(), MooseApp::outputMachineReadableData(), MooseBase::paramError(), GlobalParamsAction::parameters(), MooseBase::parameters(), MooseBase::paramInfo(), MooseBase::paramWarning(), prepare(), Eigenvalue::prepareSolverOptions(), setCoordSystem(), setPartitionerHelper(), SetupMeshAction::setupMesh(), TransientBase::setupTimeIntegrator(), MooseApp::showInputs(), and MooseBase::uniqueName().

◆ _partitioner_name

MooseEnum MooseMesh::_partitioner_name
protected

The partitioner used on this mesh.

Definition at line 1436 of file MooseMesh.h.

Referenced by partitionerName(), and setPartitionerHelper().

◆ _partitioner_overridden

bool MooseMesh::_partitioner_overridden
protected

Definition at line 1437 of file MooseMesh.h.

Referenced by isPartitionerForced(), and setPartitionerHelper().

◆ _patch_size

unsigned int MooseMesh::_patch_size
protected

The number of nodes to consider in the NearestNode neighborhood.

Definition at line 1562 of file MooseMesh.h.

Referenced by getPatchSize().

◆ _patch_update_strategy

Moose::PatchUpdateType MooseMesh::_patch_update_strategy
protected

The patch update strategy.

Definition at line 1571 of file MooseMesh.h.

Referenced by getPatchUpdateStrategy(), MooseMesh(), and setPatchUpdateStrategy().

◆ _periodic_dim

std::map<unsigned int, std::vector<bool> > MooseMesh::_periodic_dim
private

A map of vectors indicating which dimensions are periodic in a regular orthogonal mesh for the specified variable numbers.

This data structure is populated by addPeriodicVariable.

Definition at line 1626 of file MooseMesh.h.

Referenced by addPeriodicVariable(), and isTranslatedPeriodic().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 124 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::perfGraph().

◆ _prefix

const std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 127 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::timedSectionName().

◆ _provided_coord_blocks

std::vector<SubdomainName> MooseMesh::_provided_coord_blocks
private

Set for holding user-provided coordinate system type block names.

Definition at line 1874 of file MooseMesh.h.

Referenced by MooseMesh(), prepare(), and setCoordSystem().

◆ _quadrature_nodes

std::map<dof_id_type, Node *> MooseMesh::_quadrature_nodes
protected

Definition at line 1547 of file MooseMesh.h.

Referenced by addQuadratureNode(), clearQuadratureNodes(), and queryNodePtr().

◆ _refined_elements

std::unique_ptr<ConstElemPointerRange> MooseMesh::_refined_elements
protected

The elements that were just refined.

Definition at line 1475 of file MooseMesh.h.

Referenced by cacheChangedLists(), and refinedElementRange().

◆ _regular_orthogonal_mesh

bool MooseMesh::_regular_orthogonal_mesh
protected

Boolean indicating whether this mesh was detected to be regular and orthogonal.

Definition at line 1577 of file MooseMesh.h.

Referenced by addPeriodicVariable(), detectOrthogonalDimRanges(), GeneratedMesh::GeneratedMesh(), getPairedBoundaryMapping(), isRegularOrthogonal(), and prepared().

◆ _relationship_managers

std::vector<std::shared_ptr<RelationshipManager> > MooseMesh::_relationship_managers
protected

The list of active geometric relationship managers (bound to the underlying MeshBase object).

Definition at line 1416 of file MooseMesh.h.

◆ _restartable_app

MooseApp& Restartable::_restartable_app
protectedinherited

Reference to the application.

Definition at line 227 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().

◆ _restartable_read_only

const bool Restartable::_restartable_read_only
protectedinherited

Flag for toggling read only status (see ReporterData)

Definition at line 236 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp().

◆ _restartable_system_name

const std::string Restartable::_restartable_system_name
protectedinherited

The system name this object is in.

Definition at line 230 of file Restartable.h.

Referenced by Restartable::restartableName().

◆ _restartable_tid

const THREAD_ID Restartable::_restartable_tid
protectedinherited

The thread ID for this object.

Definition at line 233 of file Restartable.h.

Referenced by Restartable::declareRestartableDataHelper().

◆ _rz_coord_axis

unsigned int MooseMesh::_rz_coord_axis
private

Storage for RZ axis selection.

Definition at line 1861 of file MooseMesh.h.

Referenced by getAxisymmetricRadialCoord(), setAxisymmetricCoordAxis(), and setCoordData().

◆ _semilocal_node_list

std::set<Node *> MooseMesh::_semilocal_node_list
protected

Used for generating the semilocal node range.

Definition at line 1488 of file MooseMesh.h.

Referenced by isSemiLocal(), and updateActiveSemiLocalNodeRange().

◆ _skip_deletion_repartition_after_refine

bool MooseMesh::_skip_deletion_repartition_after_refine
protected

Whether or not skip remote deletion and repartition after uniform refinements.

Definition at line 1463 of file MooseMesh.h.

Referenced by setUniformRefineLevel(), and skipDeletionRepartitionAfterRefine().

◆ _skip_refine_when_use_split

bool MooseMesh::_skip_refine_when_use_split
protected

Whether or not to skip uniform refinements when using a pre-split mesh.

Definition at line 1460 of file MooseMesh.h.

Referenced by skipRefineWhenUseSplit().

◆ _sub_to_data

std::unordered_map<SubdomainID, SubdomainData> MooseMesh::_sub_to_data
private

Holds a map from subdomain ids to associated data.

Definition at line 1800 of file MooseMesh.h.

Referenced by cacheInfo(), getBlockConnectedBlocks(), getBoundaryConnectedBlocks(), getSubdomainBoundaryIds(), and isLowerD().

◆ _subdomain_id_to_rz_coord_axis

std::unordered_map<SubdomainID, std::pair<Point, RealVectorValue> > MooseMesh::_subdomain_id_to_rz_coord_axis
private

Map of subdomain ID to general axisymmetric axis.

Definition at line 1864 of file MooseMesh.h.

Referenced by getGeneralAxisymmetricCoordAxis(), setCoordData(), setGeneralAxisymmetricCoordAxes(), and usingGeneralAxisymmetricCoordAxes().

◆ _type

const std::string& MooseBase::_type
protectedinherited

◆ _uniform_refine_level

unsigned int MooseMesh::_uniform_refine_level
protected

The level of uniform refinement requested (set to zero if AMR is disabled)

Definition at line 1457 of file MooseMesh.h.

Referenced by setUniformRefineLevel(), and uniformRefineLevel().

◆ _use_distributed_mesh

bool MooseMesh::_use_distributed_mesh
protected

False by default.

Final value is determined by several factors including the 'distribution' setting in the input file, and whether or not the Mesh file is a Nemesis file.

Definition at line 1428 of file MooseMesh.h.

Referenced by buildMeshBaseObject(), buildTypedMesh(), detectPairedSidesets(), determineUseDistributedMesh(), errorIfDistributedMesh(), ghostGhostedBoundaries(), init(), isDistributedMesh(), and setPartitionerHelper().

◆ app_param

const std::string MooseBase::app_param = "_moose_app"
staticinherited

◆ moose_base_param

const std::string MooseBase::moose_base_param = "_moose_base"
staticinherited

The name of the parameter that contains the moose system base.

Definition at line 61 of file MooseBase.h.

Referenced by InputParameters::getBase(), InputParameters::hasBase(), and InputParameters::registerBase().

◆ name_param

const std::string MooseBase::name_param = "_object_name"
staticinherited

◆ type_param

const std::string MooseBase::type_param = "_type"
staticinherited

◆ unique_name_param

const std::string MooseBase::unique_name_param = "_unique_name"
staticinherited

The name of the parameter that contains the unique object name.

Definition at line 57 of file MooseBase.h.

Referenced by InputParameterWarehouse::addInputParameters(), AppFactory::create(), InputParameterWarehouse::removeInputParameters(), MooseBase::uniqueName(), and MooseBase::validParams().


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