www.mooseframework.org
Classes | Public Types | Public Member Functions | Static Public Member Functions | 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< DistributedMesh >
 
struct  MeshType< 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...
 

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< 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 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 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 Elem * 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. 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 maxNodeId () const
 Calls max_node/elem_id() on the underlying libMesh mesh object. More...
 
virtual dof_id_type maxElemId () const
 
virtual const Node & node (const dof_id_type i) const
 Various accessors (pointers/references) for Node "i". More...
 
virtual Node & node (const dof_id_type i)
 
virtual const Node & nodeRef (const dof_id_type i) const
 
virtual Node & nodeRef (const dof_id_type i)
 
virtual const Node * nodePtr (const dof_id_type i) const
 
virtual Node * nodePtr (const dof_id_type i)
 
virtual const Node * queryNodePtr (const dof_id_type i) const
 
virtual Node * queryNodePtr (const dof_id_type i)
 
virtual Elem * elem (const dof_id_type i)
 Various accessors (pointers/references) for Elem "i". More...
 
virtual const Elem * elem (const dof_id_type i) const
 
virtual Elem * elemPtr (const dof_id_type i)
 
virtual const Elem * elemPtr (const dof_id_type i) const
 
virtual Elem * queryElemPtr (const dof_id_type i)
 
virtual const Elem * queryElemPtr (const dof_id_type i) const
 
bool prepared () const
 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...
 
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
 
MeshBase & getMesh ()
 Accessor for the underlying libMesh Mesh object. More...
 
MeshBase & getMesh (const std::string &name)
 
const MeshBase & getMesh () const
 
const MeshBase & getMesh (const std::string &name) const
 
const MeshBase * getMeshPtr () 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 Node * addUniqueNode (const Point &p, Real tol=1e-6)
 Add a new node to the mesh. More...
 
Node * addQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
 Adds a fictitious "QuadratureNode". More...
 
Node * getQuadratureNode (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_name) const
 Get the associated subdomainIDs for the subdomain names that are passed in. More...
 
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, 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, 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...
 
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...
 
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 (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< PointLocatorBase > getPointLocator () 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 displaced. More...
 
bool isDisplaced () const
 whether this mesh is displaced 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...
 
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
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this class is associated with. More...
 
const std::string & type () const
 Get the type of this class. More...
 
virtual 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
 The unique parameter name of a valid parameter of this object for accessing parameter controls. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
MooseObjectName uniqueName () const
 The unique name for accessing input parameters of this object in the InputParameterWarehouse. More...
 
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 & 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 &nm) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default. 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 objectErrorPrefix (const std::string &error_type) const
 A descriptive prefix for errors for an object. 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 mooseError (Args &&... args) const
 Emits an error prefixed with object name and type. More...
 
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
 
std::string errorPrefix (const std::string &error_type) const
 A descriptive prefix for errors for this object: More...
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
std::string getDataFileName (const std::string &param) const
 Returns the path of a data file for a given FileName type parameter, searching (in the following order) More...
 
std::string getDataFileNameByName (const std::string &name, const std::string *param=nullptr) const
 Returns the path of a data file for a given relative file path. More...
 
PerfGraphperfGraph ()
 Get the PerfGraph. More...
 
ConstElemRangegetActiveLocalElementRange ()
 Return pointers to range objects for various types of ranges (local nodes, boundary elems, etc.). More...
 
NodeRangegetActiveNodeRange ()
 
SemiLocalNodeRangegetActiveSemiLocalNodeRange () const
 
ConstNodeRangegetLocalNodeRange ()
 
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange ()
 
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...
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. 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< 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< 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< ConstElemRange_active_local_elem_range
 A range for use with threading. More...
 
std::unique_ptr< SemiLocalNodeRange_active_semilocal_node_range
 
std::unique_ptr< NodeRange_active_node_range
 
std::unique_ptr< ConstNodeRange_local_node_range
 
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
 
std::unique_ptr< 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...
 
const std::string & _type
 The type of this class. More...
 
const std::string & _name
 The name of this class, reference to value stored in InputParameters. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
Factory_factory
 The Factory associated with the MooseApp. More...
 
ActionFactory_action_factory
 Builds Actions. 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, QBase &qrule, 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, QBase &qrule, 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, QBase &qrule, 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< ElemType, unsigned int >, std::vector< QpMap >> &) const
 
const std::vector< QpMap > & getPCoarseningMapHelper (const Elem &elem, const std::map< std::pair< 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, 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< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
 
std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
 
std::map< 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, 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< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
 
std::map< std::pair< 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::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...
 

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 1497 of file MooseMesh.h.

◆ bnd_node_iterator_imp

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

Definition at line 1490 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 1498 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 1491 of file MooseMesh.h.

◆ PeriodicNodeInfo

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

Helper type for building periodic node maps.

Definition at line 1052 of file MooseMesh.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Convenience enums.

Enumerator

Definition at line 1401 of file MooseMesh.h.

1402  {
1403  X = 0,
1404  Y,
1405  Z
1406  };

◆ anonymous enum

anonymous enum
protected
Enumerator
MIN 
MAX 

Definition at line 1407 of file MooseMesh.h.

1408  {
1409  MIN = 0,
1410  MAX
1411  };

◆ 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 188 of file MooseMesh.C.

190  Restartable(this, "Mesh"),
191  PerfGraphInterface(this),
192  _parallel_type(getParam<MooseEnum>("parallel_type").getEnum<MooseMesh::ParallelType>()),
193  _use_distributed_mesh(false),
196  _mesh(nullptr),
197  _partitioner_name(getParam<MooseEnum>("partitioner")),
201  _skip_refine_when_use_split(getParam<bool>("skip_refine_when_use_split")),
203  _is_nemesis(getParam<bool>("nemesis")),
206  _patch_size(getParam<unsigned int>("patch_size")),
207  _ghosting_patch_size(isParamValid("ghosting_patch_size")
208  ? getParam<unsigned int>("ghosting_patch_size")
209  : 5 * _patch_size),
210  _max_leaf_size(getParam<unsigned int>("max_leaf_size")),
212  getParam<MooseEnum>("patch_update_strategy").getEnum<Moose::PatchUpdateType>()),
214  _is_split(getParam<bool>("_is_split")),
215  _has_lower_d(false),
216  _allow_recovery(true),
217  _construct_node_list_from_side_list(getParam<bool>("construct_node_list_from_side_list")),
218  _need_delete(false),
221  _is_displaced(false),
222  _rz_coord_axis(getParam<MooseEnum>("rz_coord_axis")),
223  _coord_system_set(false),
224  _doing_p_refinement(false)
225 {
226  if (isParamValid("ghosting_patch_size") && (_patch_update_strategy != Moose::Iteration))
227  mooseError("Ghosting patch size parameter has to be set in the mesh block "
228  "only when 'iteration' patch update strategy is used.");
229 
230  if (isParamValid("coord_block"))
231  {
232  if (isParamValid("block"))
233  paramWarning("block",
234  "You set both 'Mesh/block' and 'Mesh/coord_block'. The value of "
235  "'Mesh/coord_block' will be used.");
236 
237  _provided_coord_blocks = getParam<std::vector<SubdomainName>>("coord_block");
238  }
239  else if (isParamValid("block"))
240  _provided_coord_blocks = getParam<std::vector<SubdomainName>>("block");
241 
242  if (getParam<bool>("build_all_side_lowerd_mesh"))
243  // Do not initially allow removal of remote elements
245 
247 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1380
bool _node_to_elem_map_built
Definition: MooseMesh.h:1462
bool allowRemoteElementRemoval() const
Whether we are allow remote element removal.
Definition: MooseMesh.h:1072
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1426
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:1820
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready...
Definition: MooseMesh.h:1783
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1414
unsigned int _max_leaf_size
Definition: MooseMesh.h:1524
bool _custom_partitioner_requested
Definition: MooseMesh.h:1398
bool _doing_p_refinement
Whether we have p-refinement (as opposed to h-refinement)
Definition: MooseMesh.h:1823
void determineUseDistributedMesh()
Determine whether to use a distributed mesh.
Definition: MooseMesh.C:2575
MooseObject(const InputParameters &parameters)
Definition: MooseObject.C:47
bool _has_lower_d
Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces...
Definition: MooseMesh.h:1762
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:1393
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:1466
bool _skip_refine_when_use_split
Whether or not to skip uniform refinements when using a pre-split mesh.
Definition: MooseMesh.h:1417
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1765
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1774
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1768
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseMesh.h:1542
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:1817
bool _parallel_type_overridden
Definition: MooseMesh.h:1387
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:1527
bool _partitioner_overridden
Definition: MooseMesh.h:1394
bool _is_displaced
Whether this mesh is displaced.
Definition: MooseMesh.h:1795
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition: MooseMesh.h:1420
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1771
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:1518
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...
PerfGraphInterface(const MooseObject *moose_object)
For objects that are MooseObjects with a default prefix of type()
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1807
bool _distribution_overridden
Definition: MooseMesh.h:1386
unsigned int _ghosting_patch_size
The number of nearest neighbors to consider for ghosting purposes when iteration patch update strateg...
Definition: MooseMesh.h:1521
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1533

◆ MooseMesh() [2/3]

MooseMesh::MooseMesh ( const MooseMesh other_mesh)

Definition at line 249 of file MooseMesh.C.

250  : MooseObject(other_mesh._pars),
251  Restartable(this, "Mesh"),
252  PerfGraphInterface(this, "CopiedMesh"),
254  _parallel_type(other_mesh._parallel_type),
258  _mesh(other_mesh.getMesh().clone()),
265  _is_nemesis(false),
268  _patch_size(other_mesh._patch_size),
270  _max_leaf_size(other_mesh._max_leaf_size),
273  _is_split(other_mesh._is_split),
274  _has_lower_d(other_mesh._has_lower_d),
275  _allow_recovery(other_mesh._allow_recovery),
277  _need_delete(other_mesh._need_delete),
280  _coord_sys(other_mesh._coord_sys),
281  _rz_coord_axis(other_mesh._rz_coord_axis),
286 {
287  // Note: this calls BoundaryInfo::operator= without changing the
288  // ownership semantics of either Mesh's BoundaryInfo object.
289  getMesh().get_boundary_info() = other_mesh.getMesh().get_boundary_info();
290 
291  const std::set<SubdomainID> & subdomains = other_mesh.meshSubdomains();
292  for (const auto & sbd_id : subdomains)
293  setSubdomainName(sbd_id, other_mesh.getMesh().subdomain_name(sbd_id));
294 
295  // Get references to BoundaryInfo objects to make the code below cleaner...
296  const BoundaryInfo & other_boundary_info = other_mesh.getMesh().get_boundary_info();
297  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
298 
299  // Use the other BoundaryInfo object to build the list of side boundary ids
300  std::vector<BoundaryID> side_boundaries;
301  other_boundary_info.build_side_boundary_ids(side_boundaries);
302 
303  // Assign those boundary ids in our BoundaryInfo object
304  for (const auto & side_bnd_id : side_boundaries)
305  boundary_info.sideset_name(side_bnd_id) = other_boundary_info.get_sideset_name(side_bnd_id);
306 
307  // Do the same thing for node boundary ids
308  std::vector<BoundaryID> node_boundaries;
309  other_boundary_info.build_node_boundary_ids(node_boundaries);
310 
311  for (const auto & node_bnd_id : node_boundaries)
312  boundary_info.nodeset_name(node_bnd_id) = other_boundary_info.get_nodeset_name(node_bnd_id);
313 
314  _bounds.resize(other_mesh._bounds.size());
315  for (std::size_t i = 0; i < _bounds.size(); ++i)
316  {
317  _bounds[i].resize(other_mesh._bounds[i].size());
318  for (std::size_t j = 0; j < _bounds[i].size(); ++j)
319  _bounds[i][j] = other_mesh._bounds[i][j];
320  }
321 
323 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1380
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1536
bool _node_to_elem_map_built
Definition: MooseMesh.h:1462
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1426
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:1820
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready...
Definition: MooseMesh.h:1783
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1414
unsigned int _max_leaf_size
Definition: MooseMesh.h:1524
bool _custom_partitioner_requested
Definition: MooseMesh.h:1398
bool _doing_p_refinement
Whether we have p-refinement (as opposed to h-refinement)
Definition: MooseMesh.h:1823
MooseObject(const InputParameters &parameters)
Definition: MooseObject.C:47
bool _has_lower_d
Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces...
Definition: MooseMesh.h:1762
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:1393
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:1466
bool _skip_refine_when_use_split
Whether or not to skip uniform refinements when using a pre-split mesh.
Definition: MooseMesh.h:1417
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1765
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition: MooseMesh.C:4001
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1804
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385
bool _built_from_other_mesh
Whether or not this mesh was built from another mesh.
Definition: MooseMesh.h:1376
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1774
void setSubdomainName(SubdomainID subdomain_id, const SubdomainName &name)
This method sets the name for subdomain_id to name.
Definition: MooseMesh.C:1525
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1768
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseMesh.h:1542
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition: MooseMesh.C:2966
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:1817
bool _parallel_type_overridden
Definition: MooseMesh.h:1387
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:1527
bool _partitioner_overridden
Definition: MooseMesh.h:1394
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition: MooseMesh.h:1420
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1771
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:1518
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:1810
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1807
bool _distribution_overridden
Definition: MooseMesh.h:1386
unsigned int _ghosting_patch_size
The number of nearest neighbors to consider for ghosting purposes when iteration patch update strateg...
Definition: MooseMesh.h:1521
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1533
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2921

◆ MooseMesh() [3/3]

MooseMesh::MooseMesh ( )
delete

◆ ~MooseMesh()

MooseMesh::~MooseMesh ( )
virtual

Definition at line 325 of file MooseMesh.C.

326 {
327  freeBndNodes();
328  freeBndElems();
330 }
void freeBndElems()
Definition: MooseMesh.C:351
void clearQuadratureNodes()
Clear out any existing quadrature nodes.
Definition: MooseMesh.C:1462
void freeBndNodes()
Definition: MooseMesh.C:333

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 2801 of file MooseMesh.C.

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

2802 {
2803  return getMesh().active_local_elements_begin();
2804 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ activeLocalElementsBegin() [2/2]

MeshBase::const_element_iterator MooseMesh::activeLocalElementsBegin ( ) const

Definition at line 2813 of file MooseMesh.C.

2814 {
2815  return getMesh().active_local_elements_begin();
2816 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ activeLocalElementsEnd() [1/2]

const MeshBase::element_iterator MooseMesh::activeLocalElementsEnd ( )

Definition at line 2807 of file MooseMesh.C.

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

2808 {
2809  return getMesh().active_local_elements_end();
2810 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ activeLocalElementsEnd() [2/2]

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

Definition at line 2819 of file MooseMesh.C.

2820 {
2821  return getMesh().active_local_elements_end();
2822 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ addGhostedBoundary()

void MooseMesh::addGhostedBoundary ( BoundaryID  boundary_id)

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

Definition at line 2979 of file MooseMesh.C.

Referenced by FEProblemBase::addGhostedBoundary().

2980 {
2981  _ghosted_boundaries.insert(boundary_id);
2982 }
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:1514

◆ 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 1973 of file MooseMesh.C.

Referenced by AddPeriodicBCAction::setPeriodicVars().

1974 {
1976  return;
1977 
1978  _periodic_dim[var_num].resize(dimension());
1979 
1980  _half_range = Point(dimensionWidth(0) / 2.0, dimensionWidth(1) / 2.0, dimensionWidth(2) / 2.0);
1981 
1982  for (unsigned int component = 0; component < dimension(); ++component)
1983  {
1984  const std::pair<BoundaryID, BoundaryID> * boundary_ids = getPairedBoundaryMapping(component);
1985 
1986  if (boundary_ids != nullptr &&
1987  ((boundary_ids->first == primary && boundary_ids->second == secondary) ||
1988  (boundary_ids->first == secondary && boundary_ids->second == primary)))
1989  _periodic_dim[var_num][component] = true;
1990  }
1991 }
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:1587
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2678
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:2036
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition: MooseMesh.C:1949
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:1582
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1533

◆ 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 1392 of file MooseMesh.C.

Referenced by GeometricSearchData::generateQuadratureNodes().

1397 {
1398  Node * qnode;
1399 
1400  if (_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) ==
1401  _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].end())
1402  {
1403  // Create a new node id starting from the max node id and counting down. This will be the least
1404  // likely to collide with an existing node id.
1405  // Note that we are using numeric_limits<unsigned>::max even
1406  // though max_id is stored as a dof_id_type. I tried this with
1407  // numeric_limits<dof_id_type>::max and it broke several tests in
1408  // MOOSE. So, this is some kind of a magic number that we will
1409  // just continue to use...
1411  dof_id_type new_id = max_id - _quadrature_nodes.size();
1412 
1413  if (new_id <= getMesh().max_node_id())
1414  mooseError("Quadrature node id collides with existing node id!");
1415 
1416  qnode = new Node(point, new_id);
1417 
1418  // Keep track of this new node in two different ways for easy lookup
1419  _quadrature_nodes[new_id] = qnode;
1420  _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp] = qnode;
1421 
1422  if (elem->active())
1423  {
1424  _node_to_elem_map[new_id].push_back(elem->id());
1425  _node_to_active_semilocal_elem_map[new_id].push_back(elem->id());
1426  }
1427  }
1428  else
1429  qnode = _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
1430 
1431  BndNode * bnode = new BndNode(qnode, bid);
1432  _bnd_nodes.push_back(bnode);
1433  _bnd_node_ids[bid].insert(qnode->id());
1434 
1435  _extra_bnd_nodes.push_back(*bnode);
1436 
1437  // Do this so the range will be regenerated next time it is accessed
1438  _bnd_node_range.reset();
1439 
1440  return qnode;
1441 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:1503
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:1461
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:1493
auto max(const L &left, const R &right)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1489
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:1506
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:1505
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:1456
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
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:1465
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 1358 of file MooseMesh.C.

1359 {
1364  if (getMesh().n_nodes() != _node_map.size())
1365  {
1366  _node_map.clear();
1367  _node_map.reserve(getMesh().n_nodes());
1368  for (const auto & node : getMesh().node_ptr_range())
1369  _node_map.push_back(node);
1370  }
1371 
1372  Node * node = nullptr;
1373  for (unsigned int i = 0; i < _node_map.size(); ++i)
1374  {
1375  if (p.relative_fuzzy_equals(*_node_map[i], tol))
1376  {
1377  node = _node_map[i];
1378  break;
1379  }
1380  }
1381  if (node == nullptr)
1382  {
1383  node = getMesh().add_node(new Node(p));
1384  _node_map.push_back(node);
1385  }
1386 
1387  mooseAssert(node != nullptr, "Node is NULL");
1388  return node;
1389 }
const dof_id_type n_nodes
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
std::vector< Node * > _node_map
Vector of all the Nodes in the mesh for determining when to add a new point.
Definition: MooseMesh.h:1530
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:622

◆ allFaceInfo()

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

Accessor for all FaceInfo objects.

Definition at line 2114 of file MooseMesh.h.

2115 {
2116  return _all_face_info;
2117 }
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1560

◆ allowRecovery()

void MooseMesh::allowRecovery ( bool  allow)
inline

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

Definition at line 1009 of file MooseMesh.h.

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

◆ allowRemoteElementRemoval() [1/2]

void MooseMesh::allowRemoteElementRemoval ( bool  allow_removal)

Set whether to allow remote element removal.

Definition at line 3663 of file MooseMesh.C.

Referenced by MooseApp::attachRelationshipManagers().

3664 {
3665  _allow_remote_element_removal = allow_remote_element_removal;
3666  if (_mesh)
3667  _mesh->allow_remote_element_removal(allow_remote_element_removal);
3668 
3669  if (!allow_remote_element_removal)
3670  // If we're not allowing remote element removal now, then we will need deletion later after
3671  // late geoemetric ghosting functors have been added (late geometric ghosting functor addition
3672  // happens when algebraic ghosting functors are added)
3673  _need_delete = true;
3674 }
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1774
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390
bool _need_delete
Whether we need to delete remote elements after init&#39;ing the EquationSystems.
Definition: MooseMesh.h:1771

◆ allowRemoteElementRemoval() [2/2]

bool MooseMesh::allowRemoteElementRemoval ( ) const
inline

Whether we are allow remote element removal.

Definition at line 1072 of file MooseMesh.h.

Referenced by MooseMesh().

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

◆ 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 2100 of file MooseMesh.h.

2101 {
2102  auto id1 = getElementIDIndex(id_name1);
2103  auto id2 = getElementIDIndex(id_name2);
2104  return _id_identical_flag[id1][id2];
2105 }
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:1792
unsigned int getElementIDIndex(const std::string &id_name) const
Return the accessing integer for an extra element integer with its name.
Definition: MooseMesh.h:2092

◆ bndElemsBegin()

MooseMesh::bnd_elem_iterator MooseMesh::bndElemsBegin ( )
virtual

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

Definition at line 1343 of file MooseMesh.C.

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

1344 {
1345  Predicates::NotNull<bnd_elem_iterator_imp> p;
1346  return bnd_elem_iterator(_bnd_elems.begin(), _bnd_elems.end(), p);
1347 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1496

◆ bndElemsEnd()

MooseMesh::bnd_elem_iterator MooseMesh::bndElemsEnd ( )
virtual

Definition at line 1351 of file MooseMesh.C.

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

1352 {
1353  Predicates::NotNull<bnd_elem_iterator_imp> p;
1354  return bnd_elem_iterator(_bnd_elems.end(), _bnd_elems.end(), p);
1355 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1496

◆ bndNodesBegin()

MooseMesh::bnd_node_iterator MooseMesh::bndNodesBegin ( )
virtual

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

Definition at line 1327 of file MooseMesh.C.

Referenced by getBoundaryNodeRange().

1328 {
1329  Predicates::NotNull<bnd_node_iterator_imp> p;
1330  return bnd_node_iterator(_bnd_nodes.begin(), _bnd_nodes.end(), p);
1331 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1489

◆ bndNodesEnd()

MooseMesh::bnd_node_iterator MooseMesh::bndNodesEnd ( )
virtual

Definition at line 1335 of file MooseMesh.C.

Referenced by getBoundaryNodeRange().

1336 {
1337  Predicates::NotNull<bnd_node_iterator_imp> p;
1338  return bnd_node_iterator(_bnd_nodes.end(), _bnd_nodes.end(), p);
1339 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1489

◆ 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 2765 of file MooseMesh.C.

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

2766 {
2767  return getMesh().get_boundary_info().build_active_side_list();
2768 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ buildBndElemList()

void MooseMesh::buildBndElemList ( )

Definition at line 957 of file MooseMesh.C.

Referenced by update().

958 {
959  TIME_SECTION("buildBndElemList", 5, "Building Boundary Elements List");
960 
961  freeBndElems();
962 
963  auto bc_tuples = getMesh().get_boundary_info().build_active_side_list();
964 
965  int n = bc_tuples.size();
966  _bnd_elems.clear();
967  _bnd_elems.reserve(n);
968  for (const auto & t : bc_tuples)
969  {
970  auto elem_id = std::get<0>(t);
971  auto side_id = std::get<1>(t);
972  auto bc_id = std::get<2>(t);
973 
974  _bnd_elems.push_back(new BndElement(getMesh().elem_ptr(elem_id), side_id, bc_id));
975  _bnd_elem_ids[bc_id].insert(elem_id);
976  }
977 }
void freeBndElems()
Definition: MooseMesh.C:351
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:1501
const boundary_id_type side_id
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1496

◆ buildCoarseningMap()

void MooseMesh::buildCoarseningMap ( const Elem &  elem,
QBase &  qrule,
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 2298 of file MooseMesh.C.

Referenced by buildHRefinementAndCoarseningMaps().

2299 {
2300  TIME_SECTION("buildCoarseningMap", 5, "Building Coarsening Map");
2301 
2302  std::pair<int, ElemType> the_pair(input_side, elem.type());
2303 
2304  if (_elem_type_to_coarsening_map.find(the_pair) != _elem_type_to_coarsening_map.end())
2305  mooseError("Already built a qp coarsening map!");
2306 
2307  std::vector<std::vector<QpMap>> refinement_map;
2308  std::vector<std::pair<unsigned int, QpMap>> & coarsen_map =
2309  _elem_type_to_coarsening_map[the_pair];
2310 
2311  // The -1 here is for a specific child. We don't do that for coarsening maps
2312  // Also note that we're always mapping the same side to the same side (which is guaranteed by
2313  // libMesh).
2315  &elem, qrule, qrule_face, refinement_map, coarsen_map, input_side, -1, input_side);
2316 
2323 }
std::map< std::pair< int, 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:1730
void findAdaptivityQpMaps(const Elem *template_elem, QBase &qrule, 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:2368
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ buildElemIDInfo()

void MooseMesh::buildElemIDInfo ( )
private

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

Definition at line 861 of file MooseMesh.C.

Referenced by update().

862 {
863  unsigned int n = getMesh().n_elem_integers() + 1;
864 
865  _block_id_mapping.clear();
866  _max_ids.clear();
867  _min_ids.clear();
868  _id_identical_flag.clear();
869 
870  _block_id_mapping.resize(n);
873  _id_identical_flag.resize(n, std::vector<bool>(n, true));
874  for (const auto & elem : getMesh().active_local_element_ptr_range())
875  for (unsigned int i = 0; i < n; ++i)
876  {
877  auto id = (i == n - 1 ? elem->subdomain_id() : elem->get_extra_integer(i));
878  _block_id_mapping[i][elem->subdomain_id()].insert(id);
879  if (id > _max_ids[i])
880  _max_ids[i] = id;
881  if (id < _min_ids[i])
882  _min_ids[i] = id;
883  for (unsigned int j = 0; j < n; ++j)
884  {
885  auto idj = (j == n - 1 ? elem->subdomain_id() : elem->get_extra_integer(j));
886  if (i != j && _id_identical_flag[i][j] && id != idj)
887  _id_identical_flag[i][j] = false;
888  }
889  }
890 
891  for (unsigned int i = 0; i < n; ++i)
892  {
893  for (auto & blk : meshSubdomains())
894  comm().set_union(_block_id_mapping[i][blk]);
896  }
897  comm().max(_max_ids);
898  comm().min(_min_ids);
899 }
std::vector< dof_id_type > _min_ids
Minimum integer ID for each extra element integer.
Definition: MooseMesh.h:1790
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:1792
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:3198
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:1788
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:1786
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
auto min(const L &left, const R &right)
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2921
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 3485 of file MooseMesh.C.

Referenced by setupFiniteVolumeMeshData().

3486 {
3487  mooseAssert(!Threads::in_threads,
3488  "This routine has not been implemented for threads. Please query this routine before "
3489  "a threaded region or contact a MOOSE developer to discuss.");
3490  _finite_volume_info_dirty = false;
3491 
3492  using Keytype = std::pair<const Elem *, unsigned short int>;
3493 
3494  // create a map from elem/side --> boundary ids
3495  std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> side_list =
3497  std::map<Keytype, std::set<boundary_id_type>> side_map;
3498  for (auto & [elem_id, side, bc_id] : side_list)
3499  {
3500  const Elem * elem = _mesh->elem_ptr(elem_id);
3501  Keytype key(elem, side);
3502  auto & bc_set = side_map[key];
3503  bc_set.insert(bc_id);
3504  }
3505 
3506  _face_info.clear();
3507  _all_face_info.clear();
3508  _elem_side_to_face_info.clear();
3509 
3510  _elem_to_elem_info.clear();
3511  _elem_info.clear();
3512 
3513  // by performing the element ID comparison check in the below loop, we are ensuring that we never
3514  // double count face contributions. If a face lies along a process boundary, the only process that
3515  // will contribute to both sides of the face residuals/Jacobians will be the process that owns the
3516  // element with the lower ID.
3517  auto begin = getMesh().active_elements_begin();
3518  auto end = getMesh().active_elements_end();
3519 
3520  // We prepare a map connecting the Elem* and the corresponding ElemInfo
3521  // for the active elements.
3522  for (const Elem * elem : as_range(begin, end))
3523  _elem_to_elem_info.emplace(elem->id(), elem);
3524 
3526 
3527  dof_id_type face_index = 0;
3528  for (const Elem * elem : as_range(begin, end))
3529  {
3530  for (unsigned int side = 0; side < elem->n_sides(); ++side)
3531  {
3532  // get the neighbor element
3533  const Elem * neighbor = elem->neighbor_ptr(side);
3534 
3535  // Check if the FaceInfo shall belong to the element. If yes,
3536  // create and initialize the FaceInfo. We need this to ensure that
3537  // we do not duplicate FaceInfo-s.
3538  if (Moose::FV::elemHasFaceInfo(*elem, neighbor))
3539  {
3540  mooseAssert(!neighbor || (neighbor->level() < elem->level() ? neighbor->active() : true),
3541  "If the neighbor is coarser than the element, we expect that the neighbor must "
3542  "be active.");
3543 
3544  // We construct the faceInfo using the elementinfo and side index
3545  _all_face_info.emplace_back(&_elem_to_elem_info[elem->id()], side, face_index++);
3546 
3547  auto & fi = _all_face_info.back();
3548 
3549  // get all the sidesets that this face is contained in and cache them
3550  // in the face info.
3551  std::set<boundary_id_type> & boundary_ids = fi.boundaryIDs();
3552  boundary_ids.clear();
3553 
3554  // We initialize the weights/other information in faceInfo. If the neighbor does not exist
3555  // or is remote (so when we are on some sort of mesh boundary), we initialize the ghost
3556  // cell and use it to compute the weights corresponding to the faceInfo.
3557  if (!neighbor || neighbor == remote_elem)
3558  fi.computeBoundaryCoefficients();
3559  else
3560  fi.computeInternalCoefficients(&_elem_to_elem_info[neighbor->id()]);
3561 
3562  auto lit = side_map.find(Keytype(&fi.elem(), fi.elemSideID()));
3563  if (lit != side_map.end())
3564  boundary_ids.insert(lit->second.begin(), lit->second.end());
3565 
3566  if (fi.neighborPtr())
3567  {
3568  auto rit = side_map.find(Keytype(fi.neighborPtr(), fi.neighborSideID()));
3569  if (rit != side_map.end())
3570  boundary_ids.insert(rit->second.begin(), rit->second.end());
3571  }
3572  }
3573  }
3574  }
3575 
3576  // Build the local face info and elem_side to face info maps. We need to do this after
3577  // _all_face_info is finished being constructed because emplace_back invalidates all iterators and
3578  // references if ever the new size exceeds capacity
3579  for (auto & fi : _all_face_info)
3580  {
3581  const Elem * const elem = &fi.elem();
3582  const auto side = fi.elemSideID();
3583 
3584 #ifndef NDEBUG
3585  auto pair_it =
3586 #endif
3587  _elem_side_to_face_info.emplace(std::make_pair(elem, side), &fi);
3588  mooseAssert(pair_it.second, "We should be adding unique FaceInfo objects.");
3589 
3590  // We will add the faces on processor boundaries to the list of face infos on each
3591  // associated processor.
3592  if (fi.elem().processor_id() == this->processor_id() ||
3593  (fi.neighborPtr() && (fi.neighborPtr()->processor_id() == this->processor_id())))
3594  _face_info.push_back(&fi);
3595  }
3596 
3597  for (auto & ei : _elem_to_elem_info)
3598  if (ei.second.elem()->processor_id() == this->processor_id())
3599  _elem_info.push_back(&ei.second);
3600 }
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1560
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:1564
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:20
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1571
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList() const
Calls BoundaryInfo::build_active_side_list.
Definition: MooseMesh.C:2765
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:1556
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:1568
bool _linear_finite_volume_dofs_cached
Definition: MooseMesh.h:1576
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
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:1552
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
processor_id_type processor_id() const
uint8_t dof_id_type

◆ buildHRefinementAndCoarseningMaps()

void MooseMesh::buildHRefinementAndCoarseningMaps ( Assembly assembly)
private

Definition at line 2054 of file MooseMesh.C.

Referenced by buildRefinementAndCoarseningMaps().

2055 {
2056  std::map<ElemType, Elem *> canonical_elems;
2057 
2058  // First, loop over all elements and find a canonical element for each type
2059  // Doing it this way guarantees that this is going to work in parallel
2060  for (const auto & elem : getMesh().element_ptr_range()) // TODO: Thread this
2061  {
2062  ElemType type = elem->type();
2063 
2064  if (canonical_elems.find(type) ==
2065  canonical_elems.end()) // If we haven't seen this type of elem before save it
2066  canonical_elems[type] = elem;
2067  else
2068  {
2069  Elem * stored = canonical_elems[type];
2070  if (elem->id() < stored->id()) // Arbitrarily keep the one with a lower id
2071  canonical_elems[type] = elem;
2072  }
2073  }
2074  // Now build the maps using these templates
2075  // Note: This MUST be done NOT threaded!
2076  for (const auto & can_it : canonical_elems)
2077  {
2078  Elem * elem = can_it.second;
2079 
2080  // Need to do this just once to get the right qrules put in place
2081  assembly->setCurrentSubdomainID(elem->subdomain_id());
2082  assembly->reinit(elem);
2083  assembly->reinit(elem, 0);
2084  auto && qrule = assembly->writeableQRule();
2085  auto && qrule_face = assembly->writeableQRuleFace();
2086 
2087  // Volume to volume projection for refinement
2088  buildRefinementMap(*elem, *qrule, *qrule_face, -1, -1, -1);
2089 
2090  // Volume to volume projection for coarsening
2091  buildCoarseningMap(*elem, *qrule, *qrule_face, -1);
2092 
2093  // Map the sides of children
2094  for (unsigned int side = 0; side < elem->n_sides(); side++)
2095  {
2096  // Side to side for sides that match parent's sides
2097  buildRefinementMap(*elem, *qrule, *qrule_face, side, -1, side);
2098  buildCoarseningMap(*elem, *qrule, *qrule_face, side);
2099  }
2100 
2101  // Child side to parent volume mapping for "internal" child sides
2102  for (unsigned int child = 0; child < elem->n_children(); ++child)
2103  for (unsigned int side = 0; side < elem->n_sides();
2104  ++side) // Assume children have the same number of sides!
2105  if (!elem->is_child_on_side(child, side)) // Otherwise we already computed that map
2106  buildRefinementMap(*elem, *qrule, *qrule_face, -1, child, side);
2107  }
2108 }
ElemType
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition: Assembly.C:1811
QBase *const & writeableQRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:292
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
QBase *const & writeableQRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:216
void buildCoarseningMap(const Elem &elem, QBase &qrule, QBase &qrule_face, int input_side)
Build the coarsening map for a given element type.
Definition: MooseMesh.C:2298
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
void setCurrentSubdomainID(SubdomainID i)
set the current subdomain ID
Definition: Assembly.h:377
void buildRefinementMap(const Elem &elem, QBase &qrule, QBase &qrule_face, int parent_side, int child, int child_side)
Build the refinement map for a given element type.
Definition: MooseMesh.C:2219
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ buildLowerDMesh()

void MooseMesh::buildLowerDMesh ( )
private

Build lower-d mesh for all sides.

Definition at line 505 of file MooseMesh.C.

Referenced by init().

506 {
507  auto & mesh = getMesh();
508 
509  if (!mesh.is_serial())
510  mooseError(
511  "Hybrid finite element method must use replicated mesh.\nCurrently lower-dimensional mesh "
512  "does not support mesh re-partitioning and a debug assertion being hit related with "
513  "neighbors of lower-dimensional element, with distributed mesh.");
514 
515  // Lower-D element build requires neighboring element information
516  if (!mesh.is_prepared())
517  mesh.find_neighbors();
518 
519  // maximum number of sides of all elements
520  unsigned int max_n_sides = 0;
521 
522  // remove existing lower-d element first
523  std::set<Elem *> deleteable_elems;
524  for (auto & elem : mesh.element_ptr_range())
525  if (elem->subdomain_id() == Moose::INTERNAL_SIDE_LOWERD_ID ||
526  elem->subdomain_id() == Moose::BOUNDARY_SIDE_LOWERD_ID)
527  deleteable_elems.insert(elem);
528  else if (elem->n_sides() > max_n_sides)
529  max_n_sides = elem->n_sides();
530 
531  for (auto & elem : deleteable_elems)
532  mesh.delete_elem(elem);
533 
534  mesh.comm().max(max_n_sides);
535 
536  deleteable_elems.clear();
537 
538  dof_id_type max_elem_id = mesh.max_elem_id();
539  unique_id_type max_unique_id = mesh.parallel_max_unique_id();
540 
541  std::vector<Elem *> side_elems;
543  for (const auto & elem : mesh.active_element_ptr_range())
544  {
545  // skip existing lower-d elements
546  if (elem->interior_parent())
547  continue;
548 
549  for (const auto side : elem->side_index_range())
550  {
551  Elem * neig = elem->neighbor_ptr(side);
552 
553  bool build_side = false;
554  if (!neig)
555  build_side = true;
556  else
557  {
558  mooseAssert(!neig->is_remote(), "We error if the mesh is not serial");
559  if (!neig->active())
560  build_side = true;
561  else if (neig->level() == elem->level() && elem->id() < neig->id())
562  build_side = true;
563  }
564 
565  if (build_side)
566  {
567  std::unique_ptr<Elem> side_elem(elem->build_side_ptr(side, false));
568 
569  // The side will be added with the same processor id as the parent.
570  side_elem->processor_id() = elem->processor_id();
571 
572  // Add subdomain ID
573  if (neig)
574  side_elem->subdomain_id() = Moose::INTERNAL_SIDE_LOWERD_ID;
575  else
576  side_elem->subdomain_id() = Moose::BOUNDARY_SIDE_LOWERD_ID;
577 
578  // set ids consistently across processors (these ids will be temporary)
579  side_elem->set_id(max_elem_id + elem->id() * max_n_sides + side);
580  side_elem->set_unique_id(max_unique_id + elem->id() * max_n_sides + side);
581 
582  // Also assign the side's interior parent, so it is always
583  // easy to figure out the Elem we came from.
584  // Note: the interior parent could be a ghost element.
585  side_elem->set_interior_parent(elem);
586 
587  side_elems.push_back(side_elem.release());
588 
589  // add link between higher d element to lower d element
590  auto pair = std::make_pair(elem, side);
591  auto link = std::make_pair(pair, side_elems.back());
592  auto ilink = std::make_pair(side_elems.back(), side);
595  }
596  }
597  }
598 
599  // finally, add the lower-dimensional element to the mesh
600  // Note: lower-d interior element will exist on a processor if its associated interior
601  // parent exists on a processor whether or not being a ghost. Lower-d elements will
602  // get its interior parent's processor id.
603  for (auto & elem : side_elems)
604  mesh.add_elem(elem);
605 
607  mesh.subdomain_name(Moose::INTERNAL_SIDE_LOWERD_ID) = "INTERNAL_SIDE_LOWERD_SUBDOMAIN";
609  mesh.subdomain_name(Moose::BOUNDARY_SIDE_LOWERD_ID) = "BOUNDARY_SIDE_LOWERD_SUBDOMAIN";
610 
611  // we do all the stuff in prepare_for_use such as renumber_nodes_and_elements(),
612  // update_parallel_id_counts(), cache_elem_dims(), etc. except partitioning here.
613  const bool skip_partitioning_old = mesh.skip_partitioning();
614  mesh.skip_partitioning(true);
615  // Finding neighbors is ambiguous for lower-dimensional elements on interior faces
616  mesh.allow_find_neighbors(false);
617  mesh.prepare_for_use();
618  mesh.skip_partitioning(skip_partitioning_old);
619 }
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
Definition: MooseMesh.h:1758
const SubdomainID BOUNDARY_SIDE_LOWERD_ID
Definition: MooseTypes.C:21
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:1757
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
const SubdomainID INTERNAL_SIDE_LOWERD_ID
Definition: MooseTypes.C:20
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1472
uint8_t unique_id_type
uint8_t dof_id_type

◆ 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 PatternedMesh, ConcentricCircleMesh, StitchedMesh, MeshGeneratorMesh, AnnularMesh, 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 2603 of file MooseMesh.C.

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

2604 {
2605  if (dim == libMesh::invalid_uint)
2606  dim = getParam<MooseEnum>("dim");
2607 
2608  std::unique_ptr<MeshBase> mesh;
2610  mesh = buildTypedMesh<DistributedMesh>(dim);
2611  else
2612  mesh = buildTypedMesh<ReplicatedMesh>(dim);
2613 
2614  return mesh;
2615 }
const unsigned int invalid_uint
MeshBase & mesh
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385

◆ 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 827 of file MooseMesh.C.

Referenced by update().

828 {
829  TIME_SECTION("buildNodeList", 5, "Building Node List");
830 
831  freeBndNodes();
832 
833  auto bc_tuples = getMesh().get_boundary_info().build_node_list();
834 
835  int n = bc_tuples.size();
836  _bnd_nodes.clear();
837  _bnd_nodes.reserve(n);
838  for (const auto & t : bc_tuples)
839  {
840  auto node_id = std::get<0>(t);
841  auto bc_id = std::get<1>(t);
842 
843  _bnd_nodes.push_back(new BndNode(getMesh().node_ptr(node_id), bc_id));
844  _node_set_nodes[bc_id].push_back(node_id);
845  _bnd_node_ids[bc_id].insert(node_id);
846  }
847 
848  _bnd_nodes.reserve(_bnd_nodes.size() + _extra_bnd_nodes.size());
849  for (unsigned int i = 0; i < _extra_bnd_nodes.size(); i++)
850  {
851  BndNode * bnode = new BndNode(_extra_bnd_nodes[i]._node, _extra_bnd_nodes[i]._bnd_id);
852  _bnd_nodes.push_back(bnode);
853  _bnd_node_ids[std::get<1>(bc_tuples[i])].insert(_extra_bnd_nodes[i]._node->id());
854  }
855 
856  // This sort is here so that boundary conditions are always applied in the same order
857  std::sort(_bnd_nodes.begin(), _bnd_nodes.end(), BndNodeCompare());
858 }
Helper class for sorting Boundary Nodes so that we always get the same order of application for bound...
Definition: MooseMesh.C:803
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:1493
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:1512
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1489
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:1506
void freeBndNodes()
Definition: MooseMesh.C:333

◆ buildNodeListFromSideList()

void MooseMesh::buildNodeListFromSideList ( )

Calls BoundaryInfo::build_node_list_from_side_list().

Definition at line 2733 of file MooseMesh.C.

Referenced by prepare(), and update().

2734 {
2736  getMesh().get_boundary_info().build_node_list_from_side_list();
2737 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1768

◆ buildPeriodicNodeMap()

void MooseMesh::buildPeriodicNodeMap ( std::multimap< dof_id_type, dof_id_type > &  periodic_node_map,
unsigned int  var_number,
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 1587 of file MooseMesh.C.

1590 {
1591  TIME_SECTION("buildPeriodicNodeMap", 5);
1592 
1593  // clear existing map
1594  periodic_node_map.clear();
1595 
1596  // get periodic nodes
1597  std::vector<PeriodicNodeInfo> periodic_nodes;
1598  for (const auto & t : getMesh().get_boundary_info().build_node_list())
1599  {
1600  // unfortunately libMesh does not give us a pointer, so we have to look it up ourselves
1601  auto node = _mesh->node_ptr(std::get<0>(t));
1602  mooseAssert(node != nullptr,
1603  "libMesh::BoundaryInfo::build_node_list() returned an ID for a non-existing node");
1604  auto bc_id = std::get<1>(t);
1605  periodic_nodes.emplace_back(node, bc_id);
1606  }
1607 
1608  // sort by boundary id
1609  std::sort(periodic_nodes.begin(),
1610  periodic_nodes.end(),
1611  [](const PeriodicNodeInfo & a, const PeriodicNodeInfo & b) -> bool
1612  { return a.second > b.second; });
1613 
1614  // build kd-tree
1615  using KDTreeType = nanoflann::KDTreeSingleIndexAdaptor<
1616  nanoflann::L2_Simple_Adaptor<Real, PointListAdaptor<PeriodicNodeInfo>, Real, std::size_t>,
1618  LIBMESH_DIM,
1619  std::size_t>;
1620  const unsigned int max_leaf_size = 20; // slightly affects runtime
1621  auto point_list =
1622  PointListAdaptor<PeriodicNodeInfo>(periodic_nodes.begin(), periodic_nodes.end());
1623  auto kd_tree = std::make_unique<KDTreeType>(
1624  LIBMESH_DIM, point_list, nanoflann::KDTreeSingleIndexAdaptorParams(max_leaf_size));
1625  mooseAssert(kd_tree != nullptr, "KDTree was not properly initialized.");
1626  kd_tree->buildIndex();
1627 
1628  // data structures for kd-tree search
1629  nanoflann::SearchParameters search_params;
1630  std::vector<nanoflann::ResultItem<std::size_t, Real>> ret_matches;
1631 
1632  // iterate over periodic nodes (boundary ids are in contiguous blocks)
1633  PeriodicBoundaryBase * periodic = nullptr;
1634  BoundaryID current_bc_id = BoundaryInfo::invalid_id;
1635  for (auto & pair : periodic_nodes)
1636  {
1637  // entering a new block of boundary IDs
1638  if (pair.second != current_bc_id)
1639  {
1640  current_bc_id = pair.second;
1641  periodic = pbs->boundary(current_bc_id);
1642  if (periodic && !periodic->is_my_variable(var_number))
1643  periodic = nullptr;
1644  }
1645 
1646  // variable is not periodic at this node, skip
1647  if (!periodic)
1648  continue;
1649 
1650  // clear result buffer
1651  ret_matches.clear();
1652 
1653  // id of the current node
1654  const auto id = pair.first->id();
1655 
1656  // position where we expect a periodic partner for the current node and boundary
1657  Point search_point = periodic->get_corresponding_pos(*pair.first);
1658 
1659  // search at the expected point
1660  kd_tree->radiusSearch(&(search_point)(0), libMesh::TOLERANCE, ret_matches, search_params);
1661  for (auto & match_pair : ret_matches)
1662  {
1663  const auto & match = periodic_nodes[match_pair.first];
1664  // add matched node if the boundary id is the corresponding id in the periodic pair
1665  if (match.second == periodic->pairedboundary)
1666  periodic_node_map.emplace(id, match.first->id());
1667  }
1668  }
1669 }
static constexpr Real TOLERANCE
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
std::pair< const Node *, BoundaryID > PeriodicNodeInfo
Helper type for building periodic node maps.
Definition: MooseMesh.h:1052
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:1390
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:622
SearchParams SearchParameters

◆ buildPeriodicNodeSets()

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

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

Definition at line 1672 of file MooseMesh.C.

1675 {
1676  TIME_SECTION("buildPeriodicNodeSets", 5);
1677 
1678  periodic_node_sets.clear();
1679 
1680  // Loop over all the boundary nodes adding the periodic nodes to the appropriate set
1681  for (const auto & t : getMesh().get_boundary_info().build_node_list())
1682  {
1683  auto node_id = std::get<0>(t);
1684  auto bc_id = std::get<1>(t);
1685 
1686  // Is this current node on a known periodic boundary?
1687  if (periodic_node_sets.find(bc_id) != periodic_node_sets.end())
1688  periodic_node_sets[bc_id].insert(node_id);
1689  else // This still might be a periodic node but we just haven't seen this boundary_id yet
1690  {
1691  const PeriodicBoundaryBase * periodic = pbs->boundary(bc_id);
1692  if (periodic && periodic->is_my_variable(var_number))
1693  periodic_node_sets[bc_id].insert(node_id);
1694  }
1695  }
1696 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ buildPRefinementAndCoarseningMaps()

void MooseMesh::buildPRefinementAndCoarseningMaps ( Assembly assembly)

Definition at line 2111 of file MooseMesh.C.

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

2112 {
2117 
2118  std::map<ElemType, std::pair<Elem *, unsigned int>> elems_and_max_p_level;
2119 
2120  for (const auto & elem : getMesh().active_element_ptr_range())
2121  {
2122  const auto type = elem->type();
2123  auto & [picked_elem, max_p_level] = elems_and_max_p_level[type];
2124  if (!picked_elem)
2125  picked_elem = elem;
2126  max_p_level = std::max(max_p_level, elem->p_level());
2127  }
2128 
2129  // The only requirement on the FEType is that it can be arbitrarily p-refined
2130  const FEType p_refinable_fe_type(CONSTANT, MONOMIAL);
2131  std::vector<Point> volume_ref_points_coarse, volume_ref_points_fine, face_ref_points_coarse,
2132  face_ref_points_fine;
2133  std::vector<unsigned int> p_levels;
2134 
2135  for (auto & [elem_type, elem_p_level_pair] : elems_and_max_p_level)
2136  {
2137  auto & [moose_elem, max_p_level] = elem_p_level_pair;
2138  const auto dim = moose_elem->dim();
2139  // Need to do this just once to get the right qrules put in place
2140  assembly->setCurrentSubdomainID(moose_elem->subdomain_id());
2141  assembly->reinit(moose_elem);
2142  assembly->reinit(moose_elem, 0);
2143  auto & qrule = assembly->writeableQRule();
2144  auto & qrule_face = assembly->writeableQRuleFace();
2145 
2146  libMesh::Parallel::Communicator self_comm{};
2147  ReplicatedMesh mesh(self_comm);
2148  mesh.set_mesh_dimension(dim);
2149  for (const auto & nd : moose_elem->node_ref_range())
2150  mesh.add_point(nd);
2151 
2152  Elem * const elem = mesh.add_elem(Elem::build(elem_type).release());
2153  for (const auto i : elem->node_index_range())
2154  elem->set_node(i) = mesh.node_ptr(i);
2155 
2156  std::unique_ptr<FEBase> fe(FEBase::build(dim, p_refinable_fe_type));
2157  std::unique_ptr<FEBase> fe_face(FEBase::build(dim, p_refinable_fe_type));
2158  fe_face->get_phi();
2159  const auto & face_phys_points = fe_face->get_xyz();
2160 
2161  fe->attach_quadrature_rule(qrule);
2162  fe_face->attach_quadrature_rule(qrule_face);
2163  fe->reinit(elem);
2164  volume_ref_points_coarse = qrule->get_points();
2165  fe_face->reinit(elem, (unsigned int)0);
2166  FEInterface::inverse_map(
2167  dim, p_refinable_fe_type, elem, face_phys_points, face_ref_points_coarse);
2168 
2169  p_levels.resize(max_p_level + 1);
2170  std::iota(p_levels.begin(), p_levels.end(), 0);
2171  MeshRefinement mesh_refinement(mesh);
2172 
2173  for (const auto p_level : p_levels)
2174  {
2175  mesh_refinement.uniformly_p_refine(1);
2176  fe->reinit(elem);
2177  volume_ref_points_fine = qrule->get_points();
2178  fe_face->reinit(elem, (unsigned int)0);
2179  FEInterface::inverse_map(
2180  dim, p_refinable_fe_type, elem, face_phys_points, face_ref_points_fine);
2181 
2182  const auto map_key = std::make_pair(elem_type, p_level);
2183  auto & volume_refine_map = _elem_type_to_p_refinement_map[map_key];
2184  auto & face_refine_map = _elem_type_to_p_refinement_side_map[map_key];
2185  auto & volume_coarsen_map = _elem_type_to_p_coarsening_map[map_key];
2186  auto & face_coarsen_map = _elem_type_to_p_coarsening_side_map[map_key];
2187 
2188  auto fill_maps = [this](const auto & coarse_ref_points,
2189  const auto & fine_ref_points,
2190  auto & coarsen_map,
2191  auto & refine_map)
2192  {
2193  mapPoints(fine_ref_points, coarse_ref_points, refine_map);
2194  mapPoints(coarse_ref_points, fine_ref_points, coarsen_map);
2195  };
2196 
2197  fill_maps(
2198  volume_ref_points_coarse, volume_ref_points_fine, volume_coarsen_map, volume_refine_map);
2199  fill_maps(face_ref_points_coarse, face_ref_points_fine, face_coarsen_map, face_refine_map);
2200 
2201  // With this level's maps filled our fine points now become our coarse points
2202  volume_ref_points_fine.swap(volume_ref_points_coarse);
2203  face_ref_points_fine.swap(face_ref_points_coarse);
2204  }
2205  }
2206 }
std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
Definition: MooseMesh.h:1707
MeshBase & mesh
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_side_map
Definition: MooseMesh.h:1734
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition: Assembly.C:1811
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:2337
QBase *const & writeableQRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:292
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
QBase *const & writeableQRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:216
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50
std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
Definition: MooseMesh.h:1732
std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
Definition: MooseMesh.h:1709
void setCurrentSubdomainID(SubdomainID i)
set the current subdomain ID
Definition: Assembly.h:377
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 2209 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup().

2210 {
2211  TIME_SECTION("buildRefinementAndCoarseningMaps", 5, "Building Refinement And Coarsening Maps");
2212  if (doingPRefinement())
2214  else
2216 }
void buildHRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2054
bool doingPRefinement() const
Query whether we have p-refinement.
Definition: MooseMesh.h:1330
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition: MooseMesh.C:2111

◆ buildRefinementMap()

void MooseMesh::buildRefinementMap ( const Elem &  elem,
QBase &  qrule,
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 2219 of file MooseMesh.C.

Referenced by buildHRefinementAndCoarseningMaps().

2225 {
2226  TIME_SECTION("buildRefinementMap", 5, "Building Refinement Map");
2227 
2228  if (child == -1) // Doing volume mapping or parent side mapping
2229  {
2230  mooseAssert(parent_side == child_side,
2231  "Parent side must match child_side if not passing a specific child!");
2232 
2233  std::pair<int, ElemType> the_pair(parent_side, elem.type());
2234 
2235  if (_elem_type_to_refinement_map.find(the_pair) != _elem_type_to_refinement_map.end())
2236  mooseError("Already built a qp refinement map!");
2237 
2238  std::vector<std::pair<unsigned int, QpMap>> coarsen_map;
2239  std::vector<std::vector<QpMap>> & refinement_map = _elem_type_to_refinement_map[the_pair];
2241  &elem, qrule, qrule_face, refinement_map, coarsen_map, parent_side, child, child_side);
2242  }
2243  else // Need to map a child side to parent volume qps
2244  {
2245  std::pair<int, int> child_pair(child, child_side);
2246 
2247  if (_elem_type_to_child_side_refinement_map.find(elem.type()) !=
2249  _elem_type_to_child_side_refinement_map[elem.type()].find(child_pair) !=
2251  mooseError("Already built a qp refinement map!");
2252 
2253  std::vector<std::pair<unsigned int, QpMap>> coarsen_map;
2254  std::vector<std::vector<QpMap>> & refinement_map =
2255  _elem_type_to_child_side_refinement_map[elem.type()][child_pair];
2257  &elem, qrule, qrule_face, refinement_map, coarsen_map, parent_side, child, child_side);
2258  }
2259 }
std::map< 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:1713
void findAdaptivityQpMaps(const Elem *template_elem, QBase &qrule, 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:2368
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
std::map< std::pair< int, 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:1705

◆ 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 2740 of file MooseMesh.C.

Referenced by InterfaceQpUserObjectBase::initialSetup().

2743 {
2744 #ifdef LIBMESH_ENABLE_DEPRECATED
2745  mooseDeprecated("The version of MooseMesh::buildSideList() taking three arguments is "
2746  "deprecated, call the version that returns a vector of tuples instead.");
2747  getMesh().get_boundary_info().build_side_list(el, sl, il);
2748 #else
2749  libmesh_ignore(el);
2750  libmesh_ignore(sl);
2751  libmesh_ignore(il);
2752  mooseError("The version of MooseMesh::buildSideList() taking three "
2753  "arguments is not available in your version of libmesh, call the "
2754  "version that returns a vector of tuples instead.");
2755 #endif
2756 }
void mooseDeprecated(Args &&... args) const
void libmesh_ignore(const Args &...)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 2759 of file MooseMesh.C.

2760 {
2761  return getMesh().get_boundary_info().build_side_list();
2762 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 2031 of file MooseMesh.h.

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

2032 {
2033  // If the requested mesh type to build doesn't match our current value for _use_distributed_mesh,
2034  // then we need to make sure to make our state consistent because other objects, like the periodic
2035  // boundary condition action, will be querying isDistributedMesh()
2036  if (_use_distributed_mesh != std::is_same<T, DistributedMesh>::value)
2037  {
2038  if (getMeshPtr())
2039  mooseError("A MooseMesh object is being asked to build a libMesh mesh that is a different "
2040  "parallel type than the libMesh mesh that it wraps. This is not allowed. Please "
2041  "create another MooseMesh object to wrap the new libMesh mesh");
2042  setParallelType(MeshType<T>::value);
2043  }
2044 
2045  if (dim == libMesh::invalid_uint)
2046  dim = getParam<MooseEnum>("dim");
2047 
2048  auto mesh = std::make_unique<T>(_communicator, dim);
2049 
2050  if (!getParam<bool>("allow_renumbering"))
2051  mesh->allow_renumbering(false);
2052 
2053  mesh->allow_remote_element_removal(_allow_remote_element_removal);
2054  _app.attachRelationshipManagers(*mesh, *this);
2055 
2057  {
2058  // Check of partitioner is supplied (not allowed if custom partitioner is used)
2059  if (!parameters().isParamSetByAddParam("partitioner"))
2060  mooseError("If partitioner block is provided, partitioner keyword cannot be used!");
2061  // Set custom partitioner
2062  if (!_custom_partitioner.get())
2063  mooseError("Custom partitioner requested but not set!");
2064  mesh->partitioner() = _custom_partitioner->clone();
2065  }
2066  else
2067  setPartitionerHelper(mesh.get());
2068 
2069  return mesh;
2070 }
const unsigned int invalid_uint
void setParallelType(ParallelType parallel_type)
Allow to change parallel type.
Definition: MooseMesh.h:2079
bool _custom_partitioner_requested
Definition: MooseMesh.h:1398
MeshBase & mesh
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
const Parallel::Communicator & _communicator
void setPartitionerHelper(MeshBase *mesh=nullptr)
Definition: MooseMesh.C:3378
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:2550
const MeshBase * getMeshPtr() const
Definition: MooseMesh.C:3192
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1774
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
std::unique_ptr< Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:1397

◆ cacheChangedLists()

void MooseMesh::cacheChangedLists ( )

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

Definition at line 715 of file MooseMesh.C.

Referenced by FEProblemBase::meshChangedHelper().

716 {
717  TIME_SECTION("cacheChangedLists", 5, "Caching Changed Lists");
718 
719  ConstElemRange elem_range(getMesh().local_elements_begin(), getMesh().local_elements_end(), 1);
720  CacheChangedListsThread cclt(*this);
721  Threads::parallel_reduce(elem_range, cclt);
722 
724 
725  _refined_elements = std::make_unique<ConstElemPointerRange>(cclt._refined_elements.begin(),
726  cclt._refined_elements.end());
727  _coarsened_elements = std::make_unique<ConstElemPointerRange>(cclt._coarsened_elements.begin(),
728  cclt._coarsened_elements.end());
729  _coarsened_element_children = cclt._coarsened_element_children;
730 }
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:1432
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:1435
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:1442

◆ 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 3689 of file MooseMesh.C.

Referenced by setupFiniteVolumeMeshData().

3690 {
3691  mooseAssert(
3692  !Threads::in_threads,
3693  "Performing writes to faceInfo variable association maps. This must be done unthreaded!");
3694 
3695  std::vector<const MooseVariableFieldBase *> moose_vars;
3696 
3697  for (const auto i : make_range(_app.feProblem().numNonlinearSystems()))
3698  {
3699  const auto & nl_variables = _app.feProblem().getNonlinearSystemBase(i).getVariables(0);
3700  for (const auto & var : nl_variables)
3701  if (var->fieldType() == 0)
3702  moose_vars.push_back(var);
3703  }
3704 
3705  const auto & aux_variables = _app.feProblem().getAuxiliarySystem().getVariables(0);
3706  for (const auto & var : aux_variables)
3707  if (var->fieldType() == 0)
3708  moose_vars.push_back(var);
3709 
3710  for (FaceInfo & face : _all_face_info)
3711  {
3712  const SubdomainID elem_subdomain_id = face.elemSubdomainID();
3713  const SubdomainID neighbor_subdomain_id = face.neighborSubdomainID();
3714 
3715  // loop through vars
3716  for (unsigned int j = 0; j < moose_vars.size(); ++j)
3717  {
3718  // get the variable, its name, and its domain of definition
3719  const MooseVariableFieldBase * const var = moose_vars[j];
3720  const std::pair<unsigned int, unsigned int> var_sys =
3721  std::make_pair(var->number(), var->sys().number());
3722  std::set<SubdomainID> var_subdomains = var->blockIDs();
3723 
3733  bool var_defined_elem = var_subdomains.find(elem_subdomain_id) != var_subdomains.end();
3734  bool var_defined_neighbor =
3735  var_subdomains.find(neighbor_subdomain_id) != var_subdomains.end();
3736  if (var_defined_elem && var_defined_neighbor)
3737  face.faceType(var_sys) = FaceInfo::VarFaceNeighbors::BOTH;
3738  else if (!var_defined_elem && !var_defined_neighbor)
3739  face.faceType(var_sys) = FaceInfo::VarFaceNeighbors::NEITHER;
3740  else
3741  {
3742  // this is a boundary face for this variable, set elem or neighbor
3743  if (var_defined_elem)
3744  face.faceType(var_sys) = FaceInfo::VarFaceNeighbors::ELEM;
3745  else if (var_defined_neighbor)
3746  face.faceType(var_sys) = FaceInfo::VarFaceNeighbors::NEIGHBOR;
3747  else
3748  mooseError("Should never get here");
3749  }
3750  }
3751  }
3752 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1560
virtual std::size_t numNonlinearSystems() const override
unsigned int number() const
Get variable number coming from libMesh.
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object Note, if this is not block restricted, this function returns all mesh subdomain ids.
FEProblemBase & feProblem() const
Definition: MooseApp.C:1326
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:35
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
subdomain_id_type SubdomainID
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
unsigned int number() const
Gets the number of this system.
Definition: SystemBase.C:1125
AuxiliarySystem & getAuxiliarySystem()
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
SystemBase & sys()
Get the system this variable is part of.

◆ 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 3755 of file MooseMesh.C.

Referenced by setupFiniteVolumeMeshData().

3756 {
3757  mooseAssert(!Threads::in_threads,
3758  "Performing writes to elemInfo dof indices. This must be done unthreaded!");
3759 
3760  const unsigned int num_eqs = _app.feProblem().es().n_systems();
3761 
3762  for (auto & elem_info_pair : _elem_to_elem_info)
3763  {
3764  ElemInfo & elem_info = elem_info_pair.second;
3765  auto & dof_vector = elem_info.dofIndices();
3766 
3767  dof_vector.clear();
3768  dof_vector.resize(num_eqs);
3769 
3770  for (const auto i : make_range(_app.feProblem().numNonlinearSystems()))
3772  {
3773  auto & sys = _app.feProblem().getNonlinearSystemBase(i);
3774  dof_vector[sys.number()].resize(sys.nVariables(), libMesh::DofObject::invalid_id);
3775  const auto & variables = sys.getVariables(0);
3776  for (const auto & var : variables)
3777  {
3778  const auto & var_subdomains = var->blockIDs();
3779 
3780  // We will only cache for FV variables and if they live on the current subdomain
3781  if (var->isFV() && var_subdomains.find(elem_info.subdomain_id()) != var_subdomains.end())
3782  {
3783  std::vector<dof_id_type> indices;
3784  var->dofMap().dof_indices(elem_info.elem(), indices, var->number());
3785  mooseAssert(indices.size() == 1, "We expect to have only one dof per element!");
3786  dof_vector[sys.number()][var->number()] = indices[0];
3787  }
3788  }
3789  }
3790 
3792  {
3793  auto & sys = _app.feProblem().getAuxiliarySystem();
3794  dof_vector[sys.number()].resize(sys.nVariables(), libMesh::DofObject::invalid_id);
3795  const auto & aux_variables = sys.getVariables(0);
3796  for (const auto & var : aux_variables)
3797  {
3798  const auto & var_subdomains = var->blockIDs();
3799 
3800  // We will only cache for FV variables and if they live on the current subdomain
3801  if (var->isFV() && var_subdomains.find(elem_info.subdomain_id()) != var_subdomains.end())
3802  {
3803  std::vector<dof_id_type> indices;
3804  var->dofMap().dof_indices(elem_info.elem(), indices, var->number());
3805  mooseAssert(indices.size() == 1, "We expect to have only one dof per element!");
3806  dof_vector[sys.number()][var->number()] = indices[0];
3807  }
3808  }
3809  }
3810  }
3811 }
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
Definition: SystemBase.h:732
virtual std::size_t numNonlinearSystems() const override
const Elem * elem() const
Definition: ElemInfo.h:34
FEProblemBase & feProblem() const
Definition: MooseApp.C:1326
virtual EquationSystems & es() override
static const dof_id_type invalid_id
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
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:1552
const std::vector< std::vector< dof_id_type > > & dofIndices() const
Definition: ElemInfo.h:39
unsigned int nFVVariables() const
Get the number of finite volume variables in this system.
Definition: SystemBase.C:859
IntRange< T > make_range(T beg, T end)
Class used for caching additional information for elements such as the volume and centroid...
Definition: ElemInfo.h:25
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 1209 of file MooseMesh.C.

Referenced by update().

1210 {
1211  TIME_SECTION("cacheInfo", 3);
1212 
1213  _has_lower_d = false;
1214  _sub_to_data.clear();
1216  _block_node_list.clear();
1218 
1219  // TODO: Thread this!
1220  for (const auto & elem : getMesh().element_ptr_range())
1221  {
1222  const Elem * ip_elem = elem->interior_parent();
1223 
1224  if (ip_elem)
1225  {
1226  if (elem->active())
1227  _sub_to_data[elem->subdomain_id()].is_lower_d = true;
1228  unsigned int ip_side = ip_elem->which_side_am_i(elem);
1229 
1230  // For some grid sequencing tests: ip_side == libMesh::invalid_uint
1231  if (ip_side != libMesh::invalid_uint)
1232  {
1233  auto pair = std::make_pair(ip_elem, ip_side);
1235  std::pair<std::pair<const Elem *, unsigned short int>, const Elem *>(pair, elem));
1236  }
1237  }
1238 
1239  for (unsigned int nd = 0; nd < elem->n_nodes(); ++nd)
1240  {
1241  Node & node = *elem->node_ptr(nd);
1242  _block_node_list[node.id()].insert(elem->subdomain_id());
1243  }
1244  }
1245 
1246  for (const auto & elem : getMesh().active_local_element_ptr_range())
1247  {
1248  SubdomainID subdomain_id = elem->subdomain_id();
1249  auto & sub_data = _sub_to_data[subdomain_id];
1250  for (unsigned int side = 0; side < elem->n_sides(); side++)
1251  {
1252  std::vector<BoundaryID> boundary_ids = getBoundaryIDs(elem, side);
1253  sub_data.boundary_ids.insert(boundary_ids.begin(), boundary_ids.end());
1254 
1255  Elem * neig = elem->neighbor_ptr(side);
1256  if (neig)
1257  {
1258  _neighbor_subdomain_boundary_ids[neig->subdomain_id()].insert(boundary_ids.begin(),
1259  boundary_ids.end());
1260  SubdomainID neighbor_subdomain_id = neig->subdomain_id();
1261  if (neighbor_subdomain_id != subdomain_id)
1262  sub_data.neighbor_subs.insert(neighbor_subdomain_id);
1263  }
1264  }
1265  }
1266 
1267  for (const auto blk_id : _mesh_subdomains)
1268  {
1269  auto & sub_data = _sub_to_data[blk_id];
1270  _communicator.set_union(sub_data.neighbor_subs);
1271  _communicator.set_union(sub_data.boundary_ids);
1272  _communicator.max(sub_data.is_lower_d);
1273  if (sub_data.is_lower_d)
1274  _has_lower_d = true;
1276  }
1277 }
const std::set< BoundaryID > & getBoundaryIDs() const
Returns a const reference to a set of all user-specified boundary IDs.
Definition: MooseMesh.C:2727
const unsigned int invalid_uint
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:1757
bool _has_lower_d
Whether there are any lower-dimensional blocks that are manifolds of higher-dimensional block faces...
Definition: MooseMesh.h:1762
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:1509
const Parallel::Communicator & _communicator
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:1753
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
subdomain_id_type SubdomainID
void max(const T &r, T &o, Request &req) const
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:622
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1472
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1750
void set_union(T &data, const unsigned int root_id) const

◆ 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 2509 of file MooseMesh.C.

2512 {
2513  TIME_SECTION("changeBoundaryId", 6);
2514  changeBoundaryId(getMesh(), old_id, new_id, delete_prev);
2515 }
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:2509
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ changeBoundaryId() [2/2]

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.

Definition at line 2518 of file MooseMesh.C.

2522 {
2523  // Get a reference to our BoundaryInfo object, we will use it several times below...
2524  BoundaryInfo & boundary_info = mesh.get_boundary_info();
2525 
2526  // Container to catch ids passed back from BoundaryInfo
2527  std::vector<boundary_id_type> old_ids;
2528 
2529  // Only level-0 elements store BCs. Loop over them.
2530  for (auto & elem : as_range(mesh.level_elements_begin(0), mesh.level_elements_end(0)))
2531  {
2532  unsigned int n_sides = elem->n_sides();
2533  for (unsigned int s = 0; s != n_sides; ++s)
2534  {
2535  boundary_info.boundary_ids(elem, s, old_ids);
2536  if (std::find(old_ids.begin(), old_ids.end(), old_id) != old_ids.end())
2537  {
2538  std::vector<boundary_id_type> new_ids(old_ids);
2539  std::replace(new_ids.begin(), new_ids.end(), old_id, new_id);
2540  if (delete_prev)
2541  {
2542  boundary_info.remove_side(elem, s);
2543  boundary_info.add_side(elem, s, new_ids);
2544  }
2545  else
2546  boundary_info.add_side(elem, s, new_ids);
2547  }
2548  }
2549  }
2550 
2551  // Remove any remaining references to the old ID from the
2552  // BoundaryInfo object. This prevents things like empty sidesets
2553  // from showing up when printing information, etc.
2554  if (delete_prev)
2555  boundary_info.remove_id(old_id);
2556 }
MeshBase & mesh
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:2849

◆ 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 4023 of file MooseMesh.C.

Referenced by FEProblemBase::checkCoordinateSystems().

4024 {
4025  for (const auto & elem : getMesh().element_ptr_range())
4026  {
4027  SubdomainID sid = elem->subdomain_id();
4028  if (_coord_sys[sid] == Moose::COORD_RZ && elem->dim() == 3)
4029  mooseError("An RZ coordinate system was requested for subdomain " + Moose::stringify(sid) +
4030  " which contains 3D elements.");
4031  if (_coord_sys[sid] == Moose::COORD_RSPHERICAL && elem->dim() > 1)
4032  mooseError("An RSPHERICAL coordinate system was requested for subdomain " +
4033  Moose::stringify(sid) + " which contains 2D or 3D elements.");
4034  }
4035 }
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1804
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
subdomain_id_type SubdomainID
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 4053 of file MooseMesh.C.

Referenced by prepare().

4054 {
4055  std::map<SubdomainName, SubdomainID> subdomain;
4056  for (const auto & sbd_id : _mesh_subdomains)
4057  {
4058  std::string sub_name = getSubdomainName(sbd_id);
4059  if (!sub_name.empty() && subdomain.count(sub_name) > 0)
4060  mooseError("The subdomain name ",
4061  sub_name,
4062  " is used for both subdomain with ID=",
4063  subdomain[sub_name],
4064  " and ID=",
4065  sbd_id,
4066  ", Please rename one of them!");
4067  else
4068  subdomain[sub_name] = sbd_id;
4069  }
4070 }
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1537
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1472

◆ clearQuadratureNodes()

void MooseMesh::clearQuadratureNodes ( )

Clear out any existing quadrature nodes.

Most likely called before re-adding them.

Definition at line 1462 of file MooseMesh.C.

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

1463 {
1464  // Delete all the quadrature nodes
1465  for (auto & it : _quadrature_nodes)
1466  delete it.second;
1467 
1468  _quadrature_nodes.clear();
1470  _extra_bnd_nodes.clear();
1471 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:1503
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:1506
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:1505

◆ clone()

MooseMesh & MooseMesh::clone ( ) const
virtual

Clone method.

Allocates memory you are responsible to clean up.

Definition at line 2569 of file MooseMesh.C.

Referenced by TiledMesh::buildMesh().

2570 {
2571  mooseError("MooseMesh::clone() is no longer supported, use MooseMesh::safeClone() instead.");
2572 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 745 of file MooseMesh.C.

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

746 {
747  auto elem_to_child_pair = _coarsened_element_children.find(elem);
748  mooseAssert(elem_to_child_pair != _coarsened_element_children.end(), "Missing element in map");
749  return elem_to_child_pair->second;
750 }
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
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:1442

◆ 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 739 of file MooseMesh.C.

Referenced by FEProblemBase::meshChangedHelper().

740 {
741  return _coarsened_elements.get();
742 }
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:1435

◆ 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 3625 of file MooseMesh.C.

Referenced by setupFiniteVolumeMeshData().

3626 {
3628  mooseError("Trying to compute face- and elem-info coords when the information is dirty");
3629 
3630  for (auto & fi : _all_face_info)
3631  {
3632  // get elem & neighbor elements, and set subdomain ids
3633  const SubdomainID elem_subdomain_id = fi.elemSubdomainID();
3634  const SubdomainID neighbor_subdomain_id = fi.neighborSubdomainID();
3635 
3637  *this, elem_subdomain_id, fi.faceCentroid(), fi.faceCoord(), neighbor_subdomain_id);
3638  }
3639 
3640  for (auto & ei : _elem_to_elem_info)
3642  *this, ei.second.subdomain_id(), ei.second.centroid(), ei.second.coordFactor());
3643 }
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition: MooseMesh.h:1560
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1571
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:39
subdomain_id_type SubdomainID
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:1552
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ connectControllableParams()

void MooseBaseParameterInterface::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 34 of file MooseBaseParameterInterface.C.

38 {
39  MooseObjectParameterName primary_name(uniqueName(), parameter);
40  const auto base_type = _factory.getValidParams(object_type).get<std::string>("_moose_base");
41  MooseObjectParameterName secondary_name(base_type, object_name, object_parameter);
43  primary_name, secondary_name);
44 
45  const auto & tags = _pars.get<std::vector<std::string>>("control_tags");
46  for (const auto & tag : tags)
47  {
48  if (!tag.empty())
49  {
50  MooseObjectParameterName tagged_name(tag, _moose_base->name(), parameter);
52  tagged_name, secondary_name);
53  }
54  }
55 }
void addControllableParameterConnection(const MooseObjectParameterName &primary, const MooseObjectParameterName &secondary, bool error_on_empty=true)
Method for linking control parameters of different names.
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:2224
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Definition: Factory.C:67
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:44
Factory & _factory
The Factory associated with the MooseApp.
MooseObjectName uniqueName() const
The unique name for accessing input parameters of this object in the InputParameterWarehouse.
const MooseBase *const _moose_base
The MooseBase object that inherits this class.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
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 1830 of file MooseMesh.h.

Referenced by FEProblemBase::coordTransform().

1831 {
1832  mooseAssert(_coord_transform, "The coordinate transformation object is null.");
1833  return *_coord_transform;
1834 }
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:1814

◆ 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 3677 of file MooseMesh.C.

3678 {
3680  if (!_mesh)
3681  mooseError("Cannot delete remote elements because we have not yet attached a MeshBase");
3682 
3683  _mesh->allow_remote_element_removal(true);
3684 
3685  _mesh->delete_remote_elements();
3686 }
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1774
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 1699 of file MooseMesh.C.

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

1700 {
1701  TIME_SECTION("detectOrthogonalDimRanges", 5);
1702 
1704  return true;
1705 
1706  std::vector<Real> min(3, std::numeric_limits<Real>::max());
1707  std::vector<Real> max(3, std::numeric_limits<Real>::min());
1708  unsigned int dim = getMesh().mesh_dimension();
1709 
1710  // Find the bounding box of our mesh
1711  for (const auto & node : getMesh().node_ptr_range())
1712  // Check all coordinates, we don't know if this mesh might be lying in a higher dim even if the
1713  // mesh dimension is lower.
1714  for (const auto i : make_range(Moose::dim))
1715  {
1716  if ((*node)(i) < min[i])
1717  min[i] = (*node)(i);
1718  if ((*node)(i) > max[i])
1719  max[i] = (*node)(i);
1720  }
1721 
1722  this->comm().max(max);
1723  this->comm().min(min);
1724 
1725  _extreme_nodes.resize(8); // 2^LIBMESH_DIM
1726  // Now make sure that there are actual nodes at all of the extremes
1727  std::vector<bool> extreme_matches(8, false);
1728  std::vector<unsigned int> comp_map(3);
1729  for (const auto & node : getMesh().node_ptr_range())
1730  {
1731  // See if the current node is located at one of the extremes
1732  unsigned int coord_match = 0;
1733 
1734  for (const auto i : make_range(Moose::dim))
1735  {
1736  if (std::abs((*node)(i)-min[i]) < tol)
1737  {
1738  comp_map[i] = MIN;
1739  ++coord_match;
1740  }
1741  else if (std::abs((*node)(i)-max[i]) < tol)
1742  {
1743  comp_map[i] = MAX;
1744  ++coord_match;
1745  }
1746  }
1747 
1748  if (coord_match == LIBMESH_DIM) // Found a coordinate at one of the extremes
1749  {
1750  _extreme_nodes[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = node;
1751  extreme_matches[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = true;
1752  }
1753  }
1754 
1755  // See if we matched all of the extremes for the mesh dimension
1756  this->comm().max(extreme_matches);
1757  if (std::count(extreme_matches.begin(), extreme_matches.end(), true) == (1 << dim))
1758  _regular_orthogonal_mesh = true;
1759 
1760  // Set the bounds
1761  _bounds.resize(LIBMESH_DIM);
1762  for (const auto i : make_range(Moose::dim))
1763  {
1764  _bounds[i].resize(2);
1765  _bounds[i][MIN] = min[i];
1766  _bounds[i][MAX] = max[i];
1767  }
1768 
1769  return _regular_orthogonal_mesh;
1770 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1536
std::vector< Node * > _extreme_nodes
A vector containing the nodes at the corners of a regular orthogonal mesh.
Definition: MooseMesh.h:1590
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
const Parallel::Communicator & comm() const
auto max(const L &left, const R &right)
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
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:622
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:1533

◆ 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 1773 of file MooseMesh.C.

Referenced by getPairedBoundaryMapping().

1774 {
1775  TIME_SECTION("detectPairedSidesets", 5);
1776 
1777  // Loop over level-0 elements (since boundary condition information
1778  // is only directly stored for them) and find sidesets with normals
1779  // that point in the -x, +x, -y, +y, and -z, +z direction. If there
1780  // is a unique sideset id for each direction, then the paired
1781  // sidesets consist of (-x,+x), (-y,+y), (-z,+z). If there are
1782  // multiple sideset ids for a given direction, then we can't pick a
1783  // single pair for that direction. In that case, we'll just return
1784  // as was done in the original algorithm.
1785 
1786  // Points used for direction comparison
1787  const Point minus_x(-1, 0, 0), plus_x(1, 0, 0), minus_y(0, -1, 0), plus_y(0, 1, 0),
1788  minus_z(0, 0, -1), plus_z(0, 0, 1);
1789 
1790  // we need to test all element dimensions from dim down to 1
1791  const unsigned int dim = getMesh().mesh_dimension();
1792 
1793  // boundary id sets for elements of different dimensions
1794  std::vector<std::set<BoundaryID>> minus_x_ids(dim), plus_x_ids(dim), minus_y_ids(dim),
1795  plus_y_ids(dim), minus_z_ids(dim), plus_z_ids(dim);
1796 
1797  std::vector<std::unique_ptr<FEBase>> fe_faces(dim);
1798  std::vector<std::unique_ptr<QGauss>> qfaces(dim);
1799  for (unsigned side_dim = 0; side_dim < dim; ++side_dim)
1800  {
1801  // Face is assumed to be flat, therefore normal is assumed to be
1802  // constant over the face, therefore only compute it at 1 qp.
1803  qfaces[side_dim] = std::unique_ptr<QGauss>(new QGauss(side_dim, CONSTANT));
1804 
1805  // A first-order Lagrange FE for the face.
1806  fe_faces[side_dim] = FEBase::build(side_dim + 1, FEType(FIRST, LAGRANGE));
1807  fe_faces[side_dim]->attach_quadrature_rule(qfaces[side_dim].get());
1808  }
1809 
1810  // We need this to get boundary ids for each boundary face we encounter.
1811  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1812  std::vector<boundary_id_type> face_ids;
1813 
1814  for (auto & elem : as_range(getMesh().level_elements_begin(0), getMesh().level_elements_end(0)))
1815  {
1816  // dimension of the current element and its normals
1817  unsigned int side_dim = elem->dim() - 1;
1818  const std::vector<Point> & normals = fe_faces[side_dim]->get_normals();
1819 
1820  // loop over element sides
1821  for (unsigned int s = 0; s < elem->n_sides(); s++)
1822  {
1823  // If side is on the boundary
1824  if (elem->neighbor_ptr(s) == nullptr)
1825  {
1826  std::unique_ptr<Elem> side = elem->build_side_ptr(s);
1827 
1828  fe_faces[side_dim]->reinit(elem, s);
1829 
1830  // Get the boundary ID(s) for this side. If there is more
1831  // than 1 boundary id, then we already can't determine a
1832  // unique pairing of sides in this direction, but we'll just
1833  // keep going to keep the logic simple.
1834  boundary_info.boundary_ids(elem, s, face_ids);
1835 
1836  // x-direction faces
1837  if (normals[0].absolute_fuzzy_equals(minus_x))
1838  minus_x_ids[side_dim].insert(face_ids.begin(), face_ids.end());
1839  else if (normals[0].absolute_fuzzy_equals(plus_x))
1840  plus_x_ids[side_dim].insert(face_ids.begin(), face_ids.end());
1841 
1842  // y-direction faces
1843  else if (normals[0].absolute_fuzzy_equals(minus_y))
1844  minus_y_ids[side_dim].insert(face_ids.begin(), face_ids.end());
1845  else if (normals[0].absolute_fuzzy_equals(plus_y))
1846  plus_y_ids[side_dim].insert(face_ids.begin(), face_ids.end());
1847 
1848  // z-direction faces
1849  else if (normals[0].absolute_fuzzy_equals(minus_z))
1850  minus_z_ids[side_dim].insert(face_ids.begin(), face_ids.end());
1851  else if (normals[0].absolute_fuzzy_equals(plus_z))
1852  plus_z_ids[side_dim].insert(face_ids.begin(), face_ids.end());
1853  }
1854  }
1855  }
1856 
1857  // For a distributed mesh, boundaries may be distributed as well. We therefore collect information
1858  // from everyone. If the mesh is already serial, then there is no need to do an allgather. Note
1859  // that this is just going to gather information about what the periodic bc ids are. We are not
1860  // gathering any remote elements or anything like that. It's just that the GhostPointNeighbors
1861  // ghosting functor currently relies on the fact that every process agrees on whether we have
1862  // periodic boundaries; every process that thinks there are periodic boundaries will call
1863  // MeshBase::sub_point_locator which makes a parallel_object_only() assertion (right or wrong). So
1864  // we all need to go there (or not go there)
1865  if (_use_distributed_mesh && !_mesh->is_serial())
1866  {
1867  // Pack all data together so that we send them via one communication
1868  // pair: boundary side --> boundary ids.
1869  std::vector<std::pair<boundary_id_type, boundary_id_type>> vecdata;
1870  // We check boundaries on all dimensions
1871  for (unsigned side_dim = 0; side_dim < dim; ++side_dim)
1872  {
1873  // "6" means: we have at most 6 boundaries. It is true for generated simple mesh
1874  // "detectPairedSidesets" is designed for only simple meshes
1875  for (auto bd = minus_x_ids[side_dim].begin(); bd != minus_x_ids[side_dim].end(); bd++)
1876  vecdata.emplace_back(side_dim * 6 + 0, *bd);
1877 
1878  for (auto bd = plus_x_ids[side_dim].begin(); bd != plus_x_ids[side_dim].end(); bd++)
1879  vecdata.emplace_back(side_dim * 6 + 1, *bd);
1880 
1881  for (auto bd = minus_y_ids[side_dim].begin(); bd != minus_y_ids[side_dim].end(); bd++)
1882  vecdata.emplace_back(side_dim * 6 + 2, *bd);
1883 
1884  for (auto bd = plus_y_ids[side_dim].begin(); bd != plus_y_ids[side_dim].end(); bd++)
1885  vecdata.emplace_back(side_dim * 6 + 3, *bd);
1886 
1887  for (auto bd = minus_z_ids[side_dim].begin(); bd != minus_z_ids[side_dim].end(); bd++)
1888  vecdata.emplace_back(side_dim * 6 + 4, *bd);
1889 
1890  for (auto bd = plus_z_ids[side_dim].begin(); bd != plus_z_ids[side_dim].end(); bd++)
1891  vecdata.emplace_back(side_dim * 6 + 5, *bd);
1892  }
1893 
1894  _communicator.allgather(vecdata, false);
1895 
1896  // Unpack data, and add them into minus/plus_x/y_ids
1897  for (auto pair = vecdata.begin(); pair != vecdata.end(); pair++)
1898  {
1899  // Convert data from the long vector, and add data to separated sets
1900  auto side_dim = pair->first / 6;
1901  auto side = pair->first % 6;
1902 
1903  switch (side)
1904  {
1905  case 0:
1906  minus_x_ids[side_dim].insert(pair->second);
1907  break;
1908  case 1:
1909  plus_x_ids[side_dim].insert(pair->second);
1910  break;
1911  case 2:
1912  minus_y_ids[side_dim].insert(pair->second);
1913  break;
1914  case 3:
1915  plus_y_ids[side_dim].insert(pair->second);
1916  break;
1917  case 4:
1918  minus_z_ids[side_dim].insert(pair->second);
1919  break;
1920  case 5:
1921  plus_z_ids[side_dim].insert(pair->second);
1922  break;
1923  default:
1924  mooseError("Unknown boundary side ", side);
1925  }
1926  }
1927 
1928  } // end if (_use_distributed_mesh && !_need_ghost_ghosted_boundaries)
1929 
1930  for (unsigned side_dim = 0; side_dim < dim; ++side_dim)
1931  {
1932  // If unique pairings were found, fill up the _paired_boundary data
1933  // structure with that information.
1934  if (minus_x_ids[side_dim].size() == 1 && plus_x_ids[side_dim].size() == 1)
1935  _paired_boundary.emplace_back(
1936  std::make_pair(*(minus_x_ids[side_dim].begin()), *(plus_x_ids[side_dim].begin())));
1937 
1938  if (minus_y_ids[side_dim].size() == 1 && plus_y_ids[side_dim].size() == 1)
1939  _paired_boundary.emplace_back(
1940  std::make_pair(*(minus_y_ids[side_dim].begin()), *(plus_y_ids[side_dim].begin())));
1941 
1942  if (minus_z_ids[side_dim].size() == 1 && plus_z_ids[side_dim].size() == 1)
1943  _paired_boundary.emplace_back(
1944  std::make_pair(*(minus_z_ids[side_dim].begin()), *(plus_z_ids[side_dim].begin())));
1945  }
1946 }
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
const Parallel::Communicator & _communicator
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition: MooseMesh.h:1539

◆ determineUseDistributedMesh()

void MooseMesh::determineUseDistributedMesh ( )

Determine whether to use a distributed mesh.

Should be called during construction

Definition at line 2575 of file MooseMesh.C.

Referenced by MooseMesh(), and setParallelType().

2576 {
2577  switch (_parallel_type)
2578  {
2579  case ParallelType::DEFAULT:
2580  // The user did not specify 'parallel_type = XYZ' in the input file,
2581  // so we allow the --distributed-mesh command line arg to possibly turn
2582  // on DistributedMesh. If the command line arg is not present, we pick ReplicatedMesh.
2584  _use_distributed_mesh = true;
2585  break;
2589  _use_distributed_mesh = false;
2590  break;
2592  _use_distributed_mesh = true;
2593  break;
2594  }
2595 
2596  // If the user specifies 'nemesis = true' in the Mesh block, or they are using --use-split,
2597  // we must use DistributedMesh.
2598  if (_is_nemesis || _is_split)
2599  _use_distributed_mesh = true;
2600 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1380
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1426
bool getDistributedMeshOnCommandLine() const
Returns true if the user specified –distributed-mesh (or –parallel-mesh, for backwards compatibilit...
Definition: MooseApp.h:464
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseMesh.h:1542
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
bool _parallel_type_overridden
Definition: MooseMesh.h:1387

◆ 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 1949 of file MooseMesh.C.

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

1950 {
1951  return getMaxInDimension(component) - getMinInDimension(component);
1952 }
virtual Real getMaxInDimension(unsigned int component) const
Definition: MooseMesh.C:1964
virtual Real getMinInDimension(unsigned int component) const
Returns the min or max of the requested dimension respectively.
Definition: MooseMesh.C:1955

◆ 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 1325 of file MooseMesh.h.

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

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

◆ doingPRefinement() [2/2]

bool MooseMesh::doingPRefinement ( ) const
inline

Query whether we have p-refinement.

Definition at line 1330 of file MooseMesh.h.

Referenced by buildRefinementAndCoarseningMaps().

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

◆ 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 2684 of file MooseMesh.C.

2685 {
2686  const Real abs_zero = 1e-12;
2687 
2688  // See if the mesh is completely containd in the z and y planes to calculate effective spatial
2689  // dim
2690  for (unsigned int dim = LIBMESH_DIM; dim >= 1; --dim)
2691  if (dimensionWidth(dim - 1) >= abs_zero)
2692  return dim;
2693 
2694  // If we get here, we have a 1D mesh on the x-axis.
2695  return 1;
2696 }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
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:1949

◆ elem() [1/2]

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

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

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

Definition at line 2849 of file MooseMesh.C.

Referenced by addQuadratureNode(), buildCoarseningMap(), buildElemIDInfo(), buildFiniteVolumeInfo(), buildHRefinementAndCoarseningMaps(), buildLowerDMesh(), AnnularMesh::buildMesh(), RinglebMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), ConcentricCircleMesh::buildMesh(), buildPRefinementAndCoarseningMaps(), buildRefinementMap(), cacheInfo(), changeBoundaryId(), checkCoordinateSystems(), coarsenedElementChildren(), detectPairedSidesets(), faceInfo(), findAdaptivityQpMaps(), getBlocksMaxDimension(), getBoundaryIDs(), getCoarseningMap(), getElemIDMapping(), getHigherDSide(), getLowerDElem(), getPCoarseningMap(), getPCoarseningMapHelper(), getPCoarseningSideMap(), getPRefinementMap(), getPRefinementMapHelper(), getPRefinementSideMap(), getQuadratureNode(), getRefinementMap(), ghostGhostedBoundaries(), nodeToActiveSemilocalElemMap(), nodeToElemMap(), prepare(), sideWithBoundaryID(), and updateActiveSemiLocalNodeRange().

2850 {
2851  mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
2852  return elemPtr(i);
2853 }
void mooseDeprecated(Args &&... args) const
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863

◆ elem() [2/2]

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

Definition at line 2856 of file MooseMesh.C.

2857 {
2858  mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
2859  return elemPtr(i);
2860 }
void mooseDeprecated(Args &&... args) const
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2863

◆ elemInfo()

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

Accessor for the elemInfo object for a given element ID.

Definition at line 3619 of file MooseMesh.C.

3620 {
3621  return libmesh_map_find(_elem_to_elem_info, id);
3622 }
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:1552

◆ elemInfoVector()

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

Accessor for the element info objects owned by this process.

Definition at line 1159 of file MooseMesh.h.

1159 { 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:1556

◆ elemPtr() [1/2]

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

Definition at line 2863 of file MooseMesh.C.

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

2864 {
2865  return getMesh().elem_ptr(i);
2866 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ elemPtr() [2/2]

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

Definition at line 2869 of file MooseMesh.C.

2870 {
2871  return getMesh().elem_ptr(i);
2872 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ elemTypes()

MooseEnum MooseMesh::elemTypes ( )
static

returns MooseMesh element type options

Definition at line 3654 of file MooseMesh.C.

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

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 49 of file MooseObject.h.

Referenced by EigenKernel::enabled().

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

◆ 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 3367 of file MooseMesh.C.

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

3368 {
3370  mooseError("Cannot use ",
3371  name,
3372  " with DistributedMesh!\n",
3373  "Consider specifying parallel_type = 'replicated' in your input file\n",
3374  "to prevent it from being run with DistributedMesh.");
3375 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ errorPrefix()

std::string MooseBaseErrorInterface::errorPrefix ( const std::string &  error_type) const
inherited

A descriptive prefix for errors for this object:

The following <error_type> occurred in the object "<name>", of type "<type>".

Definition at line 15 of file MooseBaseErrorInterface.C.

Referenced by MooseBaseErrorInterface::mooseError(), and MooseBaseErrorInterface::mooseWarning().

16 {
17  std::stringstream oss;
18  oss << "The following " << error_type << " occurred in the object \"" << _moose_base->name()
19  << "\", of type \"" << _moose_base->type() << "\".\n\n";
20  return oss.str();
21 }
const MooseBase *const _moose_base
The MooseBase class deriving from this interface.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50

◆ faceInfo() [1/2]

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

Accessor for local FaceInfo objects.

Definition at line 2108 of file MooseMesh.h.

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

2109 {
2110  return _face_info;
2111 }
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:1564

◆ 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.

Definition at line 3603 of file MooseMesh.C.

3604 {
3605  auto it = _elem_side_to_face_info.find(std::make_pair(elem, side));
3606 
3607  if (it == _elem_side_to_face_info.end())
3608  return nullptr;
3609  else
3610  {
3611  mooseAssert(it->second,
3612  "For some reason, the FaceInfo object is NULL! Try calling "
3613  "`buildFiniteVolumeInfo()` before using this accessor!");
3614  return it->second;
3615  }
3616 }
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:1568
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ findAdaptivityQpMaps()

void MooseMesh::findAdaptivityQpMaps ( const Elem *  template_elem,
QBase &  qrule,
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 2368 of file MooseMesh.C.

Referenced by buildCoarseningMap(), and buildRefinementMap().

2376 {
2377  TIME_SECTION("findAdaptivityQpMaps", 5);
2378 
2379  ReplicatedMesh mesh(_communicator);
2380  mesh.skip_partitioning(true);
2381 
2382  unsigned int dim = template_elem->dim();
2383  mesh.set_mesh_dimension(dim);
2384 
2385  for (unsigned int i = 0; i < template_elem->n_nodes(); ++i)
2386  mesh.add_point(template_elem->point(i));
2387 
2388  Elem * elem = mesh.add_elem(Elem::build(template_elem->type()).release());
2389 
2390  for (unsigned int i = 0; i < template_elem->n_nodes(); ++i)
2391  elem->set_node(i) = mesh.node_ptr(i);
2392 
2393  std::unique_ptr<FEBase> fe(FEBase::build(dim, FEType()));
2394  fe->get_phi();
2395  const std::vector<Point> & q_points_volume = fe->get_xyz();
2396 
2397  std::unique_ptr<FEBase> fe_face(FEBase::build(dim, FEType()));
2398  fe_face->get_phi();
2399  const std::vector<Point> & q_points_face = fe_face->get_xyz();
2400 
2401  fe->attach_quadrature_rule(&qrule);
2402  fe_face->attach_quadrature_rule(&qrule_face);
2403 
2404  // The current q_points (locations in *physical* space)
2405  const std::vector<Point> * q_points;
2406 
2407  if (parent_side != -1)
2408  {
2409  fe_face->reinit(elem, parent_side);
2410  q_points = &q_points_face;
2411  }
2412  else
2413  {
2414  fe->reinit(elem);
2415  q_points = &q_points_volume;
2416  }
2417 
2418  std::vector<Point> parent_ref_points;
2419 
2420  FEInterface::inverse_map(elem->dim(), FEType(), elem, *q_points, parent_ref_points);
2421  MeshRefinement mesh_refinement(mesh);
2422  mesh_refinement.uniformly_refine(1);
2423 
2424  // A map from the child element index to the locations of all the child's quadrature points in
2425  // *reference* space. Note that we use a map here instead of a vector because the caller can
2426  // pass an explicit child index. We are not guaranteed to have a sequence from [0, n_children)
2427  std::map<unsigned int, std::vector<Point>> child_to_ref_points;
2428 
2429  unsigned int n_children = elem->n_children();
2430 
2431  refinement_map.resize(n_children);
2432 
2433  std::vector<unsigned int> children;
2434 
2435  if (child != -1) // Passed in a child explicitly
2436  children.push_back(child);
2437  else
2438  {
2439  children.resize(n_children);
2440  for (unsigned int child = 0; child < n_children; ++child)
2441  children[child] = child;
2442  }
2443 
2444  for (unsigned int i = 0; i < children.size(); ++i)
2445  {
2446  unsigned int child = children[i];
2447 
2448  if ((parent_side != -1 && !elem->is_child_on_side(child, parent_side)))
2449  continue;
2450 
2451  const Elem * child_elem = elem->child_ptr(child);
2452 
2453  if (child_side != -1)
2454  {
2455  fe_face->reinit(child_elem, child_side);
2456  q_points = &q_points_face;
2457  }
2458  else
2459  {
2460  fe->reinit(child_elem);
2461  q_points = &q_points_volume;
2462  }
2463 
2464  std::vector<Point> child_ref_points;
2465 
2466  FEInterface::inverse_map(elem->dim(), FEType(), elem, *q_points, child_ref_points);
2467  child_to_ref_points[child] = child_ref_points;
2468 
2469  std::vector<QpMap> & qp_map = refinement_map[child];
2470 
2471  // Find the closest parent_qp to each child_qp
2472  mapPoints(child_ref_points, parent_ref_points, qp_map);
2473  }
2474 
2475  coarsen_map.resize(parent_ref_points.size());
2476 
2477  // For each parent qp find the closest child qp
2478  for (unsigned int child = 0; child < n_children; child++)
2479  {
2480  if (parent_side != -1 && !elem->is_child_on_side(child, child_side))
2481  continue;
2482 
2483  std::vector<Point> & child_ref_points = child_to_ref_points[child];
2484 
2485  std::vector<QpMap> qp_map;
2486 
2487  // Find all of the closest points from parent_qp to _THIS_ child's qp
2488  mapPoints(parent_ref_points, child_ref_points, qp_map);
2489 
2490  // Check those to see if they are closer than what we currently have for each point
2491  for (unsigned int parent_qp = 0; parent_qp < parent_ref_points.size(); ++parent_qp)
2492  {
2493  std::pair<unsigned int, QpMap> & child_and_map = coarsen_map[parent_qp];
2494  unsigned int & closest_child = child_and_map.first;
2495  QpMap & closest_map = child_and_map.second;
2496 
2497  QpMap & current_map = qp_map[parent_qp];
2498 
2499  if (current_map._distance < closest_map._distance)
2500  {
2501  closest_child = child;
2502  closest_map = current_map;
2503  }
2504  }
2505  }
2506 }
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:148
const Parallel::Communicator & _communicator
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:2337
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
Real _distance
The distance between them.
Definition: MooseMesh.h:81

◆ freeBndElems()

void MooseMesh::freeBndElems ( )
protected

Definition at line 351 of file MooseMesh.C.

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

352 {
353  // free memory
354  for (auto & belem : _bnd_elems)
355  delete belem;
356 
357  for (auto & it : _bnd_elem_ids)
358  it.second.clear();
359 
360  _bnd_elem_ids.clear();
361 }
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:1501
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1496

◆ freeBndNodes()

void MooseMesh::freeBndNodes ( )
protected

Definition at line 333 of file MooseMesh.C.

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

334 {
335  // free memory
336  for (auto & bnode : _bnd_nodes)
337  delete bnode;
338 
339  for (auto & it : _node_set_nodes)
340  it.second.clear();
341 
342  _node_set_nodes.clear();
343 
344  for (auto & it : _bnd_node_ids)
345  it.second.clear();
346 
347  _bnd_node_ids.clear();
348 }
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:1493
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:1512
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:1489

◆ getActiveLocalElementRange()

ConstElemRange * MooseMesh::getActiveLocalElementRange ( )

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

Definition at line 1040 of file MooseMesh.C.

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

1041 {
1043  {
1044  TIME_SECTION("getActiveLocalElementRange", 5);
1045 
1046  _active_local_elem_range = std::make_unique<ConstElemRange>(
1047  getMesh().active_local_elements_begin(), getMesh().active_local_elements_end(), GRAIN_SIZE);
1048  }
1049 
1050  return _active_local_elem_range.get();
1051 }
static const int GRAIN_SIZE
Definition: MooseMesh.C:63
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:1451

◆ getActiveNodeRange()

NodeRange * MooseMesh::getActiveNodeRange ( )

Definition at line 1054 of file MooseMesh.C.

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

1055 {
1056  if (!_active_node_range)
1057  {
1058  TIME_SECTION("getActiveNodeRange", 5);
1059 
1060  _active_node_range = std::make_unique<NodeRange>(
1061  getMesh().active_nodes_begin(), getMesh().active_nodes_end(), GRAIN_SIZE);
1062  }
1063 
1064  return _active_node_range.get();
1065 }
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:1454
static const int GRAIN_SIZE
Definition: MooseMesh.C:63
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ getActiveSemiLocalNodeRange()

SemiLocalNodeRange * MooseMesh::getActiveSemiLocalNodeRange ( ) const

Definition at line 1068 of file MooseMesh.C.

1069 {
1070  mooseAssert(_active_semilocal_node_range,
1071  "_active_semilocal_node_range has not been created yet!");
1072 
1073  return _active_semilocal_node_range.get();
1074 }
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:1453

◆ 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 931 of file MooseMesh.C.

Referenced by getElemIDMapping().

932 {
933  std::set<dof_id_type> unique_ids;
934  for (auto & pair : _block_id_mapping[elem_id_index])
935  for (auto & id : pair.second)
936  unique_ids.insert(id);
937  return unique_ids;
938 }
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:1786

◆ 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 4010 of file MooseMesh.C.

Referenced by SubProblem::getAxisymmetricRadialCoord().

4011 {
4013  mooseError("getAxisymmetricRadialCoord() should not be called if "
4014  "setGeneralAxisymmetricCoordAxes() has been called.");
4015 
4016  if (_rz_coord_axis == 0)
4017  return 1; // if the rotation axis is x (0), then the radial direction is y (1)
4018  else
4019  return 0; // otherwise the radial direction is assumed to be x, i.e., the rotation axis is y
4020 }
bool usingGeneralAxisymmetricCoordAxes() const
Returns true if general axisymmetric coordinate axes are being used.
Definition: MooseMesh.C:3995
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1807

◆ 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 3304 of file MooseMesh.C.

3305 {
3306  const auto it = _sub_to_data.find(subdomain_id);
3307 
3308  if (it == _sub_to_data.end())
3309  mooseError("Unable to find subdomain ID: ", subdomain_id, '.');
3310 
3311  return it->second.neighbor_subs;
3312 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1750

◆ getBlocksMaxDimension()

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

Returns the maximum element dimension on the given blocks.

Definition at line 2699 of file MooseMesh.C.

Referenced by BlockRestrictable::initializeBlockRestrictable().

2700 {
2701  const auto & mesh = getMesh();
2702 
2703  // Take a shortcut if possible
2704  if (const auto & elem_dims = mesh.elem_dimensions(); mesh.is_prepared() && elem_dims.size() == 1)
2705  return *elem_dims.begin();
2706 
2707  unsigned short dim = 0;
2708  const auto subdomain_ids = getSubdomainIDs(blocks);
2709  const std::set<SubdomainID> subdomain_ids_set(subdomain_ids.begin(), subdomain_ids.end());
2710  for (const auto & elem : mesh.active_subdomain_set_elements_ptr_range(subdomain_ids_set))
2711  dim = std::max(dim, elem->dim());
2712 
2713  // Get the maximumal globally
2715  return dim;
2716 }
MeshBase & mesh
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
const Parallel::Communicator & _communicator
auto max(const L &left, const R &right)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
void max(const T &r, T &o, Request &req) const
std::vector< SubdomainID > getSubdomainIDs(const std::vector< SubdomainName > &subdomain_name) const
Get the associated subdomainIDs for the subdomain names that are passed in.
Definition: MooseMesh.C:1519
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 1127 of file MooseMesh.C.

Referenced by getBoundariesToElems().

1128 {
1129  return _bnd_elem_ids;
1130 }
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:1501

◆ 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 1119 of file MooseMesh.C.

1120 {
1121  mooseDeprecated("MooseMesh::getBoundariesToElems is deprecated, "
1122  "use MooseMesh::getBoundariesToActiveSemiLocalElemIds");
1124 }
void mooseDeprecated(Args &&... args) const
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:1127

◆ 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 1144 of file MooseMesh.C.

1145 {
1146  // Vector of boundary elems is updated every mesh update
1147  std::unordered_set<dof_id_type> neighbor_elems;
1148  for (const auto & bnd_elem : _bnd_elems)
1149  {
1150  const auto & [elem_ptr, elem_side, elem_bid] = *bnd_elem;
1151  if (elem_bid == bid)
1152  {
1153  const auto * neighbor = elem_ptr->neighbor_ptr(elem_side);
1154  // Dont add fully remote elements, ghosted is fine
1155  if (neighbor && neighbor != libMesh::remote_elem)
1156  {
1157  // handle mesh refinement, only return active elements near the boundary
1158  if (neighbor->active())
1159  neighbor_elems.insert(neighbor->id());
1160  else
1161  {
1162  std::vector<const Elem *> family;
1163  neighbor->active_family_tree_by_neighbor(family, elem_ptr);
1164  for (const auto & child_neighbor : family)
1165  neighbor_elems.insert(child_neighbor->id());
1166  }
1167  }
1168  }
1169  }
1170 
1171  return neighbor_elems;
1172 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:1496
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 1133 of file MooseMesh.C.

1134 {
1135  // The boundary to element map is computed on every mesh update
1136  const auto it = _bnd_elem_ids.find(bid);
1137  if (it == _bnd_elem_ids.end())
1138  // Boundary is not local to this domain, return an empty set
1139  return std::unordered_set<dof_id_type>{};
1140  return it->second;
1141 }
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:1501

◆ 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 3271 of file MooseMesh.C.

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

3272 {
3273  std::set<SubdomainID> subdomain_ids;
3274  for (const auto & [sub_id, data] : _sub_to_data)
3275  if (data.boundary_ids.find(bid) != data.boundary_ids.end())
3276  subdomain_ids.insert(sub_id);
3277 
3278  return subdomain_ids;
3279 }
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1750

◆ 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 3282 of file MooseMesh.C.

Referenced by DomainUserObject::DomainUserObject().

3283 {
3284  std::set<SubdomainID> subdomain_ids;
3285  for (const auto & it : _neighbor_subdomain_boundary_ids)
3286  if (it.second.find(bid) != it.second.end())
3287  subdomain_ids.insert(it.first);
3288 
3289  return subdomain_ids;
3290 }
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:1753

◆ getBoundaryElementRange()

ConstBndElemRange * MooseMesh::getBoundaryElementRange ( )

Definition at line 1105 of file MooseMesh.C.

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

1106 {
1107  if (!_bnd_elem_range)
1108  {
1109  TIME_SECTION("getBoundaryElementRange", 5);
1110 
1111  _bnd_elem_range =
1112  std::make_unique<ConstBndElemRange>(bndElemsBegin(), bndElemsEnd(), GRAIN_SIZE);
1113  }
1114 
1115  return _bnd_elem_range.get();
1116 }
virtual bnd_elem_iterator bndElemsEnd()
Definition: MooseMesh.C:1351
virtual bnd_elem_iterator bndElemsBegin()
Return iterators to the beginning/end of the boundary elements list.
Definition: MooseMesh.C:1343
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:1458
static const int GRAIN_SIZE
Definition: MooseMesh.C:63

◆ 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 1474 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(), EqualValueBoundaryConstraint::updateConstrainedNodes(), and UpperBoundNodalKernel::UpperBoundNodalKernel().

1475 {
1476  if (boundary_name == "ANY_BOUNDARY_ID")
1477  mooseError("Please use getBoundaryIDs() when passing \"ANY_BOUNDARY_ID\"");
1478 
1479  return MooseMeshUtils::getBoundaryID(boundary_name, getMesh());
1480 }
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:3198
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ getBoundaryIDs() [1/3]

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

Returns a vector of boundary IDs for the requested element on the requested side.

Definition at line 2719 of file MooseMesh.C.

Referenced by NonlinearSystemBase::computeJacobianInternal(), DGKernelBase::DGKernelBase(), DGKernelBase::excludeBoundary(), MultiAppUserObjectTransfer::execute(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::initializeBoundaryRestrictable(), BoundaryRestrictable::meshBoundaryIDs(), and ActivateElementsUserObjectBase::setNewBoundayName().

2720 {
2721  std::vector<BoundaryID> ids;
2722  getMesh().get_boundary_info().boundary_ids(elem, side, ids);
2723  return ids;
2724 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 2727 of file MooseMesh.C.

Referenced by cacheInfo().

2728 {
2729  return getMesh().get_boundary_info().get_boundary_ids();
2730 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 1505 of file MooseMesh.C.

1507 {
1509  getMesh(), boundary_name, generate_unknown, _mesh_boundary_ids);
1510 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
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:1480

◆ getBoundaryName()

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

Return the name of the boundary given the id.

Definition at line 1566 of file MooseMesh.C.

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

1567 {
1568  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1569 
1570  // We need to figure out if this boundary is a sideset or nodeset
1571  if (boundary_info.get_side_boundary_ids().count(boundary_id))
1572  return boundary_info.get_sideset_name(boundary_id);
1573  else
1574  return boundary_info.get_nodeset_name(boundary_id);
1575 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ getBoundaryNodeRange()

ConstBndNodeRange * MooseMesh::getBoundaryNodeRange ( )

Definition at line 1091 of file MooseMesh.C.

Referenced by ElementSubdomainModifier::buildMovedBndNodesRange(), NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), AuxiliarySystem::computeMortarNodalVars(), NonlinearSystemBase::computeNodalBCs(), NonlinearSystemBase::computeNodalBCsResidualAndJacobian(), AuxiliarySystem::computeNodalVarsHelper(), NonlinearSystemBase::computeResidualInternal(), DMMooseGetEmbedding_Private(), NearestNodeLocator::findNodes(), ActivateElementsUserObjectBase::getNewlyActivatedBndNodeRange(), FEProblemBase::initialSetup(), meshChanged(), FEProblemBase::projectSolution(), NonlinearSystemBase::setInitialSolution(), and NearestNodeLocator::updatePatch().

1092 {
1093  if (!_bnd_node_range)
1094  {
1095  TIME_SECTION("getBoundaryNodeRange", 5);
1096 
1097  _bnd_node_range =
1098  std::make_unique<ConstBndNodeRange>(bndNodesBegin(), bndNodesEnd(), GRAIN_SIZE);
1099  }
1100 
1101  return _bnd_node_range.get();
1102 }
virtual bnd_node_iterator bndNodesEnd()
Definition: MooseMesh.C:1335
virtual bnd_node_iterator bndNodesBegin()
Return iterators to the beginning/end of the boundary nodes list.
Definition: MooseMesh.C:1327
static const int GRAIN_SIZE
Definition: MooseMesh.C:63
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:1456

◆ getCheckedPointerParam()

template<typename T >
T MooseBaseParameterInterface::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 274 of file MooseBaseParameterInterface.h.

276 {
277  return parameters().getCheckedPointerParam<T>(name, error_string);
278 }
std::string name(const ElemQuality q)
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 InputParameters & parameters() const
Get the parameters of the object.

◆ 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 2326 of file MooseMesh.C.

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

2327 {
2328  std::pair<int, ElemType> the_pair(input_side, elem.type());
2329 
2330  if (_elem_type_to_coarsening_map.find(the_pair) == _elem_type_to_coarsening_map.end())
2331  mooseError("Could not find a suitable qp refinement map!");
2332 
2333  return _elem_type_to_coarsening_map[the_pair];
2334 }
std::map< std::pair< int, 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:1730
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 3891 of file MooseMesh.C.

Referenced by SubProblem::getCoordSystem().

3892 {
3893  auto it = _coord_sys.find(sid);
3894  if (it != _coord_sys.end())
3895  return (*it).second;
3896  else
3897  mooseError("Requested subdomain ", sid, " does not exist.");
3898 }
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1804
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 3923 of file MooseMesh.C.

Referenced by setGeneralAxisymmetricCoordAxes().

3924 {
3925  return _coord_sys;
3926 }
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1804

◆ getDataFileName()

std::string DataFileInterface< MooseObject >::getDataFileName ( const std::string &  param) const
inherited

Returns the path of a data file for a given FileName type parameter, searching (in the following order)

  • relative to the input file directory
  • relative to the running binary (assuming the application is installed)
  • relative to all registered data file directories
  • relative to the input file directory

Definition at line 22 of file DataFileInterface.C.

23 {
25  {
26  const auto & absolute_path = _parent.template getParam<FileName>(param);
27  if (MooseUtils::checkFileReadable(absolute_path, false, false, false))
28  {
29  _parent.paramInfo(param, "Data file '", absolute_path, "' found relative to the input file.");
30  return absolute_path;
31  }
32  }
33 
34  const auto & relative_path = _parent.parameters().rawParamVal(param);
35  return getDataFileNameByName(relative_path, &param);
36 }
std::string getDataFileNameByName(const std::string &name, const std::string *param=nullptr) const
Returns the path of a data file for a given relative file path.
std::string & rawParamVal(const std::string &param)
Get/set a string representing the raw, unmodified token text for the given param. ...
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true, bool check_for_git_lfs_pointer=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:253
const InputParameters & parameters() const
Get the parameters of the object.
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 in...

◆ getDataFileNameByName()

std::string DataFileInterface< MooseObject >::getDataFileNameByName ( const std::string &  name,
const std::string *  param = nullptr 
) 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. The optional param pointer can be used to turn the mooseErrors this function emits into paramErrors

  • relative to the running binary (assuming the application is installed)
  • relative to all registered data file directories

Definition at line 40 of file DataFileInterface.C.

42 {
44  const auto share_dir = MooseUtils::pathjoin(Moose::getExecutablePath(), "..", "share");
45  if (MooseUtils::pathIsDirectory(share_dir))
46  {
47  const auto dirs = MooseUtils::listDir(share_dir, false);
48  for (const auto & data_dir : dirs)
49  {
50  const auto path = MooseUtils::pathjoin(data_dir, "data", relative_path);
51  if (MooseUtils::checkFileReadable(path, false, false, false))
52  {
53  if (param)
55  *param, "Data file '", path, "' found in an installed app distribution.");
56  else
57  mooseInfo("Data file '", path, "' found in an installed app distribution.");
58  return path;
59  }
60  }
61  }
62 
64  for (const auto & data_dir : Registry::getRegistry().getDataFilePaths())
65  {
66  const auto path = MooseUtils::pathjoin(data_dir, relative_path);
67  if (MooseUtils::checkFileReadable(path, false, false, false))
68  {
69  if (param)
70  _parent.paramInfo(*param, "Data file '", path, "' found in a source repository.");
71  else
72  mooseInfo("Data file '", path, "' found in a source repository.");
73  return path;
74  }
75  }
76 
77  mooseException(param ? _parent.parameters().inputLocation(*param) : _parent.name(),
78  ": Unable to find data file '",
79  relative_path,
80  "' anywhere");
81 }
static Registry & getRegistry()
Get the global Registry singleton.
Definition: Registry.C:21
std::string getExecutablePath()
This function returns the PATH of the running executable.
bool pathIsDirectory(const std::string &path)
Definition: MooseUtils.C:247
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:329
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true, bool check_for_git_lfs_pointer=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:253
std::filesystem::path pathjoin(const std::filesystem::path &p)
Definition: MooseUtils.C:58
std::list< std::string > listDir(const std::string path, bool files_only=false)
Definition: MooseUtils.C:765
const InputParameters & parameters() const
Get the parameters of the object.
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 in...

◆ 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 2092 of file MooseMesh.h.

Referenced by areElemIDsIdentical().

2093 {
2094  if (!hasElementID(id_name))
2095  mooseError("Mesh does not have element ID for ", id_name);
2096  return getMesh().get_elem_integer_index(id_name);
2097 }
bool hasElementID(const std::string &id_name) const
Whether mesh has an extra element integer with a given name.
Definition: MooseMesh.h:2086
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 902 of file MooseMesh.C.

903 {
904  auto & mesh_base = getMesh();
905 
906  if (!mesh_base.has_elem_integer(from_id_name))
907  mooseError("Mesh does not have the element integer name '", from_id_name, "'");
908  if (!mesh_base.has_elem_integer(to_id_name))
909  mooseError("Mesh does not have the element integer name '", to_id_name, "'");
910 
911  const auto id1 = mesh_base.get_elem_integer_index(from_id_name);
912  const auto id2 = mesh_base.get_elem_integer_index(to_id_name);
913 
914  std::unordered_map<dof_id_type, std::set<dof_id_type>> id_map;
915  for (const auto id : getAllElemIDs(id1))
916  id_map[id] = std::set<dof_id_type>();
917 
918  for (const auto & elem : mesh_base.active_local_element_ptr_range())
919  id_map[elem->get_extra_integer(id1)].insert(elem->get_extra_integer(id2));
920 
921  for (auto & [id, ids] : id_map)
922  {
923  libmesh_ignore(id); // avoid overzealous gcc 9.4 unused var warning
924  comm().set_union(ids);
925  }
926 
927  return id_map;
928 }
const Parallel::Communicator & comm() const
void libmesh_ignore(const Args &...)
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
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:931
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
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 941 of file MooseMesh.C.

942 {
943  std::set<dof_id_type> unique_ids;
944  for (auto & blk : blks)
945  {
946  auto it = _block_id_mapping[elem_id_index].find(blk);
947  if (it == _block_id_mapping[elem_id_index].end())
948  mooseError("Block ", blk, " is not available on the mesh");
949 
950  for (auto & mid : it->second)
951  unique_ids.insert(mid);
952  }
953  return unique_ids;
954 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
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:1786

◆ 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 1049 of file MooseMesh.h.

1049 { 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 3985 of file MooseMesh.C.

3986 {
3987  auto it = _subdomain_id_to_rz_coord_axis.find(subdomain_id);
3988  if (it != _subdomain_id_to_rz_coord_axis.end())
3989  return (*it).second;
3990  else
3991  mooseError("Requested subdomain ", subdomain_id, " does not exist.");
3992 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and 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:1810

◆ getGhostedBoundaries()

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

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

Definition at line 2991 of file MooseMesh.C.

2992 {
2993  return _ghosted_boundaries;
2994 }
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:1514

◆ getGhostedBoundaryInflation()

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

Return a writable reference to the _ghosted_boundaries_inflation vector.

Definition at line 2997 of file MooseMesh.C.

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

2998 {
3000 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:1515

◆ getGhostingPatchSize()

unsigned int MooseMesh::getGhostingPatchSize ( ) const
inline

Getter for the ghosting_patch_size parameter.

Definition at line 611 of file MooseMesh.h.

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

611 { 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:1521

◆ 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 1494 of file MooseMesh.C.

1495 {
1496  auto it = _lower_d_elem_to_higher_d_elem_side.find(elem);
1497 
1498  if (it != _lower_d_elem_to_higher_d_elem_side.end())
1499  return it->second;
1500  else
1501  return libMesh::invalid_uint;
1502 }
const unsigned int invalid_uint
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
Definition: MooseMesh.h:1758
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 3169 of file MooseMesh.C.

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

3170 {
3171  // Grab a bounding box to speed things up. Note that
3172  // local_bounding_box is *not* equivalent to processor_bounding_box
3173  // with processor_id() except in serial.
3174  BoundingBox bbox = MeshTools::create_local_bounding_box(getMesh());
3175 
3176  // Inflate the bbox just a bit to deal with roundoff
3177  // Adding 1% of the diagonal size in each direction on each end
3178  Real inflation_amount = inflation_multiplier * (bbox.max() - bbox.min()).norm();
3179  Point inflation(inflation_amount, inflation_amount, inflation_amount);
3180 
3181  bbox.first -= inflation; // min
3182  bbox.second += inflation; // max
3183 
3184  return bbox;
3185 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
auto norm(const T &a) -> decltype(std::abs(a))
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ 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 3293 of file MooseMesh.C.

3294 {
3295  std::set<SubdomainID> subdomain_ids = getBoundaryConnectedBlocks(bid);
3296  for (const auto & it : _neighbor_subdomain_boundary_ids)
3297  if (it.second.find(bid) != it.second.end())
3298  subdomain_ids.insert(it.first);
3299 
3300  return subdomain_ids;
3301 }
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:1753
std::set< SubdomainID > getBoundaryConnectedBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary.
Definition: MooseMesh.C:3271

◆ getLocalNodeRange()

ConstNodeRange * MooseMesh::getLocalNodeRange ( )

Definition at line 1077 of file MooseMesh.C.

Referenced by NonlinearSystemBase::computeDamping(), NonlinearSystemBase::computeJacobianInternal(), AuxiliarySystem::computeNodalVarsHelper(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::computeUserObjectsInternal(), FEProblemBase::initialSetup(), and meshChanged().

1078 {
1079  if (!_local_node_range)
1080  {
1081  TIME_SECTION("getLocalNodeRange", 5);
1082 
1083  _local_node_range = std::make_unique<ConstNodeRange>(
1084  getMesh().local_nodes_begin(), getMesh().local_nodes_end(), GRAIN_SIZE);
1085  }
1086 
1087  return _local_node_range.get();
1088 }
static const int GRAIN_SIZE
Definition: MooseMesh.C:63
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:1455

◆ getLowerDElem()

const Elem * MooseMesh::getLowerDElem ( const Elem *  elem,
unsigned short int  side 
) 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 1483 of file MooseMesh.C.

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

1484 {
1485  auto it = _higher_d_elem_side_to_lower_d_elem.find(std::make_pair(elem, side));
1486 
1487  if (it != _higher_d_elem_side_to_lower_d_elem.end())
1488  return it->second;
1489  else
1490  return nullptr;
1491 }
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:1757
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 2126 of file MooseMesh.h.

2127 {
2129 }
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:1757

◆ getMaxInDimension()

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

Reimplemented in AnnularMesh, and GeneratedMesh.

Definition at line 1964 of file MooseMesh.C.

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

1965 {
1966  mooseAssert(_mesh, "The MeshBase has not been constructed");
1967  mooseAssert(component < _bounds.size(), "Requested dimension out of bounds");
1968 
1969  return _bounds[component][MAX];
1970 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1536
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390

◆ getMaxLeafSize()

unsigned int MooseMesh::getMaxLeafSize ( ) const
inline

Getter for the maximum leaf size parameter.

Definition at line 616 of file MooseMesh.h.

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

616 { return _max_leaf_size; }
unsigned int _max_leaf_size
Definition: MooseMesh.h:1524

◆ getMesh() [1/4]

MeshBase & MooseMesh::getMesh ( )

Accessor for the underlying libMesh Mesh object.

Definition at line 3198 of file MooseMesh.C.

Referenced by AddPeriodicBCAction::act(), activeLocalElementsBegin(), activeLocalElementsEnd(), Adaptivity::adaptMesh(), FEProblemBase::addAnyRedistributers(), addQuadratureNode(), addUniqueNode(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), NonlinearSystemBase::assembleScalingVector(), Assembly::Assembly(), AuxKernelTempl< Real >::AuxKernelTempl(), buildActiveSideList(), buildBndElemList(), buildElemIDInfo(), buildFiniteVolumeInfo(), buildHRefinementAndCoarseningMaps(), buildLowerDMesh(), TiledMesh::buildMesh(), FileMesh::buildMesh(), AnnularMesh::buildMesh(), RinglebMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), GeneratedMesh::buildMesh(), ConcentricCircleMesh::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(), elemPtr(), ElemSideNeighborLayersTester::execute(), NodalNormalsCorner::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppUserObjectTransfer::execute(), NodalNormalsPreprocessor::execute(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), ElementSubdomainModifier::finalize(), ActivateElementsUserObjectBase::finalize(), getActiveLocalElementRange(), getActiveNodeRange(), getBlocksMaxDimension(), getBoundaryID(), getBoundaryIDs(), getBoundaryName(), getElementIDIndex(), getElemIDMapping(), FEProblemBase::getEvaluableElementRange(), getInflatedProcessorBoundingBox(), getLocalNodeRange(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), getNodeList(), FEProblemBase::getNonlinearEvaluableElementRange(), getPointLocator(), getSubdomainID(), getSubdomainIDs(), getSubdomainName(), ghostGhostedBoundaries(), hasElementID(), UpdateDisplacedMeshThread::init(), init(), VerifyElementUniqueID::initialize(), VerifyNodalUniqueID::initialize(), ExtraElementIntegerDivision::initialize(), ElementCentroidPositions::initialize(), ElementGroupCentroidPositions::initialize(), FunctorPositions::initialize(), FunctorTimes::initialize(), MultiAppDofCopyTransfer::initialSetup(), NodalVariableValue::initialSetup(), Exodus::initialSetup(), FEProblemBase::initialSetup(), OversampleOutput::initOversample(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), LinearNodalConstraint::LinearNodalConstraint(), localNodesBegin(), localNodesEnd(), Moose::Mortar::loopOverMortarSegments(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), maxElemId(), maxNodeId(), GeometryBase::meshChanged(), GhostingUserObject::meshChanged(), RadialAverage::meshChanged(), Nemesis::meshChanged(), MooseMesh(), nElem(), nNodes(), NodalPatchRecovery::NodalPatchRecovery(), NodalVariableValue::NodalVariableValue(), nodeToActiveSemilocalElemMap(), nodeToElemMap(), ComputeNodalUserObjectsThread::onNode(), ProxyRelationshipManager::operator()(), MortarUserObjectThread::operator()(), ComputeMortarFunctor::operator()(), XDA::output(), ConsoleUtils::outputMeshInformation(), prepare(), EqualValueEmbeddedConstraint::prepareSecondaryToPrimaryMap(), BoundaryPreservedMarker::preserveBoundary(), printInfo(), ElementSubdomainModifier::pushBoundaryNodeInfo(), ElementSubdomainModifier::pushBoundarySideInfo(), queryElemPtr(), queryNodePtr(), FileMesh::read(), PropertyReadFile::readData(), RedistributeProperties::redistribute(), SubProblem::restrictionBoundaryCheckName(), SubProblem::restrictionSubdomainCheckName(), setBoundaryName(), NonlinearSystemBase::setConstraintSecondaryValues(), XFEMInterface::setDisplacedMesh(), ActivateElementsUserObjectBase::setNewBoundayName(), setPartitionerHelper(), setSubdomainName(), sideWithBoundaryID(), MultiAppDofCopyTransfer::transfer(), DisplacedProblem::undisplaceMesh(), updateActiveSemiLocalNodeRange(), EqualValueBoundaryConstraint::updateConstrainedNodes(), Adaptivity::updateErrorVectors(), RandomData::updateGenerators(), DisplacedProblem::updateMesh(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

3199 {
3200  mooseAssert(_mesh, "Mesh hasn't been created");
3201  return *_mesh;
3202 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390

◆ getMesh() [2/4]

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

◆ getMesh() [3/4]

const MeshBase & MooseMesh::getMesh ( ) const

Definition at line 3205 of file MooseMesh.C.

3206 {
3207  mooseAssert(_mesh, "Mesh hasn't been created");
3208  return *_mesh;
3209 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390

◆ getMesh() [4/4]

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

◆ getMeshPtr()

const MeshBase * MooseMesh::getMeshPtr ( ) const

Definition at line 3192 of file MooseMesh.C.

Referenced by MooseApp::attachRelationshipManagers(), buildTypedMesh(), and RelationshipManager::init().

3193 {
3194  return _mesh.get();
3195 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390

◆ 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 1955 of file MooseMesh.C.

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

1956 {
1957  mooseAssert(_mesh, "The MeshBase has not been constructed");
1958  mooseAssert(component < _bounds.size(), "Requested dimension out of bounds");
1959 
1960  return _bounds[component][MIN];
1961 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:1536
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390

◆ getMooseApp()

MooseApp& MooseBase::getMooseApp ( ) const
inlineinherited

◆ getNodeBlockIds()

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

Return list of blocks to which the given node belongs.

Definition at line 1280 of file MooseMesh.C.

Referenced by GeometryBase::meshChanged(), ComputeNodalUserObjectsThread::onNode(), ComputeNodalKernelsThread::onNode(), ComputeNodalKernelJacobiansThread::onNode(), and ComputeInitialConditionThread::operator()().

1281 {
1282  std::map<dof_id_type, std::set<SubdomainID>>::const_iterator it =
1283  _block_node_list.find(node.id());
1284 
1285  if (it == _block_node_list.end())
1286  mooseError("Unable to find node: ", node.id(), " in any block list.");
1287 
1288  return it->second;
1289 }
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:1509
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:622
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 3220 of file MooseMesh.C.

Referenced by LinearNodalConstraint::LinearNodalConstraint(), GeometryBase::meshChanged(), NodalScalarKernel::NodalScalarKernel(), and EqualValueBoundaryConstraint::updateConstrainedNodes().

3221 {
3222  std::map<boundary_id_type, std::vector<dof_id_type>>::const_iterator it =
3223  _node_set_nodes.find(nodeset_id);
3224 
3225  if (it == _node_set_nodes.end())
3226  {
3227  // On a distributed mesh we might not know about a remote nodeset,
3228  // so we'll return an empty vector and hope the nodeset exists
3229  // elsewhere.
3230  if (!getMesh().is_serial())
3231  {
3232  static const std::vector<dof_id_type> empty_vec;
3233  return empty_vec;
3234  }
3235  // On a replicated mesh we should know about every nodeset and if
3236  // we're asked for one that doesn't exist then it must be a bug.
3237  else
3238  {
3239  mooseError("Unable to nodeset ID: ", nodeset_id, '.');
3240  }
3241  }
3242 
3243  return it->second;
3244 }
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:1512
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.

◆ 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 2559 of file MooseMesh.C.

2560 {
2561  mooseAssert(_boundary_to_normal_map.get() != nullptr, "Boundary To Normal Map not built!");
2562 
2563  // Note: Boundaries that are not in the map (existing boundaries) will default
2564  // construct a new RealVectorValue - (x,y,z)=(0, 0, 0)
2565  return (*_boundary_to_normal_map)[id];
2566 }
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:1486

◆ 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 2036 of file MooseMesh.C.

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

2037 {
2039  mooseError("Trying to retrieve automatic paired mapping for a mesh that is not regular and "
2040  "orthogonal");
2041 
2042  mooseAssert(component < dimension(), "Requested dimension out of bounds");
2043 
2044  if (_paired_boundary.empty())
2046 
2047  if (component < _paired_boundary.size())
2048  return &_paired_boundary[component];
2049  else
2050  return nullptr;
2051 }
void detectPairedSidesets()
This routine detects paired sidesets of a regular orthogonal mesh (.i.e.
Definition: MooseMesh.C:1773
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2678
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition: MooseMesh.h:1539
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1533

◆ getParam() [1/2]

template<typename T >
const T & MooseBaseParameterInterface::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 210 of file MooseBaseParameterInterface.h.

Referenced by CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), ADNodalKernel::ADNodalKernel(), ArrayParsedAux::ArrayParsedAux(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), PiecewiseTabularBase::buildFromJSON(), PhysicsBase::checkVectorParamsNoOverlap(), PhysicsBase::checkVectorParamsSameLength(), FEProblemBase::createTagSolutions(), AccumulateReporter::declareLateValues(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FVInterfaceKernel::FVInterfaceKernel(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), GeneratedMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), SideSetsBetweenSubdomainsGenerator::generate(), BlockDeletionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedGenerateSideset::generate(), GenericConstantRankTwoTensorTempl< is_ad >::GenericConstantRankTwoTensorTempl(), MooseApp::getCheckpointDirectories(), ExecutorInterface::getExecutor(), GhostingUserObject::GhostingUserObject(), TimeSequenceStepper::init(), IterationAdaptiveDT::init(), AdvancedOutput::init(), AttribThread::initFrom(), AttribSysNum::initFrom(), AttribResidualObject::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MooseMesh(), MooseVariableBase::MooseVariableBase(), NestedDivision::NestedDivision(), ConsoleUtils::outputExecutionInformation(), ParsedAux::ParsedAux(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterialTempl< is_ad >::ParsedMaterialTempl(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseConstantByBlockMaterialTempl< is_ad >::PiecewiseConstantByBlockMaterialTempl(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), Moose::FV::setInterpolationMethod(), SetupMeshAction::setupMesh(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorOfPostprocessors::VectorOfPostprocessors().

211 {
212  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
213 }
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseObject *moose_object=nullptr)
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ getParam() [2/2]

template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > MooseBaseParameterInterface::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 267 of file MooseBaseParameterInterface.h.

268 {
269  return _pars.get<T1, T2>(param1, param2);
270 }
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.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ getPatchSize()

unsigned int MooseMesh::getPatchSize ( ) const

Getter for the patch_size parameter.

Definition at line 3151 of file MooseMesh.C.

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

3152 {
3153  return _patch_size;
3154 }
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:1518

◆ getPatchUpdateStrategy()

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

Get the current patch update strategy.

Definition at line 3163 of file MooseMesh.C.

Referenced by FEProblemBase::possiblyRebuildGeomSearchPatches().

3164 {
3165  return _patch_update_strategy;
3166 }
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:1527

◆ 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 4108 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onElement().

4109 {
4111 }
const std::vector< QpMap > & getPCoarseningMapHelper(const Elem &elem, const std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4086
std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
Definition: MooseMesh.h:1732
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ getPCoarseningMapHelper()

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

Definition at line 4086 of file MooseMesh.C.

Referenced by getPCoarseningMap(), and getPCoarseningSideMap().

4089 {
4090  mooseAssert(elem.active() && elem.p_refinement_flag() == Elem::JUST_COARSENED,
4091  "These are the conditions that should be met for requesting a coarsening map");
4092  return libmesh_map_find(map, std::make_pair(elem.type(), elem.p_level()));
4093 }
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 4114 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onBoundary().

4115 {
4117 }
const std::vector< QpMap > & getPCoarseningMapHelper(const Elem &elem, const std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4086
std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_side_map
Definition: MooseMesh.h:1734
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ getPointLocator()

std::unique_ptr< 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 3479 of file MooseMesh.C.

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

3480 {
3481  return getMesh().sub_point_locator();
3482 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 4096 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onElement().

4097 {
4099 }
std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
Definition: MooseMesh.h:1707
const std::vector< QpMap > & getPRefinementMapHelper(const Elem &elem, const std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4073
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ getPRefinementMapHelper()

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

Definition at line 4073 of file MooseMesh.C.

Referenced by getPRefinementMap(), and getPRefinementSideMap().

4076 {
4077  mooseAssert(elem.active() && elem.p_refinement_flag() == Elem::JUST_REFINED,
4078  "These are the conditions that should be met for requesting a refinement map");
4079  // We are actually seeking the map stored with the p_level - 1 key, e.g. the refinement map that
4080  // maps from the previous p_level to this element's p_level
4081  return libmesh_map_find(map,
4082  std::make_pair(elem.type(), cast_int<unsigned int>(elem.p_level() - 1)));
4083 }
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 4102 of file MooseMesh.C.

Referenced by ProjectMaterialProperties::onBoundary().

4103 {
4105 }
const std::vector< QpMap > & getPRefinementMapHelper(const Elem &elem, const std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap >> &) const
Definition: MooseMesh.C:4073
std::map< std::pair< ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
Definition: MooseMesh.h:1709
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 1444 of file MooseMesh.C.

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

1447 {
1448  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes.find(elem->id()) !=
1450  "Elem has no quadrature nodes!");
1451  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()].find(side) !=
1453  "Side has no quadrature nodes!");
1454  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) !=
1455  _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].end(),
1456  "qp not found on side!");
1457 
1458  return _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
1459 }
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:1505
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 2262 of file MooseMesh.C.

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

2263 {
2264  if (child == -1) // Doing volume mapping or parent side mapping
2265  {
2266  mooseAssert(parent_side == child_side,
2267  "Parent side must match child_side if not passing a specific child!");
2268 
2269  std::pair<int, ElemType> the_pair(parent_side, elem.type());
2270 
2271  if (_elem_type_to_refinement_map.find(the_pair) == _elem_type_to_refinement_map.end())
2272  mooseError("Could not find a suitable qp refinement map!");
2273 
2274  return _elem_type_to_refinement_map[the_pair];
2275  }
2276  else // Need to map a child side to parent volume qps
2277  {
2278  std::pair<int, int> child_pair(child, child_side);
2279 
2280  if (_elem_type_to_child_side_refinement_map.find(elem.type()) ==
2282  _elem_type_to_child_side_refinement_map[elem.type()].find(child_pair) ==
2284  mooseError("Could not find a suitable qp refinement map!");
2285 
2286  return _elem_type_to_child_side_refinement_map[elem.type()][child_pair];
2287  }
2288 
2295 }
std::map< 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:1713
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
std::map< std::pair< int, 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:1705

◆ getRenamedParam()

template<typename T >
const T & MooseBaseParameterInterface::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 217 of file MooseBaseParameterInterface.h.

219 {
220  // this enables having a default on the new parameter but bypassing it with the old one
221  // Most important: accept new parameter
222  if (isParamSetByUser(new_name) && !isParamValid(old_name))
223  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0));
224  // Second most: accept old parameter
225  else if (isParamValid(old_name) && !isParamSetByUser(new_name))
226  return InputParameters::getParamHelper(old_name, _pars, static_cast<T *>(0));
227  // Third most: accept default for new parameter
228  else if (isParamValid(new_name) && !isParamValid(old_name))
229  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0));
230  // Refuse: no default, no value passed
231  else if (!isParamValid(old_name) && !isParamValid(new_name))
232  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
233  "' is being retrieved without being set.\n"
234  "Did you misspell it?");
235  // Refuse: both old and new parameters set by user
236  else
237  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
238  "' may not be provided alongside former parameter '" + old_name + "'");
239 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseObject *moose_object=nullptr)
bool isParamSetByUser(const std::string &nm) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
std::string & blockFullpath()
Get/set a string representing the full HIT parameter path from the input file (e.g.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ 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 }

◆ 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 3247 of file MooseMesh.C.

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

3248 {
3249  const auto it = _sub_to_data.find(subdomain_id);
3250 
3251  if (it == _sub_to_data.end())
3252  mooseError("Unable to find subdomain ID: ", subdomain_id, '.');
3253 
3254  return it->second.boundary_ids;
3255 }
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1750

◆ 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 1513 of file MooseMesh.C.

Referenced by SystemBase::addVariable(), FVInterfaceKernel::FVInterfaceKernel(), SolutionIC::initialSetup(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseConstantByBlockMaterialTempl< is_ad >::PiecewiseConstantByBlockMaterialTempl(), setCoordSystem(), and setGeneralAxisymmetricCoordAxes().

1514 {
1515  return MooseMeshUtils::getSubdomainID(subdomain_name, getMesh());
1516 }
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:3198

◆ getSubdomainIDs()

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

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

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

Definition at line 1519 of file MooseMesh.C.

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

1520 {
1521  return MooseMeshUtils::getSubdomainIDs(getMesh(), subdomain_name);
1522 }
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:3198

◆ 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 3258 of file MooseMesh.C.

3259 {
3260  const auto & bnd_ids = getSubdomainBoundaryIds(subdomain_id);
3261  std::set<BoundaryID> boundary_ids(bnd_ids.begin(), bnd_ids.end());
3262  std::unordered_map<SubdomainID, std::set<BoundaryID>>::const_iterator it =
3263  _neighbor_subdomain_boundary_ids.find(subdomain_id);
3264 
3265  boundary_ids.insert(it->second.begin(), it->second.end());
3266 
3267  return boundary_ids;
3268 }
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:3247
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:1753

◆ getSubdomainName()

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

Return the name of a block given an id.

Definition at line 1537 of file MooseMesh.C.

Referenced by FEProblemBase::checkDependMaterialsHelper(), checkDuplicateSubdomainNames(), DomainUserObject::checkVariable(), getSubdomainNames(), NonlinearThread::printBlockExecutionInformation(), and setGeneralAxisymmetricCoordAxes().

1538 {
1539  return getMesh().subdomain_name(subdomain_id);
1540 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 1543 of file MooseMesh.C.

Referenced by NonlinearSystemBase::checkKernelCoverage(), and SolutionIC::initialSetup().

1544 {
1545  std::vector<SubdomainName> names(subdomain_ids.size());
1546 
1547  for (unsigned int i = 0; i < subdomain_ids.size(); i++)
1548  names[i] = getSubdomainName(subdomain_ids[i]);
1549 
1550  return names;
1551 }
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1537

◆ 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 3901 of file MooseMesh.C.

3902 {
3903  const auto unique_system = _coord_sys.find(*meshSubdomains().begin())->second;
3904  // Check that it is actually unique
3905  bool result = std::all_of(
3906  std::next(_coord_sys.begin()),
3907  _coord_sys.end(),
3908  [unique_system](
3909  typename std::unordered_map<SubdomainID, Moose::CoordinateSystemType>::const_reference
3910  item) { return (item.second == unique_system); });
3911  if (!result)
3912  mooseError("The unique coordinate system of the mesh was requested by the mesh contains "
3913  "multiple blocks with different coordinate systems");
3914 
3916  mooseError("General axisymmetric coordinate axes are being used, and it is currently "
3917  "conservatively assumed that in this case there is no unique coordinate system.");
3918 
3919  return unique_system;
3920 }
bool usingGeneralAxisymmetricCoordAxes() const
Returns true if general axisymmetric coordinate axes are being used.
Definition: MooseMesh.C:3995
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1804
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2921

◆ ghostGhostedBoundaries()

void MooseMesh::ghostGhostedBoundaries ( )

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

Definition at line 3064 of file MooseMesh.C.

Referenced by FEProblemBase::ghostGhostedBoundaries().

3065 {
3066  // No need to do this if using a serial mesh
3067  // We do not need to ghost boundary elements when _need_ghost_ghosted_boundaries
3068  // is not true. _need_ghost_ghosted_boundaries can be set by a mesh generator
3069  // where boundaries are already ghosted accordingly
3071  return;
3072 
3073  TIME_SECTION("GhostGhostedBoundaries", 3);
3074 
3075  parallel_object_only();
3076 
3077  DistributedMesh & mesh = dynamic_cast<DistributedMesh &>(getMesh());
3078 
3079  // We clear ghosted elements that were added by previous invocations of this
3080  // method but leave ghosted elements that were added by other code, e.g.
3081  // OversampleOutput, untouched
3082  mesh.clear_extra_ghost_elems(_ghost_elems_from_ghost_boundaries);
3084 
3085  std::set<const Elem *, CompareElemsByLevel> boundary_elems_to_ghost;
3086  std::set<Node *> connected_nodes_to_ghost;
3087 
3088  std::vector<const Elem *> family_tree;
3089 
3090  for (const auto & t : mesh.get_boundary_info().build_side_list())
3091  {
3092  auto elem_id = std::get<0>(t);
3093  auto bc_id = std::get<2>(t);
3094 
3095  if (_ghosted_boundaries.find(bc_id) != _ghosted_boundaries.end())
3096  {
3097  Elem * elem = mesh.elem_ptr(elem_id);
3098 
3099 #ifdef LIBMESH_ENABLE_AMR
3100  elem->family_tree(family_tree);
3101  Elem * parent = elem->parent();
3102  while (parent)
3103  {
3104  family_tree.push_back(parent);
3105  parent = parent->parent();
3106  }
3107 #else
3108  family_tree.clear();
3109  family_tree.push_back(elem);
3110 #endif
3111  for (const auto & felem : family_tree)
3112  {
3113  boundary_elems_to_ghost.insert(felem);
3114 
3115  // The entries of connected_nodes_to_ghost need to be
3116  // non-constant, so that they will work in things like
3117  // UpdateDisplacedMeshThread. The container returned by
3118  // family_tree contains const Elems even when the Elem
3119  // it is called on is non-const, so once that interface
3120  // gets fixed we can remove this const_cast.
3121  for (unsigned int n = 0; n < felem->n_nodes(); ++n)
3122  connected_nodes_to_ghost.insert(const_cast<Node *>(felem->node_ptr(n)));
3123  }
3124  }
3125  }
3126 
3127  // We really do want to store this by value instead of by reference
3128  const auto prior_ghost_elems = mesh.extra_ghost_elems();
3129 
3130  mesh.comm().allgather_packed_range(&mesh,
3131  connected_nodes_to_ghost.begin(),
3132  connected_nodes_to_ghost.end(),
3133  extra_ghost_elem_inserter<Node>(mesh));
3134 
3135  mesh.comm().allgather_packed_range(&mesh,
3136  boundary_elems_to_ghost.begin(),
3137  boundary_elems_to_ghost.end(),
3138  extra_ghost_elem_inserter<Elem>(mesh));
3139 
3140  const auto & current_ghost_elems = mesh.extra_ghost_elems();
3141 
3142  std::set_difference(current_ghost_elems.begin(),
3143  current_ghost_elems.end(),
3144  prior_ghost_elems.begin(),
3145  prior_ghost_elems.end(),
3146  std::inserter(_ghost_elems_from_ghost_boundaries,
3148 }
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready...
Definition: MooseMesh.h:1783
MeshBase & mesh
std::set< Elem * > _ghost_elems_from_ghost_boundaries
Set of elements ghosted by ghostGhostedBoundaries.
Definition: MooseMesh.h:1777
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
void family_tree(T elem, std::vector< T > &family, bool reset=true)
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:1514

◆ 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 2086 of file MooseMesh.h.

Referenced by getElementIDIndex().

2087 {
2088  return getMesh().has_elem_integer(id_name);
2089 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 1366 of file MooseMesh.h.

Referenced by GhostLowerDElems::operator()().

1366 { 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:1762

◆ hasMeshBase()

bool MooseMesh::hasMeshBase ( ) const
inline

Whether mesh base object was constructed or not.

Definition at line 1082 of file MooseMesh.h.

Referenced by MeshGeneratorMesh::buildMesh().

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

◆ hasSecondOrderElements()

bool MooseMesh::hasSecondOrderElements ( )

check if the mesh has SECOND order elements

Definition at line 3457 of file MooseMesh.C.

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

3458 {
3459  bool mesh_has_second_order_elements = false;
3460  for (auto it = activeLocalElementsBegin(), end = activeLocalElementsEnd(); it != end; ++it)
3461  if ((*it)->default_order() == SECOND)
3462  {
3463  mesh_has_second_order_elements = true;
3464  break;
3465  }
3466 
3467  // We checked our local elements, so take the max over all processors.
3468  comm().max(mesh_has_second_order_elements);
3469  return mesh_has_second_order_elements;
3470 }
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:2801
void max(const T &r, T &o, Request &req) const
const MeshBase::element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:2807

◆ 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 2625 of file MooseMesh.C.

2626 {
2633  if (!_mesh)
2635 
2637  mooseError("You cannot use the mesh splitter capability with DistributedMesh!");
2638 
2639  TIME_SECTION("init", 2);
2640 
2642  {
2643  // Some partitioners are not idempotent. Some recovery data
2644  // files require partitioning to match mesh partitioning. This
2645  // means that, when recovering, we can't safely repartition.
2646  const bool skip_partitioning_later = getMesh().skip_partitioning();
2647  getMesh().skip_partitioning(true);
2648  const bool allow_renumbering_later = getMesh().allow_renumbering();
2649  getMesh().allow_renumbering(false);
2650 
2651  // For now, only read the recovery mesh on the Ultimate Master..
2652  // sub-apps need to just build their mesh like normal
2653  {
2654  TIME_SECTION("readRecoveredMesh", 2);
2656  }
2657 
2658  getMesh().allow_renumbering(allow_renumbering_later);
2659  getMesh().skip_partitioning(skip_partitioning_later);
2660  }
2661  else // Normally just build the mesh
2662  {
2663  // Don't allow partitioning during building
2664  if (_app.isSplitMesh())
2665  getMesh().skip_partitioning(true);
2666  buildMesh();
2667 
2668  // Re-enable partitioning so the splitter can partition!
2669  if (_app.isSplitMesh())
2670  getMesh().skip_partitioning(false);
2671 
2672  if (getParam<bool>("build_all_side_lowerd_mesh"))
2673  buildLowerDMesh();
2674  }
2675 }
static const std::string & checkpointSuffix()
The file suffix for the checkpoint mesh.
Definition: MooseApp.C:2396
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:823
void buildLowerDMesh()
Build lower-d mesh for all sides.
Definition: MooseMesh.C:505
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:1179
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1765
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
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:2603
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:1167
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
Definition: MooseApp.h:498

◆ 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 3341 of file MooseMesh.C.

Referenced by BoundaryMarker::computeElementMarker().

3342 {
3343  bool found_elem = false;
3344  for (const auto & it : _bnd_elem_ids)
3345  {
3346  if (it.second.find(elem_id) != it.second.end())
3347  {
3348  found_elem = true;
3349  break;
3350  }
3351  }
3352  return found_elem;
3353 }
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:1501

◆ 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 3356 of file MooseMesh.C.

3357 {
3358  bool found_elem = false;
3359  auto it = _bnd_elem_ids.find(bnd_id);
3360  if (it != _bnd_elem_ids.end())
3361  if (it->second.find(elem_id) != it->second.end())
3362  found_elem = true;
3363  return found_elem;
3364 }
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:1501

◆ 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 1175 of file MooseMesh.C.

1177 {
1178  mooseAssert(_bnd_elem_range, "Boundary element range is not initialized");
1179 
1180  // Loop over all side elements of the mesh, select those on the boundary
1181  for (const auto & bnd_elem : *_bnd_elem_range)
1182  {
1183  const auto & [elem_ptr, elem_side, elem_bid] = *bnd_elem;
1184  if (elem_bid == bid)
1185  {
1186  // If an element is internal to the group of subdomain, check the neighbor
1187  if (blk_group.find(elem_ptr->subdomain_id()) != blk_group.end())
1188  {
1189  const auto * const neighbor = elem_ptr->neighbor_ptr(elem_side);
1190 
1191  // If we did not ghost the neighbor, we cannot decide
1192  if (neighbor == libMesh::remote_elem)
1193  mooseError("Insufficient level of geometrical ghosting to determine "
1194  "if a boundary is internal to the mesh");
1195  // If the neighbor does not exist, then we are on the edge of the mesh
1196  if (!neighbor)
1197  continue;
1198  // If the neighbor is also in the group of subdomain,
1199  // then the boundary cuts the subdomains
1200  if (blk_group.find(neighbor->subdomain_id()) != blk_group.end())
1201  return false;
1202  }
1203  }
1204  }
1205  return true;
1206 }
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:1458
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
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 3315 of file MooseMesh.C.

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

3316 {
3317  bool found_node = false;
3318  for (const auto & it : _bnd_node_ids)
3319  {
3320  if (it.second.find(node_id) != it.second.end())
3321  {
3322  found_node = true;
3323  break;
3324  }
3325  }
3326  return found_node;
3327 }
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:1493

◆ 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 3330 of file MooseMesh.C.

3331 {
3332  bool found_node = false;
3333  std::map<boundary_id_type, std::set<dof_id_type>>::const_iterator it = _bnd_node_ids.find(bnd_id);
3334  if (it != _bnd_node_ids.end())
3335  if (it->second.find(node_id) != it->second.end())
3336  found_node = true;
3337  return found_node;
3338 }
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:1493

◆ isCustomPartitionerRequested()

bool MooseMesh::isCustomPartitionerRequested ( ) const

Setter and getter for _custom_partitioner_requested.

Definition at line 3451 of file MooseMesh.C.

3452 {
3454 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:1398

◆ isDisplaced() [1/2]

void MooseMesh::isDisplaced ( bool  is_displaced)
inline

Set whether this mesh is displaced.

Definition at line 1186 of file MooseMesh.h.

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

◆ isDisplaced() [2/2]

bool MooseMesh::isDisplaced ( ) const
inline

whether this mesh is displaced

Definition at line 1191 of file MooseMesh.h.

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

◆ isDistributedMesh()

bool MooseMesh::isDistributedMesh ( ) const
inline

◆ isFiniteVolumeInfoDirty()

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

Definition at line 1282 of file MooseMesh.h.

Referenced by FEProblemBase::meshChangedHelper().

1282 { return _finite_volume_info_dirty; }
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1571

◆ 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 2132 of file MooseMesh.h.

Referenced by MooseVariableBase::MooseVariableBase().

2133 {
2134  return libmesh_map_find(_sub_to_data, subdomain_id).is_lower_d;
2135 }
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition: MooseMesh.h:1750

◆ isParallelTypeForced()

bool MooseMesh::isParallelTypeForced ( ) const
inline

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

Definition at line 989 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

989 { return _parallel_type_overridden; }
bool _parallel_type_overridden
Definition: MooseMesh.h:1387

◆ isParamSetByUser()

bool MooseBaseParameterInterface::isParamSetByUser ( const std::string &  nm) const
inlineinherited

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

Parameters
nmThe name of the parameter to test

Definition at line 118 of file MooseBaseParameterInterface.h.

Referenced by SetupDebugAction::act(), SetAdaptivityOptionsAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), PhysicsBase::checkSecondParamSetOnlyIfFirstOneTrue(), LibtorchNeuralNetControl::conditionalParameterError(), MooseBaseParameterInterface::getRenamedParam(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PiecewiseTabularBase::PiecewiseTabularBase(), prepare(), and SolutionUserObject::readXda().

118 { return _pars.isParamSetByUser(nm); }
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ isParamValid()

bool MooseBaseParameterInterface::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 112 of file MooseBaseParameterInterface.h.

Referenced by CopyNodalVarsAction::act(), SetupMeshAction::act(), ComposeTimeStepperAction::act(), SetupDebugAction::act(), CreateDisplacedProblemAction::act(), SetAdaptivityOptionsAction::act(), CommonOutputAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), DiffusionFV::addFVBCs(), DiffusionFV::addFVKernels(), DiffusionCG::addNonlinearVariables(), AdvectiveFluxAux::AdvectiveFluxAux(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), AddPeriodicBCAction::autoTranslationBoundaries(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromJSON(), GeneratedMesh::buildMesh(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), PhysicsBase::checkParamsBothSetOrNotSet(), PhysicsBase::checkVectorParamsSameLength(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CombinerGenerator::CombinerGenerator(), CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), ConstantReporter::declareConstantReporterValues(), DGKernelBase::DGKernelBase(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), Eigenvalue::Eigenvalue(), ElementExtremeFunctorValueTempl< is_ad >::ElementExtremeFunctorValueTempl(), ElementExtremeValue::ElementExtremeValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), PIDTransientControl::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FileOutput::FileOutput(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FunctionDT::FunctionDT(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FVInterfaceKernel::FVInterfaceKernel(), FVMassMatrix::FVMassMatrix(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), AddMetaDataGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), SideSetsBetweenSubdomainsGenerator::generate(), BlockDeletionGenerator::generate(), MeshExtruderGenerator::generate(), XYDelaunayGenerator::generate(), ParsedGenerateSideset::generate(), SubdomainBoundingBoxGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBaseParameterInterface::getRenamedParam(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), Terminator::handleMessage(), HFEMDirichletBC::HFEMDirichletBC(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), Eigenvalue::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppVariableValueSampleTransfer::initialSetup(), PiecewiseTabularBase::initialSetup(), SolutionScalarAux::initialSetup(), SolutionAux::initialSetup(), Console::initialSetup(), MooseParsedVectorFunction::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MassMatrix::MassMatrix(), MatCoupledForce::MatCoupledForce(), MatDiffusionBase< Real >::MatDiffusionBase(), MooseMesh(), MoosePreconditioner::MoosePreconditioner(), 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(), NodalExtremeValue::NodalExtremeValue(), EigenExecutionerBase::normalizeSolution(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedGenerateSideset::ParsedGenerateSideset(), PetscOutput::PetscOutput(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PicardSolve::PicardSolve(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularBase::PiecewiseTabularBase(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), prepare(), MultiApp::readCommandLineArguments(), SolutionUserObject::readExodusII(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), setCoordSystem(), FileOutput::setFileBase(), FileOutput::setFileBaseInternal(), Split::setup(), SetupMeshAction::setupMesh(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideExtremeValue::SideExtremeValue(), SolutionUserObject::SolutionUserObject(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

112 { return _pars.isParamValid(name); }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
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 1004 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

1004 { return _partitioner_overridden; }
bool _partitioner_overridden
Definition: MooseMesh.h:1394

◆ isRegularOrthogonal()

bool MooseMesh::isRegularOrthogonal ( )
inline

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

Definition at line 1034 of file MooseMesh.h.

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

◆ 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 794 of file MooseMesh.C.

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

◆ isSplit()

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

Definition at line 1305 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

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

◆ 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 1994 of file MooseMesh.C.

Referenced by minPeriodicVector().

1995 {
1996  mooseAssert(component < dimension(), "Requested dimension out of bounds");
1997 
1998  if (_periodic_dim.find(nonlinear_var_num) != _periodic_dim.end())
1999  return _periodic_dim.at(nonlinear_var_num)[component];
2000  else
2001  return false;
2002 }
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2678
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:1582

◆ lengthUnit()

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

Definition at line 4046 of file MooseMesh.C.

4047 {
4048  mooseAssert(_coord_transform, "This must be non-null");
4049  return _coord_transform->lengthUnit();
4050 }
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:1814

◆ localNodesBegin() [1/2]

MeshBase::node_iterator MooseMesh::localNodesBegin ( )

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

Definition at line 2777 of file MooseMesh.C.

Referenced by OversampleOutput::updateOversample().

2778 {
2779  return getMesh().local_nodes_begin();
2780 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ localNodesBegin() [2/2]

MeshBase::const_node_iterator MooseMesh::localNodesBegin ( ) const

Definition at line 2789 of file MooseMesh.C.

2790 {
2791  return getMesh().local_nodes_begin();
2792 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ localNodesEnd() [1/2]

MeshBase::node_iterator MooseMesh::localNodesEnd ( )

Definition at line 2783 of file MooseMesh.C.

Referenced by OversampleOutput::updateOversample().

2784 {
2785  return getMesh().local_nodes_end();
2786 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ localNodesEnd() [2/2]

MeshBase::const_node_iterator MooseMesh::localNodesEnd ( ) const

Definition at line 2795 of file MooseMesh.C.

2796 {
2797  return getMesh().local_nodes_end();
2798 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 2337 of file MooseMesh.C.

Referenced by buildPRefinementAndCoarseningMaps(), and findAdaptivityQpMaps().

2340 {
2341  unsigned int n_from = from.size();
2342  unsigned int n_to = to.size();
2343 
2344  qp_map.resize(n_from);
2345 
2346  for (unsigned int i = 0; i < n_from; ++i)
2347  {
2348  const Point & from_point = from[i];
2349 
2350  QpMap & current_map = qp_map[i];
2351 
2352  for (unsigned int j = 0; j < n_to; ++j)
2353  {
2354  const Point & to_point = to[j];
2355  Real distance = (from_point - to_point).norm();
2356 
2357  if (distance < current_map._distance)
2358  {
2359  current_map._distance = distance;
2360  current_map._from = i;
2361  current_map._to = j;
2362  }
2363  }
2364  }
2365 }
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 1277 of file MooseMesh.h.

1277 { _finite_volume_info_dirty = true; }
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1571

◆ 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 1097 of file MooseMesh.h.

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

◆ maxElemId()

dof_id_type MooseMesh::maxElemId ( ) const
virtual

Definition at line 2843 of file MooseMesh.C.

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

2844 {
2845  return getMesh().max_elem_id();
2846 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 2837 of file MooseMesh.C.

2838 {
2839  return getMesh().max_node_id();
2840 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 2927 of file MooseMesh.C.

Referenced by BoundaryRestrictable::isBoundarySubset().

2928 {
2929  return _mesh_boundary_ids;
2930 }
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:1480

◆ 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 684 of file MooseMesh.C.

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

685 {
686  TIME_SECTION("meshChanged", 3, "Updating Because Mesh Changed");
687 
688  update();
689 
690  // Delete all of the cached ranges
691  _active_local_elem_range.reset();
692  _active_node_range.reset();
694  _local_node_range.reset();
695  _bnd_node_range.reset();
696  _bnd_elem_range.reset();
697 
698  // Rebuild the ranges
704 
705  // Call the callback function onMeshChanged
706  onMeshChanged();
707 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1040
virtual void onMeshChanged()
Declares a callback function that is executed at the conclusion of meshChanged(). ...
Definition: MooseMesh.C:710
ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:1077
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:1454
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:1458
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:483
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:1456
NodeRange * getActiveNodeRange()
Definition: MooseMesh.C:1054
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:1451
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1105
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:1091
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:1453
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:1455

◆ 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 2939 of file MooseMesh.C.

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

2940 {
2941  return _mesh_nodeset_ids;
2942 }
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:1482

◆ 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 2933 of file MooseMesh.C.

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

2934 {
2935  return _mesh_sideset_ids;
2936 }
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:1481

◆ meshSubdomains()

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

◆ 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 1102 of file MooseMesh.h.

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

◆ 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 2030 of file MooseMesh.C.

2031 {
2032  return minPeriodicVector(nonlinear_var_num, p, q).norm();
2033 }
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:2005

◆ 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 2005 of file MooseMesh.C.

Referenced by minPeriodicDistance().

2006 {
2007  for (unsigned int i = 0; i < dimension(); ++i)
2008  {
2009  // check to see if we're closer in real or periodic space in x, y, and z
2010  if (isTranslatedPeriodic(nonlinear_var_num, i))
2011  {
2012  // Need to test order before differencing
2013  if (p(i) > q(i))
2014  {
2015  if (p(i) - q(i) > _half_range(i))
2016  p(i) -= _half_range(i) * 2;
2017  }
2018  else
2019  {
2020  if (q(i) - p(i) > _half_range(i))
2021  p(i) += _half_range(i) * 2;
2022  }
2023  }
2024  }
2025 
2026  return q - p;
2027 }
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:1587
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:1994
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2678

◆ mooseDeprecated()

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

Definition at line 78 of file MooseBaseErrorInterface.h.

Referenced by FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::advanceMultiApps(), MultiApp::appProblem(), Executioner::augmentedPicardConvergenceCheck(), buildSideList(), ChangeOverTimestepPostprocessor::ChangeOverTimestepPostprocessor(), FEProblemBase::computeResidual(), AddVariableAction::determineType(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), elem(), UserForcingFunction::f(), FaceFaceConstraint::FaceFaceConstraint(), FunctionDT::FunctionDT(), RandomICBase::generateRandom(), getBoundariesToElems(), Control::getExecuteOptions(), FEProblemBase::getNonlinearSystem(), FEProblemBase::getUserObjects(), FEProblemBase::hasPostprocessor(), MatDiffusionBase< Real >::MatDiffusionBase(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalScalarKernel::NodalScalarKernel(), node(), FixedPointSolve::numPicardIts(), RelationshipManager::operator>=(), PercentChangePostprocessor::PercentChangePostprocessor(), Executioner::picardSolve(), ReferenceResidualProblem::ReferenceResidualProblem(), setBoundaryToNormalMap(), Exodus::setOutputDimension(), and UserForcingFunction::UserForcingFunction().

79  {
80  moose::internal::mooseDeprecatedStream(_console, false, true, std::forward<Args>(args)...);
81  }
void mooseDeprecatedStream(S &oss, const bool expired, const bool print_title, Args &&... args)
Definition: MooseError.h:236
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ mooseError()

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

Emits an error prefixed with object name and type.

Definition at line 38 of file MooseBaseErrorInterface.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), MultiAppGeneralFieldTransfer::acceptPointInOriginMesh(), SetupMeshCompleteAction::act(), AddVectorPostprocessorAction::act(), AutoCheckpointAction::act(), InitProblemAction::act(), AddMeshGeneratorAction::act(), AddFVICAction::act(), CheckFVBCAction::act(), CheckIntegrityAction::act(), CreateExecutionerAction::act(), AddICAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupMeshAction::act(), SplitMeshAction::act(), AdaptivityAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), AddTimeStepperAction::act(), DeprecatedBlockAction::act(), CreateDisplacedProblemAction::act(), MaterialDerivativeTestAction::act(), SetAdaptivityOptionsAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), MaterialOutputAction::act(), FEProblemBase::adaptMesh(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), FEProblemBase::addConstraint(), DistributedRectilinearMeshGenerator::addElement(), FEProblemBase::addFunction(), SubProblem::addFunctor(), FEProblemBase::addFVInitialCondition(), ADDGKernel::ADDGKernel(), FEProblemBase::addInitialCondition(), FEProblem::addLineSearch(), FEProblemBase::addLineSearch(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addOutput(), SubProblem::addPiecewiseByBlockLambdaFunctor(), DiracKernelBase::addPoint(), DistributedRectilinearMeshGenerator::addPoint(), DiracKernelBase::addPointWithValidId(), FEProblemBase::addPostprocessor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), addQuadratureNode(), Action::addRelationshipManager(), FEProblemBase::addReporter(), AddVariableAction::addVariable(), FEProblemBase::addVectorPostprocessor(), SubProblem::addVectorTag(), ADInterfaceKernelTempl< T >::ADInterfaceKernelTempl(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), MooseVariableScalar::adUDot(), Output::advancedExecuteOn(), AdvectiveFluxAux::AdvectiveFluxAux(), MooseVariableBase::allDofIndices(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayConstantIC::ArrayConstantIC(), ArrayDGKernel::ArrayDGKernel(), ArrayDiffusion::ArrayDiffusion(), ArrayFunctionIC::ArrayFunctionIC(), ArrayParsedAux::ArrayParsedAux(), ArrayReaction::ArrayReaction(), ArrayTimeDerivative::ArrayTimeDerivative(), AddPeriodicBCAction::autoTranslationBoundaries(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), buildCoarseningMap(), MultiApp::buildComm(), DistributedRectilinearMeshGenerator::buildCube(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromJSON(), 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(), UserObjectInterface::castUserObject(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), SubProblem::checkBoundaryMatProps(), checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), FEProblemBase::checkDuplicatePostprocessorVariableNames(), checkDuplicateSubdomainNames(), FEProblemBase::checkExceptionAndStopSolve(), MaterialBase::checkExecutionStage(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), Eigenvalue::checkIntegrity(), ExplicitTimeIntegrator::checkLinearConvergence(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), PostprocessorInterface::checkParam(), FEProblemBase::checkProblemIntegrity(), Sampler::checkReinitStatus(), MultiAppPostprocessorToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppScalarToAuxScalarTransfer::checkSiblingsTransferSupported(), MultiAppPostprocessorTransfer::checkSiblingsTransferSupported(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), MultiAppCopyTransfer::checkSiblingsTransferSupported(), MultiAppTransfer::checkSiblingsTransferSupported(), MaterialBase::checkStatefulSanity(), FEProblemBase::checkUserObjects(), DomainUserObject::checkVariable(), MultiAppTransfer::checkVariable(), PhysicsBase::checkVectorParamsNoOverlap(), LibmeshPartitioner::clone(), clone(), CombinerGenerator::CombinerGenerator(), ComparisonPostprocessor::comparisonIsTrue(), ElementSubdomainModifier::complementMovingBoundaryID(), ElementSubdomainModifier::complementMovingBoundaryName(), 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(), ScalarKernel::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), NodalEqualValueConstraint::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), ScalarKernel::computeQpResidual(), NodalEqualValueConstraint::computeQpResidual(), KernelValue::computeQpResidual(), InterfaceQpValueUserObject::computeRealValue(), ArrayKernel::computeResidual(), ArrayIntegratedBC::computeResidual(), FVFluxBC::computeResidual(), FVFluxKernel::computeResidual(), NodalConstraint::computeResidual(), FVFluxKernel::computeResidualAndJacobian(), ResidualObject::computeResidualAndJacobian(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualL2Norm(), 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(), PenetrationAux::computeValue(), ConcentricCircleMesh::ConcentricCircleMesh(), ConditionalEnableControl::ConditionalEnableControl(), TimeStepper::constrainStep(), LibtorchNeuralNetControl::controlNeuralNet(), CoupledForceNodalKernel::CoupledForceNodalKernel(), MultiApp::createApp(), AddVariableAction::createInitialConditionAction(), Function::curl(), MooseVariableFV< Real >::curlPhi(), SidesetInfoVectorPostprocessor::dataHelper(), ReporterTransferInterface::declareClone(), MeshGenerator::declareMeshProperty(), ReporterTransferInterface::declareVectorClone(), FunctorRelationshipManager::delete_remote_elements(), deleteRemoteElements(), BicubicSplineFunction::derivative(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), detectPairedSidesets(), FEProblemBase::determineNonlinearSystem(), DGKernel::DGKernel(), MeshDiagnosticsGenerator::diagnosticsLog(), DistributedPositions::DistributedPositions(), Function::div(), FunctorBinnedValuesDivision::divisionIndex(), MooseVariableFV< Real >::divPhi(), FunctorRelationshipManager::dofmap_reinit(), EigenProblem::doFreeNonlinearPowerIterations(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementIntegerAux::ElementIntegerAux(), ElementQualityAux::ElementQualityAux(), ElementUOAux::ElementUOAux(), DistributedRectilinearMeshGenerator::elemId(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), errorIfDistributedMesh(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppGeneralFieldTransfer::examineReceivedValueConflicts(), RestartableDataReporter::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), NodalValueSampler::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), ElementQualityChecker::execute(), MultiAppPostprocessorTransfer::execute(), PositionsFunctorValueSampler::execute(), PointValue::execute(), MultiAppVariableValueSampleTransfer::execute(), GreaterThanLessThanPostprocessor::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), FindValueOnLine::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppCopyTransfer::execute(), MultiAppGeometricInterpolationTransfer::execute(), InterfaceQpUserObjectBase::execute(), MultiAppUserObjectTransfer::execute(), LeastSquaresFit::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFitHistory::execute(), TimeExtremeValue::execute(), Eigenvalue::execute(), DomainUserObject::execute(), FEProblemBase::execute(), FEProblemBase::executeControls(), MultiAppVectorPostprocessorTransfer::executeFromMultiapp(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), Exodus::Exodus(), ExplicitSSPRungeKutta::ExplicitSSPRungeKutta(), MultiAppGeneralFieldTransfer::extractOutgoingPoints(), FileOutput::FileOutput(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), ElementQualityChecker::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), NearestPointAverage::finalize(), NearestPointIntegralVariablePostprocessor::finalize(), Transfer::find_sys(), BreakMeshByBlockGeneratorBase::findFreeBoundaryId(), FunctionDT::FunctionDT(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), MaterialOutputAction::functorMaterialOutputHelper(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVMassMatrix::FVMassMatrix(), FVMatAdvection::FVMatAdvection(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), GapValueAux::GapValueAux(), WorkBalance::gather(), LowerDBlockFromSidesetGenerator::generate(), BlockToMeshConverterGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), MoveNodeGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), SideSetsFromNormalsGenerator::generate(), SmoothMeshGenerator::generate(), SubdomainPerElementGenerator::generate(), TiledMeshGenerator::generate(), CoarsenBlockGenerator::generate(), CutMeshByPlaneGenerator::generate(), BreakMeshByBlockGenerator::generate(), GeneratedMeshGenerator::generate(), MeshDiagnosticsGenerator::generate(), MeshRepairGenerator::generate(), FlipSidesetGenerator::generate(), SideSetsFromPointsGenerator::generate(), MeshExtruderGenerator::generate(), MeshCollectionGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), StackGenerator::generate(), StitchedMeshGenerator::generate(), CombinerGenerator::generate(), AllSideSetsByNormalsGenerator::generate(), SpiralAnnularMeshGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::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(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), DisplacedProblem::getActualFieldVariable(), FEProblemBase::getActualFieldVariable(), DisplacedProblem::getArrayVariable(), FEProblemBase::getArrayVariable(), getAxisymmetricRadialCoord(), getBlockConnectedBlocks(), VariableOldValueBounds::getBound(), getBoundaryID(), MultiApp::getBoundingBox(), getCoarseningMap(), MooseVariableBase::getContinuity(), Control::getControllableParameterByName(), getCoordSystem(), PhysicsBase::getCoupledPhysics(), PropertyReadFile::getData(), 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(), MultiAppTransfer::getFromMultiApp(), MultiAppTransfer::getFromMultiAppInfo(), FEProblemBase::getFunction(), SubProblem::getFunctor(), getGeneralAxisymmetricCoordAxis(), DistributedRectilinearMeshGenerator::getGhostNeighbors(), BatchMaterial< Tuple, Output, Input >::getIndex(), DistributedRectilinearMeshGenerator::getIndices(), SolutionUserObject::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(), DistributedRectilinearMeshGenerator::getNeighbors(), Times::getNextTime(), getNodeBlockIds(), PropertyReadFile::getNodeData(), getNodeList(), EigenProblem::getNonlinearEigenSystem(), FEProblemBase::getNonlinearSystem(), getPairedBoundaryMapping(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), PlaneIDMeshGenerator::getPlaneID(), Positions::getPosition(), Positions::getPositions(), FEProblemBase::getPositionsObject(), Positions::getPositionsVector2D(), Positions::getPositionsVector3D(), Positions::getPositionsVector4D(), PostprocessorInterface::getPostprocessorValueByNameInternal(), Times::getPreviousTime(), InterfaceQpUserObjectBase::getQpValue(), getRefinementMap(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), FEProblemBase::getSampler(), JSONFileReader::getScalar(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), InterfaceQpUserObjectBase::getSideAverageValue(), DisplacedProblem::getStandardVariable(), FEProblemBase::getStandardVariable(), getSubdomainBoundaryIds(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), Times::getTimeAtIndex(), FEProblemBase::getTimeFromStateArg(), Transient::getTimeIntegratorName(), Times::getTimes(), MultiAppTransfer::getToMultiApp(), MultiAppTransfer::getToMultiAppInfo(), getUniqueCoordSystem(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), UserObjectInterface::getUserObjectBaseByName(), UserObjectInterface::getUserObjectName(), NumRelationshipManagers::getValue(), VectorPostprocessorComponent::getValue(), Residual::getValue(), SideAverageValue::getValue(), LineValueSampler::getValue(), FindValueOnLine::getValueAtPoint(), SubProblem::getVariableHelper(), JSONFileReader::getVector(), VectorPostprocessorInterface::getVectorPostprocessorName(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), DisplacedProblem::getVectorVariable(), FEProblemBase::getVectorVariable(), GhostingAux::GhostingAux(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), Function::gradient(), FEProblemBase::handleException(), Terminator::handleMessage(), MooseVariableBase::hasDoFsOnNodes(), PostprocessorInterface::hasPostprocessor(), PostprocessorInterface::hasPostprocessorByName(), ReporterInterface::hasReporterValue(), ReporterInterface::hasReporterValueByName(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), CrankNicolson::init(), CSVTimeSequenceStepper::init(), ExplicitTimeIntegrator::init(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), Transient::init(), AddAuxVariableAction::init(), Eigenvalue::init(), AddVariableAction::init(), init(), Sampler::init(), FEProblemBase::init(), MultiApp::init(), FEProblemBase::initialAdaptMesh(), NestedDivision::initialize(), TransformedPositions::initialize(), DistributedPositions::initialize(), ReporterPositions::initialize(), FunctorPositions::initialize(), ReporterTimes::initialize(), ElementGroupCentroidPositions::initialize(), FunctorTimes::initialize(), MultiAppCloneReporterTransfer::initialSetup(), SolutionIC::initialSetup(), IntegralPreservingFunctionIC::initialSetup(), MultiAppConservativeTransfer::initialSetup(), PiecewiseLinearBase::initialSetup(), ReferenceResidualProblem::initialSetup(), FullSolveMultiApp::initialSetup(), PiecewiseLinear::initialSetup(), CoarsenedPiecewiseLinear::initialSetup(), SolutionScalarAux::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), SolutionAux::initialSetup(), NodalVariableValue::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), CSV::initialSetup(), MooseParsedFunction::initialSetup(), SolutionUserObject::initialSetup(), FEProblemBase::initialSetup(), SubProblem::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Function::integral(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), InterfaceTimeKernel::InterfaceTimeKernel(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), Sampler::isAdaptiveSamplingCompleted(), isBoundaryFullyExternalToSubdomains(), MooseVariableBase::isNodal(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), LineSearch::lineSearch(), LineValueSampler::LineValueSampler(), MultiAppGeneralFieldTransfer::locatePointReceivers(), LowerBoundNodalKernel::LowerBoundNodalKernel(), MooseVariableFV< Real >::lowerDError(), PNGOutput::makePNG(), ReporterPointMarker::markerSetup(), MassMatrix::MassMatrix(), Material::Material(), MaterialOutputAction::materialOutputHelper(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAuxTempl< is_ad >::MaterialRealVectorValueAuxTempl(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), FunctorRelationshipManager::mesh_reinit(), SubProblem::meshChanged(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshRepairGenerator::MeshRepairGenerator(), SetupMeshAction::modifyParamsForUseSplit(), MeshMetaDataInterface::mooseErrorInternal(), MooseMesh(), MooseVariableBase::MooseVariableBase(), MooseVariableConstMonomial::MooseVariableConstMonomial(), MoveNodeGenerator::MoveNodeGenerator(), ElementSubdomainModifier::movingBoundaryID(), ElementSubdomainModifier::movingBoundaryName(), MultiApp::MultiApp(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), FEProblemBase::needsPreviousNewtonIteration(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), MooseVariableFV< Real >::nodalDofIndex(), MooseVariableFV< Real >::nodalDofIndexNeighbor(), 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(), PhysicsBase::nonlinearVariableExists(), MooseVariableFV< Real >::numberOfDofsNeighbor(), NumDOFs::NumDOFs(), NumFailedTimeSteps::NumFailedTimeSteps(), DistributedRectilinearMeshGenerator::numNeighbors(), NumNonlinearIterations::NumNonlinearIterations(), NumVars::NumVars(), Output::onInterval(), FunctorRelationshipManager::operator()(), RelationshipManager::operator==(), XDA::output(), SolutionHistory::output(), Exodus::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), Exodus::outputSetup(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), DistributedRectilinearMeshGenerator::paritionSquarely(), PiecewiseBilinear::parse(), ParsedAux::ParsedAux(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), MultiAppConservativeTransfer::performAdjustment(), ExplicitTimeIntegrator::performExplicitSolve(), PetscExternalPartitioner::PetscExternalPartitioner(), MooseVariableFV< Real >::phiLowerSize(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Executioner::picardSolve(), PIDTransientControl::PIDTransientControl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMulticonstant::PiecewiseMulticonstant(), PiecewiseMultiInterpolation::PiecewiseMultiInterpolation(), PiecewiseTabularBase::PiecewiseTabularBase(), CutMeshByPlaneGenerator::pointPairPlaneInterception(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessorByName(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), ImplicitMidpoint::postResidual(), ExplicitTVDRK2::postResidual(), AStableDirk4::postResidual(), LStableDirk4::postResidual(), ExplicitRK2::postResidual(), EigenProblem::postScaleEigenVector(), VariableCondensationPreconditioner::preallocateCondensedJacobian(), ADKernelValueTempl< T >::precomputeQpJacobian(), Predictor::Predictor(), Transient::preExecute(), prepare(), prepared(), FixedPointSolve::printFixedPointConvergenceReason(), PseudoTimestep::PseudoTimestep(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObject::readExodusII(), SolutionUserObject::readXda(), CoarsenBlockGenerator::recursiveCoarsen(), FunctorRelationshipManager::redistribute(), ReferenceResidualProblem::ReferenceResidualProblem(), Sampler::reinit(), EqualValueEmbeddedConstraint::reinitConstraint(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), 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(), FVPointValueConstraint::setMyElem(), FEProblemBase::setNonlocalCouplingMatrix(), Sampler::setNumberOfCols(), Sampler::setNumberOfRandomSeeds(), Sampler::setNumberOfRows(), Exodus::setOutputDimensionInExodusWriter(), MultiAppGeneralFieldTransfer::setSolutionVectorValues(), Split::setup(), TransientMultiApp::setupApp(), SetupMeshAction::setupMesh(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), TimePeriodBase::setupTimes(), SideAdvectiveFluxIntegralTempl< is_ad >::SideAdvectiveFluxIntegralTempl(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::SideDiffusiveFluxIntegralTempl(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObject::SolutionUserObject(), FullSolveMultiApp::solveStep(), SpatialAverageBase::SpatialAverageBase(), UserObject::spatialPoints(), NearestPointAverage::spatialValue(), NearestPointIntegralVariablePostprocessor::spatialValue(), MeshDivisionFunctorReductionVectorPostprocessor::spatialValue(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), StitchedMesh::StitchedMesh(), MultiAppGeometricInterpolationTransfer::subdomainIDsNode(), Constraint::subdomainSetup(), GeneralUserObject::subdomainSetup(), NodalUserObject::subdomainSetup(), MaterialBase::subdomainSetup(), FEProblemBase::swapBackMaterialsNeighbor(), Console::systemInfoFlags(), Terminator::Terminator(), CutMeshByPlaneGenerator::tet4ElemCutter(), ThreadedGeneralUserObject::threadJoin(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriodBase::TimePeriodBase(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppDofCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), TransformedPositions::TransformedPositions(), FEProblemBase::trustUserCouplingMatrix(), MooseVariableScalar::uDot(), MooseVariableScalar::uDotDot(), MooseVariableScalar::uDotDotOld(), FEProblemBase::uDotDotOldRequested(), MooseVariableScalar::uDotOld(), FEProblemBase::uDotOldRequested(), Positions::unrollMultiDPositions(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), Checkpoint::updateCheckpointFiles(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), FEProblemBase::updateMaxQps(), UpperBoundNodalKernel::UpperBoundNodalKernel(), NearestPointAverage::userObjectValue(), NearestPointIntegralVariablePostprocessor::userObjectValue(), BoundingBoxIC::value(), PiecewiseConstantFromCSV::value(), IntegralPreservingFunctionIC::value(), Axisymmetric2D3DSolutionFunction::value(), Function::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), 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(), VTKOutput::VTKOutput(), DOFMapOutput::writeStreamToFile(), and Console::writeStreamToFile().

39  {
40  std::ostringstream oss;
41  moose::internal::mooseStreamAll(oss, errorPrefix("error"), std::forward<Args>(args)...);
42  std::string msg = oss.str();
43  callMooseErrorRaw(msg, &_app);
44  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:91
void callMooseErrorRaw(std::string &msg, MooseApp *app)
MooseApp & _app
The MOOSE application this is associated with.
std::string errorPrefix(const std::string &error_type) const
A descriptive prefix for errors for this object:

◆ mooseErrorNonPrefixed()

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

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

Definition at line 50 of file MooseBaseErrorInterface.h.

51  {
52  std::ostringstream oss;
53  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
54  std::string msg = oss.str();
55  callMooseErrorRaw(msg, &_app);
56  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:91
void callMooseErrorRaw(std::string &msg, MooseApp *app)
MooseApp & _app
The MOOSE application this is associated with.

◆ mooseInfo()

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

◆ mooseWarning()

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

Emits a warning prefixed with object name and type.

Definition at line 62 of file MooseBaseErrorInterface.h.

Referenced by AddKernelAction::act(), SetupMeshAction::act(), MeshOnlyAction::act(), AddFunctionAction::act(), CommonOutputAction::act(), MaterialOutputAction::act(), DiracKernelBase::addPoint(), BoundaryMarker::BoundaryMarker(), BoundsBase::BoundsBase(), DistributedRectilinearMeshGenerator::buildCube(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), CartesianMeshGenerator::CartesianMeshGenerator(), CheckOutputAction::checkConsoleOutput(), MultiAppTransfer::checkMultiAppExecuteOn(), PhysicsBase::checkRequiredTasks(), OversampleOutput::cloneMesh(), GapValueAux::computeValue(), MultiApp::createApp(), MeshDiagnosticsGenerator::diagnosticsLog(), CartesianGridDivision::divisionIndex(), CylindricalGridDivision::divisionIndex(), SphericalGridDivision::divisionIndex(), Postprocessor::evaluateDotWarning(), MeshDivisionFunctorReductionVectorPostprocessor::execute(), ElementQualityChecker::finalize(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), SubdomainPerElementGenerator::generate(), ParsedGenerateSideset::generate(), MultiAppTransfer::getAppInfo(), FunctorBinnedValuesDivision::getBinIndex(), PointSamplerBase::getLocalElemContainingPoint(), FEProblemBase::getMaterial(), Positions::getNearestPositionIndex(), LineValueSampler::getValue(), Terminator::handleMessage(), ElementGroupCentroidPositions::initialize(), CartesianGridDivision::initialize(), SphericalGridDivision::initialize(), CylindricalGridDivision::initialize(), ReferenceResidualProblem::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), LeastSquaresFit::LeastSquaresFit(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), FEProblemBase::mesh(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), NewmarkBeta::NewmarkBeta(), NodalPatchRecovery::NodalPatchRecovery(), NonlocalIntegratedBC::NonlocalIntegratedBC(), NonlocalKernel::NonlocalKernel(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PiecewiseConstantFromCSV::PiecewiseConstantFromCSV(), Executioner::problem(), PropertyReadFile::readData(), TestSourceStepper::rejectStep(), MaterialBase::resetQpProperties(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), setCoordSystem(), FEProblemBase::sizeZeroes(), TransientMultiApp::solveStep(), Tecplot::Tecplot(), TimeDerivativeAux::TimeDerivativeAux(), Checkpoint::updateCheckpointFiles(), PiecewiseConstantFromCSV::value(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

63  {
65  _console, errorPrefix("warning"), std::forward<Args>(args)...);
66  }
void mooseWarningStream(S &oss, Args &&... args)
Definition: MooseError.h:181
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string errorPrefix(const std::string &error_type) const
A descriptive prefix for errors for this object:

◆ mooseWarningNonPrefixed()

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

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

Definition at line 72 of file MooseBaseErrorInterface.h.

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

◆ name()

virtual const std::string& MooseBase::name ( ) const
inlinevirtualinherited

Get the name of the class.

Returns
The name of the class

Reimplemented in MooseVariableBase.

Definition at line 56 of file MooseBase.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), CopyNodalVarsAction::act(), AddElementalFieldAction::act(), AdaptivityAction::act(), AddTimeStepperAction::act(), DeprecatedBlockAction::act(), DisplayGhostingAction::act(), AddVariableAction::act(), AddPeriodicBCAction::act(), MaterialOutputAction::act(), FEProblemBase::addAnyRedistributers(), Executioner::addAttributeReporter(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), FEProblemBase::addFunction(), SubProblem::addFunctor(), FEProblemBase::addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), ADDGKernel::ADDGKernel(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), FEProblemBase::addKernel(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMeshDivision(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), SubProblem::addPiecewiseByBlockLambdaFunctor(), FEProblemBase::addPostprocessor(), InitialConditionBase::addPostprocessorDependencyHelper(), UserObject::addPostprocessorDependencyHelper(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), InitialConditionBase::addUserObjectDependencyHelper(), UserObject::addUserObjectDependencyHelper(), AuxKernelTempl< Real >::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), UserObject::addVectorPostprocessorDependencyHelper(), FVFluxKernel::adjustRMGhostLayers(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), ArrayParsedAux::ArrayParsedAux(), AStableDirk4::AStableDirk4(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), MultiApp::backup(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), PiecewiseTabularBase::buildFromFile(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkICRestartError(), Material::checkMaterialProperty(), Damper::checkMinDamping(), Coupleable::checkWritableVar(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), FEProblemBase::computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBaseParameterInterface::connectControllableParams(), BatchMaterial< Tuple, Output, Input >::construct(), MultiApp::createApp(), AddVariableAction::createInitialConditionAction(), MultiApp::createLocalApp(), MeshGeneratorSystem::createMeshGeneratorOrder(), MaterialBase::declareADProperty(), MeshGenerator::declareMeshesForSubByName(), MeshGenerator::declareNullMeshName(), MaterialBase::declareProperty(), DOFMapOutput::demangle(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DomainUserObject::DomainUserObject(), DumpObjectsProblem::dumpObjectHelper(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementValueSampler::ElementValueSampler(), errorIfDistributedMesh(), MooseBaseErrorInterface::errorPrefix(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), RestartableDataReporter::execute(), PointValue::execute(), MultiAppNearestNodeTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), MultiApp::fillPositions(), PointSamplerBase::finalize(), FunctionDT::FunctionDT(), FunctionIC::functionName(), FVFunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), MooseServer::gatherDocumentSymbols(), BoundaryDeletionGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), BreakMeshByBlockGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), GeneratedMeshGenerator::generate(), StitchedMeshGenerator::generate(), XYDelaunayGenerator::generate(), ParsedGenerateSideset::generate(), SideSetsAroundSubdomainGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), MeshGenerator::generateInternal(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MultiApp::getBoundingBox(), MooseApp::getCheckpointDirectories(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), UserObject::getDependObjects(), DistributionInterface::getDistribution(), FEProblemBase::getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), 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(), BatchMaterial< Tuple, Output, Input >::getIndex(), SolutionUserObject::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(), MeshGenerator::getMesh(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshesByName(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MultiAppTransfer::getMultiApp(), InterfaceMaterial::getNeighborADMaterialProperty(), InterfaceMaterial::getNeighborMaterialProperty(), InterfaceMaterial::getNeighborMaterialPropertyOld(), InterfaceMaterial::getNeighborMaterialPropertyOlder(), MooseServer::getObjectParameters(), Material::getOptionalADMaterialProperty(), Material::getOptionalMaterialProperty(), Material::getOptionalMaterialPropertyOld(), Material::getOptionalMaterialPropertyOlder(), FEProblemBase::getPositionsObject(), FEProblemBase::getPostprocessorValueByName(), ReporterData::getReporterInfo(), FEProblemBase::getSampler(), Transient::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), Terminator::handleMessage(), FEProblemBase::hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasPostprocessorValueByName(), FEProblemBase::hasUserObject(), IterationAdaptiveDT::init(), AdvancedOutput::init(), FEProblemBase::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), SolutionScalarAux::initialSetup(), MultiAppProjectionTransfer::initialSetup(), NodalVariableValue::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), Function::integral(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MeshGenerator::isChildMeshGenerator(), MeshGenerator::isNullMeshName(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), FEProblemBase::logAdd(), Marker::Marker(), MatDiffusionBase< Real >::MatDiffusionBase(), Material::Material(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshGenerator::meshPropertyPrefix(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalValueSampler::NodalValueSampler(), PhysicsBase::nonlinearVariableExists(), Registry::objData(), MooseBaseParameterInterface::objectErrorPrefix(), MeshGenerator::Comparator::operator()(), ProgressOutput::output(), DOFMapOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), ConsoleUtils::outputExecutionInformation(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), TableOutput::outputReporter(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), ParsedAux::ParsedAux(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PointVariableSamplerBase::PointVariableSamplerBase(), PhysicsBase::prefix(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), Registry::registerObjectsTo(), FEProblemBase::registerRandomInterface(), GlobalParamsAction::remove(), MaterialBase::resetQpProperties(), MultiApp::restore(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), GlobalParamsAction::setDoubleIndexParam(), OutputWarehouse::setFileNumbers(), GlobalParamsAction::setParam(), FEProblemBase::setPostprocessorValueByName(), GlobalParamsAction::setScalarParam(), setSubdomainName(), GlobalParamsAction::setTripleIndexParam(), Split::setup(), TransientMultiApp::setupApp(), GlobalParamsAction::setVectorParam(), FullSolveMultiApp::showStatusMessage(), SideSetExtruderGenerator::SideSetExtruderGenerator(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), SubProblem::storeSubdomainZeroMatProp(), MaterialBase::subdomainSetup(), TaggingInterface::TaggingInterface(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppDofCopyTransfer::transfer(), TransientMultiApp::TransientMultiApp(), MooseServer::traverseParseTreeAndFillSymbols(), MooseBase::typeAndName(), MooseBaseParameterInterface::uniqueParameterName(), FVFluxBC::uOnGhost(), FVFluxBC::uOnUSub(), UserObject::UserObject(), UserObjectInterface::userObjectName(), MultiAppTransfer::variableIntegrityCheck(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), AdvancedOutput::wantOutput(), Coupleable::writableCoupledValue(), and Coupleable::writableVariable().

56 { return _name; }
const std::string & _name
The name of this class, reference to value stored in InputParameters.
Definition: MooseBase.h:75

◆ needGhostGhostedBoundaries()

void MooseMesh::needGhostGhostedBoundaries ( bool  needghost)
inline

Whether or not we want to ghost ghosted boundaries.

Definition at line 601 of file MooseMesh.h.

Referenced by DistributedRectilinearMeshGenerator::generate().

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

◆ 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 2915 of file MooseMesh.C.

2916 {
2917  prepared(false);
2918 }
bool prepared() const
Setter/getter for whether the mesh is prepared.
Definition: MooseMesh.C:2887

◆ needsRemoteElemDeletion() [1/2]

void MooseMesh::needsRemoteElemDeletion ( bool  need_delete)
inline

Set whether we need to delete remote elements.

Definition at line 1057 of file MooseMesh.h.

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

◆ needsRemoteElemDeletion() [2/2]

bool MooseMesh::needsRemoteElemDeletion ( ) const
inline

Whether we need to delete remote elements.

Definition at line 1062 of file MooseMesh.h.

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

◆ nElem()

dof_id_type MooseMesh::nElem ( ) const
virtual

Definition at line 2831 of file MooseMesh.C.

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

2832 {
2833  return getMesh().n_elem();
2834 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ nFace()

unsigned int MooseMesh::nFace ( ) const
inline

accessors for the FaceInfo objects

Definition at line 1125 of file MooseMesh.h.

1125 { 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:1564

◆ nNodes()

dof_id_type MooseMesh::nNodes ( ) const
virtual

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

Definition at line 2825 of file MooseMesh.C.

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

2826 {
2827  return getMesh().n_nodes();
2828 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 622 of file MooseMesh.C.

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

623 {
624  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
625  return nodeRef(i);
626 }
void mooseDeprecated(Args &&... args) const
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:636

◆ node() [2/2]

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

Definition at line 629 of file MooseMesh.C.

630 {
631  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
632  return nodeRef(i);
633 }
void mooseDeprecated(Args &&... args) const
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:636

◆ nodePtr() [1/2]

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

Definition at line 650 of file MooseMesh.C.

651 {
652  return &nodeRef(i);
653 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:636

◆ nodePtr() [2/2]

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

Definition at line 656 of file MooseMesh.C.

657 {
658  return &nodeRef(i);
659 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:636

◆ 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 644 of file MooseMesh.C.

645 {
646  return const_cast<Node &>(const_cast<const MooseMesh *>(this)->nodeRef(i));
647 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:636
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 2120 of file MooseMesh.h.

2121 {
2122  return _node_set_nodes;
2123 }
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:1512

◆ 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 1008 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup().

1009 {
1010  if (!_node_to_active_semilocal_elem_map_built) // Guard the creation with a double checked lock
1011  {
1012  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1013 
1014  // This is allowing the timing to be run even with threads
1015  // This is safe because all threads will be waiting on this section when it runs
1016  // NOTE: Do not copy this construction to other places without thinking REALLY hard about it
1017  // The PerfGraph is NOT threadsafe and will cause all kinds of havok if care isn't taken
1018  auto in_threads = Threads::in_threads;
1019  Threads::in_threads = false;
1020  TIME_SECTION("nodeToActiveSemilocalElemMap", 5, "Building SemiLocalElemMap");
1021  Threads::in_threads = in_threads;
1022 
1024  {
1025  for (const auto & elem :
1026  as_range(getMesh().semilocal_elements_begin(), getMesh().semilocal_elements_end()))
1027  if (elem->active())
1028  for (unsigned int n = 0; n < elem->n_nodes(); n++)
1029  _node_to_active_semilocal_elem_map[elem->node_id(n)].push_back(elem->id());
1030 
1032  true; // MUST be set at the end for double-checked locking to work!
1033  }
1034  }
1035 
1037 }
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:1466
bool in_threads
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
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:2849
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:1465

◆ 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 980 of file MooseMesh.C.

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

981 {
982  if (!_node_to_elem_map_built) // Guard the creation with a double checked lock
983  {
984  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
985 
987  {
988  // This is allowing the timing to be run even with threads
989  // This is safe because all threads will be waiting on this section when it runs
990  // NOTE: Do not copy this construction to other places without thinking REALLY hard about it
991  // The PerfGraph is NOT threadsafe and will cause all kinds of havok if care isn't taken
992  auto in_threads = Threads::in_threads;
993  Threads::in_threads = false;
994  TIME_SECTION("nodeToElemMap", 5, "Building Node To Elem Map");
995  Threads::in_threads = in_threads;
996 
997  for (const auto & elem : getMesh().active_element_ptr_range())
998  for (unsigned int n = 0; n < elem->n_nodes(); n++)
999  _node_to_elem_map[elem->node_id(n)].push_back(elem->id());
1000 
1001  _node_to_elem_map_built = true; // MUST be set at the end for double-checked locking to work!
1002  }
1003  }
1004  return _node_to_elem_map;
1005 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:1462
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:1461
bool in_threads
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ objectErrorPrefix()

std::string MooseBaseParameterInterface::objectErrorPrefix ( const std::string &  error_type) const
inherited

A descriptive prefix for errors for an object.

Definition at line 58 of file MooseBaseParameterInterface.C.

Referenced by MooseBaseParameterInterface::paramErrorMsg().

59 {
60  std::stringstream oss;
61  oss << "The following " << error_type << " occurred in the class \"" << _moose_base->name()
62  << "\", of type \"" << _moose_base->type() << "\".\n\n";
63  return oss.str();
64 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const MooseBase *const _moose_base
The MooseBase object that inherits this class.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50

◆ 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 710 of file MooseMesh.C.

Referenced by meshChanged().

711 {
712 }

◆ operator const libMesh::MeshBase &()

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

Definition at line 3189 of file MooseMesh.C.

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

◆ operator libMesh::MeshBase &()

MooseMesh::operator libMesh::MeshBase & ( )

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

Definition at line 3187 of file MooseMesh.C.

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

◆ 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 1310 of file MooseMesh.C.

Referenced by FEProblemBase::projectSolution().

1311 {
1312  return elem_info_iterator(_elem_info.begin(),
1313  _elem_info.end(),
1314  Predicates::NotNull<std::vector<const ElemInfo *>::iterator>());
1315 }
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:1556

◆ ownedElemInfoEnd()

MooseMesh::elem_info_iterator MooseMesh::ownedElemInfoEnd ( )

Definition at line 1318 of file MooseMesh.C.

Referenced by FEProblemBase::projectSolution().

1319 {
1320  return elem_info_iterator(_elem_info.end(),
1321  _elem_info.end(),
1322  Predicates::NotNull<std::vector<const ElemInfo *>::iterator>());
1323 }
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:1556

◆ 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 1292 of file MooseMesh.C.

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

1293 {
1294  return face_info_iterator(
1295  _face_info.begin(),
1296  _face_info.end(),
1298 }
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:1564
processor_id_type processor_id() const

◆ ownedFaceInfoEnd()

MooseMesh::face_info_iterator MooseMesh::ownedFaceInfoEnd ( )

Definition at line 1301 of file MooseMesh.C.

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

1302 {
1303  return face_info_iterator(
1304  _face_info.end(),
1305  _face_info.end(),
1307 }
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:1564
processor_id_type processor_id() const

◆ paramError()

template<typename... Args>
void MooseBaseParameterInterface::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 243 of file MooseBaseParameterInterface.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), SetupDebugAction::act(), ADConservativeAdvectionBC::ADConservativeAdvectionBC(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), ADDGKernel::ADDGKernel(), DiffusionCG::addNonlinearVariables(), 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(), AuxKernelTempl< Real >::AuxKernelTempl(), BlockDeletionGenerator::BlockDeletionGenerator(), BlockWeightedPartitioner::BlockWeightedPartitioner(), BoundsBase::BoundsBase(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BuildArrayVariableAux::BuildArrayVariableAux(), PiecewiseTabularBase::buildFromFile(), CartesianGridDivision::CartesianGridDivision(), UserObjectInterface::castUserObject(), checkComponent(), MeshGenerator::checkGetMesh(), PostprocessorInterface::checkParam(), PhysicsBase::checkParamsBothSetOrNotSet(), Checkpoint::Checkpoint(), PhysicsBase::checkSecondParamSetOnlyIfFirstOneTrue(), Coupleable::checkVar(), MultiAppTransfer::checkVariable(), PhysicsBase::checkVectorParamsSameLength(), CircularBoundaryCorrectionGenerator::CircularBoundaryCorrectionGenerator(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), MultiAppGeneralFieldTransfer::closestToPosition(), CoarsenBlockGenerator::CoarsenBlockGenerator(), CombinerGenerator::CombinerGenerator(), CompositionDT::CompositionDT(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), LibtorchNeuralNetControl::conditionalParameterError(), ConstantVectorPostprocessor::ConstantVectorPostprocessor(), ContainsPointAux::ContainsPointAux(), CopyValueAux::CopyValueAux(), Coupleable::Coupleable(), CoupledForceTempl< is_ad >::CoupledForceTempl(), CoupledValueFunctionMaterialTempl< is_ad >::CoupledValueFunctionMaterialTempl(), MultiApp::createApp(), MeshGeneratorSystem::createMeshGenerator(), CylindricalGridDivision::CylindricalGridDivision(), ConstantReporter::declareConstantReporterValues(), AccumulateReporter::declareLateValues(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DGLowerDKernel::DGLowerDKernel(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), ElementExtremeFunctorValueTempl< is_ad >::ElementExtremeFunctorValueTempl(), ElementExtremeValue::ElementExtremeValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementLengthAux::ElementLengthAux(), ElementLpNormAux::ElementLpNormAux(), ElementValueSampler::ElementValueSampler(), ElementVectorL2Error::ElementVectorL2Error(), ReporterPointSource::errorCheck(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), ExtraElementIDAux::ExtraElementIDAux(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), FEProblemSolve::FEProblemSolve(), FillBetweenCurvesGenerator::FillBetweenCurvesGenerator(), FillBetweenSidesetsGenerator::FillBetweenSidesetsGenerator(), ReporterPointSource::fillPoint(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), InternalSideIndicator::finalize(), FixedPointSolve::FixedPointSolve(), ForcingFunctionAux::ForcingFunctionAux(), FunctionArrayAux::FunctionArrayAux(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FunctorADConverterTempl< T >::FunctorADConverterTempl(), FunctorAux::FunctorAux(), FunctorBinnedValuesDivision::FunctorBinnedValuesDivision(), FunctorElementalGradientAuxTempl< is_ad >::FunctorElementalGradientAuxTempl(), FunctorPositions::FunctorPositions(), FunctorVectorElementalAuxTempl< is_ad >::FunctorVectorElementalAuxTempl(), FVFluxBC::FVFluxBC(), FVInterfaceKernel::FVInterfaceKernel(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), FVTwoVarContinuityConstraint::FVTwoVarContinuityConstraint(), BoundaryDeletionGenerator::generate(), ElementsToTetrahedronsConverter::generate(), ExtraNodesetGenerator::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), PlaneIDMeshGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), AddMetaDataGenerator::generate(), BlockToMeshConverterGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), RefineSidesetGenerator::generate(), SideSetsBetweenSubdomainsGenerator::generate(), FlipSidesetGenerator::generate(), BlockDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), CutMeshByPlaneGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), RefineBlockGenerator::generate(), CombinerGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedCurveGenerator::generate(), BreakMeshByElementGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), StackGenerator::generate(), StitchedMeshGenerator::generate(), AdvancedExtruderGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), ParsedGenerateSideset::generate(), SideSetsAroundSubdomainGenerator::generate(), PatternedMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), PropertyReadFile::getBlockData(), PropertyReadFile::getData(), Sampler::getGlobalSamples(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), Sampler::getLocalSamples(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), Sampler::getNextLocalRow(), PostprocessorInterface::getPostprocessorNameInternal(), PostprocessorInterface::getPostprocessorValueInternal(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), UserObjectInterface::getUserObjectBase(), UserObjectInterface::getUserObjectName(), HFEMDirichletBC::HFEMDirichletBC(), MultiApp::init(), DistributedPositions::initialize(), BlockWeightedPartitioner::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), PhysicsBase::initializePhysics(), MultiAppCloneReporterTransfer::initialSetup(), ReferenceResidualProblem::initialSetup(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), HistogramVectorPostprocessor::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), AddMetaDataGenerator::inputChecker(), IntegratedBC::IntegratedBC(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceValueUserObjectAux::InterfaceValueUserObjectAux(), InterpolatedStatefulMaterialTempl< T >::InterpolatedStatefulMaterialTempl(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), MultiApp::keepSolutionDuringRestore(), Kernel::Kernel(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationFunction::LinearCombinationFunction(), LowerDIntegratedBC::LowerDIntegratedBC(), PNGOutput::makeMeshFunc(), MatCoupledForce::MatCoupledForce(), MaterialADConverterTempl< T >::MaterialADConverterTempl(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), PatternedMeshGenerator::mergeSubdomainNameMaps(), MeshCollectionGenerator::MeshCollectionGenerator(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshDivisionAux::MeshDivisionAux(), MeshGenerator::MeshGenerator(), MoosePreconditioner::MoosePreconditioner(), 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(), NestedDivision::NestedDivision(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), NodalValueSampler::NodalValueSampler(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), PatchMeshGenerator::PatchMeshGenerator(), PatternedMeshGenerator::PatternedMeshGenerator(), PenaltyPeriodicSegmentalConstraint::PenaltyPeriodicSegmentalConstraint(), PeriodicSegmentalConstraint::PeriodicSegmentalConstraint(), PIDTransientControl::PIDTransientControl(), PlaneDeletionGenerator::PlaneDeletionGenerator(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), PolyLineMeshGenerator::PolyLineMeshGenerator(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessor(), LibmeshPartitioner::prepareBlocksForSubdomainPartitioner(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), PropertyReadFile::PropertyReadFile(), RandomIC::RandomIC(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObject::readXda(), ReferenceResidualProblem::ReferenceResidualProblem(), RefineBlockGenerator::RefineBlockGenerator(), RefineSidesetGenerator::RefineSidesetGenerator(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), setPartitioner(), TimeSequenceStepperBase::setupSequence(), SingleRankPartitioner::SingleRankPartitioner(), SphericalGridDivision::SphericalGridDivision(), SymmetryTransformGenerator::SymmetryTransformGenerator(), Terminator::Terminator(), TimeDerivativeAux::TimeDerivativeAux(), Transfer::Transfer(), TransformGenerator::TransformGenerator(), TransientMultiApp::TransientMultiApp(), ParsedCurveGenerator::tSectionSpaceDefiner(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), UserObject::UserObject(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VolumeAux::VolumeAux(), XYDelaunayGenerator::XYDelaunayGenerator(), and XYMeshLineCutter::XYMeshLineCutter().

244 {
245  Moose::show_trace = false;
246  std::string msg = paramErrorMsg(param, std::forward<Args>(args)...);
248  Moose::show_trace = true;
249 }
bool show_trace
Set to true (the default) to print the stack trace with error and warning messages - false to omit it...
Definition: Moose.C:642
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:44
void callMooseErrorRaw(std::string &msg, MooseApp *app)
const MooseBase *const _moose_base
The MooseBase object that inherits this class.
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ parameters()

const InputParameters& MooseBaseParameterInterface::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 63 of file MooseBaseParameterInterface.h.

Referenced by SetupDebugAction::act(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addFunctorMaterial(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), FEProblemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMeshDivision(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), assemble_l2(), Moose::assemble_matrix(), PhysicsBase::assertParamDefined(), AuxKernelTempl< Real >::AuxKernelTempl(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), buildTypedMesh(), UserObjectInterface::castUserObject(), PostprocessorInterface::checkParam(), PhysicsBase::checkSecondParamSetOnlyIfFirstOneTrue(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), Moose::compute_bounds(), Moose::compute_jacobian(), Moose::compute_nearnullspace(), Moose::compute_nullspace(), Moose::compute_postcheck(), Moose::compute_transpose_nullspace(), LibtorchNeuralNetControl::conditionalParameterError(), Console::Console(), MultiApp::createApp(), Postprocessor::declareValue(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Executor::Executor(), Exodus::Exodus(), FEProblem::FEProblem(), FEProblemBase::FEProblemBase(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainMeshGenerator::generate(), ParsedGenerateSideset::generate(), MooseBaseParameterInterface::getCheckedPointerParam(), ExecutorInterface::getExecutor(), Material::getMaterial(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), FEProblemBase::initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiApp::MultiApp(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NodeFaceConstraint::NodeFaceConstraint(), OverlayMeshGenerator::OverlayMeshGenerator(), PatchMeshGenerator::PatchMeshGenerator(), PenetrationAux::PenetrationAux(), PicardSolve::PicardSolve(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), ProjectedStatefulMaterialStorageAction::processProperty(), PropertyReadFile::PropertyReadFile(), PseudoTimestep::PseudoTimestep(), RandomIC::RandomIC(), InputParameterWarehouse::removeInputParameters(), OutputWarehouse::resetFileBase(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SteffensenSolve::SteffensenSolve(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), Transient::Transient(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

63 { return _pars; }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ paramInfo()

template<typename... Args>
void MooseBaseParameterInterface::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 260 of file MooseBaseParameterInterface.h.

Referenced by TransientMultiApp::TransientMultiApp().

261 {
262  mooseInfo(paramErrorMsg(param, std::forward<Args>(args)...));
263 }
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:329
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ paramWarning()

template<typename... Args>
void MooseBaseParameterInterface::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 253 of file MooseBaseParameterInterface.h.

Referenced by MultiAppNearestNodeTransfer::execute(), FEProblemSolve::FEProblemSolve(), UniqueExtraIDMeshGenerator::generate(), PlaneIDMeshGenerator::generate(), Terminator::initialSetup(), and MooseMesh().

254 {
255  mooseWarning(paramErrorMsg(param, std::forward<Args>(args)...));
256 }
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:296
std::string paramErrorMsg(const std::string &param, Args... args) const

◆ partitionerName()

const MooseEnum& MooseMesh::partitionerName ( ) const
inline

Definition at line 999 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

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

◆ partitioning()

MooseEnum MooseMesh::partitioning ( )
static

returns MooseMesh partitioning options so other classes can use it

Definition at line 3646 of file MooseMesh.C.

Referenced by validParams().

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

◆ 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:144

◆ 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 364 of file MooseMesh.C.

365 {
366  TIME_SECTION("prepare", 2, "Preparing Mesh", true);
367 
368  bool called_prepare_for_use = false;
369 
370  mooseAssert(_mesh, "The MeshBase has not been constructed");
371 
372  if (!dynamic_cast<DistributedMesh *>(&getMesh()) || _is_nemesis)
373  // For whatever reason we do not want to allow renumbering here nor ever in the future?
374  getMesh().allow_renumbering(false);
375 
376  if (mesh_to_clone)
377  {
378  mooseAssert(mesh_to_clone->is_prepared(),
379  "The mesh we wish to clone from must already be prepared");
380  _mesh = mesh_to_clone->clone();
381  _moose_mesh_prepared = false;
382  }
383  else if (!_mesh->is_prepared())
384  {
385  _mesh->prepare_for_use();
386  _moose_mesh_prepared = false;
387  called_prepare_for_use = true;
388  }
389 
391  return called_prepare_for_use;
392 
393  // Collect (local) subdomain IDs
394  _mesh_subdomains.clear();
395  for (const auto & elem : getMesh().element_ptr_range())
396  _mesh_subdomains.insert(elem->subdomain_id());
397 
398  // add explicitly requested subdomains
399  if (isParamValid("add_subdomain_ids"))
400  {
401  const auto add_subdomain_id = getParam<std::vector<SubdomainID>>("add_subdomain_ids");
402  _mesh_subdomains.insert(add_subdomain_id.begin(), add_subdomain_id.end());
403  }
404 
405  // Make sure nodesets have been generated
407 
408  // Collect (local) boundary IDs
409  const std::set<BoundaryID> & local_bids = getMesh().get_boundary_info().get_boundary_ids();
410  _mesh_boundary_ids.insert(local_bids.begin(), local_bids.end());
411 
412  const std::set<BoundaryID> & local_node_bids =
413  getMesh().get_boundary_info().get_node_boundary_ids();
414  _mesh_nodeset_ids.insert(local_node_bids.begin(), local_node_bids.end());
415 
416  const std::set<BoundaryID> & local_side_bids =
417  getMesh().get_boundary_info().get_side_boundary_ids();
418  _mesh_sideset_ids.insert(local_side_bids.begin(), local_side_bids.end());
419 
420  // Communicate subdomain and boundary IDs if this is a parallel mesh
421  if (!getMesh().is_serial())
422  {
427  }
428 
430  {
431  if (!_coord_system_set)
432  setCoordSystem(_provided_coord_blocks, getParam<MultiMooseEnum>("coord_type"));
433  else if (_pars.isParamSetByUser("coord_type"))
434  mooseError(
435  "Trying to set coordinate system type information based on the user input file, but "
436  "the coordinate system type information has already been set programmatically! "
437  "Either remove your coordinate system type information from the input file, or contact "
438  "your application developer");
439  }
440 
441  // Set general axisymmetric axes if provided
442  if (isParamValid("rz_coord_blocks") && isParamValid("rz_coord_origins") &&
443  isParamValid("rz_coord_directions"))
444  {
445  const auto rz_coord_blocks = getParam<std::vector<SubdomainName>>("rz_coord_blocks");
446  const auto rz_coord_origins = getParam<std::vector<Point>>("rz_coord_origins");
447  const auto rz_coord_directions = getParam<std::vector<RealVectorValue>>("rz_coord_directions");
448  if (rz_coord_origins.size() == rz_coord_blocks.size() &&
449  rz_coord_directions.size() == rz_coord_blocks.size())
450  {
451  std::vector<std::pair<Point, RealVectorValue>> rz_coord_axes;
452  for (unsigned int i = 0; i < rz_coord_origins.size(); ++i)
453  rz_coord_axes.push_back(std::make_pair(rz_coord_origins[i], rz_coord_directions[i]));
454 
455  setGeneralAxisymmetricCoordAxes(rz_coord_blocks, rz_coord_axes);
456 
457  if (isParamSetByUser("rz_coord_axis"))
458  mooseError("The parameter 'rz_coord_axis' may not be provided if 'rz_coord_blocks', "
459  "'rz_coord_origins', and 'rz_coord_directions' are provided.");
460  }
461  else
462  mooseError("The parameters 'rz_coord_blocks', 'rz_coord_origins', and "
463  "'rz_coord_directions' must all have the same size.");
464  }
465  else if (isParamValid("rz_coord_blocks") || isParamValid("rz_coord_origins") ||
466  isParamValid("rz_coord_directions"))
467  mooseError("If any of the parameters 'rz_coord_blocks', 'rz_coord_origins', and "
468  "'rz_coord_directions' are provided, then all must be provided.");
469 
471 
472  update();
473 
474  // Check if there is subdomain name duplication for the same subdomain ID
476 
477  _moose_mesh_prepared = true;
478 
479  return called_prepare_for_use;
480 }
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:1426
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:1820
void checkDuplicateSubdomainNames()
Loop through all subdomain IDs and check if there is name duplication used for the subdomains with sa...
Definition: MooseMesh.C:4053
const Parallel::Communicator & _communicator
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:2733
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
bool _built_from_other_mesh
Whether or not this mesh was built from another mesh.
Definition: MooseMesh.h:1376
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:483
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:1482
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:3823
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:1480
bool _moose_mesh_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:1429
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:1817
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
bool isParamSetByUser(const std::string &nm) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:1481
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:3937
bool detectOrthogonalDimRanges(Real tol=1e-6)
This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
Definition: MooseMesh.C:1699
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:1472
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 2887 of file MooseMesh.C.

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

2888 {
2889  return _mesh->is_prepared() && _moose_mesh_prepared;
2890 }
bool _moose_mesh_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:1429
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390

◆ 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 2893 of file MooseMesh.C.

2894 {
2895  if (state)
2896  mooseError("We don't have any right to tell the libmesh mesh that it *is* prepared. Only a "
2897  "call to prepare_for_use should tell us that");
2898 
2899  // Some people may call this even before we have a MeshBase object. This isn't dangerous really
2900  // because when the MeshBase object is born, it knows it's in an unprepared state
2901  if (_mesh)
2902  _mesh->set_isnt_prepared();
2903 
2904  // If the libMesh mesh isn't preparead, then our MooseMesh wrapper is also no longer prepared
2905  _moose_mesh_prepared = false;
2906 
2911  _regular_orthogonal_mesh = false;
2912 }
bool _moose_mesh_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:1429
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:1533

◆ 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 3212 of file MooseMesh.C.

Referenced by Adaptivity::adaptMesh().

3213 {
3214  os << '\n';
3215  getMesh().print_info(os, verbosity);
3216  os << std::flush;
3217 }
std::basic_ostream< charT, traits > * os
Definition: InfixIterator.h:33
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ queryElemPtr() [1/2]

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

◆ queryElemPtr() [2/2]

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

Definition at line 2881 of file MooseMesh.C.

2882 {
2883  return getMesh().query_elem_ptr(i);
2884 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ queryNodePtr() [1/2]

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

Definition at line 662 of file MooseMesh.C.

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

663 {
664  if (i > getMesh().max_node_id())
665  {
666  auto it = _quadrature_nodes.find(i);
667  if (it == _quadrature_nodes.end())
668  return nullptr;
669  auto & node_ptr = it->second;
670  mooseAssert(node_ptr, "Uninitialized quadrature node");
671  return node_ptr;
672  }
673 
674  return getMesh().query_node_ptr(i);
675 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:1503
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ queryNodePtr() [2/2]

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

Definition at line 678 of file MooseMesh.C.

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

◆ 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 733 of file MooseMesh.C.

Referenced by FEProblemBase::meshChangedHelper().

734 {
735  return _refined_elements.get();
736 }
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:1432

◆ 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 PatternedMesh, StitchedMesh, MeshGeneratorMesh, AnnularMesh, ConcentricCircleMesh, GeneratedMesh, RinglebMesh, SpiralAnnularMesh, ImageMesh, FileMesh, and TiledMesh.

Referenced by SetupMeshAction::act(), and OversampleOutput::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 3929 of file MooseMesh.C.

Referenced by FEProblemBase::setAxisymmetricCoordAxis().

3930 {
3931  _rz_coord_axis = rz_coord_axis;
3932 
3934 }
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition: MooseMesh.C:4001
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1807

◆ 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 1554 of file MooseMesh.C.

Referenced by ActivateElementsUserObjectBase::setNewBoundayName().

1555 {
1556  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1557 
1558  // We need to figure out if this boundary is a sideset or nodeset
1559  if (boundary_info.get_side_boundary_ids().count(boundary_id))
1560  boundary_info.sideset_name(boundary_id) = name;
1561  else
1562  boundary_info.nodeset_name(boundary_id) = name;
1563 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ 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 2951 of file MooseMesh.C.

2953 {
2954  _boundary_to_normal_map = std::move(boundary_map);
2955 }
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:1486

◆ setBoundaryToNormalMap() [2/2]

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

Definition at line 2958 of file MooseMesh.C.

2959 {
2960  mooseDeprecated("setBoundaryToNormalMap(std::map<BoundaryID, RealVectorValue> * boundary_map) is "
2961  "deprecated, use the unique_ptr version instead");
2962  _boundary_to_normal_map.reset(boundary_map);
2963 }
void mooseDeprecated(Args &&... args) const
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:1486

◆ setCoordData()

void MooseMesh::setCoordData ( const MooseMesh other_mesh)

Set the coordinate system data to that of other_mesh.

Definition at line 4038 of file MooseMesh.C.

Referenced by DisplacedProblem::DisplacedProblem().

4039 {
4040  _coord_sys = other_mesh._coord_sys;
4041  _rz_coord_axis = other_mesh._rz_coord_axis;
4043 }
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1804
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:1810
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition: MooseMesh.h:1807

◆ 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 3823 of file MooseMesh.C.

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

3825 {
3826  TIME_SECTION("setCoordSystem", 5, "Setting Coordinate System");
3827  if (!_provided_coord_blocks.empty() && (_provided_coord_blocks != blocks))
3828  {
3829  const std::string param_name = isParamValid("coord_block") ? "coord_block" : "block";
3830  mooseWarning("Supplied blocks in the 'setCoordSystem' method do not match the value of the "
3831  "'Mesh/",
3832  param_name,
3833  "' parameter. Did you provide different parameter values for 'Mesh/",
3834  param_name,
3835  "' and 'Problem/block'?. We will honor the parameter value from 'Mesh/",
3836  param_name,
3837  "'");
3838  mooseAssert(_coord_system_set,
3839  "If we are arriving here due to a bad specification in the Problem block, then we "
3840  "should have already set our coordinate system subdomains from the Mesh block");
3841  return;
3842  }
3843  if (_pars.isParamSetByUser("coord_type") && getParam<MultiMooseEnum>("coord_type") != coord_sys)
3844  mooseError("Supplied coordinate systems in the 'setCoordSystem' method do not match the value "
3845  "of the 'Mesh/coord_type' parameter. Did you provide different parameter values for "
3846  "'coord_type' to 'Mesh' and 'Problem'?");
3847 
3848  auto subdomains = meshSubdomains();
3849  // It's possible that a user has called this API before the mesh is prepared and consequently we
3850  // don't yet have the subdomains in meshSubdomains()
3851  for (const auto & sub_name : blocks)
3852  {
3853  const auto sub_id = getSubdomainID(sub_name);
3854  subdomains.insert(sub_id);
3855  }
3856 
3857  if (coord_sys.size() <= 1)
3858  {
3859  // We will specify the same coordinate system for all blocks
3860  const auto coord_type = coord_sys.size() == 0
3862  : Moose::stringToEnum<Moose::CoordinateSystemType>(coord_sys[0]);
3863  for (const auto sid : subdomains)
3864  _coord_sys[sid] = coord_type;
3865  }
3866  else
3867  {
3868  if (blocks.size() != coord_sys.size())
3869  mooseError("Number of blocks and coordinate systems does not match.");
3870 
3871  for (const auto i : index_range(blocks))
3872  {
3873  SubdomainID sid = getSubdomainID(blocks[i]);
3874  Moose::CoordinateSystemType coord_type =
3875  Moose::stringToEnum<Moose::CoordinateSystemType>(coord_sys[i]);
3876  _coord_sys[sid] = coord_type;
3877  }
3878 
3879  for (const auto & sid : subdomains)
3880  if (_coord_sys.find(sid) == _coord_sys.end())
3881  mooseError("Subdomain '" + Moose::stringify(sid) +
3882  "' does not have a coordinate system specified.");
3883  }
3884 
3885  _coord_system_set = true;
3886 
3888 }
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition: MooseMesh.h:1820
unsigned int size() const
Return the number of active items in the MultiMooseEnum.
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition: MooseMesh.C:4001
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1804
subdomain_id_type SubdomainID
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
bool _coord_system_set
Whether the coordinate system has been set.
Definition: MooseMesh.h:1817
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
CoordinateSystemType
Definition: MooseTypes.h:722
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
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:2921
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1513

◆ setCustomPartitioner()

void MooseMesh::setCustomPartitioner ( Partitioner *  partitioner)

Setter for custom partitioner.

Definition at line 3445 of file MooseMesh.C.

3446 {
3447  _custom_partitioner = partitioner->clone();
3448 }
std::unique_ptr< Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:1397

◆ 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 3937 of file MooseMesh.C.

Referenced by prepare().

3940 {
3941  // Set the axes for the given blocks
3942  mooseAssert(blocks.size() == axes.size(), "Blocks and axes vectors must be the same length.");
3943  for (const auto i : index_range(blocks))
3944  {
3945  const auto subdomain_id = getSubdomainID(blocks[i]);
3946  const auto it = _coord_sys.find(subdomain_id);
3947  if (it == _coord_sys.end())
3948  mooseError("The block '",
3949  blocks[i],
3950  "' has not set a coordinate system. Make sure to call setCoordSystem() before "
3951  "setGeneralAxisymmetricCoordAxes().");
3952  else
3953  {
3954  if (it->second == Moose::COORD_RZ)
3955  {
3956  const auto direction = axes[i].second;
3957  if (direction.is_zero())
3958  mooseError("Only nonzero vectors may be supplied for RZ directions.");
3959 
3960  _subdomain_id_to_rz_coord_axis[subdomain_id] =
3961  std::make_pair(axes[i].first, direction.unit());
3962  }
3963  else
3964  mooseError("The block '",
3965  blocks[i],
3966  "' was provided in setGeneralAxisymmetricCoordAxes(), but the coordinate system "
3967  "for this block is not 'RZ'.");
3968  }
3969  }
3970 
3971  // Make sure there are no RZ blocks that still do not have axes
3972  const auto all_subdomain_ids = meshSubdomains();
3973  for (const auto subdomain_id : all_subdomain_ids)
3974  if (getCoordSystem(subdomain_id) == Moose::COORD_RZ &&
3975  !_subdomain_id_to_rz_coord_axis.count(subdomain_id))
3976  mooseError("The block '",
3977  getSubdomainName(subdomain_id),
3978  "' was specified to use the 'RZ' coordinate system but was not given in "
3979  "setGeneralAxisymmetricCoordAxes().");
3980 
3982 }
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition: MooseMesh.C:1537
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition: MooseMesh.C:4001
std::map< SubdomainID, Moose::CoordinateSystemType > _coord_sys
Type of coordinate system per subdomain.
Definition: MooseMesh.h:1804
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem() const
Get the map from subdomain ID to coordinate system type, e.g.
Definition: MooseMesh.C:3923
void mooseError(Args &&... args) const
Emits an error prefixed with object name and 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:1810
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:2921
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1513

◆ 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 2985 of file MooseMesh.C.

2986 {
2987  _ghosted_boundaries_inflation = inflation;
2988 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:1515

◆ setIsCustomPartitionerRequested()

void MooseMesh::setIsCustomPartitionerRequested ( bool  cpr)

Definition at line 3473 of file MooseMesh.C.

3474 {
3476 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:1398

◆ 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 2618 of file MooseMesh.C.

2619 {
2620  _mesh = std::move(mesh_base);
2621  _mesh->allow_remote_element_removal(_allow_remote_element_removal);
2622 }
bool _allow_remote_element_removal
Whether to allow removal of remote elements.
Definition: MooseMesh.h:1774
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:1390

◆ setMeshBoundaryIDs()

void MooseMesh::setMeshBoundaryIDs ( std::set< BoundaryID boundary_IDs)

Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.

Definition at line 2945 of file MooseMesh.C.

2946 {
2947  _mesh_boundary_ids = boundary_IDs;
2948 }
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:1480

◆ setParallelType()

void MooseMesh::setParallelType ( ParallelType  parallel_type)
inline

Allow to change parallel type.

Definition at line 2079 of file MooseMesh.h.

Referenced by buildTypedMesh().

2080 {
2081  _parallel_type = parallel_type;
2083 }
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition: MooseMesh.h:1380
void determineUseDistributedMesh()
Determine whether to use a distributed mesh.
Definition: MooseMesh.C:2575

◆ 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 3390 of file MooseMesh.C.

Referenced by setPartitionerHelper().

3395 {
3396  // Set the partitioner based on partitioner name
3397  switch (partitioner)
3398  {
3399  case -3: // default
3400  // We'll use the default partitioner, but notify the user of which one is being used...
3401  if (use_distributed_mesh)
3402  partitioner = "parmetis";
3403  else
3404  partitioner = "metis";
3405  break;
3406 
3407  // No need to explicitily create the metis or parmetis partitioners,
3408  // They are the default for serial and parallel mesh respectively
3409  case -2: // metis
3410  case -1: // parmetis
3411  break;
3412 
3413  case 0: // linear
3414  mesh_base.partitioner().reset(new LinearPartitioner);
3415  break;
3416  case 1: // centroid
3417  {
3418  if (!params.isParamValid("centroid_partitioner_direction"))
3419  context_obj.paramError(
3420  "centroid_partitioner_direction",
3421  "If using the centroid partitioner you _must_ specify centroid_partitioner_direction!");
3422 
3423  MooseEnum direction = params.get<MooseEnum>("centroid_partitioner_direction");
3424 
3425  if (direction == "x")
3426  mesh_base.partitioner().reset(new CentroidPartitioner(CentroidPartitioner::X));
3427  else if (direction == "y")
3428  mesh_base.partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Y));
3429  else if (direction == "z")
3430  mesh_base.partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Z));
3431  else if (direction == "radial")
3432  mesh_base.partitioner().reset(new CentroidPartitioner(CentroidPartitioner::RADIAL));
3433  break;
3434  }
3435  case 2: // hilbert_sfc
3436  mesh_base.partitioner().reset(new HilbertSFCPartitioner);
3437  break;
3438  case 3: // morton_sfc
3439  mesh_base.partitioner().reset(new MortonSFCPartitioner);
3440  break;
3441  }
3442 }
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.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
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 ...
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 3378 of file MooseMesh.C.

Referenced by buildTypedMesh().

3379 {
3380  if (_use_distributed_mesh && (_partitioner_name != "default" && _partitioner_name != "parmetis"))
3381  {
3382  _partitioner_name = "parmetis";
3383  _partitioner_overridden = true;
3384  }
3385 
3387 }
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:3390
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:1393
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:1385
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
bool _partitioner_overridden
Definition: MooseMesh.h:1394
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

◆ setPatchUpdateStrategy()

void MooseMesh::setPatchUpdateStrategy ( Moose::PatchUpdateType  patch_update_strategy)

Set the patch size update strategy.

Definition at line 3157 of file MooseMesh.C.

3158 {
3159  _patch_update_strategy = patch_update_strategy;
3160 }
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:1527

◆ 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 1525 of file MooseMesh.C.

Referenced by MooseMesh().

1526 {
1527  getMesh().subdomain_name(subdomain_id) = name;
1528 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198

◆ setSubdomainName() [2/2]

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.

Definition at line 1531 of file MooseMesh.C.

1532 {
1533  mesh.subdomain_name(subdomain_id) = name;
1534 }
MeshBase & mesh
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56

◆ setUniformRefineLevel()

void MooseMesh::setUniformRefineLevel ( unsigned int  level,
bool  deletion = true 
)

Set uniform refinement level.

Definition at line 2972 of file MooseMesh.C.

2973 {
2974  _uniform_refine_level = level;
2976 }
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1414
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition: MooseMesh.h:1420

◆ 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 3814 of file MooseMesh.C.

Referenced by DisplacedProblem::init(), FEProblemBase::init(), FEProblemBase::meshChangedHelper(), and DisplacedProblem::updateMesh().

3815 {
3820 }
void cacheFVElementalDoFs() const
Cache the DoF indices for FV variables on each element.
Definition: MooseMesh.C:3755
void cacheFaceInfoVariableOwnership() const
Cache if variables live on the elements connected by the FaceInfo objects.
Definition: MooseMesh.C:3689
void buildFiniteVolumeInfo() const
Builds the face and elem info vectors that store meta-data needed for looping over and doing calculat...
Definition: MooseMesh.C:3485
void computeFiniteVolumeCoords() const
Compute the face coordinate value for all FaceInfo and ElemInfo objects.
Definition: MooseMesh.C:3625

◆ sideWithBoundaryID()

unsigned int MooseMesh::sideWithBoundaryID ( const Elem *const  elem,
const BoundaryID  boundary_id 
) const

Calls BoundaryInfo::side_with_boundary_id().

Definition at line 2771 of file MooseMesh.C.

2772 {
2773  return getMesh().get_boundary_info().side_with_boundary_id(elem, boundary_id);
2774 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849

◆ 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 2073 of file MooseMesh.h.

2074 {
2076 }
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition: MooseMesh.h:1420

◆ skipRefineWhenUseSplit()

bool MooseMesh::skipRefineWhenUseSplit ( ) const
inline

Whether or not skip uniform refinements when using a pre-split mesh.

Definition at line 570 of file MooseMesh.h.

570 { 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:1417

◆ 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 50 of file MooseBase.h.

Referenced by CreateProblemDefaultAction::act(), SetupDebugAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addMeshDivision(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addObject(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addTimeIntegrator(), MooseServer::addValuesToList(), DisplacedProblem::addVectorTag(), SubProblem::addVectorTag(), FEProblemBase::advanceMultiApps(), PhysicsBase::assertParamDefined(), AuxKernelTempl< Real >::AuxKernelTempl(), FEProblemBase::backupMultiApps(), BoundaryPreservedMarker::BoundaryPreservedMarker(), DistributedRectilinearMeshGenerator::buildCube(), buildHRefinementAndCoarseningMaps(), buildPRefinementAndCoarseningMaps(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), PhysicsBase::checkRequiredTasks(), FEProblemBase::computeAuxiliaryKernels(), 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(), HFEMDiffusion::computeLowerDQpJacobian(), HFEMDirichletBC::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(), EqualValueEmbeddedConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), DGConvection::computeQpResidual(), HFEMDiffusion::computeQpResidual(), ArrayHFEMDiffusion::computeQpResidual(), ScalarKernel::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), InterfaceReaction::computeQpResidual(), ADDGAdvection::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), DGDiffusion::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), ADDGDiffusion::computeQpResidual(), HFEMTrialJump::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), HFEMTestJump::computeQpResidual(), EqualValueEmbeddedConstraint::computeQpResidual(), FEProblemBase::computeUserObjectByName(), FEProblemBase::computeUserObjects(), FEProblemBase::computeUserObjectsInternal(), BatchMaterial< Tuple, Output, Input >::construct(), DisplacedProblem::createQRules(), FEProblemBase::createQRules(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), MooseBaseErrorInterface::errorPrefix(), AB2PredictorCorrector::estimateTimeError(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), FEProblemBase::execTransfers(), FEProblemBase::finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), MooseServer::getInputLookupDefinitionNodes(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), Transient::getTimeIntegratorName(), FEProblemBase::getTransfers(), DisplacedProblem::getVectorTags(), SubProblem::getVectorTags(), CommonOutputAction::hasConsole(), FEProblemBase::hasMultiApps(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), MultiAppConservativeTransfer::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), FEProblemBase::logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), DisplacedProblem::numVectorTags(), SubProblem::numVectorTags(), MooseBaseParameterInterface::objectErrorPrefix(), Console::output(), AdvancedOutput::output(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), ProjectedStatefulMaterialStorageAction::processProperty(), SolutionInvalidInterface::registerInvalidSolutionInternal(), FEProblemBase::restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), FEProblemBase::setCoupling(), MooseBase::typeAndName(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

50 { return _type; }
const std::string & _type
The type of this class.
Definition: MooseBase.h:72

◆ typeAndName()

std::string MooseBase::typeAndName ( ) const
inlineinherited

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 62 of file MooseBase.h.

Referenced by MaterialPropertyStorage::addProperty(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< std::vector< T > >::finalize(), and ReporterData::getReporterInfo().

63  {
64  return type() + std::string(" \"") + name() + std::string("\"");
65  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:50

◆ uniformRefineLevel()

unsigned int MooseMesh::uniformRefineLevel ( ) const

Returns the level of uniform refinement requested (zero if AMR is disabled).

Definition at line 2966 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup(), and Adaptivity::uniformRefineWithProjection().

2967 {
2968  return _uniform_refine_level;
2969 }
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:1414

◆ uniqueName()

MooseObjectName MooseBaseParameterInterface::uniqueName ( ) const
inlineinherited

The unique name for accessing input parameters of this object in the InputParameterWarehouse.

Definition at line 68 of file MooseBaseParameterInterface.h.

Referenced by MooseBaseParameterInterface::connectControllableParams(), and Action::uniqueActionName().

69  {
70  return MooseObjectName(_pars.get<std::string>("_unique_name"));
71  }
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.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing the names of MooseObject by tag and object name.

◆ uniqueParameterName()

MooseObjectParameterName MooseBaseParameterInterface::uniqueParameterName ( const std::string &  parameter_name) const
inlineinherited

The unique parameter name of a valid parameter of this object for accessing parameter controls.

Definition at line 53 of file MooseBaseParameterInterface.h.

54  {
56  _pars.get<std::string>("_moose_base"), _moose_base->name(), parameter_name);
57  }
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 const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
const MooseBase *const _moose_base
The MooseBase object that inherits this class.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
A class for storing an input parameter name.

◆ update()

void MooseMesh::update ( )

Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().

Definition at line 483 of file MooseMesh.C.

Referenced by meshChanged(), prepare(), and EqualValueBoundaryConstraint::updateConstrainedNodes().

484 {
485  TIME_SECTION("update", 3, "Updating Mesh", true);
486 
487  // Rebuild the boundary conditions
489 
490  // Update the node to elem map
491  _node_to_elem_map.clear();
492  _node_to_elem_map_built = false;
495 
496  buildNodeList();
498  cacheInfo();
499  buildElemIDInfo();
500 
502 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:1462
void buildElemIDInfo()
Build extra data for faster access to the information of extra element integers.
Definition: MooseMesh.C:861
bool _finite_volume_info_dirty
Definition: MooseMesh.h:1571
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:1461
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:1466
void cacheInfo()
Definition: MooseMesh.C:1209
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:2733
void buildBndElemList()
Definition: MooseMesh.C:957
void buildNodeList()
Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in t...
Definition: MooseMesh.C:827
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:1465

◆ 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 753 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup(), FEProblemBase::meshChangedHelper(), and FEProblemBase::possiblyRebuildGeomSearchPatches().

754 {
755  TIME_SECTION("updateActiveSemiLocalNodeRange", 5, "Updating ActiveSemiLocalNode Range");
756 
757  _semilocal_node_list.clear();
758 
759  // First add the nodes connected to local elems
760  ConstElemRange * active_local_elems = getActiveLocalElementRange();
761  for (const auto & elem : *active_local_elems)
762  {
763  for (unsigned int n = 0; n < elem->n_nodes(); ++n)
764  {
765  // Since elem is const here but we require a non-const Node * to
766  // store in the _semilocal_node_list (otherwise things like
767  // UpdateDisplacedMeshThread don't work), we are using a
768  // const_cast. A more long-term fix would be to have
769  // getActiveLocalElementRange return a non-const ElemRange.
770  Node * node = const_cast<Node *>(elem->node_ptr(n));
771 
772  _semilocal_node_list.insert(node);
773  }
774  }
775 
776  // Now add the nodes connected to ghosted_elems
777  for (const auto & ghost_elem_id : ghosted_elems)
778  {
779  Elem * elem = getMesh().elem_ptr(ghost_elem_id);
780  for (unsigned int n = 0; n < elem->n_nodes(); n++)
781  {
782  Node * node = elem->node_ptr(n);
783 
784  _semilocal_node_list.insert(node);
785  }
786  }
787 
788  // Now create the actual range
789  _active_semilocal_node_range = std::make_unique<SemiLocalNodeRange>(_semilocal_node_list.begin(),
790  _semilocal_node_list.end());
791 }
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:1445
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:1040
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:3198
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:622
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2849
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:1453

◆ 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 4001 of file MooseMesh.C.

Referenced by MooseMesh(), setAxisymmetricCoordAxis(), setCoordSystem(), and setGeneralAxisymmetricCoordAxes().

4002 {
4003  if (!_coord_transform)
4004  _coord_transform = std::make_unique<MooseAppCoordTransform>(*this);
4005  else
4006  _coord_transform->setCoordinateSystem(*this);
4007 }
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:1814

◆ usingGeneralAxisymmetricCoordAxes()

bool MooseMesh::usingGeneralAxisymmetricCoordAxes ( ) const

Returns true if general axisymmetric coordinate axes are being used.

Definition at line 3995 of file MooseMesh.C.

Referenced by getAxisymmetricRadialCoord(), and getUniqueCoordSystem().

3996 {
3997  return _subdomain_id_to_rz_coord_axis.size() > 0;
3998 }
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:1810

◆ validParams()

InputParameters MooseMesh::validParams ( )
static

Typical "Moose-style" constructor and copy constructor.

Definition at line 78 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().

79 {
81 
82  MooseEnum parallel_type("DEFAULT REPLICATED DISTRIBUTED", "DEFAULT");
83  params.addParam<MooseEnum>("parallel_type",
84  parallel_type,
85  "DEFAULT: Use libMesh::ReplicatedMesh unless --distributed-mesh is "
86  "specified on the command line "
87  "REPLICATED: Always use libMesh::ReplicatedMesh "
88  "DISTRIBUTED: Always use libMesh::DistributedMesh");
89 
90  params.addParam<bool>(
91  "allow_renumbering",
92  true,
93  "If allow_renumbering=false, node and element numbers are kept fixed until deletion");
94 
95  params.addParam<bool>("nemesis",
96  false,
97  "If nemesis=true and file=foo.e, actually reads "
98  "foo.e.N.0, foo.e.N.1, ... foo.e.N.N-1, "
99  "where N = # CPUs, with NemesisIO.");
100 
101  MooseEnum dims("1=1 2 3", "1");
102  params.addParam<MooseEnum>("dim",
103  dims,
104  "This is only required for certain mesh formats where "
105  "the dimension of the mesh cannot be autodetected. "
106  "In particular you must supply this for GMSH meshes. "
107  "Note: This is completely ignored for ExodusII meshes!");
108 
109  params.addParam<MooseEnum>(
110  "partitioner",
111  partitioning(),
112  "Specifies a mesh partitioner to use when splitting the mesh for a parallel computation.");
113  MooseEnum direction("x y z radial");
114  params.addParam<MooseEnum>("centroid_partitioner_direction",
115  direction,
116  "Specifies the sort direction if using the centroid partitioner. "
117  "Available options: x, y, z, radial");
118 
119  MooseEnum patch_update_strategy("never always auto iteration", "never");
120  params.addParam<MooseEnum>(
121  "patch_update_strategy",
122  patch_update_strategy,
123  "How often to update the geometric search 'patch'. The default is to "
124  "never update it (which is the most efficient but could be a problem "
125  "with lots of relative motion). 'always' will update the patch for all "
126  "secondary nodes at the beginning of every timestep which might be time "
127  "consuming. 'auto' will attempt to determine at the start of which "
128  "timesteps the patch for all secondary nodes needs to be updated automatically."
129  "'iteration' updates the patch at every nonlinear iteration for a "
130  "subset of secondary nodes for which penetration is not detected. If there "
131  "can be substantial relative motion between the primary and secondary surfaces "
132  "during the nonlinear iterations within a timestep, it is advisable to use "
133  "'iteration' option to ensure accurate contact detection.");
134 
135  // Note: This parameter is named to match 'construct_side_list_from_node_list' in SetupMeshAction
136  params.addParam<bool>(
137  "construct_node_list_from_side_list",
138  true,
139  "Whether or not to generate nodesets from the sidesets (usually a good idea).");
140  params.addParam<unsigned int>(
141  "patch_size", 40, "The number of nodes to consider in the NearestNode neighborhood.");
142  params.addParam<unsigned int>("ghosting_patch_size",
143  "The number of nearest neighbors considered "
144  "for ghosting purposes when 'iteration' "
145  "patch update strategy is used. Default is "
146  "5 * patch_size.");
147  params.addParam<unsigned int>("max_leaf_size",
148  10,
149  "The maximum number of points in each leaf of the KDTree used in "
150  "the nearest neighbor search. As the leaf size becomes larger,"
151  "KDTree construction becomes faster but the nearest neighbor search"
152  "becomes slower.");
153 
154  params.addParam<bool>("build_all_side_lowerd_mesh",
155  false,
156  "True to build the lower-dimensional mesh for all sides.");
157 
158  params.addParam<bool>("skip_refine_when_use_split",
159  true,
160  "True to skip uniform refinements when using a pre-split mesh.");
161 
162  params.addParam<std::vector<SubdomainID>>(
163  "add_subdomain_ids",
164  "The listed subdomains will be assumed valid for the mesh. This permits setting up subdomain "
165  "restrictions for subdomains initially containing no elements, which can occur, for example, "
166  "in additive manufacturing simulations which dynamically add and remove elements.");
167 
169 
170  // This indicates that the derived mesh type accepts a MeshGenerator, and should be set to true in
171  // derived types that do so.
172  params.addPrivateParam<bool>("_mesh_generator_mesh", false);
173 
174  // Whether or not the mesh is pre split
175  params.addPrivateParam<bool>("_is_split", false);
176 
177  params.registerBase("MooseMesh");
178 
179  // groups
180  params.addParamNamesToGroup(
181  "dim nemesis patch_update_strategy construct_node_list_from_side_list patch_size",
182  "Advanced");
183  params.addParamNamesToGroup("partitioner centroid_partitioner_direction", "Partitioning");
184 
185  return params;
186 }
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:31
static MooseEnum partitioning()
returns MooseMesh partitioning options so other classes can use it
Definition: MooseMesh.C:3646
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
static InputParameters validParams()
Definition: MooseObject.C:24

Member Data Documentation

◆ _action_factory

ActionFactory& MooseBaseParameterInterface::_action_factory
protectedinherited

◆ _active_local_elem_range

std::unique_ptr<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 1451 of file MooseMesh.h.

Referenced by getActiveLocalElementRange(), and meshChanged().

◆ _active_node_range

std::unique_ptr<NodeRange> MooseMesh::_active_node_range
protected

Definition at line 1454 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 1560 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 1765 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 1774 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 69 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 1786 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 1509 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 1501 of file MooseMesh.h.

Referenced by buildBndElemList(), freeBndElems(), getBoundariesToActiveSemiLocalElemIds(), getBoundaryActiveSemiLocalElemIds(), and isBoundaryElem().

◆ _bnd_elem_range

std::unique_ptr<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 1496 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 1493 of file MooseMesh.h.

Referenced by addQuadratureNode(), buildNodeList(), freeBndNodes(), and isBoundaryNode().

◆ _bnd_node_range

std::unique_ptr<StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *> > MooseMesh::_bnd_node_range
protected

Definition at line 1456 of file MooseMesh.h.

Referenced by addQuadratureNode(), getBoundaryNodeRange(), and meshChanged().

◆ _bnd_nodes

std::vector<BndNode *> MooseMesh::_bnd_nodes
protected

array of boundary nodes

Definition at line 1489 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 1486 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 1536 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 1376 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 1442 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 1435 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(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonPlanarSides(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualProblem::checkRelativeConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), FixedPointSolve::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), NonlinearSystemBase::computeScaling(), Problem::console(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MessageFromInput::execute(), Steady::execute(), Eigenvalue::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), CoarsenBlockGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseBaseErrorInterface::mooseDeprecated(), MooseBaseErrorInterface::mooseInfo(), MooseBaseErrorInterface::mooseWarning(), MooseBaseErrorInterface::mooseWarningNonPrefixed(), ReferenceResidualProblem::nonlinearConvergenceSetup(), ReporterDebugOutput::output(), PerfGraphOutput::output(), MaterialPropertyDebugOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), PicardSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), NonlinearSystem::solve(), EigenProblem::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(), Transient::takeStep(), 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 1768 of file MooseMesh.h.

Referenced by buildNodeListFromSideList().

◆ _coord_sys

std::map<SubdomainID, Moose::CoordinateSystemType> MooseMesh::_coord_sys
private

Type of coordinate system per subdomain.

Definition at line 1804 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 1817 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 1814 of file MooseMesh.h.

Referenced by coordTransform(), lengthUnit(), and updateCoordTransform().

◆ _custom_partitioner

std::unique_ptr<Partitioner> MooseMesh::_custom_partitioner
protected

The custom partitioner.

Definition at line 1397 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 1386 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 1823 of file MooseMesh.h.

Referenced by doingPRefinement().

◆ _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 1556 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 1568 of file MooseMesh.h.

Referenced by buildFiniteVolumeInfo(), and faceInfo().

◆ _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 1552 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 1505 of file MooseMesh.h.

Referenced by addQuadratureNode(), clearQuadratureNodes(), and getQuadratureNode().

◆ _elem_type_to_child_side_refinement_map

std::map<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 1713 of file MooseMesh.h.

Referenced by buildRefinementMap(), and getRefinementMap().

◆ _elem_type_to_coarsening_map

std::map<std::pair<int, 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 1730 of file MooseMesh.h.

Referenced by buildCoarseningMap(), and getCoarseningMap().

◆ _elem_type_to_p_coarsening_map

std::map<std::pair<ElemType, unsigned int>, std::vector<QpMap> > MooseMesh::_elem_type_to_p_coarsening_map
private

Definition at line 1732 of file MooseMesh.h.

Referenced by buildPRefinementAndCoarseningMaps(), and getPCoarseningMap().

◆ _elem_type_to_p_coarsening_side_map

std::map<std::pair<ElemType, unsigned int>, std::vector<QpMap> > MooseMesh::_elem_type_to_p_coarsening_side_map
private

Definition at line 1734 of file MooseMesh.h.

Referenced by buildPRefinementAndCoarseningMaps(), and getPCoarseningSideMap().

◆ _elem_type_to_p_refinement_map

std::map<std::pair<ElemType, unsigned int>, std::vector<QpMap> > MooseMesh::_elem_type_to_p_refinement_map
private

Definition at line 1707 of file MooseMesh.h.

Referenced by buildPRefinementAndCoarseningMaps(), and getPRefinementMap().

◆ _elem_type_to_p_refinement_side_map

std::map<std::pair<ElemType, unsigned int>, std::vector<QpMap> > MooseMesh::_elem_type_to_p_refinement_side_map
private

Definition at line 1709 of file MooseMesh.h.

Referenced by buildPRefinementAndCoarseningMaps(), and getPRefinementSideMap().

◆ _elem_type_to_refinement_map

std::map<std::pair<int, 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 1705 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 53 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _extra_bnd_nodes

std::vector<BndNode> MooseMesh::_extra_bnd_nodes
protected

Definition at line 1506 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 1590 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 1564 of file MooseMesh.h.

Referenced by buildFiniteVolumeInfo(), faceInfo(), nFace(), ownedFaceInfoBegin(), and ownedFaceInfoEnd().

◆ _factory

Factory& MooseBaseParameterInterface::_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 1777 of file MooseMesh.h.

Referenced by ghostGhostedBoundaries().

◆ _ghosted_boundaries

std::set<unsigned int> MooseMesh::_ghosted_boundaries
protected

Definition at line 1514 of file MooseMesh.h.

Referenced by addGhostedBoundary(), getGhostedBoundaries(), and ghostGhostedBoundaries().

◆ _ghosted_boundaries_inflation

std::vector<Real> MooseMesh::_ghosted_boundaries_inflation
protected

Definition at line 1515 of file MooseMesh.h.

Referenced by getGhostedBoundaryInflation(), and setGhostedBoundaryInflation().

◆ _ghosting_functors

std::vector<std::unique_ptr<GhostingFunctor> > MooseMesh::_ghosting_functors
protected

Deprecated (DO NOT USE)

Definition at line 1370 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 1521 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 1587 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 1762 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 1757 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 1792 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 1423 of file MooseMesh.h.

◆ _is_displaced

bool MooseMesh::_is_displaced
private

Whether this mesh is displaced.

Definition at line 1795 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 1426 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 1542 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 1576 of file MooseMesh.h.

Referenced by buildFiniteVolumeInfo().

◆ _local_node_range

std::unique_ptr<ConstNodeRange> MooseMesh::_local_node_range
protected

Definition at line 1455 of file MooseMesh.h.

Referenced by getLocalNodeRange(), and meshChanged().

◆ _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 1758 of file MooseMesh.h.

Referenced by buildLowerDMesh(), and getHigherDSide().

◆ _max_ids

std::vector<dof_id_type> MooseMesh::_max_ids
private

Maximum integer ID for each extra element integer.

Definition at line 1788 of file MooseMesh.h.

Referenced by buildElemIDInfo(), and maxElementID().

◆ _max_leaf_size

unsigned int MooseMesh::_max_leaf_size
protected

Definition at line 1524 of file MooseMesh.h.

Referenced by getMaxLeafSize().

◆ _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 1480 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 1482 of file MooseMesh.h.

Referenced by meshNodesetIds(), and prepare().

◆ _mesh_sideset_ids

std::set<BoundaryID> MooseMesh::_mesh_sideset_ids
protected

Definition at line 1481 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 1472 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 1790 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 1429 of file MooseMesh.h.

Referenced by prepare(), and prepared().

◆ _name

const std::string& MooseBase::_name
protectedinherited

The name of this class, reference to value stored in InputParameters.

Definition at line 75 of file MooseBase.h.

Referenced by AddBCAction::act(), AddDamperAction::act(), AddUserObjectAction::act(), AddDGKernelAction::act(), AddFVInterfaceKernelAction::act(), AddIndicatorAction::act(), AddInterfaceKernelAction::act(), AddTransferAction::act(), AddVectorPostprocessorAction::act(), AddMeshGeneratorAction::act(), AddScalarKernelAction::act(), ReadExecutorParamsAction::act(), AddFunctorMaterialAction::act(), AddKernelAction::act(), AddMaterialAction::act(), AddMarkerAction::act(), AddInitialConditionAction::act(), AddConstraintAction::act(), AddMultiAppAction::act(), AddNodalKernelAction::act(), AddFVInitialConditionAction::act(), AddDiracKernelAction::act(), PartitionerAction::act(), AddPostprocessorAction::act(), AddTimesAction::act(), AddFieldSplitAction::act(), AddPositionsAction::act(), AddReporterAction::act(), AddFVBCAction::act(), AddFVKernelAction::act(), SetupPreconditionerAction::act(), SetupTimeIntegratorAction::act(), AddMeshDivisionAction::act(), AddFunctionAction::act(), AddTimeStepperAction::act(), AddDistributionAction::act(), AddOutputAction::act(), AddSamplerAction::act(), AddControlAction::act(), AddPeriodicBCAction::act(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromXY(), PiecewiseLinearBase::buildInterpolation(), CombinerGenerator::CombinerGenerator(), Executor::Executor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), FillBetweenSidesetsGenerator::generate(), FillBetweenPointVectorsGenerator::generate(), FillBetweenCurvesGenerator::generate(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::name(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseBase::setData(), and Split::setup().

◆ _need_delete

bool MooseMesh::_need_delete
private

Whether we need to delete remote elements after init'ing the EquationSystems.

Definition at line 1771 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 1783 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 1753 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 1530 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 1512 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 1465 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 1466 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 1461 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 1462 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 1539 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 1380 of file MooseMesh.h.

Referenced by determineUseDistributedMesh(), and setParallelType().

◆ _parallel_type_overridden

bool MooseMesh::_parallel_type_overridden
protected

Definition at line 1387 of file MooseMesh.h.

Referenced by determineUseDistributedMesh(), and isParallelTypeForced().

◆ _pars

const InputParameters& MooseBaseParameterInterface::_pars
protectedinherited

Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.

Definition at line 168 of file MooseBaseParameterInterface.h.

Referenced by AddFVICAction::act(), AddICAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupMeshAction::act(), ComposeTimeStepperAction::act(), SetupDebugAction::act(), AddAuxKernelAction::act(), AddVariableAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), FunctorMaterial::addFunctorPropertyByBlocks(), FVFluxKernel::adjustRMGhostLayers(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), PiecewiseTabularBase::buildFromFile(), PNGOutput::calculateRescalingValues(), SingleRankPartitioner::clone(), RandomPartitioner::clone(), BlockWeightedPartitioner::clone(), PetscExternalPartitioner::clone(), HierarchicalGridPartitioner::clone(), GridPartitioner::clone(), MooseBaseParameterInterface::connectControllableParams(), Console::Console(), AddVariableAction::createInitialConditionAction(), MaterialBase::declareADProperty(), MaterialBase::declareProperty(), FEProblemSolve::FEProblemSolve(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), FVAdvection::FVAdvection(), FVAnisotropicDiffusion::FVAnisotropicDiffusion(), FVDiffusion::FVDiffusion(), FileMeshGenerator::generate(), MaterialBase::getGenericZeroMaterialProperty(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBaseParameterInterface::getParam(), MooseBaseParameterInterface::getRenamedParam(), MeshGenerator::hasGenerateData(), AddVariableAction::init(), AdvancedOutput::initExecutionTypes(), Console::initialSetup(), MooseBaseParameterInterface::isParamSetByUser(), MooseBaseParameterInterface::isParamValid(), MultiApp::keepSolutionDuringRestore(), MooseBaseParameterInterface::paramErrorMsg(), GlobalParamsAction::parameters(), MooseBaseParameterInterface::parameters(), prepare(), Eigenvalue::prepareSolverOptions(), setCoordSystem(), setPartitionerHelper(), SetupMeshAction::setupMesh(), Transient::setupTimeIntegrator(), MooseBaseParameterInterface::uniqueName(), and MooseBaseParameterInterface::uniqueParameterName().

◆ _partitioner_name

MooseEnum MooseMesh::_partitioner_name
protected

The partitioner used on this mesh.

Definition at line 1393 of file MooseMesh.h.

Referenced by partitionerName(), and setPartitionerHelper().

◆ _partitioner_overridden

bool MooseMesh::_partitioner_overridden
protected

Definition at line 1394 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 1518 of file MooseMesh.h.

Referenced by getPatchSize().

◆ _patch_update_strategy

Moose::PatchUpdateType MooseMesh::_patch_update_strategy
protected

The patch update strategy.

Definition at line 1527 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 1582 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 1820 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 1503 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 1432 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 1533 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 1373 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 1807 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 1445 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 1420 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 1417 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 1750 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 1810 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 1414 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 1385 of file MooseMesh.h.

Referenced by buildMeshBaseObject(), buildTypedMesh(), detectPairedSidesets(), determineUseDistributedMesh(), errorIfDistributedMesh(), ghostGhostedBoundaries(), init(), isDistributedMesh(), and setPartitionerHelper().


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