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

MooseMesh subclass that consumes the MeshGenerator pipeline to build an mfem::ParMesh. More...

#include <MFEMMeshGeneratorMesh.h>

Inheritance diagram for MFEMMeshGeneratorMesh:
[legend]

Public Types

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

Public Member Functions

 MFEMMeshGeneratorMesh (const InputParameters &parameters)
 
std::unique_ptr< MooseMesh > safeClone () const override
 A safer version of the clone() method that hands back an allocated object wrapped in a smart pointer.
 
mfem::ParMesh & getMFEMParMesh ()
 Accessors for the _mfem_par_mesh object.
 
const mfem::ParMesh & getMFEMParMesh () const
 
std::shared_ptr< mfem::ParMesh > getMFEMParMeshPtr ()
 Copy a shared_ptr to the mfem::ParMesh object.
 
void init () override
 Initialize the MFEM ParMesh and placeholder MOOSE mesh.
 
std::vector< std::filesystem::path > writeRecoveryFiles (const std::filesystem::path &file_base) override
 Write the mesh files needed for recovery/checkpointing.
 
bool shouldDisplace () const
 Returns true if mesh displacement is required.
 
const std::string & getMeshDisplacementVariable () const
 Returns an optional reference to displacement variable name.
 
void displace (mfem::GridFunction const &displacement)
 Displace the nodes of the mesh by the given displacement.
 
bool isDistributedMesh () const override
 Returns the final Mesh distribution type.
 
unsigned int dimension () const override
 Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh mesh object.
 
unsigned int spatialDimension () const override
 Returns MeshBase::spatial_dimension.
 
SubdomainID nSubdomains () const override
 
dof_id_type nActiveElem () const override
 
dof_id_type nActiveLocalElem () const override
 
void buildMesh () override final
 Must be overridden by child classes.
 
virtual MooseMesh & clone () const
 Clone method.
 
void determineUseDistributedMesh ()
 Determine whether to use a distributed mesh.
 
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.
 
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.
 
void setMeshBase (std::unique_ptr< MeshBase > mesh_base)
 Method to set the mesh_base object.
 
virtual unsigned int effectiveSpatialDimension () const
 Returns the effective spatial dimension determined by the coordinates actually used by the mesh.
 
unsigned int getBlocksMaxDimension (const std::vector< SubdomainName > &blocks) const
 Returns the maximum element dimension on the given blocks.
 
std::vector< BoundaryID > 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.
 
std::vector< std::vector< BoundaryID > > getBoundaryIDs (const Elem *const elem) const
 Returns a vector of vector of boundary IDs for the requested element on each of its sides.
 
const std::set< BoundaryID > & getBoundaryIDs () const
 Returns a const reference to a set of all user-specified boundary IDs.
 
std::vector< BoundaryID > getBoundaryIDs (const std::vector< BoundaryName > &boundary_name, bool generate_unknown=false) const
 Get the associated BoundaryID for the boundary names that are passed in.
 
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.
 
unsigned int getHigherDSide (const Elem *elem) const
 Returns the local side ID of the interior parent aligned with the lower dimensional element.
 
void buildNodeList ()
 Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in those lists.
 
void buildBndElemList ()
 
const std::unordered_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.
 
virtual bnd_node_iterator bndNodesBegin ()
 Return iterators to the beginning/end of the boundary nodes list.
 
virtual bnd_node_iterator bndNodesEnd ()
 
virtual bnd_elem_iterator bndElemsBegin ()
 Return iterators to the beginning/end of the boundary elements list.
 
virtual bnd_elem_iterator bndElemsEnd ()
 
void buildNodeListFromSideList ()
 Calls BoundaryInfo::build_node_list_from_side_list().
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildSideList ()
 Calls BoundaryInfo::build_side_list(), returns a std::vector of (elem-id, side-id, bc-id) tuples.
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList () const
 Calls BoundaryInfo::build_active_side_list.
 
unsigned int sideWithBoundaryID (const Elem *const elem, const BoundaryID boundary_id) const
 Calls BoundaryInfo::side_with_boundary_id().
 
MeshBase::node_iterator localNodesBegin ()
 Calls local_nodes_begin/end() on the underlying libMesh mesh object.
 
MeshBase::const_node_iterator localNodesBegin () const
 
MeshBase::node_iterator localNodesEnd ()
 
MeshBase::const_node_iterator localNodesEnd () const
 
MeshBase::element_iterator activeLocalElementsBegin ()
 Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
 
MeshBase::const_element_iterator activeLocalElementsBegin () const
 
const MeshBase::element_iterator activeLocalElementsEnd ()
 
const MeshBase::const_element_iterator activeLocalElementsEnd () const
 
virtual dof_id_type nNodes () const
 Calls n_nodes/elem() on the underlying libMesh mesh object.
 
virtual dof_id_type nElem () const
 
virtual dof_id_type nLocalNodes () const
 
virtual unsigned int nPartitions () const
 
virtual bool skipPartitioning () const
 
virtual bool skipNoncriticalPartitioning () const
 
virtual dof_id_type maxNodeId () const
 Calls max_node/elem_id() on the underlying libMesh mesh object.
 
virtual dof_id_type maxElemId () const
 
virtual const Node & node (const dof_id_type i) const
 Various accessors (pointers/references) for Node "i".
 
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".
 
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.
 
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.
 
void meshChanged ()
 Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
 
virtual void onMeshChanged ()
 Declares a callback function that is executed at the conclusion of meshChanged().
 
void cacheChangedLists ()
 Cache information about what elements were refined and coarsened in the previous step.
 
ConstElemPointerRange * refinedElementRange () const
 Return a range that is suitable for threaded execution over elements that were just refined.
 
ConstElemPointerRange * coarsenedElementRange () const
 Return a range that is suitable for threaded execution over elements that were just coarsened.
 
const std::vector< const Elem * > & coarsenedElementChildren (const Elem *elem) const
 Get the newly removed children element ids for an element that was just coarsened.
 
void updateActiveSemiLocalNodeRange (std::set< dof_id_type > &ghosted_elems)
 Clears the "semi-local" node list and rebuilds it.
 
bool isSemiLocal (Node *const node) const
 Returns true if the node is semi-local.
 
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.
 
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.
 
std::unordered_set< dof_id_type > getBoundaryActiveSemiLocalElemIds (BoundaryID bid) const
 Return all ids of elements which have a side which is part of a sideset.
 
std::unordered_set< dof_id_type > getBoundaryActiveNeighborElemIds (BoundaryID bid) const
 Return all ids of neighbors of elements which have a side which is part of a sideset.
 
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.
 
const std::set< SubdomainID > & meshSubdomains () const
 Returns a read-only reference to the set of subdomains currently present in the Mesh.
 
const std::set< BoundaryID > & meshBoundaryIds () const
 Returns a read-only reference to the set of boundary IDs currently present in the Mesh.
 
const std::set< BoundaryID > & meshSidesetIds () const
 Returns a read-only reference to the set of sidesets currently present in the Mesh.
 
const std::set< BoundaryID > & meshNodesetIds () const
 Returns a read-only reference to the set of nodesets currently present in the Mesh.
 
void setBoundaryToNormalMap (std::unique_ptr< std::map< BoundaryID, RealVectorValue > > boundary_map)
 Sets the mapping between BoundaryID and normal vector Is called by AddAllSideSetsByNormals.
 
void setBoundaryToNormalMap (std::map< BoundaryID, RealVectorValue > *boundary_map)
 
void setMeshBoundaryIDs (std::set< BoundaryID > boundary_IDs)
 Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.
 
const RealVectorValue & getNormalByBoundaryID (BoundaryID id) const
 Returns the normal vector associated with a given BoundaryID.
 
void prepare ()
 Calls prepare_for_use() if the underlying MeshBase object isn't prepared, then communicates various boundary information on parallel meshes.
 
void prepare (const MeshBase *mesh_to_clone)
 Deprecated method; mesh_to_clone is no longer supported and must be null.
 
void update ()
 Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
 
unsigned int uniformRefineLevel () const
 Returns the level of uniform refinement requested (zero if AMR is disabled).
 
void setUniformRefineLevel (unsigned int, bool deletion=true)
 Set uniform refinement level.
 
bool skipDeletionRepartitionAfterRefine () const
 Return a flag indicating whether or not we should skip remote deletion and repartition after uniform refinements.
 
bool skipRefineWhenUseSplit () const
 Whether or not skip uniform refinements when using a pre-split mesh.
 
void addGhostedBoundary (BoundaryID boundary_id)
 This will add the boundary ids to be ghosted to this processor.
 
void setGhostedBoundaryInflation (const std::vector< Real > &inflation)
 This sets the inflation amount for the bounding box for each partition for use in ghosting boundaries.
 
const std::set< unsigned int > & getGhostedBoundaries () const
 Return a writable reference to the set of ghosted boundary IDs.
 
const std::vector< Real > & getGhostedBoundaryInflation () const
 Return a writable reference to the _ghosted_boundaries_inflation vector.
 
void ghostGhostedBoundaries ()
 Actually do the ghosting of boundaries that need to be ghosted to this processor.
 
void needGhostGhostedBoundaries (bool needghost)
 Whether or not we want to ghost ghosted boundaries.
 
unsigned int getPatchSize () const
 Getter for the patch_size parameter.
 
unsigned int getGhostingPatchSize () const
 Getter for the ghosting_patch_size parameter.
 
unsigned int getMaxLeafSize () const
 Getter for the maximum leaf size parameter.
 
void setPatchUpdateStrategy (Moose::PatchUpdateType patch_update_strategy)
 Set the patch size update strategy.
 
const Moose::PatchUpdateType & getPatchUpdateStrategy () const
 Get the current patch update strategy.
 
libMesh::BoundingBox getInflatedProcessorBoundingBox (Real inflation_multiplier=0.01) const
 Get a (slightly inflated) processor bounding box.
 
 operator libMesh::MeshBase & ()
 Implicit conversion operator from MooseMesh -> libMesh::MeshBase.
 
 operator const libMesh::MeshBase & () const
 
MeshBase & getMesh ()
 Accessor for the underlying libMesh Mesh object.
 
MeshBase & getMesh (const std::string &name)
 
const MeshBase & getMesh () const
 
const MeshBase & getMesh (const std::string &name) const
 
const MeshBase * getMeshPtr () const
 
Moose::Kokkos::Mesh * getKokkosMesh ()
 Accessor for Kokkos mesh object.
 
const Moose::Kokkos::Mesh * getKokkosMesh () const
 
void printInfo (std::ostream &os=libMesh::out, const unsigned int verbosity=0) const
 Calls print_info() on the underlying Mesh.
 
const std::set< SubdomainID > & getNodeBlockIds (const Node &node) const
 Return list of blocks to which the given node belongs.
 
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.
 
const Node * addUniqueNode (const Point &p, Real tol=1e-6)
 Add a new node to the mesh.
 
Node * addQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
 Adds a fictitious "QuadratureNode".
 
Node * getQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp)
 Get a specified quadrature node.
 
void clearQuadratureNodes ()
 Clear out any existing quadrature nodes.
 
BoundaryID getBoundaryID (const BoundaryName &boundary_name) const
 Get the associated BoundaryID for the boundary name.
 
SubdomainID getSubdomainID (const SubdomainName &subdomain_name) const
 Get the associated subdomain ID for the subdomain name.
 
std::vector< SubdomainID > getSubdomainIDs (const std::vector< SubdomainName > &subdomain_names) const
 Get the associated subdomainIDs for the subdomain names that are passed in.
 
std::set< SubdomainID > getSubdomainIDs (const std::set< SubdomainName > &subdomain_names) const
 
void setSubdomainName (SubdomainID subdomain_id, const SubdomainName &name, const bool synchronous=false)
 This method sets the name for subdomain_id to name.
 
const std::string & getSubdomainName (SubdomainID subdomain_id) const
 Return the name of a block given an id.
 
std::vector< SubdomainName > getSubdomainNames (const std::vector< SubdomainID > &subdomain_ids) const
 Get the associated subdomainNames for the subdomain ids that are passed in.
 
void setBoundaryName (BoundaryID boundary_id, BoundaryName name)
 This method sets the boundary name of the boundary based on the id parameter.
 
const std::string & getBoundaryName (const BoundaryID boundary_id) const
 Return the name of the boundary given the id.
 
std::string getBoundaryString (const BoundaryID boundary_id) const
 Return the name of the boundary given the id, if it exists.
 
void buildPeriodicNodeMap (std::multimap< dof_id_type, dof_id_type > &periodic_node_map, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
 This routine builds a multimap of boundary ids to matching boundary ids across all periodic boundaries in the system.
 
void buildPeriodicNodeSets (std::map< BoundaryID, std::set< dof_id_type > > &periodic_node_sets, unsigned int var_number, libMesh::PeriodicBoundaries *pbs) const
 This routine builds a datastructure of node ids organized by periodic boundary ids.
 
Real dimensionWidth (unsigned int component) const
 Returns the width of the requested dimension.
 
bool detectOrthogonalDimRanges (Real tol=1e-6)
 This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
 
void addPeriodicVariable (const unsigned int sys_num, const unsigned int var_num, const BoundaryID primary, const 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.
 
const std::array< bool, 3 > & queryPeriodicDimensions (const unsigned int sys_num, const unsigned int var_num) const
 Query the translated periodic dimension flags for the given variable on the given system.
 
const std::array< bool, 3 > & queryPeriodicDimensions (const MooseVariableBase &var) const
 Query the translated periodic dimension flags for the given variable.
 
bool isTranslatedPeriodic (const unsigned int sys_num, const unsigned int var_num, const unsigned int component) const
 Returns whether this generated mesh is periodic in the given dimension for the given variable on the given system.
 
bool isTranslatedPeriodic (const MooseVariableBase &var, const unsigned int component) const
 Returns whether this generated mesh is periodic in the given dimension for the given variable.
 
bool isTranslatedPeriodic (const unsigned int var_num, const unsigned int component) const
 Returns whether this generated mesh is periodic in the given dimension for the given variable.
 
RealVectorValue minPeriodicVector (const unsigned int sys_num, const unsigned int var_num, Point p, Point q) const
 Returns the minimum vector between two points on the mesh taking into account periodicity for the given variable on the given system.
 
RealVectorValue minPeriodicVector (const MooseVariableBase &var, const Point &p, const Point &q) const
 Returns the minimum vector between two points on the mesh taking into account periodicity for the given variable.
 
RealVectorValue minPeriodicVector (const unsigned int var_num, const Point &p, const Point &q) const
 Returns the minimum vector between two points on the mesh taking into account periodicity for the given variable on the given system.
 
Real minPeriodicDistance (const unsigned int sys_num, const unsigned int var_num, const Point &p, const Point &q) const
 Returns the distance between two points on the mesh taking into account periodicity for the given variable on the given system.
 
Real minPeriodicDistance (const MooseVariableBase &var, const Point &p, const Point &q) const
 Returns the distance between two points on the mesh taking into account periodicity for the given variable.
 
Real minPeriodicDistance (const unsigned int var_num, const Point &p, const Point &q) const
 Returns the distance between two points on the mesh taking into account periodicity for the given variable.
 
void detectPairedSidesets ()
 This routine detects paired sidesets of a regular orthogonal mesh (.i.e.
 
bool hasDetectedPairedSidesets () const
 Whether or not detectedPairedSidesets() has been called.
 
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping (unsigned int component) const
 This function attempts to return the paired boundary ids for the given component.
 
void buildRefinementAndCoarseningMaps (Assembly *assembly)
 Create the refinement and coarsening maps necessary for projection of stateful material properties when using adaptivity.
 
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.
 
const std::vector< std::pair< unsigned int, QpMap > > & getCoarseningMap (const Elem &elem, int input_side)
 Get the coarsening map for a given element type.
 
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.
 
const std::set< BoundaryID > & getSubdomainBoundaryIds (const SubdomainID subdomain_id) const
 Get the list of boundary ids associated with the given subdomain id.
 
std::set< BoundaryID > getSubdomainInterfaceBoundaryIds (const SubdomainID subdomain_id) const
 Get the list of boundaries that contact the given subdomain.
 
std::set< SubdomainID > getBoundaryConnectedBlocks (const BoundaryID bid) const
 Get the list of subdomains associated with the given boundary.
 
std::set< SubdomainID > getBoundaryConnectedSecondaryBlocks (const BoundaryID bid) const
 Get the list of subdomains associated with the given boundary of its secondary side.
 
std::set< SubdomainID > getInterfaceConnectedBlocks (const BoundaryID bid) const
 Get the list of subdomains contacting the given boundary.
 
const std::set< SubdomainID > & getBlockConnectedBlocks (const SubdomainID subdomain_id) const
 Get the list of subdomains neighboring a given subdomain.
 
bool isBoundaryNode (dof_id_type node_id) const
 Returns true if the requested node is in the list of boundary nodes, false otherwise.
 
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.
 
bool isSurfaceElemOnNodeset (const Elem &elem, BoundaryID bnd_id) const
 Returns true if elem is a surface element without an interior parent, e.g.
 
bool isBoundaryElem (dof_id_type elem_id) const
 Returns true if the requested element is in the list of boundary elements, false otherwise.
 
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.
 
void errorIfDistributedMesh (std::string name) const
 Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
 
bool isParallelTypeForced () const
 Tell the user if the distribution was overriden for any reason.
 
void setParallelType (ParallelType parallel_type)
 Allow to change parallel type.
 
ParallelType getParallelType () const
 
const MooseEnum & partitionerName () const
 
bool isPartitionerForced () const
 Tell the user if the partitioner was overriden for any reason.
 
void allowRecovery (bool allow)
 Set whether or not this mesh is allowed to read a recovery file.
 
void setCustomPartitioner (libMesh::Partitioner *partitioner)
 Setter for custom partitioner.
 
bool isRegularOrthogonal ()
 Getter to query if the mesh was detected to be regular and orthogonal.
 
bool hasSecondOrderElements ()
 check if the mesh has SECOND order elements
 
virtual std::unique_ptr< libMesh::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.
 
virtual std::string getFileName () const
 Returns the name of the mesh file read to produce this mesh if any or an empty string otherwise.
 
void needsRemoteElemDeletion (bool need_delete)
 Set whether we need to delete remote elements.
 
bool needsRemoteElemDeletion () const
 Whether we need to delete remote elements.
 
void allowRemoteElementRemoval (bool allow_removal)
 Set whether to allow remote element removal.
 
bool allowRemoteElementRemoval () const
 Whether we are allow remote element removal.
 
void deleteRemoteElements ()
 Delete remote elements.
 
bool hasMeshBase () const
 Whether mesh base object was constructed or not.
 
bool hasElementID (const std::string &id_name) const
 Whether mesh has an extra element integer with a given name.
 
unsigned int getElementIDIndex (const std::string &id_name) const
 Return the accessing integer for an extra element integer with its name.
 
dof_id_type maxElementID (unsigned int elem_id_index) const
 Return the maximum element ID for an extra element integer with its accessing index.
 
dof_id_type minElementID (unsigned int elem_id_index) const
 Return the minimum element ID for an extra element integer with its accessing index.
 
bool areElemIDsIdentical (const std::string &id_name1, const std::string &id_name2) const
 Whether or not two extra element integers are identical.
 
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.
 
std::set< dof_id_type > 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.
 
unsigned int getMaxSidesPerElem () const
 Get the maximum number of sides per element.
 
unsigned int getMaxNodesPerElem () const
 Get the maximum number of nodes per element.
 
unsigned int getMaxNodesPerSide () const
 Get the maximum number of nodes per side.
 
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.
 
void cacheFVElementalDoFs () const
 Cache the DoF indices for FV variables on each element.
 
void computeFiniteVolumeCoords () const
 Compute the face coordinate value for all FaceInfo and ElemInfo objects.
 
void isDisplaced (bool is_displaced)
 Set whether this mesh is a displaced mesh.
 
bool isDisplaced () const
 whether this mesh is a displaced mesh
 
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.
 
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem () const
 Get the map from subdomain ID to coordinate system type, e.g.
 
Moose::CoordinateSystemType getUniqueCoordSystem () const
 Get the coordinate system from the mesh, it must be the same in all subdomains otherwise this will error.
 
void setCoordSystem (const std::vector< SubdomainName > &blocks, const MultiMooseEnum &coord_sys)
 Set the coordinate system for the provided blocks to coord_sys.
 
void setAxisymmetricCoordAxis (const MooseEnum &rz_coord_axis)
 For axisymmetric simulations, set the symmetry coordinate axis.
 
void setGeneralAxisymmetricCoordAxes (const std::vector< SubdomainName > &blocks, const std::vector< std::pair< Point, RealVectorValue > > &axes)
 Sets the general coordinate axes for axisymmetric blocks.
 
const std::pair< Point, RealVectorValue > & getGeneralAxisymmetricCoordAxis (SubdomainID subdomain_id) const
 Gets the general axisymmetric coordinate axis for a block.
 
bool usingGeneralAxisymmetricCoordAxes () const
 Returns true if general axisymmetric coordinate axes are being used.
 
unsigned int getAxisymmetricRadialCoord () const
 Returns the desired radial direction for RZ coordinate transformation.
 
void checkCoordinateSystems ()
 Performs a sanity check for every element in the mesh.
 
void setCoordData (const MooseMesh &other_mesh)
 Set the coordinate system data to that of other_mesh.
 
void markFiniteVolumeInfoDirty ()
 Mark the finite volume information as dirty.
 
bool isFiniteVolumeInfoDirty () const
 
MooseAppCoordTransform & coordTransform ()
 
const MooseUnits & lengthUnit () 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.
 
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.
 
void setupFiniteVolumeMeshData () const
 Sets up the additional data needed for finite volume computations.
 
void doingPRefinement (bool doing_p_refinement)
 Indicate whether the kind of adaptivity we're doing includes p-refinement.
 
bool doingPRefinement () const
 Query whether the kind of adaptivity we're doing includes p-refinement.
 
unsigned int maxPLevel () const
 Returns the maximum p-refinement level of all elements.
 
unsigned int maxHLevel () const
 Returns the maximum h-refinement level of all elements.
 
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.
 
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.
 
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.
 
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.
 
void buildPRefinementAndCoarseningMaps (Assembly *assembly)
 
bool hasLowerD () const
 
const std::set< SubdomainID > & interiorLowerDBlocks () const
 
const std::set< SubdomainID > & boundaryLowerDBlocks () const
 
bool getConstructNodeListFromSideList ()
 Return construct node list from side list boolean.
 
bool getDisplaceNodeListBySideList ()
 Return displace node list by side list boolean.
 
bool possiblyRebuildNodeToElemMap ()
 rebuild the node to element map if it's been requsted previously
 
virtual bool enabled () const
 Return the enabled status of the object.
 
std::shared_ptr< MooseObject > getSharedPtr ()
 Get another shared pointer to this object that has the same ownership group.
 
std::shared_ptr< const MooseObject > getSharedPtr () const
 
bool isKokkosObject () const
 Get whether this object is a Kokkos functor The parameter MooseBase::kokkos_object_param is set by the Kokkos base classes.
 
MooseApp & getMooseApp () const
 Get the MooseApp this class is associated with.
 
const std::string & type () const
 Get the type of this class.
 
const std::string & name () const
 Get the name of the class.
 
std::string typeAndName () const
 Get the class's combined type and name; useful in error handling.
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParameters & parameters () const
 Get the parameters of the object.
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object.
 
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.
 
template<typename T >
const T * queryParam (const std::string &name) const
 Query a parameter for the object.
 
template<typename T >
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 Retrieve a renamed parameter for the object.
 
template<typename T >
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.
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid.
 
bool isParamSetByUser (const std::string &name) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default.
 
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.
 
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.
 
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.
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args) const
 
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.
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 Deprecated message prefix; the error type is no longer used.
 
template<typename... Args>
void mooseError (Args &&... args) const
 Emits an error prefixed with object name and type and optionally a file path to the top-level block parameter if available.
 
template<typename... Args>
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
template<typename... Args>
void mooseErrorNonPrefixed (Args &&... args) const
 Emits an error without the prefixing included in mooseError().
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 Emits a warning prefixed with object name and type.
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 Emits a warning without the prefixing included in mooseWarning().
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 Emits a deprecation warning prefixed with the object name and type, and a stack trace.
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseDeprecatedNoTrace (Args &&... args) const
 Emits a deprecation warning prefixed with the object name and type, and no stack trace.
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 Emits an informational message prefixed with the object name and type, unless the application suppresses informational messages.
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 External method for calling moose error with added object context.
 
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
 Deprecated method.
 
std::string getDataFileNameByName (const std::string &relative_path) const
 Deprecated method.
 
std::string getDataFilePath (const std::string &relative_path) const
 Returns the path of a data file for a given relative file path.
 
PerfGraph & perfGraph ()
 Get the PerfGraph.
 
const libMesh::ConstElemRange * getActiveLocalElementRange ()
 Return pointers to range objects for various types of ranges (local nodes, boundary elems, etc.).
 
libMesh::NodeRange * getActiveNodeRange ()
 
SemiLocalNodeRange * getActiveSemiLocalNodeRange () const
 
libMesh::ConstNodeRange * getLocalNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange ()
 
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange ()
 
virtual Real getMinInDimension (unsigned int component) const
 Returns the min or max of the requested dimension respectively.
 
virtual Real getMaxInDimension (unsigned int component) const
 
bool isCustomPartitionerRequested () const
 Setter and getter for _custom_partitioner_requested.
 
void setIsCustomPartitionerRequested (bool cpr)
 
unsigned int nFace () const
 accessors for the FaceInfo objects
 
const std::vector< const FaceInfo * > & faceInfo () const
 Accessor for local FaceInfo objects.
 
const FaceInfo * faceInfo (const Elem *elem, unsigned int side) const
 Accessor for the local FaceInfo object on the side of one element. Returns null if ghosted.
 
face_info_iterator ownedFaceInfoBegin ()
 Iterators to owned faceInfo objects.
 
face_info_iterator ownedFaceInfoEnd ()
 
elem_info_iterator ownedElemInfoBegin ()
 Iterators to owned faceInfo objects.
 
elem_info_iterator ownedElemInfoEnd ()
 
const ElemInfo & elemInfo (const dof_id_type id) const
 Accessor for the elemInfo object for a given element ID.
 
const std::vector< const ElemInfo * > & elemInfoVector () const
 Accessor for the element info objects owned by this process.
 
const std::vector< FaceInfo > & allFaceInfo () const
 Accessor for all FaceInfo objects.
 

Static Public Member Functions

static InputParameters validParams ()
 
static MooseEnum partitioning ()
 returns MooseMesh partitioning options so other classes can use it
 
static MooseEnum elemTypes ()
 returns MooseMesh element type options
 
static void setSubdomainName (MeshBase &mesh, SubdomainID subdomain_id, const SubdomainName &name, const bool synchronous=false)
 This method sets the name for subdomain_id on the provided mesh to name.
 
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.
 
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.
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 External method for calling moose error with added object context.
 

Public Attributes

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

Static Public Attributes

static const std::array< bool, 3 > periodic_dim_default {false, false, false}
 Default value for the automatically detected paired boundaries for each unit dimension, in which the value for each unit dimension is false (not detected).
 
static const std::string type_param = "_type"
 The name of the parameter that contains the object type.
 
static const std::string name_param = "_object_name"
 The name of the parameter that contains the object name.
 
static const std::string unique_name_param = "_unique_name"
 The name of the parameter that contains the unique object name.
 
static const std::string app_param = "_moose_app"
 The name of the parameter that contains the MooseApp.
 
static const std::string moose_base_param = "_moose_base"
 The name of the parameter that contains the moose system base.
 
static const std::string kokkos_object_param = "_kokkos_object"
 The name of the parameter that indicates an object is a Kokkos functor.
 

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

mfem::Mesh buildSerialMFEMMesh () override
 Build and return the serial mfem::Mesh for this object.
 
void buildDummyMooseMesh ()
 Builds a dimension-compatible libMesh placeholder after initializing the MFEM mesh.
 
void uniformRefinement (mfem::Mesh &mesh, const unsigned int nref) const
 Performs a uniform refinement on the chosen mesh nref times.
 
bool allowRecovery () const
 Returns whether this mesh is allowed to read a recovery file.
 
bool hasSingleSubdomain () const
 Whether the elements of the mesh all have the same subdomain, according to the subdomain set that libMesh caches, which cacheInfo() refreshes.
 
void cacheInfo ()
 
void freeBndNodes ()
 
void freeBndElems ()
 
void setPartitionerHelper (MeshBase *mesh=nullptr)
 
template<bool warning>
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 Set solution invalid mark for the given solution ID.
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
template<typename T , typename... Args>
T & declareRestartableData (const std::string &data_name, Args &&... args)
 Declare a piece of data as "restartable" and initialize it.
 
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.
 
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.
 
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.
 
template<typename T , typename... Args>
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 Declare a piece of data as "recoverable" and initialize it.
 
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".
 
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".
 
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.
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing.
 
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.
 
std::string timedSectionName (const std::string &section_name) const
 

Protected Attributes

std::string _mesh_displacement_variable
 Holds name of variable used for mesh displacement, if set.
 
std::shared_ptr< mfem::ParMesh > _mfem_par_mesh {nullptr}
 Smart pointer to mfem::ParMesh object.
 
std::vector< std::unique_ptr< libMesh::GhostingFunctor > > _ghosting_functors
 Deprecated (DO NOT USE)
 
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
 The list of active geometric relationship managers (bound to the underlying MeshBase object).
 
bool _built_from_other_mesh = false
 Whether or not this mesh was built from another mesh.
 
ParallelType _parallel_type
 Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
 
bool _use_distributed_mesh
 False by default.
 
bool _distribution_overridden
 
bool _parallel_type_overridden
 
std::unique_ptr< libMesh::MeshBase > _mesh
 Pointer to underlying libMesh mesh object.
 
std::unique_ptr< Moose::Kokkos::Mesh > _kokkos_mesh
 Pointer to Kokkos mesh object.
 
MooseEnum _partitioner_name
 The partitioner used on this mesh.
 
bool _partitioner_overridden
 
std::unique_ptr< libMesh::Partitioner > _custom_partitioner
 The custom partitioner.
 
bool _custom_partitioner_requested
 
unsigned int _uniform_refine_level
 The level of uniform refinement requested (set to zero if AMR is disabled)
 
bool _skip_refine_when_use_split
 Whether or not to skip uniform refinements when using a pre-split mesh.
 
bool _skip_deletion_repartition_after_refine
 Whether or not skip remote deletion and repartition after uniform refinements.
 
bool _is_changed
 true if mesh is changed (i.e. after adaptivity step)
 
bool _is_nemesis
 True if a Nemesis Mesh was read in.
 
bool _moose_mesh_prepared = false
 True if prepare has been called on the mesh.
 
std::unique_ptr< ConstElemPointerRange > _refined_elements
 The elements that were just refined.
 
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
 The elements that were just coarsened.
 
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
 Map of Parent elements to child elements for elements that were just coarsened.
 
std::set< Node * > _semilocal_node_list
 Used for generating the semilocal node range.
 
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
 Ranges for use with threading, cached so they don't have to get rebuilt all the time (which takes time).
 
std::unique_ptr< libMesh::NodeRange > _active_node_range
 
std::unique_ptr< libMesh::ConstNodeRange > _local_node_range
 
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
 
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
 
std::unordered_map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
 A map of all of the current nodes to the elements that they are connected to.
 
bool _node_to_elem_map_built = false
 Whether _node_to_elem_map has been built.
 
std::set< SubdomainID > _mesh_subdomains
 A set of subdomain IDs currently present in the mesh.
 
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
 The boundary to normal map - valid only when AddAllSideSetsByNormals is active.
 
std::vector< BndNode * > _bnd_nodes
 array of boundary nodes
 
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
 Map of sets of node IDs in each boundary.
 
std::vector< BndElement * > _bnd_elems
 array of boundary elems
 
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.
 
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::unordered_map< dof_id_type, SubdomainID > _node_block
 The subdomain of the elements incident on a node, for the nodes whose incident elements all agree, which is every node away from a subdomain interface.
 
std::unordered_map< dof_id_type, std::set< SubdomainID > > _interface_node_blocks
 The full subdomain set of the nodes whose incident elements disagree, that is the nodes on a subdomain interface.
 
std::unordered_map< SubdomainID, std::set< SubdomainID > > _block_singletons
 For each subdomain, a std::set containing just that subdomain ID, e.g.
 
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]
 
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.
 
unsigned int _ghosting_patch_size
 The number of nearest neighbors to consider for ghosting purposes when iteration patch update strategy is used.
 
unsigned int _max_leaf_size
 
Moose::PatchUpdateType _patch_update_strategy
 The patch update strategy.
 
std::vector< Node * > _node_map
 Vector of all the Nodes in the mesh for determining when to add a new point.
 
bool _regular_orthogonal_mesh
 Boolean indicating whether this mesh was detected to be regular and orthogonal.
 
std::vector< std::vector< Real > > _bounds
 The bounds in each dimension of the mesh for regular orthogonal meshes.
 
std::optional< std::vector< std::pair< BoundaryID, BoundaryID > > > _paired_boundary
 A vector holding the paired boundaries for a regular orthogonal mesh.
 
const bool _is_split
 Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
 
const bool & _enabled
 Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.
 
MooseApp & _app
 The MOOSE application this is associated with.
 
Factory & _factory
 The Factory associated with the MooseApp.
 
ActionFactory & _action_factory
 Builds Actions.
 
const std::string & _type
 The type of this class.
 
const std::string & _name
 The name of this class.
 
const InputParameters & _pars
 The object's parameters.
 
const Parallel::Communicator & _communicator
 
MooseApp & _restartable_app
 Reference to the application.
 
const std::string _restartable_system_name
 The system name this object is in.
 
const THREAD_ID _restartable_tid
 The thread ID for this object.
 
const bool _restartable_read_only
 Flag for toggling read only status (see ReporterData)
 
MooseApp & _pg_moose_app
 The MooseApp that owns the PerfGraph.
 
const std::string _prefix
 A prefix to use for all sections.
 
std::set< BoundaryID > _mesh_boundary_ids
 A set of boundary IDs currently present in the mesh.
 
std::set< BoundaryID > _mesh_sideset_ids
 
std::set< BoundaryID > _mesh_nodeset_ids
 

Private Member Functions

std::unordered_map< dof_id_type, std::vector< dof_id_type > > & internalNodeToElemMap ()
 If not already created, creates a map from every node to all elements to which they are connected.
 
void buildRefinementMap (const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int parent_side, int child, int child_side)
 Build the refinement map for a given element type.
 
void buildCoarseningMap (const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int input_side)
 Build the coarsening map for a given element type.
 
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".
 
void findAdaptivityQpMaps (const Elem *template_elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, std::vector< std::vector< QpMap > > &refinement_map, std::vector< std::pair< unsigned int, QpMap > > &coarsen_map, int parent_side, int child, int child_side)
 Given an elem type, get maps that tell us what qp's are closest to each other between a parent and it's children.
 
void buildHRefinementAndCoarseningMaps (Assembly *assembly)
 
const std::vector< QpMap > & getPRefinementMapHelper (const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > &) const
 
const std::vector< QpMap > & getPCoarseningMapHelper (const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > &) const
 
void updateCoordTransform ()
 Update the coordinate transformation object based on our coordinate system data.
 
void checkDuplicateSubdomainNames ()
 Loop through all subdomain IDs and check if there is name duplication used for the subdomains with same ID.
 
void computeMaxPerElemAndSide ()
 Compute the maximum numbers per element and side.
 
void buildElemIDInfo ()
 Build extra data for faster access to the information of extra element integers.
 
void buildLowerDMesh ()
 Build lower-d mesh for all sides.
 
bool suppressInfo () const
 Whether the application of this object suppresses informational messages.
 
RestartableDataValue & registerRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 Helper function for actually registering the restartable data.
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 Helper function for actually registering the restartable data.
 
template<typename T , typename... Args>
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 Helper function for declaring restartable data.
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 Internal method for getting a hit node (if available) given a set of parameters.
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 Internal method for getting the message prefix for an object (object type, name, etc).
 

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.
 
std::vector< const ElemInfo * > _elem_info
 Holds only those ElemInfo objects that have processor_id equal to this process's id, e.g.
 
std::vector< FaceInfo > _all_face_info
 FaceInfo object storing information for face based loops.
 
std::vector< const FaceInfo * > _face_info
 Holds only those FaceInfo objects that have processor_id equal to this process's id, e.g.
 
std::unordered_map< std::pair< const Elem *, unsigned int >, FaceInfo * > _elem_side_to_face_info
 Map from elem-side pair to FaceInfo.
 
bool _finite_volume_info_dirty = true
 
bool _linear_finite_volume_dofs_cached = false
 
std::map< std::pair< unsigned int, unsigned int >, std::array< bool, 3 > > _periodic_dim
 A map from (system number, vector number) to which dimensions are periodic in a regular orthogonal mesh.
 
RealVectorValue _half_range
 A convenience vector used to hold values in each dimension representing half of the range.
 
std::vector< Node * > _extreme_nodes
 A vector containing the nodes at the corners of a regular orthogonal mesh.
 
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::vector< QpMap > > > _elem_type_to_refinement_map
 Holds mappings for volume to volume and parent side to child side Map key:
 
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
 
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
 
std::map< libMesh::ElemType, std::map< std::pair< int, int >, std::vector< std::vector< QpMap > > > > _elem_type_to_child_side_refinement_map
 Holds mappings for "internal" child sides to parent volume. The second key is (child, child_side).
 
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::pair< unsigned int, QpMap > > > _elem_type_to_coarsening_map
 Holds mappings for volume to volume and parent side to child side Map key:
 
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
 
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_side_map
 
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
 Holds a map from subdomain ids to associated data.
 
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.
 
std::set< SubdomainID > _lower_d_interior_blocks
 Mesh blocks for interior lower-d elements in different types.
 
std::set< SubdomainID > _lower_d_boundary_blocks
 Mesh blocks for boundary lower-d elements in different types.
 
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.
 
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
 
bool _allow_recovery
 Whether or not this Mesh is allowed to read a recovery file.
 
bool _construct_node_list_from_side_list
 Whether or not to allow generation of nodesets from sidesets.
 
bool _displace_node_list_by_side_list
 Whether or not to displace unrelated nodesets by nodesets constructed from sidesets.
 
bool _need_delete
 Whether we need to delete remote elements after init'ing the EquationSystems.
 
bool _allow_remote_element_removal
 Whether to allow removal of remote elements.
 
std::set< Elem * > _ghost_elems_from_ghost_boundaries
 Set of elements ghosted by ghostGhostedBoundaries.
 
bool _need_ghost_ghosted_boundaries
 A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready.
 
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.
 
std::vector< dof_id_type > _max_ids
 Maximum integer ID for each extra element integer.
 
std::vector< dof_id_type > _min_ids
 Minimum integer ID for each extra element integer.
 
std::vector< std::vector< bool > > _id_identical_flag
 Flags to indicate whether or not any two extra element integers are the same.
 
unsigned int _max_sides_per_elem
 The maximum number of sides per element.
 
unsigned int _max_nodes_per_elem
 The maximum number of nodes per element.
 
unsigned int _max_nodes_per_side
 The maximum number of nodes per side.
 
bool _is_displaced
 Whether this mesh is displaced.
 
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
 Type of coordinate system per subdomain.
 
unsigned int _rz_coord_axis
 Storage for RZ axis selection.
 
std::unordered_map< SubdomainID, std::pair< Point, RealVectorValue > > _subdomain_id_to_rz_coord_axis
 Map of subdomain ID to general axisymmetric axis.
 
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.
 
bool _coord_system_set
 Whether the coordinate system has been set.
 
std::vector< SubdomainName > _provided_coord_blocks
 Set for holding user-provided coordinate system type block names.
 
bool _doing_p_refinement
 Whether we have p-refinement (whether exclusively p- or hp-refinement)
 
unsigned int _max_p_level
 Maximum p-refinement level of all elements.
 
unsigned int _max_h_level
 Maximum h-refinement level of all elements.
 
const ParallelParamObject & _parent
 
const MooseBase & _si_moose_base
 The MooseBase that owns this interface.
 
const FEProblemBase * _si_problem
 A pointer to FEProblem base.
 
const RestartableDataMapName _metaname
 Restartable metadata name.
 
std::string _restartable_name
 The name of the object.
 

Detailed Description

MooseMesh subclass that consumes the MeshGenerator pipeline to build an mfem::ParMesh.

It is the MFEM analog of MeshGeneratorMesh: use it as the [Mesh] type (or let SetupMeshAction auto-select it) whenever one or more MFEMMeshGenerator objects are present.

Common MFEM mesh infrastructure lives in the MFEMMesh base class; this class implements buildSerialMFEMMesh() to extract the mfem::Mesh from the MFEMMeshCarrier produced by the generator pipeline.

Definition at line 26 of file MFEMMeshGeneratorMesh.h.

Member Typedef Documentation

◆ bnd_elem_iterator_imp

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

Definition at line 1718 of file MooseMesh.h.

◆ bnd_node_iterator_imp

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

Definition at line 1711 of file MooseMesh.h.

◆ const_bnd_elem_iterator_imp

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

Definition at line 1719 of file MooseMesh.h.

◆ const_bnd_node_iterator_imp

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

Definition at line 1712 of file MooseMesh.h.

◆ DataFileParameterType

using DataFileInterface::DataFileParameterType = DataFileName
inherited

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

Definition at line 27 of file DataFileInterface.h.

◆ PeriodicNodeInfo

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

Helper type for building periodic node maps.

Definition at line 1227 of file MooseMesh.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited

Convenience enums.

Enumerator
X 
Y 
Z 

Definition at line 1625 of file MooseMesh.h.

1626 {
1627 X = 0,
1628 Y,
1629 Z
1630 };

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
MIN 
MAX 

Definition at line 1631 of file MooseMesh.h.

1632 {
1633 MIN = 0,
1634 MAX
1635 };

◆ ParallelType

enum class MooseMesh::ParallelType
stronginherited
Enumerator
DEFAULT 
REPLICATED 
DISTRIBUTED 

Definition at line 117 of file MooseMesh.h.

Constructor & Destructor Documentation

◆ MFEMMeshGeneratorMesh()

MFEMMeshGeneratorMesh::MFEMMeshGeneratorMesh ( const InputParameters &  parameters)

Definition at line 33 of file MFEMMeshGeneratorMesh.C.

35{
36}
Abstract MooseMesh base for all MFEM-backed mesh types (MFEMFileMesh, MFEMMeshGeneratorMesh).
Definition MFEMMesh.h:24
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131

Member Function Documentation

◆ activeLocalElementsBegin() [1/2]

MeshBase::element_iterator MooseMesh::activeLocalElementsBegin ( )
inherited

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

Definition at line 3159 of file MooseMesh.C.

3160{
3161 return getMesh().active_local_elements_begin();
3162}
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition MooseMesh.C:3581

Referenced by FEProblemBase::checkDisplacementNodes(), and MooseMesh::hasSecondOrderElements().

◆ activeLocalElementsBegin() [2/2]

MeshBase::const_element_iterator MooseMesh::activeLocalElementsBegin ( ) const
inherited

Definition at line 3171 of file MooseMesh.C.

3172{
3173 return getMesh().active_local_elements_begin();
3174}

◆ activeLocalElementsEnd() [1/2]

const MeshBase::element_iterator MooseMesh::activeLocalElementsEnd ( )
inherited

Definition at line 3165 of file MooseMesh.C.

3166{
3167 return getMesh().active_local_elements_end();
3168}

Referenced by FEProblemBase::checkDisplacementNodes(), and MooseMesh::hasSecondOrderElements().

◆ activeLocalElementsEnd() [2/2]

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

Definition at line 3177 of file MooseMesh.C.

3178{
3179 return getMesh().active_local_elements_end();
3180}

◆ addGhostedBoundary()

void MooseMesh::addGhostedBoundary ( BoundaryID  boundary_id)
inherited

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

Definition at line 3337 of file MooseMesh.C.

3338{
3339 _ghosted_boundaries.insert(boundary_id);
3340}
std::set< unsigned int > _ghosted_boundaries
Definition MooseMesh.h:1754

Referenced by FEProblemBase::addGhostedBoundary().

◆ addPeriodicVariable()

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

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

2206{
2208 return;
2209
2210 const auto key = std::make_pair(sys_num, var_num);
2211 auto & entry = _periodic_dim.try_emplace(key, periodic_dim_default).first->second;
2212
2213 _half_range = Point(dimensionWidth(0) / 2.0, dimensionWidth(1) / 2.0, dimensionWidth(2) / 2.0);
2214
2215 bool component_found = false;
2216 for (const auto component : make_range(dimension()))
2217 {
2218 const std::pair<BoundaryID, BoundaryID> * boundary_ids = getPairedBoundaryMapping(component);
2219
2220 if (boundary_ids && ((boundary_ids->first == primary && boundary_ids->second == secondary) ||
2221 (boundary_ids->first == secondary && boundary_ids->second == primary)))
2222 {
2223 entry[component] = true;
2224 component_found = true;
2225 }
2226 }
2227
2228 if (!component_found)
2229 mooseWarning("Could not find a match between boundary '",
2230 getBoundaryName(primary),
2231 "' and '",
2232 getBoundaryName(secondary),
2233 "' to set periodic boundary conditions for variable (index:",
2234 var_num,
2235 ") in either the X, Y or Z direction. The periodic dimension of the mesh for this "
2236 "variable will not be stored.");
2237}
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition MooseMesh.C:2993
static const std::array< bool, 3 > periodic_dim_default
Default value for the automatically detected paired boundaries for each unit dimension,...
Definition MooseMesh.h:80
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition MooseMesh.C:2178
const std::string & getBoundaryName(const BoundaryID boundary_id) const
Return the name of the boundary given the id.
Definition MooseMesh.C:1787
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition MooseMesh.h:1773
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping(unsigned int component) const
This function attempts to return the paired boundary ids for the given component.
Definition MooseMesh.C:2350
std::map< std::pair< unsigned int, unsigned int >, std::array< bool, 3 > > _periodic_dim
A map from (system number, vector number) to which dimensions are periodic in a regular orthogonal me...
Definition MooseMesh.h:1830
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range.
Definition MooseMesh.h:1835
void mooseWarning(Args &&... args) const
IntRange< T > make_range(T beg, T end)

Referenced by AddPeriodicBCAction::onSetupPeriodicBoundary().

◆ addQuadratureNode()

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

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

1607{
1608 Node * qnode;
1609
1610 if (_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) ==
1612 {
1613 // Create a new node id starting from the max node id and counting down. This will be the least
1614 // likely to collide with an existing node id.
1615 // Note that we are using numeric_limits<unsigned>::max even
1616 // though max_id is stored as a dof_id_type. I tried this with
1617 // numeric_limits<dof_id_type>::max and it broke several tests in
1618 // MOOSE. So, this is some kind of a magic number that we will
1619 // just continue to use...
1620 dof_id_type max_id = std::numeric_limits<unsigned int>::max() - 100;
1621 dof_id_type new_id = max_id - _quadrature_nodes.size();
1622
1623 if (new_id <= getMesh().max_node_id())
1624 mooseError("Quadrature node id collides with existing node id!");
1625
1626 qnode = new Node(point, new_id);
1627
1628 // Keep track of this new node in two different ways for easy lookup
1629 _quadrature_nodes[new_id] = qnode;
1630 _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp] = qnode;
1631
1632 if (elem->active())
1633 internalNodeToElemMap()[new_id].push_back(elem->id());
1634 }
1635 else
1636 qnode = _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
1637
1638 BndNode * bnode = new BndNode(qnode, bid);
1639 _bnd_nodes.push_back(bnode);
1640 _bnd_node_ids[bid].insert(qnode->id());
1641
1642 _extra_bnd_nodes.push_back(*bnode);
1643
1644 // Do this so the range will be regenerated next time it is accessed
1645 _bnd_node_range.reset();
1646
1647 return qnode;
1648}
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition MooseBase.h:271
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition MooseMesh.C:3207
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition MooseMesh.h:1679
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:1726
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition MooseMesh.h:1710
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:1714
std::map< dof_id_type, Node * > _quadrature_nodes
Definition MooseMesh.h:1724
std::vector< BndNode > _extra_bnd_nodes
Definition MooseMesh.h:1727
std::unordered_map< dof_id_type, std::vector< dof_id_type > > & internalNodeToElemMap()
If not already created, creates a map from every node to all elements to which they are connected.
Definition MooseMesh.C:1222
uint8_t dof_id_type

Referenced by GeometricSearchData::generateQuadratureNodes().

◆ addUniqueNode()

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

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

1569{
1574 if (getMesh().n_nodes() != _node_map.size())
1575 {
1576 _node_map.clear();
1577 _node_map.reserve(getMesh().n_nodes());
1578 for (const auto & node : getMesh().node_ptr_range())
1579 _node_map.push_back(node);
1580 }
1581
1582 Node * node = nullptr;
1583 for (unsigned int i = 0; i < _node_map.size(); ++i)
1584 {
1585 if (p.relative_fuzzy_equals(*_node_map[i], tol))
1586 {
1587 node = _node_map[i];
1588 break;
1589 }
1590 }
1591 if (node == nullptr)
1592 {
1593 node = getMesh().add_node(new Node(p));
1594 _node_map.push_back(node);
1595 }
1596
1597 mooseAssert(node != nullptr, "Node is NULL");
1598 return node;
1599}
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition MooseMesh.C:842
std::vector< Node * > _node_map
Vector of all the Nodes in the mesh for determining when to add a new point.
Definition MooseMesh.h:1770
const dof_id_type n_nodes

◆ allFaceInfo()

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

Accessor for all FaceInfo objects.

Definition at line 2385 of file MooseMesh.h.

2386{
2387 return _all_face_info;
2388}
std::vector< FaceInfo > _all_face_info
FaceInfo object storing information for face based loops.
Definition MooseMesh.h:1806

◆ allowRecovery() [1/2]

bool MooseMesh::allowRecovery ( ) const
inlineprotectedinherited

Returns whether this mesh is allowed to read a recovery file.

Definition at line 1586 of file MooseMesh.h.

1586{ return _allow_recovery; }
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition MooseMesh.h:2009

Referenced by MFEMMesh::init().

◆ allowRecovery() [2/2]

void MooseMesh::allowRecovery ( bool  allow)
inlineinherited

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

Definition at line 1184 of file MooseMesh.h.

1184{ _allow_recovery = allow; }

Referenced by SampledOutput::cloneMesh().

◆ allowRemoteElementRemoval() [1/2]

bool MooseMesh::allowRemoteElementRemoval ( ) const
inlineinherited

Whether we are allow remote element removal.

Definition at line 1247 of file MooseMesh.h.

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

Referenced by MooseMesh::MooseMesh().

◆ allowRemoteElementRemoval() [2/2]

void MooseMesh::allowRemoteElementRemoval ( bool  allow_removal)
inherited

Set whether to allow remote element removal.

Definition at line 4081 of file MooseMesh.C.

4082{
4083 _allow_remote_element_removal = allow_remote_element_removal;
4084 if (_mesh)
4085 _mesh->allow_remote_element_removal(allow_remote_element_removal);
4086
4087 if (!allow_remote_element_removal)
4088 // If we're not allowing remote element removal now, then we will need deletion later after
4089 // late geoemetric ghosting functors have been added (late geometric ghosting functor addition
4090 // happens when algebraic ghosting functors are added)
4091 _need_delete = true;
4092}
bool _need_delete
Whether we need to delete remote elements after init'ing the EquationSystems.
Definition MooseMesh.h:2019
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition MooseMesh.h:1609

Referenced by MooseApp::attachRelationshipManagers(), and XYTriangleBoundaryLayerGenerator::generate().

◆ areElemIDsIdentical()

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

Whether or not two extra element integers are identical.

Definition at line 2371 of file MooseMesh.h.

2372{
2373 auto id1 = getElementIDIndex(id_name1);
2374 auto id2 = getElementIDIndex(id_name2);
2375 return _id_identical_flag[id1][id2];
2376}
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:2040
unsigned int getElementIDIndex(const std::string &id_name) const
Return the accessing integer for an extra element integer with its name.
Definition MooseMesh.h:2363

◆ bndElemsBegin()

MooseMesh::bnd_elem_iterator MooseMesh::bndElemsBegin ( )
virtualinherited

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

Definition at line 1553 of file MooseMesh.C.

1554{
1556 return bnd_elem_iterator(_bnd_elems.begin(), _bnd_elems.end(), p);
1557}
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition MooseMesh.h:1717

Referenced by MooseMesh::getBoundaryElementRange().

◆ bndElemsEnd()

MooseMesh::bnd_elem_iterator MooseMesh::bndElemsEnd ( )
virtualinherited

Definition at line 1561 of file MooseMesh.C.

1562{
1564 return bnd_elem_iterator(_bnd_elems.end(), _bnd_elems.end(), p);
1565}

Referenced by MooseMesh::getBoundaryElementRange().

◆ bndNodesBegin()

MooseMesh::bnd_node_iterator MooseMesh::bndNodesBegin ( )
virtualinherited

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

Definition at line 1537 of file MooseMesh.C.

1538{
1540 return bnd_node_iterator(_bnd_nodes.begin(), _bnd_nodes.end(), p);
1541}

Referenced by MooseMesh::getBoundaryNodeRange().

◆ bndNodesEnd()

MooseMesh::bnd_node_iterator MooseMesh::bndNodesEnd ( )
virtualinherited

Definition at line 1545 of file MooseMesh.C.

1546{
1548 return bnd_node_iterator(_bnd_nodes.end(), _bnd_nodes.end(), p);
1549}

Referenced by MooseMesh::getBoundaryNodeRange().

◆ boundaryLowerDBlocks()

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

Definition at line 1567 of file MooseMesh.h.

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

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

◆ buildActiveSideList()

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

Calls BoundaryInfo::build_active_side_list.

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

Definition at line 3123 of file MooseMesh.C.

3124{
3125 return getMesh().get_boundary_info().build_active_side_list();
3126}

Referenced by MooseMesh::buildFiniteVolumeInfo().

◆ buildBndElemList()

void MooseMesh::buildBndElemList ( )
inherited

Definition at line 1199 of file MooseMesh.C.

1200{
1201 TIME_SECTION("buildBndElemList", 5, "Building Boundary Elements List");
1202
1203 freeBndElems();
1204
1205 auto bc_tuples = getMesh().get_boundary_info().build_active_side_list();
1206
1207 int n = bc_tuples.size();
1208 _bnd_elems.clear();
1209 _bnd_elems.reserve(n);
1210 for (const auto & t : bc_tuples)
1211 {
1212 auto elem_id = std::get<0>(t);
1213 auto side_id = std::get<1>(t);
1214 auto bc_id = std::get<2>(t);
1215
1216 _bnd_elems.push_back(new BndElement(getMesh().elem_ptr(elem_id), side_id, bc_id));
1217 _bnd_elem_ids[bc_id].insert(elem_id);
1218 }
1219}
void freeBndElems()
Definition MooseMesh.C:385
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:1722
const boundary_id_type side_id

Referenced by MooseMesh::update().

◆ buildCoarseningMap()

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

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

2610{
2611 TIME_SECTION("buildCoarseningMap", 5, "Building Coarsening Map");
2612
2613 std::pair<int, ElemType> the_pair(input_side, elem.type());
2614
2616 mooseError("Already built a qp coarsening map!");
2617
2618 std::vector<std::vector<QpMap>> refinement_map;
2619 std::vector<std::pair<unsigned int, QpMap>> & coarsen_map =
2621
2622 // The -1 here is for a specific child. We don't do that for coarsening maps
2623 // Also note that we're always mapping the same side to the same side (which is guaranteed by
2624 // libMesh).
2626 &elem, qrule, qrule_face, refinement_map, coarsen_map, input_side, -1, input_side);
2627
2634}
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::pair< unsigned int, QpMap > > > _elem_type_to_coarsening_map
Holds mappings for volume to volume and parent side to child side Map key:
Definition MooseMesh.h:1976
void findAdaptivityQpMaps(const Elem *template_elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, std::vector< std::vector< QpMap > > &refinement_map, std::vector< std::pair< unsigned int, QpMap > > &coarsen_map, int parent_side, int child, int child_side)
Given an elem type, get maps that tell us what qp's are closest to each other between a parent and it...
Definition MooseMesh.C:2679

Referenced by MooseMesh::buildHRefinementAndCoarseningMaps().

◆ buildDummyMooseMesh()

void MFEMMesh::buildDummyMooseMesh ( )
protectedinherited

Builds a dimension-compatible libMesh placeholder after initializing the MFEM mesh.

Definition at line 143 of file MFEMMesh.C.

144{
145 // The libMesh placeholder is always replicated, independently of the distributed MFEM mesh.
147 auto & dummy = cast_ref<UnstructuredMesh &>(getMesh());
148 MeshTools::Generation::build_point(dummy);
149 if (dimension() >= 2)
150 MeshTools::Generation::build_square(dummy, 1, 1, 0., 1., 0., 1., ElemType::QUAD9);
151}
unsigned int dimension() const override
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition MFEMMesh.h:65
void setParallelType(ParallelType parallel_type)
Allow to change parallel type.
Definition MooseMesh.h:2350

Referenced by MFEMMesh::buildMesh().

◆ buildElemIDInfo()

void MooseMesh::buildElemIDInfo ( )
privateinherited

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

Definition at line 1103 of file MooseMesh.C.

1104{
1105 unsigned int n = getMesh().n_elem_integers() + 1;
1106
1107 _block_id_mapping.clear();
1108 _max_ids.clear();
1109 _min_ids.clear();
1110 _id_identical_flag.clear();
1111
1112 _block_id_mapping.resize(n);
1113 _max_ids.resize(n, std::numeric_limits<dof_id_type>::min());
1114 _min_ids.resize(n, std::numeric_limits<dof_id_type>::max());
1115 _id_identical_flag.resize(n, std::vector<bool>(n, true));
1116 for (const auto & elem : getMesh().active_local_element_ptr_range())
1117 for (unsigned int i = 0; i < n; ++i)
1118 {
1119 auto id = (i == n - 1 ? elem->subdomain_id() : elem->get_extra_integer(i));
1120 _block_id_mapping[i][elem->subdomain_id()].insert(id);
1121 if (id > _max_ids[i])
1122 _max_ids[i] = id;
1123 if (id < _min_ids[i])
1124 _min_ids[i] = id;
1125 for (unsigned int j = 0; j < n; ++j)
1126 {
1127 auto idj = (j == n - 1 ? elem->subdomain_id() : elem->get_extra_integer(j));
1128 if (i != j && _id_identical_flag[i][j] && id != idj)
1129 _id_identical_flag[i][j] = false;
1130 }
1131 }
1132
1133 for (unsigned int i = 0; i < n; ++i)
1134 {
1135 for (auto & blk : meshSubdomains())
1136 comm().set_union(_block_id_mapping[i][blk]);
1138 }
1139 comm().max(_max_ids);
1140 comm().min(_min_ids);
1141}
for(PetscInt i=0;i< nvars;++i)
void ErrorVector unsigned int
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:2034
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition MooseMesh.C:3279
std::vector< dof_id_type > _max_ids
Maximum integer ID for each extra element integer.
Definition MooseMesh.h:2036
std::vector< dof_id_type > _min_ids
Minimum integer ID for each extra element integer.
Definition MooseMesh.h:2038
void max(const T &r, T &o, Request &req) const
void min(const T &r, T &o, Request &req) const
const Parallel::Communicator & comm() const

Referenced by MooseMesh::update().

◆ buildFiniteVolumeInfo()

void MooseMesh::buildFiniteVolumeInfo ( ) const
inherited

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

3890{
3891 mooseAssert(!Threads::in_threads,
3892 "This routine has not been implemented for threads. Please query this routine before "
3893 "a threaded region or contact a MOOSE developer to discuss.");
3895
3896 using Keytype = std::pair<const Elem *, unsigned short int>;
3897
3898 // create a map from elem/side --> boundary ids
3899 std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> side_list =
3901 std::map<Keytype, std::set<boundary_id_type>> side_map;
3902 for (auto & [elem_id, side, bc_id] : side_list)
3903 {
3904 const Elem * elem = _mesh->elem_ptr(elem_id);
3905 Keytype key(elem, side);
3906 auto & bc_set = side_map[key];
3907 bc_set.insert(bc_id);
3908 }
3909
3910 _face_info.clear();
3911 _all_face_info.clear();
3913
3914 _elem_to_elem_info.clear();
3915 _elem_info.clear();
3916
3917 // by performing the element ID comparison check in the below loop, we are ensuring that we never
3918 // double count face contributions. If a face lies along a process boundary, the only process that
3919 // will contribute to both sides of the face residuals/Jacobians will be the process that owns the
3920 // element with the lower ID.
3921 auto begin = getMesh().active_elements_begin();
3922 auto end = getMesh().active_elements_end();
3923
3924 // We prepare a map connecting the Elem* and the corresponding ElemInfo
3925 // for the active elements.
3927 unsigned int num_sides = 0;
3928 for (const Elem * elem : as_range(begin, end))
3929 {
3930 _elem_to_elem_info.emplace(elem->id(), elem);
3931 num_sides += elem->n_sides();
3932 }
3933
3934 // Used to speed up FaceInfo creation:
3935 // - element side builder that caches per type of element
3936 libMesh::ElemSideBuilder side_builder;
3937
3938 _all_face_info.reserve(num_sides / 2);
3939 dof_id_type face_index = 0;
3940 for (const Elem * elem : as_range(begin, end))
3941 {
3942 for (unsigned int side = 0; side < elem->n_sides(); ++side)
3943 {
3944 // get the neighbor element
3945 const Elem * neighbor = elem->neighbor_ptr(side);
3946
3947 // Check if the FaceInfo shall belong to the element. If yes,
3948 // create and initialize the FaceInfo. We need this to ensure that
3949 // we do not duplicate FaceInfo-s.
3950 if (Moose::FV::elemHasFaceInfo(*elem, neighbor))
3951 {
3952 mooseAssert(!neighbor || (neighbor->level() < elem->level() ? neighbor->active() : true),
3953 "If the neighbor is coarser than the element, we expect that the neighbor must "
3954 "be active.");
3955
3956 // We construct the faceInfo using the elementinfo and side index
3957 mooseAssert(elem->default_order() < 4, "Did not expect such high element orders in FV");
3958 _all_face_info.emplace_back(
3959 &_elem_to_elem_info[elem->id()], side, face_index++, side_builder);
3960
3961 auto & fi = _all_face_info.back();
3962
3963 // get all the sidesets that this face is contained in and cache them
3964 // in the face info.
3965 std::set<boundary_id_type> & boundary_ids = fi.boundaryIDs();
3966 boundary_ids.clear();
3967
3968 // We initialize the weights/other information in faceInfo. If the neighbor does not exist
3969 // or is remote (so when we are on some sort of mesh boundary), we initialize the ghost
3970 // cell and use it to compute the weights corresponding to the faceInfo.
3971 if (!neighbor || neighbor == libMesh::remote_elem)
3972 fi.computeBoundaryCoefficients();
3973 else
3974 fi.computeInternalCoefficients(&_elem_to_elem_info[neighbor->id()]);
3975
3976 auto lit = side_map.find(Keytype(&fi.elem(), fi.elemSideID()));
3977 if (lit != side_map.end())
3978 boundary_ids.insert(lit->second.begin(), lit->second.end());
3979
3980 if (fi.neighborPtr())
3981 {
3982 auto rit = side_map.find(Keytype(fi.neighborPtr(), fi.neighborSideID()));
3983 if (rit != side_map.end())
3984 boundary_ids.insert(rit->second.begin(), rit->second.end());
3985 }
3986 }
3987 }
3988 }
3989
3990 // Build the local face info and elem_side to face info maps. We need to do this after
3991 // _all_face_info is finished being constructed because emplace_back invalidates all iterators and
3992 // references if ever the new size exceeds capacity
3994 // heuristic to avoid resizing too much
3995 _face_info.reserve(_all_face_info.size());
3996 for (auto & fi : _all_face_info)
3997 {
3998 const Elem * const elem = &fi.elem();
3999 const auto side = fi.elemSideID();
4000
4001#ifndef NDEBUG
4002 auto pair_it =
4003#endif
4004 _elem_side_to_face_info.emplace(std::make_pair(elem, side), &fi);
4005 mooseAssert(pair_it.second, "We should be adding unique FaceInfo objects.");
4006
4007 // We will add the faces on processor boundaries to the list of face infos on each
4008 // associated processor.
4009 if (fi.elem().processor_id() == this->processor_id() ||
4010 (fi.neighborPtr() && (fi.neighborPtr()->processor_id() == this->processor_id())))
4011 _face_info.push_back(&fi);
4012 }
4013
4014 _elem_info.reserve(nActiveLocalElem());
4015 for (auto & ei : _elem_to_elem_info)
4016 if (ei.second.elem()->processor_id() == this->processor_id())
4017 _elem_info.push_back(&ei.second);
4018}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
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:1798
std::vector< const FaceInfo * > _face_info
Holds only those FaceInfo objects that have processor_id equal to this process's id,...
Definition MooseMesh.h:1810
virtual dof_id_type nActiveLocalElem() const
Definition MooseMesh.h:338
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:1814
bool _finite_volume_info_dirty
Definition MooseMesh.h:1817
std::vector< const ElemInfo * > _elem_info
Holds only those ElemInfo objects that have processor_id equal to this process's id,...
Definition MooseMesh.h:1802
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildActiveSideList() const
Calls BoundaryInfo::build_active_side_list.
Definition MooseMesh.C:3123
processor_id_type processor_id() const
bool elemHasFaceInfo(const Elem &elem, const Elem *const neighbor)
This function infers based on elements if the faceinfo between them belongs to the element or not.
Definition FVUtils.C:21
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
const RemoteElem * remote_elem

Referenced by MooseMesh::setupFiniteVolumeMeshData().

◆ buildHRefinementAndCoarseningMaps()

void MooseMesh::buildHRefinementAndCoarseningMaps ( Assembly *  assembly)
privateinherited

Definition at line 2369 of file MooseMesh.C.

2370{
2371 std::map<ElemType, Elem *> canonical_elems;
2372
2373 // First, loop over all elements and find a canonical element for each type
2374 // Doing it this way guarantees that this is going to work in parallel
2375 for (const auto & elem : getMesh().element_ptr_range()) // TODO: Thread this
2376 {
2377 ElemType type = elem->type();
2378
2379 if (canonical_elems.find(type) ==
2380 canonical_elems.end()) // If we haven't seen this type of elem before save it
2381 canonical_elems[type] = elem;
2382 else
2383 {
2384 Elem * stored = canonical_elems[type];
2385 if (elem->id() < stored->id()) // Arbitrarily keep the one with a lower id
2386 canonical_elems[type] = elem;
2387 }
2388 }
2389 // Now build the maps using these templates
2390 // Note: This MUST be done NOT threaded!
2391 for (const auto & can_it : canonical_elems)
2392 {
2393 Elem * elem = can_it.second;
2394
2395 // Need to do this just once to get the right qrules put in place
2396 assembly->setCurrentSubdomainID(elem->subdomain_id());
2397 assembly->reinit(elem);
2398 assembly->reinit(elem, 0);
2399 auto && qrule = assembly->writeableQRule();
2400 auto && qrule_face = assembly->writeableQRuleFace();
2401
2402 // Volume to volume projection for refinement
2403 buildRefinementMap(*elem, *qrule, *qrule_face, -1, -1, -1);
2404
2405 // Volume to volume projection for coarsening
2406 buildCoarseningMap(*elem, *qrule, *qrule_face, -1);
2407
2408 // Map the sides of children
2409 for (unsigned int side = 0; side < elem->n_sides(); side++)
2410 {
2411 // Side to side for sides that match parent's sides
2412 buildRefinementMap(*elem, *qrule, *qrule_face, side, -1, side);
2413 buildCoarseningMap(*elem, *qrule, *qrule_face, side);
2414 }
2415
2416 // Child side to parent volume mapping for "internal" child sides
2417 for (unsigned int child = 0; child < elem->n_children(); ++child)
2418 for (unsigned int side = 0; side < elem->n_sides();
2419 ++side) // Assume children have the same number of sides!
2420 if (!elem->is_child_on_side(child, side)) // Otherwise we already computed that map
2421 buildRefinementMap(*elem, *qrule, *qrule_face, -1, child, side);
2422 }
2423}
libMesh::QBase *const & writeableQRule()
Returns the reference to the current quadrature being used.
Definition Assembly.h:233
libMesh::QBase *const & writeableQRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition Assembly.h:318
void setCurrentSubdomainID(SubdomainID i)
set the current subdomain ID
Definition Assembly.h:420
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition Assembly.C:1875
const std::string & type() const
Get the type of this class.
Definition MooseBase.h:93
void buildRefinementMap(const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int parent_side, int child, int child_side)
Build the refinement map for a given element type.
Definition MooseMesh.C:2530
void buildCoarseningMap(const Elem &elem, libMesh::QBase &qrule, libMesh::QBase &qrule_face, int input_side)
Build the coarsening map for a given element type.
Definition MooseMesh.C:2609

Referenced by MooseMesh::buildRefinementAndCoarseningMaps().

◆ buildLowerDMesh()

void MooseMesh::buildLowerDMesh ( )
privateinherited

Build lower-d mesh for all sides.

Definition at line 678 of file MooseMesh.C.

679{
680 auto & mesh = getMesh();
681
682 if (!mesh.is_serial())
684 "Hybrid finite element method must use replicated mesh.\nCurrently lower-dimensional mesh "
685 "does not support mesh re-partitioning and a debug assertion being hit related with "
686 "neighbors of lower-dimensional element, with distributed mesh.");
687
688 // Lower-D element build requires neighboring element information
689 if (!mesh.is_prepared())
690 mesh.find_neighbors();
691
692 // maximum number of sides of all elements
693 unsigned int max_n_sides = 0;
694
695 // remove existing lower-d element first
696 std::set<Elem *> deleteable_elems;
697 for (auto & elem : mesh.element_ptr_range())
698 if (_lower_d_interior_blocks.count(elem->subdomain_id()) ||
699 _lower_d_boundary_blocks.count(elem->subdomain_id()))
700 deleteable_elems.insert(elem);
701 else if (elem->n_sides() > max_n_sides)
702 max_n_sides = elem->n_sides();
703
704 for (auto & elem : deleteable_elems)
705 mesh.delete_elem(elem);
706 for (const auto & id : _lower_d_interior_blocks)
707 _mesh_subdomains.erase(id);
708 for (const auto & id : _lower_d_boundary_blocks)
709 _mesh_subdomains.erase(id);
712
713 mesh.comm().max(max_n_sides);
714
715 deleteable_elems.clear();
716
717 // get all side types
718 std::set<int> interior_side_types;
719 std::set<int> boundary_side_types;
720 for (const auto & elem : mesh.active_element_ptr_range())
721 for (const auto side : elem->side_index_range())
722 {
723 Elem * neig = elem->neighbor_ptr(side);
724 std::unique_ptr<Elem> side_elem(elem->build_side_ptr(side));
725 if (neig)
726 interior_side_types.insert(side_elem->type());
727 else
728 boundary_side_types.insert(side_elem->type());
729 }
730 mesh.comm().set_union(interior_side_types);
731 mesh.comm().set_union(boundary_side_types);
732
733 // assign block ids for different side types
734 std::map<ElemType, SubdomainID> interior_block_ids;
735 std::map<ElemType, SubdomainID> boundary_block_ids;
736 // we assume this id is not used by the mesh
738 for (const auto & tpid : interior_side_types)
739 {
740 const auto type = ElemType(tpid);
741 mesh.set_subdomain_name(
742 id, "INTERNAL_SIDE_LOWERD_SUBDOMAIN_" + Utility::enum_to_string(type), true);
743 interior_block_ids[type] = id;
744 _lower_d_interior_blocks.insert(id);
745 if (_mesh_subdomains.count(id) > 0)
746 mooseError("Trying to add a mesh block with id ", id, " that has existed in the mesh");
747 _mesh_subdomains.insert(id);
748 --id;
749 }
750 for (const auto & tpid : boundary_side_types)
751 {
752 const auto type = ElemType(tpid);
753 mesh.set_subdomain_name(
754 id, "BOUNDARY_SIDE_LOWERD_SUBDOMAIN_" + Utility::enum_to_string(type), true);
755 boundary_block_ids[type] = id;
756 _lower_d_boundary_blocks.insert(id);
757 if (_mesh_subdomains.count(id) > 0)
758 mooseError("Trying to add a mesh block with id ", id, " that has existed in the mesh");
759 _mesh_subdomains.insert(id);
760 --id;
761 }
762
763 dof_id_type max_elem_id = mesh.max_elem_id();
764 unique_id_type max_unique_id = mesh.parallel_max_unique_id();
765
766 std::vector<Elem *> side_elems;
768 for (const auto & elem : mesh.active_element_ptr_range())
769 {
770 // skip existing lower-d elements
771 if (elem->interior_parent())
772 continue;
773
774 for (const auto side : elem->side_index_range())
775 {
776 Elem * neig = elem->neighbor_ptr(side);
777
778 bool build_side = false;
779 if (!neig)
780 build_side = true;
781 else
782 {
783 mooseAssert(!neig->is_remote(), "We error if the mesh is not serial");
784 if (!neig->active())
785 build_side = true;
786 else if (neig->level() == elem->level() && elem->id() < neig->id())
787 build_side = true;
788 }
789
790 if (build_side)
791 {
792 std::unique_ptr<Elem> side_elem(elem->build_side_ptr(side));
793
794 // The side will be added with the same processor id as the parent.
795 side_elem->processor_id() = elem->processor_id();
796
797 // Add subdomain ID
798 if (neig)
799 side_elem->subdomain_id() = interior_block_ids.at(side_elem->type());
800 else
801 side_elem->subdomain_id() = boundary_block_ids.at(side_elem->type());
802
803 // set ids consistently across processors (these ids will be temporary)
804 side_elem->set_id(max_elem_id + elem->id() * max_n_sides + side);
805 side_elem->set_unique_id(max_unique_id + elem->id() * max_n_sides + side);
806
807 // Also assign the side's interior parent, so it is always
808 // easy to figure out the Elem we came from.
809 // Note: the interior parent could be a ghost element.
810 side_elem->set_interior_parent(elem);
811
812 side_elems.push_back(side_elem.release());
813
814 // add link between higher d element to lower d element
815 auto pair = std::make_pair(elem, side);
816 auto link = std::make_pair(pair, side_elems.back());
817 auto ilink = std::make_pair(side_elems.back(), side);
820 }
821 }
822 }
823
824 // finally, add the lower-dimensional element to the mesh
825 // Note: lower-d interior element will exist on a processor if its associated interior
826 // parent exists on a processor whether or not being a ghost. Lower-d elements will
827 // get its interior parent's processor id.
828 for (auto & elem : side_elems)
829 mesh.add_elem(elem);
830
831 // we do all the stuff in prepare_for_use such as renumber_nodes_and_elements(),
832 // update_parallel_id_counts(), cache_elem_dims(), etc. except partitioning here.
833 const bool skip_partitioning_old = mesh.skip_partitioning();
834 mesh.skip_partitioning(true);
835 // Finding neighbors is ambiguous for lower-dimensional elements on interior faces
836 mesh.allow_find_neighbors(false);
837 mesh.prepare_for_use();
838 mesh.skip_partitioning(skip_partitioning_old);
839}
unsigned int count
Definition MortarUtils.C:53
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:2005
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition MooseMesh.h:1693
std::set< SubdomainID > _lower_d_interior_blocks
Mesh blocks for interior lower-d elements in different types.
Definition MooseMesh.h:2000
std::unordered_map< const Elem *, unsigned short int > _lower_d_elem_to_higher_d_elem_side
Definition MooseMesh.h:2006
static constexpr subdomain_id_type invalid_subdomain_id
MeshBase & mesh
std::string enum_to_string(const T e)
uint8_t unique_id_type

Referenced by MooseMesh::init().

◆ buildMesh()

void MFEMMesh::buildMesh ( )
finaloverridevirtualinherited

Must be overridden by child classes.

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

Implements MooseMesh.

Definition at line 74 of file MFEMMesh.C.

75{
76 TIME_SECTION("buildMesh", 2, "Building MFEM Mesh");
77
78 // Build the MFEM ParMesh from a serial MFEM mesh
79 mfem::Mesh mfem_ser_mesh = buildSerialMFEMMesh();
80
81 if (isParamSetByUser("serial_refine") && isParamSetByUser("uniform_refine"))
82 paramError("serial_refine",
83 "Cannot set both serial_refine and uniform_refine at the same time.");
84
85 uniformRefinement(mfem_ser_mesh,
86 isParamSetByUser("serial_refine") ? getParam<unsigned int>("serial_refine")
87 : getParam<unsigned int>("uniform_refine"));
88
89 // MFEM supports load balancing of parallel non-conforming meshes
90 // with a space-filling curve partitioning, and we can improve it
91 // by re-ordering the mesh. For now, we only support the Hilbert
92 // ordering, although there is one other option.
93 if (getParam<bool>("reorder_mesh"))
94 {
95 mfem::Array<int> ordering;
96 mfem_ser_mesh.GetHilbertElementOrdering(ordering);
97 mfem_ser_mesh.ReorderElements(ordering);
98 }
99
100 // Make sure mesh is in non-conforming mode to enable local refinement of
101 // quadrilaterals/hexahedra (c.f. MFEM example 6p). The argument (true/false)
102 // determines whether a simplex mesh is considered to be non-conforming.
103 if (getParam<bool>("nonconforming"))
104 mfem_ser_mesh.EnsureNCMesh(true);
105
106 _mfem_par_mesh = std::make_shared<mfem::ParMesh>(this->comm().get(), mfem_ser_mesh);
107
108 // Perform parallel refinements
109 uniformRefinement(*_mfem_par_mesh, getParam<unsigned int>("parallel_refine"));
110
111 if (isParamSetByUser("displacement"))
112 _mesh_displacement_variable = getParam<std::string>("displacement");
113
114 // Build a dummy MOOSE mesh to enable this class to work with other MOOSE classes.
116}
std::string _mesh_displacement_variable
Holds name of variable used for mesh displacement, if set.
Definition MFEMMesh.h:92
void uniformRefinement(mfem::Mesh &mesh, const unsigned int nref) const
Performs a uniform refinement on the chosen mesh nref times.
Definition MFEMMesh.C:154
virtual mfem::Mesh buildSerialMFEMMesh()=0
Build and return the serial mfem::Mesh for this object.
void buildDummyMooseMesh()
Builds a dimension-compatible libMesh placeholder after initializing the MFEM mesh.
Definition MFEMMesh.C:143
std::shared_ptr< mfem::ParMesh > _mfem_par_mesh
Smart pointer to mfem::ParMesh object.
Definition MFEMMesh.h:98
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition MooseBase.h:466
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
Definition MooseBase.h:205
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition MooseBase.h:415
const Elem & get(const ElemType type_in)

◆ buildMeshBaseObject()

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

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

2918{
2919 std::unique_ptr<MeshBase> mesh;
2921 mesh = buildTypedMesh<DistributedMesh>(dim);
2922 else
2923 mesh = buildTypedMesh<ReplicatedMesh>(dim);
2924
2925 return mesh;
2926}
bool _use_distributed_mesh
False by default.
Definition MooseMesh.h:1604

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

◆ buildNodeList()

void MooseMesh::buildNodeList ( )
inherited

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

1047{
1048 TIME_SECTION("buildNodeList", 5, "Building Node List");
1049
1050 freeBndNodes();
1051
1052 auto bc_tuples = getMesh().get_boundary_info().build_node_list();
1053
1054 int n = bc_tuples.size();
1055 _bnd_nodes.clear();
1056 _bnd_nodes.reserve(n);
1057 for (const auto & t : bc_tuples)
1058 {
1059 auto node_id = std::get<0>(t);
1060 auto bc_id = std::get<1>(t);
1061
1062 _bnd_nodes.push_back(new BndNode(getMesh().node_ptr(node_id), bc_id));
1063 _node_set_nodes[bc_id].push_back(node_id);
1064 _bnd_node_ids[bc_id].insert(node_id);
1065 }
1066
1067 _bnd_nodes.reserve(_bnd_nodes.size() + _extra_bnd_nodes.size());
1068 for (unsigned int i = 0; i < _extra_bnd_nodes.size(); i++)
1069 {
1070 BndNode * bnode = new BndNode(_extra_bnd_nodes[i]._node, _extra_bnd_nodes[i]._bnd_id);
1071 _bnd_nodes.push_back(bnode);
1072 _bnd_node_ids[std::get<1>(bc_tuples[i])].insert(_extra_bnd_nodes[i]._node->id());
1073 }
1074
1075 // This sort is here so that boundary conditions are always applied in the same order
1076 std::sort(_bnd_nodes.begin(), _bnd_nodes.end(), BndNodeCompare());
1077}
Helper class for sorting Boundary Nodes so that we always get the same order of application for bound...
Definition MooseMesh.C:1023
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:1752
void freeBndNodes()
Definition MooseMesh.C:366

Referenced by MooseMesh::update().

◆ buildNodeListFromSideList()

void MooseMesh::buildNodeListFromSideList ( )
inherited

Calls BoundaryInfo::build_node_list_from_side_list().

Definition at line 3056 of file MooseMesh.C.

3057{
3058 auto & boundary_info = getMesh().get_boundary_info();
3059
3061 {
3062 const std::set<boundary_id_type> & side_bcids = boundary_info.get_side_boundary_ids();
3063
3065 {
3066 // Don't want to use auto here - the rbegin trick relies on a
3067 // sorted set and we want the compiler to scream if libMesh ever
3068 // switches type
3069 const std::set<boundary_id_type> & node_bcids = boundary_info.get_node_boundary_ids();
3070
3071 // If we've got a reasonable largest BC id, we can just use the
3072 // subsequent unused ones
3073 boundary_id_type next_bcid = 0;
3074 if (!node_bcids.empty())
3075 next_bcid = std::max(next_bcid, cast_int<boundary_id_type>(*node_bcids.rbegin() + 1));
3076 if (!side_bcids.empty())
3077 next_bcid = std::max(next_bcid, cast_int<boundary_id_type>(*side_bcids.rbegin() + 1));
3078
3079 // We need all processors to agree on the id to use, even when
3080 // each only sees the bcids on their own portions of a
3081 // distributed mesh.
3082 _communicator.max(next_bcid);
3083
3084 // If we've got an unreasonably high largest BC id, we should
3085 // probably just search for unused ones with moderate values, so we
3086 // don't risk wrapping.
3087 if (next_bcid > 1000 || next_bcid <= 0)
3088 next_bcid = 1000;
3089
3090 // If any side bcid is already a node bcid with a different name,
3091 // that's a different boundary condition that we need to reassign
3092 // rather than overwrite or merge to.
3093 for (auto bcid : side_bcids)
3094 if (node_bcids.count(bcid) &&
3095 (boundary_info.get_sideset_name(bcid) != boundary_info.get_nodeset_name(bcid)))
3096 {
3097 boundary_info.renumber_node_id(bcid, next_bcid);
3098 do
3099 {
3100 ++next_bcid;
3101 } while (node_bcids.count(next_bcid) || side_bcids.count(next_bcid));
3102 }
3103 }
3104
3105 // For any side bcid that has a name, make sure that our new node
3106 // bcid is given the same name. We need to iterate over the
3107 // actual name map (which is global) here, not over side_bcids
3108 // (which only includes local ids on a distributed mesh).
3109 for (auto & [id, name] : boundary_info.get_sideset_name_map())
3110 boundary_info.nodeset_name(id) = name;
3111
3112 boundary_info.build_node_list_from_side_list();
3113 }
3114}
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
bool _displace_node_list_by_side_list
Whether or not to displace unrelated nodesets by nodesets constructed from sidesets.
Definition MooseMesh.h:2016
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition MooseMesh.h:2012
const Parallel::Communicator & _communicator
int8_t boundary_id_type

Referenced by MooseMesh::prepare(), and MooseMesh::update().

◆ buildPeriodicNodeMap()

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

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

Definition at line 1815 of file MooseMesh.C.

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

◆ buildPeriodicNodeSets()

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

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

Definition at line 1900 of file MooseMesh.C.

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

◆ buildPRefinementAndCoarseningMaps()

void MooseMesh::buildPRefinementAndCoarseningMaps ( Assembly *  assembly)
inherited

Definition at line 2426 of file MooseMesh.C.

2427{
2432
2433 std::map<ElemType, std::pair<Elem *, unsigned int>> elems_and_max_p_level;
2434
2435 for (const auto & elem : getMesh().active_element_ptr_range())
2436 {
2437 const auto type = elem->type();
2438 auto & [picked_elem, max_p_level] = elems_and_max_p_level[type];
2439 if (!picked_elem)
2440 picked_elem = elem;
2441 max_p_level = std::max(max_p_level, elem->p_level());
2442 }
2443
2444 // The only requirement on the FEType is that it can be arbitrarily p-refined
2445 const FEType p_refinable_fe_type(CONSTANT, libMesh::MONOMIAL);
2446 std::vector<Point> volume_ref_points_coarse, volume_ref_points_fine, face_ref_points_coarse,
2447 face_ref_points_fine;
2448 std::vector<unsigned int> p_levels;
2449
2450 for (auto & [elem_type, elem_p_level_pair] : elems_and_max_p_level)
2451 {
2452 auto & [moose_elem, max_p_level] = elem_p_level_pair;
2453 const auto dim = moose_elem->dim();
2454 // Need to do this just once to get the right qrules put in place
2455 assembly->setCurrentSubdomainID(moose_elem->subdomain_id());
2456 assembly->reinit(moose_elem);
2457 assembly->reinit(moose_elem, 0);
2458 auto & qrule = assembly->writeableQRule();
2459 auto & qrule_face = assembly->writeableQRuleFace();
2460
2462 ReplicatedMesh mesh(self_comm);
2463 mesh.set_mesh_dimension(dim);
2464 for (const auto & nd : moose_elem->node_ref_range())
2465 mesh.add_point(nd);
2466
2467 Elem * const elem = mesh.add_elem(Elem::build(elem_type).release());
2468 for (const auto i : elem->node_index_range())
2469 elem->set_node(i, mesh.node_ptr(i));
2470
2471 std::unique_ptr<FEBase> fe_face(FEBase::build(dim, p_refinable_fe_type));
2472 fe_face->get_phi();
2473 const auto & face_phys_points = fe_face->get_xyz();
2474 fe_face->attach_quadrature_rule(qrule_face);
2475
2476 qrule->init(*elem);
2477 volume_ref_points_coarse = qrule->get_points();
2478 fe_face->reinit(elem, (unsigned int)0);
2479 libMesh::FEMap::inverse_map(dim, elem, face_phys_points, face_ref_points_coarse);
2480
2481 p_levels.resize(max_p_level + 1);
2482 std::iota(p_levels.begin(), p_levels.end(), 0);
2483 libMesh::MeshRefinement mesh_refinement(mesh);
2484
2485 for (const auto p_level : p_levels)
2486 {
2487 mesh_refinement.uniformly_p_refine(1);
2488 qrule->init(*elem);
2489 volume_ref_points_fine = qrule->get_points();
2490 fe_face->reinit(elem, (unsigned int)0);
2491 libMesh::FEMap::inverse_map(dim, elem, face_phys_points, face_ref_points_fine);
2492
2493 const auto map_key = std::make_pair(elem_type, p_level);
2494 auto & volume_refine_map = _elem_type_to_p_refinement_map[map_key];
2495 auto & face_refine_map = _elem_type_to_p_refinement_side_map[map_key];
2496 auto & volume_coarsen_map = _elem_type_to_p_coarsening_map[map_key];
2497 auto & face_coarsen_map = _elem_type_to_p_coarsening_side_map[map_key];
2498
2499 auto fill_maps = [this](const auto & coarse_ref_points,
2500 const auto & fine_ref_points,
2501 auto & coarsen_map,
2502 auto & refine_map)
2503 {
2504 mapPoints(fine_ref_points, coarse_ref_points, refine_map);
2505 mapPoints(coarse_ref_points, fine_ref_points, coarsen_map);
2506 };
2507
2508 fill_maps(
2509 volume_ref_points_coarse, volume_ref_points_fine, volume_coarsen_map, volume_refine_map);
2510 fill_maps(face_ref_points_coarse, face_ref_points_fine, face_coarsen_map, face_refine_map);
2511
2512 // With this level's maps filled our fine points now become our coarse points
2513 volume_ref_points_fine.swap(volume_ref_points_coarse);
2514 face_ref_points_fine.swap(face_ref_points_coarse);
2515 }
2516 }
2517}
unsigned int dim
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:2648
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_map
Definition MooseMesh.h:1979
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_coarsening_side_map
Definition MooseMesh.h:1981
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_side_map
Definition MooseMesh.h:1955
std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > _elem_type_to_p_refinement_map
Definition MooseMesh.h:1953
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)

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

◆ buildRefinementAndCoarseningMaps()

void MooseMesh::buildRefinementAndCoarseningMaps ( Assembly *  assembly)
inherited

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

2521{
2522 TIME_SECTION("buildRefinementAndCoarseningMaps", 5, "Building Refinement And Coarsening Maps");
2523 if (doingPRefinement())
2525 else
2527}
bool doingPRefinement() const
Query whether the kind of adaptivity we're doing includes p-refinement.
Definition MooseMesh.h:1520
void buildHRefinementAndCoarseningMaps(Assembly *assembly)
Definition MooseMesh.C:2369
void buildPRefinementAndCoarseningMaps(Assembly *assembly)
Definition MooseMesh.C:2426

◆ buildRefinementMap()

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

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

2536{
2537 TIME_SECTION("buildRefinementMap", 5, "Building Refinement Map");
2538
2539 if (child == -1) // Doing volume mapping or parent side mapping
2540 {
2541 mooseAssert(parent_side == child_side,
2542 "Parent side must match child_side if not passing a specific child!");
2543
2544 std::pair<int, ElemType> the_pair(parent_side, elem.type());
2545
2547 mooseError("Already built a qp refinement map!");
2548
2549 std::vector<std::pair<unsigned int, QpMap>> coarsen_map;
2550 std::vector<std::vector<QpMap>> & refinement_map = _elem_type_to_refinement_map[the_pair];
2552 &elem, qrule, qrule_face, refinement_map, coarsen_map, parent_side, child, child_side);
2553 }
2554 else // Need to map a child side to parent volume qps
2555 {
2556 std::pair<int, int> child_pair(child, child_side);
2557
2560 _elem_type_to_child_side_refinement_map[elem.type()].find(child_pair) !=
2562 mooseError("Already built a qp refinement map!");
2563
2564 std::vector<std::pair<unsigned int, QpMap>> coarsen_map;
2565 std::vector<std::vector<QpMap>> & refinement_map =
2568 &elem, qrule, qrule_face, refinement_map, coarsen_map, parent_side, child, child_side);
2569 }
2570}
std::map< std::pair< int, libMesh::ElemType >, std::vector< std::vector< QpMap > > > _elem_type_to_refinement_map
Holds mappings for volume to volume and parent side to child side Map key:
Definition MooseMesh.h:1950
std::map< libMesh::ElemType, std::map< std::pair< int, int >, std::vector< std::vector< QpMap > > > > _elem_type_to_child_side_refinement_map
Holds mappings for "internal" child sides to parent volume. The second key is (child,...
Definition MooseMesh.h:1959

Referenced by MooseMesh::buildHRefinementAndCoarseningMaps().

◆ buildSerialMFEMMesh()

mfem::Mesh MFEMMeshGeneratorMesh::buildSerialMFEMMesh ( )
overrideprotectedvirtual

Build and return the serial mfem::Mesh for this object.

Implements MFEMMesh.

Definition at line 45 of file MFEMMeshGeneratorMesh.C.

46{
47 if (!hasMeshBase())
48 mooseError("MFEMMeshGeneratorMesh: the mesh base has not been set. "
49 "Ensure MFEM mesh generators are present in the input file.");
50
51 auto * carrier = dynamic_cast<MFEMMeshCarrier *>(&getMesh());
52 if (!carrier)
53 mooseError("MFEMMeshGeneratorMesh requires the final mesh generator to produce an MFEM mesh. "
54 "If you are using libMesh generators, use MeshGeneratorMesh instead.");
55
56 return std::move(*carrier->releaseMFEMMesh());
57}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
A thin libMesh::ReplicatedMesh subclass that carries an mfem::Mesh through the MeshGenerator pipeline...
bool hasMeshBase() const
Whether mesh base object was constructed or not.
Definition MooseMesh.h:1257

◆ buildSideList()

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

Calls BoundaryInfo::build_side_list(), returns a std::vector of (elem-id, side-id, bc-id) tuples.

Definition at line 3117 of file MooseMesh.C.

3118{
3119 return getMesh().get_boundary_info().build_side_list();
3120}

Referenced by InterfaceQpUserObjectBase::initialSetup().

◆ buildTypedMesh()

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

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

2297{
2298 // If the requested mesh type to build doesn't match our current value for _use_distributed_mesh,
2299 // then we need to make sure to make our state consistent because other objects, like the periodic
2300 // boundary condition action, will be querying isDistributedMesh()
2301 if (_use_distributed_mesh != std::is_same<T, libMesh::DistributedMesh>::value)
2302 {
2303 if (getMeshPtr())
2304 mooseError("A MooseMesh object is being asked to build a libMesh mesh that is a different "
2305 "parallel type than the libMesh mesh that it wraps. This is not allowed. Please "
2306 "create another MooseMesh object to wrap the new libMesh mesh");
2307 setParallelType(MeshType<T>::value);
2308 }
2309
2310 if (dim == libMesh::invalid_uint)
2311 {
2312 if (isParamValid("dim"))
2313 dim = getParam<MooseEnum>("dim");
2314 else
2315 // Legacy selection of the default for the 'dim' parameter
2316 dim = 1;
2317 }
2318
2319 auto mesh = std::make_unique<T>(_communicator, dim);
2320
2321 if (!getParam<bool>("allow_renumbering"))
2322 mesh->allow_renumbering(false);
2323
2324 mesh->allow_remote_element_removal(_allow_remote_element_removal);
2325 _app.attachRelationshipManagers(*mesh, *this);
2326
2328 {
2329 // Check of partitioner is supplied (not allowed if custom partitioner is used)
2330 if (!parameters().isParamSetByAddParam("partitioner"))
2331 mooseError("If partitioner block is provided, partitioner keyword cannot be used!");
2332 // Set custom partitioner
2333 if (!_custom_partitioner.get())
2334 mooseError("Custom partitioner requested but not set!");
2335 mesh->partitioner() = _custom_partitioner->clone();
2336 }
2337 else
2339
2340 return mesh;
2341}
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:3247
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition MooseBase.h:199
bool _custom_partitioner_requested
Definition MooseMesh.h:1622
const MeshBase * getMeshPtr() const
Definition MooseMesh.C:3575
std::unique_ptr< libMesh::Partitioner > _custom_partitioner
The custom partitioner.
Definition MooseMesh.h:1621
void setPartitionerHelper(MeshBase *mesh=nullptr)
Definition MooseMesh.C:3774
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:381
const unsigned int invalid_uint

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

◆ cacheChangedLists()

void MooseMesh::cacheChangedLists ( )
inherited

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

Definition at line 934 of file MooseMesh.C.

935{
936 TIME_SECTION("cacheChangedLists", 5, "Caching Changed Lists");
937
938 ConstElemRange elem_range(getMesh().local_elements_begin(), getMesh().local_elements_end(), 1);
939 CacheChangedListsThread cclt(*this);
940 Threads::parallel_reduce(elem_range, cclt, getMooseApp().numThreads());
941
943
944 _refined_elements = std::make_unique<ConstElemPointerRange>(cclt._refined_elements.begin(),
945 cclt._refined_elements.end());
946 _coarsened_elements = std::make_unique<ConstElemPointerRange>(cclt._coarsened_elements.begin(),
947 cclt._coarsened_elements.end());
948 _coarsened_element_children = cclt._coarsened_element_children;
949}
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition MooseBase.h:87
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:1666
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition MooseMesh.h:1659
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition MooseMesh.h:1656
void parallel_reduce(const Range &range, Body &body, unsigned int n_threads=libMesh::n_threads())
StoredRange< MeshBase::const_element_iterator, const Elem * > ConstElemRange

Referenced by FEProblemBase::meshChanged().

◆ cacheFaceInfoVariableOwnership()

void MooseMesh::cacheFaceInfoVariableOwnership ( ) const
inherited

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

4108{
4109 mooseAssert(
4111 "Performing writes to faceInfo variable association maps. This must be done unthreaded!");
4112
4113 const unsigned int num_eqs = _app.feProblem().es().n_systems();
4114
4115 auto face_lambda = [this](const SubdomainID elem_subdomain_id,
4116 const SubdomainID neighbor_subdomain_id,
4117 SystemBase & sys,
4118 std::vector<std::vector<FaceInfo::VarFaceNeighbors>> & face_type_vector)
4119 {
4120 face_type_vector[sys.number()].resize(sys.nVariables(), FaceInfo::VarFaceNeighbors::NEITHER);
4121 const auto & variables = sys.getVariables(0);
4122
4123 for (const auto & var : variables)
4124 {
4125 const unsigned int var_num = var->number();
4126 const unsigned int sys_num = var->sys().number();
4127 std::set<SubdomainID> var_subdomains = var->blockIDs();
4137 bool var_defined_elem = var_subdomains.find(elem_subdomain_id) != var_subdomains.end();
4138 bool var_defined_neighbor =
4139 var_subdomains.find(neighbor_subdomain_id) != var_subdomains.end();
4140 if (var_defined_elem && var_defined_neighbor)
4141 face_type_vector[sys_num][var_num] = FaceInfo::VarFaceNeighbors::BOTH;
4142 else if (!var_defined_elem && !var_defined_neighbor)
4143 face_type_vector[sys_num][var_num] = FaceInfo::VarFaceNeighbors::NEITHER;
4144 else
4145 {
4146 // this is a boundary face for this variable, set elem or neighbor
4147 if (var_defined_elem)
4148 face_type_vector[sys_num][var_num] = FaceInfo::VarFaceNeighbors::ELEM;
4149 else if (var_defined_neighbor)
4150 face_type_vector[sys_num][var_num] = FaceInfo::VarFaceNeighbors::NEIGHBOR;
4151 else
4152 mooseError("Should never get here");
4153 }
4154 }
4155 };
4156
4157 // We loop through the faces and check if they are internal, boundary or external to
4158 // the variables in the problem
4159 for (FaceInfo & face : _all_face_info)
4160 {
4161 const SubdomainID elem_subdomain_id = face.elemSubdomainID();
4162 const SubdomainID neighbor_subdomain_id = face.neighborSubdomainID();
4163
4164 auto & face_type_vector = face.faceType();
4165
4166 face_type_vector.clear();
4167 face_type_vector.resize(num_eqs);
4168
4169 // First, we check the variables in the solver systems (linear/nonlinear)
4170 for (const auto i : make_range(_app.feProblem().numSolverSystems()))
4171 face_lambda(elem_subdomain_id,
4172 neighbor_subdomain_id,
4173 _app.feProblem().getSolverSystem(i),
4174 face_type_vector);
4175
4176 // Then we check the variables in the auxiliary system
4177 face_lambda(elem_subdomain_id,
4178 neighbor_subdomain_id,
4180 face_type_vector);
4181 }
4182}
subdomain_id_type SubdomainID
virtual libMesh::EquationSystems & es() override
AuxiliarySystem & getAuxiliarySystem()
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition FaceInfo.h:38
FEProblemBase & feProblem() const
Definition MooseApp.C:1895
Base class for a system (of equations)
Definition SystemBase.h:87
unsigned int n_systems() const

Referenced by MooseMesh::setupFiniteVolumeMeshData().

◆ cacheFVElementalDoFs()

void MooseMesh::cacheFVElementalDoFs ( ) const
inherited

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

4186{
4187 mooseAssert(!Threads::in_threads,
4188 "Performing writes to elemInfo dof indices. This must be done unthreaded!");
4189
4190 auto elem_lambda = [](const ElemInfo & elem_info,
4191 SystemBase & sys,
4192 std::vector<std::vector<dof_id_type>> & dof_vector)
4193 {
4194 if (sys.nFVVariables())
4195 {
4196 dof_vector[sys.number()].resize(sys.nVariables(), libMesh::DofObject::invalid_id);
4197 const auto & variables = sys.getVariables(0);
4198
4199 for (const auto & var : variables)
4200 if (var->isFV())
4201 {
4202 const auto & var_subdomains = var->blockIDs();
4203
4204 // We will only cache for FV variables and if they live on the current subdomain
4205 if (var_subdomains.find(elem_info.subdomain_id()) != var_subdomains.end())
4206 {
4207 std::vector<dof_id_type> indices;
4208 var->dofMap().dof_indices(elem_info.elem(), indices, var->number());
4209 mooseAssert(indices.size() == 1, "We expect to have only one dof per element!");
4210 dof_vector[sys.number()][var->number()] = indices[0];
4211 }
4212 }
4213 }
4214 };
4215
4216 const unsigned int num_eqs = _app.feProblem().es().n_systems();
4217
4218 // We loop through the elements in the mesh and cache the dof indices
4219 // for the corresponding variables.
4220 for (auto & ei_pair : _elem_to_elem_info)
4221 {
4222 auto & elem_info = ei_pair.second;
4223 auto & dof_vector = elem_info.dofIndices();
4224
4225 dof_vector.clear();
4226 dof_vector.resize(num_eqs);
4227
4228 // First, we cache the dof indices for the variables in the solver systems (linear, nonlinear)
4229 for (const auto i : make_range(_app.feProblem().numSolverSystems()))
4230 elem_lambda(elem_info, _app.feProblem().getSolverSystem(i), dof_vector);
4231
4232 // Then we cache the dof indices for the auxvariables
4233 elem_lambda(elem_info, _app.feProblem().getAuxiliarySystem(), dof_vector);
4234 }
4235}
Class used for caching additional information for elements such as the volume and centroid.
Definition ElemInfo.h:26
SubdomainID subdomain_id() const
We return the subdomain ID of the corresponding libmesh element.
Definition ElemInfo.h:43
const Elem * elem() const
Definition ElemInfo.h:34
const std::vector< std::vector< dof_id_type > > & dofIndices() const
Definition ElemInfo.h:39
static constexpr dof_id_type invalid_id

Referenced by MooseMesh::setupFiniteVolumeMeshData().

◆ cacheInfo()

void MooseMesh::cacheInfo ( )
protectedinherited

Definition at line 1427 of file MooseMesh.C.

1428{
1429 TIME_SECTION("cacheInfo", 3);
1430
1431 // Elements can change subdomain after prepare_for_use(), e.g. through an
1432 // ElementSubdomainModifier, so refresh the subdomain set that hasSingleSubdomain() and
1433 // _block_singletons are built from
1434 getMesh().cache_elem_data();
1435
1436 const auto & mesh = getMesh();
1437
1438 ConstElemRange all_elems(mesh.elements_begin(), mesh.elements_end(), 1);
1439 CacheInfoThread ci(*this, !hasSingleSubdomain());
1440 Threads::parallel_reduce(all_elems, ci);
1441
1442 ConstElemRange local_elems(
1443 mesh.active_local_elements_begin(), mesh.active_local_elements_end(), 1);
1444 CacheSubdomainInfoThread csi(*this);
1445 Threads::parallel_reduce(local_elems, csi);
1446
1447 _node_block = std::move(ci._node_block);
1448 _interface_node_blocks = std::move(ci._interface_node_blocks);
1449
1450 _block_singletons.clear();
1451 for (const auto blk_id : mesh.get_mesh_subdomains())
1452 _block_singletons.emplace(blk_id, std::set<SubdomainID>{blk_id});
1453
1454 _higher_d_elem_side_to_lower_d_elem = std::move(ci._higher_d_elem_side_to_lower_d_elem);
1455 _lower_d_elem_to_higher_d_elem_side = std::move(ci._lower_d_elem_to_higher_d_elem_side);
1456 _lower_d_interior_blocks = std::move(ci._lower_d_interior_blocks);
1457 _lower_d_boundary_blocks = std::move(ci._lower_d_boundary_blocks);
1458 _neighbor_subdomain_boundary_ids = std::move(csi._neighbor_subdomain_boundary_ids);
1459
1460 _sub_to_data.clear();
1461 for (auto & [id, subs] : csi._neighbor_subs)
1462 _sub_to_data[id].neighbor_subs = std::move(subs);
1463 for (auto & [id, bids] : csi._sub_boundary_ids)
1464 _sub_to_data[id].boundary_ids = std::move(bids);
1465
1468
1469 for (const auto blk_id : _mesh_subdomains)
1470 {
1471 auto & sub_data = _sub_to_data[blk_id];
1472 _communicator.set_union(sub_data.neighbor_subs);
1473 _communicator.set_union(sub_data.boundary_ids);
1475 }
1476}
Fills lower-d side maps and node-to-block ownership for MooseMesh::cacheInfo().
Fills subdomain neighbor and attached boundary-id caches for MooseMesh::cacheInfo().
bool hasSingleSubdomain() const
Whether the elements of the mesh all have the same subdomain, according to the subdomain set that lib...
Definition MooseMesh.h:1734
std::unordered_map< SubdomainID, SubdomainData > _sub_to_data
Holds a map from subdomain ids to associated data.
Definition MooseMesh.h:1994
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:1997
std::unordered_map< dof_id_type, SubdomainID > _node_block
The subdomain of the elements incident on a node, for the nodes whose incident elements all agree,...
Definition MooseMesh.h:1739
std::unordered_map< dof_id_type, std::set< SubdomainID > > _interface_node_blocks
The full subdomain set of the nodes whose incident elements disagree, that is the nodes on a subdomai...
Definition MooseMesh.h:1744
std::unordered_map< SubdomainID, std::set< SubdomainID > > _block_singletons
For each subdomain, a std::set containing just that subdomain ID, e.g.
Definition MooseMesh.h:1749
void set_union(T &data, const unsigned int root_id) const

Referenced by MooseMesh::update().

◆ callMooseError() [1/2]

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

External method for calling moose error with added object context.

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

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

Definition at line 114 of file MooseBase.C.

120{
121 if (!node)
122 node = MooseBase::getHitNode(params);
123
124 std::string multiapp_prefix = "";
125 if (app)
126 {
127 if (!app->isUltimateMaster())
128 multiapp_prefix = app->name();
130 }
131
132 if (with_prefix)
133 // False here because the hit context will get processed by the node
134 msg = messagePrefix(params, false) + msg;
135
136 moose::internal::mooseErrorRaw(msg, multiapp_prefix, node, show_trace);
137}
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition MooseApp.C:2452
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition MooseApp.h:875
const hit::Node * getHitNode() const
Definition MooseBase.h:136
std::string messagePrefix(const bool hit_prefix=true) const
Definition MooseBase.h:256
void mooseConsole()
Send current output buffer to Console output objects.
void mooseErrorRaw(std::string msg, const std::string &prefix="", const hit::Node *node=nullptr, const bool show_trace=true)
Main callback for emitting a moose error.
Definition MooseError.C:51

◆ callMooseError() [2/2]

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

External method for calling moose error with added object context.

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

Definition at line 105 of file MooseBase.C.

109{
110 callMooseError(&_app, _pars, msg, with_prefix, node, show_trace);
111}
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:381
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
External method for calling moose error with added object context.
Definition MooseBase.C:105
const InputParameters & _pars
The object's parameters.
Definition MooseBase.h:390

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

◆ changeBoundaryId() [1/2]

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

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

2823{
2824 TIME_SECTION("changeBoundaryId", 6);
2825 changeBoundaryId(getMesh(), old_id, new_id, delete_prev);
2826}
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:2820

Referenced by MooseMesh::changeBoundaryId().

◆ changeBoundaryId() [2/2]

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

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

2833{
2834 // Get a reference to our BoundaryInfo object, we will use it several times below...
2835 BoundaryInfo & boundary_info = mesh.get_boundary_info();
2836
2837 // Container to catch ids passed back from BoundaryInfo
2838 std::vector<boundary_id_type> old_ids;
2839
2840 // Only level-0 elements store BCs. Loop over them.
2841 for (auto & elem : as_range(mesh.level_elements_begin(0), mesh.level_elements_end(0)))
2842 {
2843 unsigned int n_sides = elem->n_sides();
2844 for (unsigned int s = 0; s != n_sides; ++s)
2845 {
2846 boundary_info.boundary_ids(elem, s, old_ids);
2847 if (std::find(old_ids.begin(), old_ids.end(), old_id) != old_ids.end())
2848 {
2849 std::vector<boundary_id_type> new_ids(old_ids);
2850 std::replace(new_ids.begin(), new_ids.end(), old_id, new_id);
2851 if (delete_prev)
2852 {
2853 boundary_info.remove_side(elem, s);
2854 boundary_info.add_side(elem, s, new_ids);
2855 }
2856 else
2857 boundary_info.add_side(elem, s, new_ids);
2858 }
2859 }
2860 }
2861
2862 // Remove any remaining references to the old ID from the
2863 // BoundaryInfo object. This prevents things like empty sidesets
2864 // from showing up when printing information, etc.
2865 if (delete_prev)
2866 boundary_info.remove_id(old_id);
2867
2868 // The cached boundary id sets will need re-preparation
2869 mesh.unset_has_boundary_id_sets();
2870}

◆ checkCoordinateSystems()

void MooseMesh::checkCoordinateSystems ( )
inherited

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

4474{
4475 for (const auto & elem : getMesh().element_ptr_range())
4476 {
4477 SubdomainID sid = elem->subdomain_id();
4478 if (_coord_sys[sid] == Moose::COORD_RZ && elem->dim() == 3)
4479 mooseError("An RZ coordinate system was requested for subdomain " + Moose::stringify(sid) +
4480 " which contains 3D elements.");
4481 if (_coord_sys[sid] == Moose::COORD_RSPHERICAL && elem->dim() > 1)
4482 mooseError("An RSPHERICAL coordinate system was requested for subdomain " +
4483 Moose::stringify(sid) + " which contains 2D or 3D elements.");
4484 }
4485}
std::map< SubdomainID, Moose::CoordinateSystemType > & _coord_sys
Type of coordinate system per subdomain.
Definition MooseMesh.h:2064
std::string stringify(const T &t)
conversion to string
Definition Conversion.h:65
@ COORD_RZ
Definition MooseTypes.h:871
@ COORD_RSPHERICAL
Definition MooseTypes.h:872

Referenced by FEProblemBase::checkCoordinateSystems().

◆ checkDuplicateSubdomainNames()

void MooseMesh::checkDuplicateSubdomainNames ( )
privateinherited

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

4504{
4505 std::map<SubdomainName, SubdomainID> subdomain;
4506 for (const auto & sbd_id : _mesh_subdomains)
4507 {
4508 std::string sub_name = getSubdomainName(sbd_id);
4509 if (!sub_name.empty() && subdomain.count(sub_name) > 0)
4510 mooseError("The subdomain name ",
4511 sub_name,
4512 " is used for both subdomain with ID=",
4513 subdomain[sub_name],
4514 " and ID=",
4515 sbd_id,
4516 ", Please rename one of them!");
4517 else
4518 subdomain[sub_name] = sbd_id;
4519 }
4520}
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
Definition MooseMesh.C:1758

Referenced by MooseMesh::prepare().

◆ clearQuadratureNodes()

void MooseMesh::clearQuadratureNodes ( )
inherited

Clear out any existing quadrature nodes.

Most likely called before re-adding them.

Definition at line 1669 of file MooseMesh.C.

1670{
1671 // Delete all the quadrature nodes
1672 for (auto & it : _quadrature_nodes)
1673 delete it.second;
1674
1675 _quadrature_nodes.clear();
1677 _extra_bnd_nodes.clear();
1678
1679 // NOTE: this does not clear them from the nodeToElem map
1680}

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

◆ clone()

MooseMesh & MooseMesh::clone ( ) const
virtualinherited

Clone method.

Allocates memory you are responsible to clean up.

Definition at line 2883 of file MooseMesh.C.

2884{
2885 mooseError("MooseMesh::clone() is no longer supported, use MooseMesh::safeClone() instead.");
2886}

Referenced by TiledMesh::buildMesh().

◆ coarsenedElementChildren()

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

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

965{
966 auto elem_to_child_pair = _coarsened_element_children.find(elem);
967 mooseAssert(elem_to_child_pair != _coarsened_element_children.end(), "Missing element in map");
968 return elem_to_child_pair->second;
969}

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

◆ coarsenedElementRange()

ConstElemPointerRange * MooseMesh::coarsenedElementRange ( ) const
inherited

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

959{
960 return _coarsened_elements.get();
961}

Referenced by FEProblemBase::meshChanged().

◆ computeFiniteVolumeCoords()

void MooseMesh::computeFiniteVolumeCoords ( ) const
inherited

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

4044{
4046 mooseError("Trying to compute face- and elem-info coords when the information is dirty");
4047
4048 for (auto & fi : _all_face_info)
4049 {
4050 // get elem & neighbor elements, and set subdomain ids
4051 const SubdomainID elem_subdomain_id = fi.elemSubdomainID();
4052 const SubdomainID neighbor_subdomain_id = fi.neighborSubdomainID();
4053
4055 *this, elem_subdomain_id, fi.faceCentroid(), fi.faceCoord(), neighbor_subdomain_id);
4056 }
4057
4058 for (auto & ei : _elem_to_elem_info)
4060 *this, ei.second.subdomain_id(), ei.second.centroid(), ei.second.coordFactor());
4061}
void coordTransformFactor(const SubProblem &s, SubdomainID sub_id, const P &point, C &factor, SubdomainID neighbor_sub_id=libMesh::Elem::invalid_subdomain_id)
Computes a conversion multiplier for use when computing integraals for the current coordinate system ...
Definition Assembly.C:41

Referenced by MooseMesh::setupFiniteVolumeMeshData().

◆ computeMaxPerElemAndSide()

void MooseMesh::computeMaxPerElemAndSide ( )
privateinherited

Compute the maximum numbers per element and side.

Definition at line 1080 of file MooseMesh.C.

1081{
1082 auto & mesh = getMesh();
1083
1087
1088 for (auto & elem : as_range(mesh.local_elements_begin(), mesh.local_elements_end()))
1089 {
1090 _max_sides_per_elem = std::max(_max_sides_per_elem, elem->n_sides());
1091 _max_nodes_per_elem = std::max(_max_nodes_per_elem, elem->n_nodes());
1092
1093 for (unsigned int side = 0; side < elem->n_sides(); ++side)
1094 _max_nodes_per_side = std::max(_max_nodes_per_side, elem->side_ptr(side)->n_nodes());
1095 }
1096
1097 mesh.comm().max(_max_sides_per_elem);
1098 mesh.comm().max(_max_nodes_per_elem);
1099 mesh.comm().max(_max_nodes_per_side);
1100}
unsigned int _max_nodes_per_elem
The maximum number of nodes per element.
Definition MooseMesh.h:2046
unsigned int _max_nodes_per_side
The maximum number of nodes per side.
Definition MooseMesh.h:2049
unsigned int _max_sides_per_elem
The maximum number of sides per element.
Definition MooseMesh.h:2043

Referenced by MooseMesh::update().

◆ connectControllableParams()

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

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

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

Definition at line 77 of file MooseBase.C.

81{
82 auto & factory = _app.getFactory();
83 auto & ip_warehouse = _app.getInputParameterWarehouse();
84
85 MooseObjectParameterName primary_name(uniqueName(), parameter);
86 const auto base_type = factory.getValidParams(object_type).getBase();
87 MooseObjectParameterName secondary_name(base_type, object_name, object_parameter);
88 ip_warehouse.addControllableParameterConnection(primary_name, secondary_name);
89
90 const auto & tags = _pars.get<std::vector<std::string>>("control_tags");
91 for (const auto & tag : tags)
92 {
93 if (!tag.empty())
94 {
95 // Only adds the parameter with the different control tags if the derived class
96 // properly registers the parameter to its own syntax
97 MooseObjectParameterName tagged_name(tag, name(), parameter);
98 ip_warehouse.addControllableParameterConnection(
99 tagged_name, secondary_name, /*error_on_empty=*/false);
100 }
101 }
102}
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.
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition MooseApp.h:409
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition MooseApp.C:2910
MooseObjectName uniqueName() const
Definition MooseBase.C:69
A class for storing an input parameter name.

◆ coordTransform()

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

Definition at line 2094 of file MooseMesh.h.

2095{
2096 mooseAssert(_coord_transform, "The coordinate transformation object is null.");
2097 return *_coord_transform;
2098}
std::unique_ptr< MooseAppCoordTransform > _coord_transform
A coordinate transformation object that describes how to transform this problem's coordinate system i...
Definition MooseMesh.h:2074

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

◆ 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 283 of file Restartable.h.

286{
287 auto & data_ptr =
288 declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...);
289 return Restartable::ManagedValue<T>(data_ptr);
290}
Wrapper class for restartable data that is "managed.
Definition Restartable.h:43

◆ 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 358 of file Restartable.h.

359{
360 const auto full_name = restartableName(data_name);
361
363
364 return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
365}
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:78
void registerRestartableNameWithFilterOnApp(const std::string &name, Moose::RESTARTABLE_FILTER filter)
Helper function for actually registering the restartable data.
Definition Restartable.C:71

◆ 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 276 of file Restartable.h.

277{
278 return declareRestartableDataWithContext<T>(data_name, nullptr, std::forward<Args>(args)...);
279}

◆ declareRestartableDataHelper()

template<typename T , typename... Args>
RestartableData< T > & Restartable::declareRestartableDataHelper ( const std::string &  data_name,
void *  context,
Args &&...  args 
) const
privateinherited

Helper function for declaring restartable data.

We use this function to reduce code duplication when returning const/nonconst references to the data.

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 310 of file Restartable.h.

313{
314 const auto full_name = restartableName(data_name);
315
316 // Here we will create the RestartableData even though we may not use this instance.
317 // If it's already in use, the App will return a reference to the existing instance and we'll
318 // return that one instead. We might refactor this to have the app create the RestartableData
319 // at a later date.
320 auto data_ptr =
321 std::make_unique<RestartableData<T>>(full_name, context, std::forward<Args>(args)...);
322 auto & restartable_data_ref = cast_ref<RestartableData<T> &>(
323 registerRestartableDataOnApp(std::move(data_ptr), _restartable_tid));
324
325 return restartable_data_ref;
326}
const THREAD_ID _restartable_tid
The thread ID for this object.
RestartableDataValue & registerRestartableDataOnApp(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
Helper function for actually registering the restartable data.
Definition Restartable.C:63

◆ 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 301 of file Restartable.h.

304{
305 return declareRestartableDataHelper<T>(data_name, context, std::forward<Args>(args)...).set();
306}

◆ 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 330 of file Restartable.h.

333{
334 return declareRestartableDataWithObjectNameWithContext<T>(
335 data_name, object_name, nullptr, std::forward<Args>(args)...);
336}

◆ 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 340 of file Restartable.h.

344{
345 std::string old_name = _restartable_name;
346
347 _restartable_name = object_name;
348
349 T & value = declareRestartableDataWithContext<T>(data_name, context, std::forward<Args>(args)...);
350
351 _restartable_name = old_name;
352
353 return value;
354}
std::string _restartable_name
The name of the object.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ deleteRemoteElements()

void MooseMesh::deleteRemoteElements ( )
inherited

Delete remote elements.

Definition at line 4095 of file MooseMesh.C.

4096{
4098 if (!_mesh)
4099 mooseError("Cannot delete remote elements because we have not yet attached a MeshBase");
4100
4101 _mesh->allow_remote_element_removal(true);
4102
4103 _mesh->delete_remote_elements();
4104}

◆ detectOrthogonalDimRanges()

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

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

1928{
1929 TIME_SECTION("detectOrthogonalDimRanges", 5);
1930
1932 return true;
1933
1934 std::vector<Real> min(3, std::numeric_limits<Real>::max());
1935 std::vector<Real> max(3, std::numeric_limits<Real>::min());
1936 unsigned int dim = getMesh().mesh_dimension();
1937
1938 // Find the bounding box of our mesh
1939 for (const auto & node : getMesh().node_ptr_range())
1940 // Check all coordinates, we don't know if this mesh might be lying in a higher dim even if the
1941 // mesh dimension is lower.
1942 for (const auto i : make_range(Moose::dim))
1943 {
1944 if ((*node)(i) < min[i])
1945 min[i] = (*node)(i);
1946 if ((*node)(i) > max[i])
1947 max[i] = (*node)(i);
1948 }
1949
1950 this->comm().max(max);
1951 this->comm().min(min);
1952
1953 _extreme_nodes.resize(8); // 2^LIBMESH_DIM
1954 // Now make sure that there are actual nodes at all of the extremes
1955 std::vector<bool> extreme_matches(8, false);
1956 std::vector<unsigned int> comp_map(3);
1957 for (const auto & node : getMesh().node_ptr_range())
1958 {
1959 // See if the current node is located at one of the extremes
1960 unsigned int coord_match = 0;
1961
1962 for (const auto i : make_range(Moose::dim))
1963 {
1964 if (std::abs((*node)(i)-min[i]) < tol)
1965 {
1966 comp_map[i] = MIN;
1967 ++coord_match;
1968 }
1969 else if (std::abs((*node)(i)-max[i]) < tol)
1970 {
1971 comp_map[i] = MAX;
1972 ++coord_match;
1973 }
1974 }
1975
1976 if (coord_match == LIBMESH_DIM) // Found a coordinate at one of the extremes
1977 {
1978 _extreme_nodes[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = node;
1979 extreme_matches[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = true;
1980 }
1981 }
1982
1983 // See if we matched all of the extremes for the mesh dimension
1984 this->comm().max(extreme_matches);
1985 if (std::count(extreme_matches.begin(), extreme_matches.end(), true) == (1 << dim))
1987
1988 // Set the bounds
1989 _bounds.resize(LIBMESH_DIM);
1990 for (const auto i : make_range(Moose::dim))
1991 {
1992 _bounds[i].resize(2);
1993 _bounds[i][MIN] = min[i];
1994 _bounds[i][MAX] = max[i];
1995 }
1996
1998}
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition MooseMesh.h:1776
std::vector< Node * > _extreme_nodes
A vector containing the nodes at the corners of a regular orthogonal mesh.
Definition MooseMesh.h:1838
auto max(const L &left, const R &right)
auto min(const L &left, const R &right)
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...

Referenced by MooseMesh::prepare().

◆ detectPairedSidesets()

void MooseMesh::detectPairedSidesets ( )
inherited

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

2002{
2003 TIME_SECTION("detectPairedSidesets", 5);
2004
2005 _paired_boundary = std::vector<std::pair<BoundaryID, BoundaryID>>();
2006
2007 // Loop over level-0 elements (since boundary condition information
2008 // is only directly stored for them) and find sidesets with normals
2009 // that point in the -x, +x, -y, +y, and -z, +z direction. If there
2010 // is a unique sideset id for each direction, then the paired
2011 // sidesets consist of (-x,+x), (-y,+y), (-z,+z). If there are
2012 // multiple sideset ids for a given direction, then we can't pick a
2013 // single pair for that direction. In that case, we'll just return
2014 // as was done in the original algorithm.
2015
2016 // we need to test all element dimensions from dim down to 1
2017 const unsigned int mesh_dim = getMesh().mesh_dimension();
2018
2019 // Helper for iterating through unit dimensions (0=x, 1=y, 2=z)
2020 static constexpr std::array<std::size_t, 3> unit_dims{0, 1, 2};
2021 // Helper for mapping from unit dim -> name
2022 static const std::array<std::string, 3> unit_dim_names{"x", "y", "z"};
2023
2024 // Boundary id sets for elements of different dimensions
2025 // First index: side dimension; 0=1D, 1=2D, 2=3D
2026 // Second index: unit dimension; 0=x, 1=y, 2=z
2027 // Third index: false for minus, true for plus
2028 std::array<std::array<std::array<std::set<BoundaryID>, 2>, 3>, 3> ids{};
2029
2030 // Build quadrature needed to evaluate side normals
2031 std::array<std::unique_ptr<FEBase>, 3> fe_faces{};
2032 std::array<std::unique_ptr<libMesh::QGauss>, 3> qfaces{};
2033 for (const auto side_dim : make_range(mesh_dim))
2034 {
2035 // Face is assumed to be flat, therefore normal is assumed to be
2036 // constant over the face, therefore only compute it at 1 qp.
2037 qfaces[side_dim] = std::unique_ptr<libMesh::QGauss>(new libMesh::QGauss(side_dim, CONSTANT));
2038
2039 // A first-order Lagrange FE for the face.
2040 fe_faces[side_dim] = FEBase::build(side_dim + 1, FEType(FIRST, libMesh::LAGRANGE));
2041 fe_faces[side_dim]->attach_quadrature_rule(qfaces[side_dim].get());
2042 fe_faces[side_dim]->get_normals();
2043 }
2044
2045 // Get boundary IDs for each dimension that are in the unit normal
2046 const auto & boundary_info = getMesh().get_boundary_info();
2047 // Temporary for evaluating boundary_ids
2048 std::vector<boundary_id_type> face_ids;
2049 // The side dimensions we've come across, so that we only report
2050 // warnings for side dimensions that we have
2051 std::set<unsigned int> side_dims;
2052 // Normal dimensions that we found that were nonzero; lets us
2053 // skip warnings for dimensions that we don't have
2054 std::array<bool, 3> nonzero_dims = periodic_dim_default;
2055 for (auto & elem : as_range(getMesh().level_elements_begin(0), getMesh().level_elements_end(0)))
2056 {
2057 // If not on the boundary, nothing to do
2058 if (!elem->on_boundary())
2059 continue;
2060
2061 const auto side_dim = elem->dim() - 1;
2062 side_dims.insert(side_dim);
2063
2064 // Check for unit normals on each boundary side
2065 for (const auto s : elem->side_index_range())
2066 if (!elem->neighbor_ptr(s))
2067 {
2068 // Reinit to get the normal
2069 fe_faces[side_dim]->reinit(elem, s);
2070 const auto & normal = fe_faces[side_dim]->get_normals()[0];
2071
2072 // Get the boundary ID(s) for this side. If there is more
2073 // than 1 boundary id, then we already can't determine a
2074 // unique pairing of sides in this direction, but we'll just
2075 // keep going to keep the logic simple.
2076 boundary_info.boundary_ids(elem, s, face_ids);
2077
2078 bool found = false;
2079 for (const auto unit_dim : unit_dims)
2080 {
2081 if (libMesh::absolute_fuzzy_equals(normal(unit_dim), 0.0))
2082 continue;
2083 nonzero_dims[unit_dim] = true;
2084 if (!found)
2085 for (const auto plus : {false, true})
2086 {
2087 if (libMesh::absolute_fuzzy_equals(normal(unit_dim), plus ? 1.0 : -1.0))
2088 {
2089 ids[side_dim][unit_dim][plus].insert(face_ids.begin(), face_ids.end());
2090 found = true;
2091 break;
2092 }
2093 }
2094 }
2095 }
2096 }
2097
2098 // For a distributed mesh, boundaries may be distributed as well. We therefore collect information
2099 // from everyone. If the mesh is already serial, then there is no need to do an allgather. Note
2100 // that this is just going to gather information about what the periodic bc ids are. We are not
2101 // gathering any remote elements or anything like that. It's just that the GhostPointNeighbors
2102 // ghosting functor currently relies on the fact that every process agrees on whether we have
2103 // periodic boundaries; every process that thinks there are periodic boundaries will call
2104 // MeshBase::sub_point_locator which makes a parallel_object_only() assertion (right or wrong). So
2105 // we all need to go there (or not go there)
2106 if (_use_distributed_mesh && !_mesh->is_serial())
2107 {
2108 // Communicate id data by packing as [side dim, unit dim, plus (as a char), boundary id]
2109 std::vector<std::tuple<unsigned int, unsigned int, unsigned char, boundary_id_type>> id_data;
2110 for (const auto side_dim : side_dims)
2111 for (const auto unit_dim : unit_dims)
2112 for (const auto plus : {false, true})
2113 for (const auto bd : ids[side_dim][unit_dim][plus])
2114 id_data.emplace_back(side_dim, unit_dim, plus, bd);
2115 _communicator.allgather(id_data, false);
2116 for (const auto & [side_dim, unit_dim, plus_char, bd] : id_data)
2117 ids[side_dim][unit_dim][bool(plus_char)].insert(bd);
2118
2119 // Gather true-ness of nonzero_dims
2120 for (auto & entry : nonzero_dims)
2121 _communicator.max(entry);
2122
2123 // Gather found side dimensions
2124 _communicator.set_union(side_dims);
2125 } // end if (_use_distributed_mesh && !_need_ghost_ghosted_boundaries)
2126
2127 // Find pairings that have exactly one boundary on each side
2128 std::ostringstream oss_found, oss_missing;
2129 for (const auto side_dim : side_dims)
2130 {
2131 for (const auto unit_dim : unit_dims)
2132 if (nonzero_dims[unit_dim])
2133 {
2134 const auto & unit_name = unit_dim_names[unit_dim];
2135 const auto & minus = ids[side_dim][unit_dim][false];
2136 const auto & plus = ids[side_dim][unit_dim][true];
2137
2138 if (minus.size() == 1 && plus.size() == 1)
2139 {
2140 const auto get_boundary_name = [this](const auto id)
2141 {
2142 const auto & name = getBoundaryName(id);
2143 return name.size() ? name : std::to_string(id);
2144 };
2145
2146 oss_found << "\n " << side_dim + 1 << "D " << unit_name
2147 << "-direction: " << get_boundary_name(*minus.begin()) << " <-> "
2148 << get_boundary_name(*plus.begin());
2149 _paired_boundary->emplace_back(std::make_pair(*minus.begin(), *plus.begin()));
2150 }
2151 else
2152 oss_missing << "\n " << side_dim + 1 << "D -" << unit_name << "/+" << unit_name
2153 << ": Found " << minus.size() << " -" << unit_name << " boundaries and "
2154 << plus.size() << " +" << unit_name << " boundaries";
2155 }
2156 }
2157
2158 std::ostringstream oss;
2159 const auto found = oss_found.str();
2160 const auto missing = oss_missing.str();
2161 if (found.size())
2162 oss << "The following paired boundaries were automatically detected for periodicity:\n"
2163 << found << "\n";
2164 if (missing.size())
2165 {
2166 if (found.size())
2167 oss << "\n";
2168 oss << "Paired boundaries were not automatically detected for the following:\n"
2169 << missing
2170 << "\n\nAutomatic detection requires that exactly one boundary is found in each unit "
2171 "direction.\n";
2172 }
2173
2174 mooseInfoRepeated(oss.str());
2175}
void mooseInfoRepeated(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition MooseError.h:409
std::optional< std::vector< std::pair< BoundaryID, BoundaryID > > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition MooseMesh.h:1779
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
bool absolute_fuzzy_equals(const T &var1, const T2 &var2, const Real tol=TOLERANCE *TOLERANCE)

Referenced by Moose::PeriodicBCHelper::setupPeriodicBoundaries().

◆ determineUseDistributedMesh()

void MooseMesh::determineUseDistributedMesh ( )
inherited

Determine whether to use a distributed mesh.

Should be called during construction

Definition at line 2889 of file MooseMesh.C.

2890{
2891 switch (_parallel_type)
2892 {
2894 // The user did not specify 'parallel_type = XYZ' in the input file,
2895 // so we allow the --distributed-mesh command line arg to possibly turn
2896 // on DistributedMesh. If the command line arg is not present, we pick ReplicatedMesh.
2898 _use_distributed_mesh = true;
2899 break;
2903 _use_distributed_mesh = false;
2904 break;
2906 _use_distributed_mesh = true;
2907 break;
2908 }
2909
2910 // If the user specifies 'nemesis = true' in the Mesh block, or they are using --use-split,
2911 // we must use DistributedMesh.
2912 if (_is_nemesis || _is_split)
2913 _use_distributed_mesh = true;
2914}
bool getDistributedMeshOnCommandLine() const
Returns true if the user specified –distributed-mesh (or –parallel-mesh, for backwards compatibility)...
Definition MooseApp.h:475
bool _parallel_type_overridden
Definition MooseMesh.h:1606
ParallelType _parallel_type
Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.
Definition MooseMesh.h:1599
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition MooseMesh.h:1650
const bool _is_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition MooseMesh.h:1782

Referenced by FileMesh::FileMesh(), MooseMesh::MooseMesh(), and MooseMesh::setParallelType().

◆ dimension()

unsigned int MFEMMesh::dimension ( ) const
inlineoverridevirtualinherited

Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh mesh object.

Reimplemented from MooseMesh.

Definition at line 65 of file MFEMMesh.h.

65{ return _mfem_par_mesh->Dimension(); }

Referenced by MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), and MFEMMesh::buildDummyMooseMesh().

◆ dimensionWidth()

Real MooseMesh::dimensionWidth ( unsigned int  component) const
inherited

Returns the width of the requested dimension.

Definition at line 2178 of file MooseMesh.C.

2179{
2180 return getMaxInDimension(component) - getMinInDimension(component);
2181}
virtual Real getMaxInDimension(unsigned int component) const
Definition MooseMesh.C:2193
virtual Real getMinInDimension(unsigned int component) const
Returns the min or max of the requested dimension respectively.
Definition MooseMesh.C:2184

Referenced by MooseMesh::addPeriodicVariable(), and MooseMesh::effectiveSpatialDimension().

◆ displace()

void MFEMMesh::displace ( mfem::GridFunction const &  displacement)
inherited

Displace the nodes of the mesh by the given displacement.

Does not update FE spaces for variables.

Definition at line 136 of file MFEMMesh.C.

137{
138 _mfem_par_mesh->EnsureNodes();
139 *_mfem_par_mesh->GetNodes() += displacement;
140}

Referenced by MFEMProblem::displaceMesh().

◆ doingPRefinement() [1/2]

bool MooseMesh::doingPRefinement ( ) const
inlineinherited

Query whether the kind of adaptivity we're doing includes p-refinement.

Definition at line 1520 of file MooseMesh.h.

1520{ return _doing_p_refinement; }
bool _doing_p_refinement
Whether we have p-refinement (whether exclusively p- or hp-refinement)
Definition MooseMesh.h:2083

Referenced by MooseMesh::buildRefinementAndCoarseningMaps().

◆ doingPRefinement() [2/2]

void MooseMesh::doingPRefinement ( bool  doing_p_refinement)
inlineinherited

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

Definition at line 1515 of file MooseMesh.h.

1515{ _doing_p_refinement = doing_p_refinement; }

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

◆ effectiveSpatialDimension()

unsigned int MooseMesh::effectiveSpatialDimension ( ) const
virtualinherited

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

3000{
3001 const Real abs_zero = 1e-12;
3002
3003 // See if the mesh is completely containd in the z and y planes to calculate effective spatial
3004 // dim
3005 for (unsigned int dim = LIBMESH_DIM; dim >= 1; --dim)
3006 if (dimensionWidth(dim - 1) >= abs_zero)
3007 return dim;
3008
3009 // If we get here, we have a 1D mesh on the x-axis.
3010 return 1;
3011}

◆ elem() [1/2]

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

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

3208{
3209 mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
3210 return elemPtr(i);
3211}
virtual Elem * elemPtr(const dof_id_type i)
Definition MooseMesh.C:3221
void mooseDeprecated(Args &&... args) const

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

◆ elem() [2/2]

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

Definition at line 3214 of file MooseMesh.C.

3215{
3216 mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
3217 return elemPtr(i);
3218}

◆ elemInfo()

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

◆ elemInfoVector()

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

Accessor for the element info objects owned by this process.

Definition at line 1349 of file MooseMesh.h.

1349{ return _elem_info; }

◆ elemPtr() [1/2]

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

Definition at line 3221 of file MooseMesh.C.

3222{
3223 return getMesh().elem_ptr(i);
3224}

Referenced by Adaptivity::adaptMesh(), FEProblemBase::addGhostedElem(), SystemBase::augmentSendList(), NodalPatchRecoveryAuxBase::blockRestrictElements(), NodalPatchRecovery::compute(), BoundaryMarker::computeElementMarker(), NodalPatchRecoveryAuxBase::computeValue(), ProjectionAux::computeValue(), MooseMesh::elem(), MooseMesh::elem(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), ActivateElementsUserObjectBase::execute(), NonlinearSystemBase::findImplicitGeometricCouplingEntries(), NearestNodeLocator::findNodes(), ElementSubdomainModifierBase::findReinitializedElemsAndNodes(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), ElementSubdomainModifierBase::gatherMovingBoundaryChanges(), ElementSubdomainModifierBase::gatherPatchElements(), NodalPatchRecoveryBase::gatherRequestList(), NodalPatchRecoveryBase::getCoefficients(), NodeElemConstraint::getConnectedDofIndices(), NodeFaceConstraint::getConnectedDofIndices(), FEProblemBase::getDiracElements(), PenetrationThread::getInfoForFacesWithCommonNodes(), ActivateElementsUserObjectBase::getNewlyActivatedElementRange(), ActivateElementsUserObjectBase::getNewlyActivatedNodeRange(), DiracKernelBase::hasPointsOnElem(), AuxKernelBase::initialSetup(), ActivateElementsUserObjectBase::isNewlyActivated(), Moose::Mortar::loopOverMortarSegments(), ElementSubdomainModifierBase::nodeIsNewlyReinitialized(), PenetrationThread::operator()(), SecondaryNeighborhoodThread::operator()(), FEProblemBase::prepare(), FEProblemBase::prepare(), FEProblemBase::prepareFace(), FEProblemBase::reinitDirac(), FEProblemBase::reinitElem(), FEProblemBase::reinitElemFace(), FEProblemBase::reinitElemFaceRef(), FEProblemBase::reinitElemNeighborAndLowerD(), ElementSubdomainModifierBase::reinitializedElemRange(), FEProblemBase::reinitLowerDElem(), FEProblemBase::reinitNeighbor(), FEProblemBase::reinitNeighborFaceRef(), FEProblemBase::reinitNeighborSurfaceElemRef(), NonlinearSystemBase::reinitNodeFace(), FEProblemBase::setCurrentLowerDElem(), ElementSubdomainModifierBase::storeOverriddenDofValues(), and NearestNodeLocator::updatePatch().

◆ elemPtr() [2/2]

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

Definition at line 3227 of file MooseMesh.C.

3228{
3229 return getMesh().elem_ptr(i);
3230}

◆ elemTypes()

MooseEnum MooseMesh::elemTypes ( )
staticinherited

returns MooseMesh element type options

Definition at line 4072 of file MooseMesh.C.

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

Referenced by MooseMesh::elemTypes(), and SphereMeshGenerator::validParams().

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

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

Referenced by EigenKernel::enabled(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), and NodeFaceConstraint::validParams().

◆ errorIfDistributedMesh()

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

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

3764{
3766 mooseError("Cannot use ",
3767 name,
3768 " with DistributedMesh!\n",
3769 "Consider specifying parallel_type = 'replicated' in your input file\n",
3770 "to prevent it from being run with DistributedMesh.");
3771}

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

◆ errorPrefix()

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

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

Definition at line 264 of file MooseBase.h.

264{ return messagePrefix(); }

◆ faceInfo() [1/2]

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

◆ faceInfo() [2/2]

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

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

Definition at line 4021 of file MooseMesh.C.

4022{
4023 auto it = _elem_side_to_face_info.find(std::make_pair(elem, side));
4024
4025 if (it == _elem_side_to_face_info.end())
4026 return nullptr;
4027 else
4028 {
4029 mooseAssert(it->second,
4030 "For some reason, the FaceInfo object is NULL! Try calling "
4031 "`buildFiniteVolumeInfo()` before using this accessor!");
4032 return it->second;
4033 }
4034}

◆ findAdaptivityQpMaps()

void MooseMesh::findAdaptivityQpMaps ( const Elem *  template_elem,
libMesh::QBase &  qrule,
libMesh::QBase &  qrule_face,
std::vector< std::vector< QpMap > > &  refinement_map,
std::vector< std::pair< unsigned int, QpMap > > &  coarsen_map,
int  parent_side,
int  child,
int  child_side 
)
privateinherited

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

2687{
2688 TIME_SECTION("findAdaptivityQpMaps", 5);
2689
2690 ReplicatedMesh mesh(_communicator);
2691 mesh.skip_partitioning(true);
2692
2693 unsigned int dim = template_elem->dim();
2694 mesh.set_mesh_dimension(dim);
2695
2696 for (unsigned int i = 0; i < template_elem->n_nodes(); ++i)
2697 mesh.add_point(template_elem->point(i));
2698
2699 Elem * elem = mesh.add_elem(Elem::build(template_elem->type()).release());
2700
2701 for (unsigned int i = 0; i < template_elem->n_nodes(); ++i)
2702 elem->set_node(i, mesh.node_ptr(i));
2703
2704 std::unique_ptr<FEBase> fe(FEBase::build(dim, FEType()));
2705 fe->get_phi();
2706 const std::vector<Point> & q_points_volume = fe->get_xyz();
2707
2708 std::unique_ptr<FEBase> fe_face(FEBase::build(dim, FEType()));
2709 fe_face->get_phi();
2710 const std::vector<Point> & q_points_face = fe_face->get_xyz();
2711
2712 fe->attach_quadrature_rule(&qrule);
2713 fe_face->attach_quadrature_rule(&qrule_face);
2714
2715 // The current q_points (locations in *physical* space)
2716 const std::vector<Point> * q_points;
2717
2718 if (parent_side != -1)
2719 {
2720 fe_face->reinit(elem, parent_side);
2721 q_points = &q_points_face;
2722 }
2723 else
2724 {
2725 fe->reinit(elem);
2726 q_points = &q_points_volume;
2727 }
2728
2729 std::vector<Point> parent_ref_points;
2730
2731 libMesh::FEMap::inverse_map(elem->dim(), elem, *q_points, parent_ref_points);
2732 libMesh::MeshRefinement mesh_refinement(mesh);
2733 mesh_refinement.uniformly_refine(1);
2734
2735 // A map from the child element index to the locations of all the child's quadrature points in
2736 // *reference* space. Note that we use a map here instead of a vector because the caller can
2737 // pass an explicit child index. We are not guaranteed to have a sequence from [0, n_children)
2738 std::map<unsigned int, std::vector<Point>> child_to_ref_points;
2739
2740 unsigned int n_children = elem->n_children();
2741
2742 refinement_map.resize(n_children);
2743
2744 std::vector<unsigned int> children;
2745
2746 if (child != -1) // Passed in a child explicitly
2747 children.push_back(child);
2748 else
2749 {
2750 children.resize(n_children);
2751 for (unsigned int child = 0; child < n_children; ++child)
2752 children[child] = child;
2753 }
2754
2755 for (unsigned int i = 0; i < children.size(); ++i)
2756 {
2757 unsigned int child = children[i];
2758
2759 if ((parent_side != -1 && !elem->is_child_on_side(child, parent_side)))
2760 continue;
2761
2762 const Elem * child_elem = elem->child_ptr(child);
2763
2764 if (child_side != -1)
2765 {
2766 fe_face->reinit(child_elem, child_side);
2767 q_points = &q_points_face;
2768 }
2769 else
2770 {
2771 fe->reinit(child_elem);
2772 q_points = &q_points_volume;
2773 }
2774
2775 std::vector<Point> child_ref_points;
2776
2777 libMesh::FEMap::inverse_map(elem->dim(), elem, *q_points, child_ref_points);
2778 child_to_ref_points[child] = child_ref_points;
2779
2780 std::vector<QpMap> & qp_map = refinement_map[child];
2781
2782 // Find the closest parent_qp to each child_qp
2783 mapPoints(child_ref_points, parent_ref_points, qp_map);
2784 }
2785
2786 coarsen_map.resize(parent_ref_points.size());
2787
2788 // For each parent qp find the closest child qp
2789 for (unsigned int child = 0; child < n_children; child++)
2790 {
2791 if (parent_side != -1 && !elem->is_child_on_side(child, child_side))
2792 continue;
2793
2794 std::vector<Point> & child_ref_points = child_to_ref_points[child];
2795
2796 std::vector<QpMap> qp_map;
2797
2798 // Find all of the closest points from parent_qp to _THIS_ child's qp
2799 mapPoints(parent_ref_points, child_ref_points, qp_map);
2800
2801 // Check those to see if they are closer than what we currently have for each point
2802 for (unsigned int parent_qp = 0; parent_qp < parent_ref_points.size(); ++parent_qp)
2803 {
2804 std::pair<unsigned int, QpMap> & child_and_map = coarsen_map[parent_qp];
2805 unsigned int & closest_child = child_and_map.first;
2806 QpMap & closest_map = child_and_map.second;
2807
2808 QpMap & current_map = qp_map[parent_qp];
2809
2810 if (current_map._distance < closest_map._distance)
2811 {
2812 closest_child = child;
2813 closest_map = current_map;
2814 }
2815 }
2816 }
2817}
Helper object for holding qp mapping info.
Definition MooseMesh.h:76
Real _distance
The distance between them.
Definition MooseMesh.h:87

Referenced by MooseMesh::buildCoarseningMap(), and MooseMesh::buildRefinementMap().

◆ flagInvalidSolutionInternal()

template<bool warning>
template void SolutionInvalidInterface::flagInvalidSolutionInternal< false > ( const InvalidSolutionID  invalid_solution_id) const
protectedinherited

Set solution invalid mark for the given solution ID.

Definition at line 41 of file SolutionInvalidInterface.C.

43{
44 mooseAssert(
45 warning == moose::internal::getSolutionInvalidityRegistry().item(invalid_solution_id).warning,
46 "Inconsistent warning flag");
47 auto & solution_invalidity = _si_moose_base.getMooseApp().solutionInvalidity();
48 if constexpr (!warning)
50 solution_invalidity.printDebug(invalid_solution_id);
51 return solution_invalidity.flagInvalidSolutionInternal(invalid_solution_id);
52}
bool immediatelyPrintInvalidSolution() const
Whether or not the solution invalid warnings are printed out immediately.
SolutionInvalidity & solutionInvalidity()
Get the SolutionInvalidity for this app.
Definition MooseApp.h:182
const FEProblemBase * _si_problem
A pointer to FEProblem base.
const MooseBase & _si_moose_base
The MooseBase that owns this interface.
void printDebug(InvalidSolutionID _invalid_solution_id) const
Immediately print the section and message for debug purpose.
SolutionInvalidityRegistry & getSolutionInvalidityRegistry()
Get the global SolutionInvalidityRegistry singleton.

◆ freeBndElems()

void MooseMesh::freeBndElems ( )
protectedinherited

Definition at line 385 of file MooseMesh.C.

386{
387 // free memory
388 for (auto & belem : _bnd_elems)
389 delete belem;
390
391 for (auto & it : _bnd_elem_ids)
392 it.second.clear();
393
394 _bnd_elem_ids.clear();
395 _bnd_elem_range.reset();
396}
sideset clear()
std::unique_ptr< libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition MooseMesh.h:1681

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

◆ freeBndNodes()

void MooseMesh::freeBndNodes ( )
protectedinherited

Definition at line 366 of file MooseMesh.C.

367{
368 // free memory
369 for (auto & bnode : _bnd_nodes)
370 delete bnode;
371
372 for (auto & it : _node_set_nodes)
373 it.second.clear();
374
375 _node_set_nodes.clear();
376
377 for (auto & it : _bnd_node_ids)
378 it.second.clear();
379
380 _bnd_node_ids.clear();
381 _bnd_node_range.reset();
382}

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

◆ getActiveLocalElementRange()

const ConstElemRange * MooseMesh::getActiveLocalElementRange ( )
inherited

◆ getActiveNodeRange()

NodeRange * MooseMesh::getActiveNodeRange ( )
inherited

Definition at line 1263 of file MooseMesh.C.

1264{
1265 if (!_active_node_range)
1266 {
1267 TIME_SECTION("getActiveNodeRange", 5);
1268
1270 std::make_unique<NodeRange>(getMesh().active_nodes_begin(), getMesh().active_nodes_end());
1271 }
1272
1273 return _active_node_range.get();
1274}
std::unique_ptr< libMesh::NodeRange > _active_node_range
Definition MooseMesh.h:1676

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

◆ getActiveSemiLocalNodeRange()

SemiLocalNodeRange * MooseMesh::getActiveSemiLocalNodeRange ( ) const
inherited

Definition at line 1277 of file MooseMesh.C.

1278{
1279 mooseAssert(_active_semilocal_node_range,
1280 "_active_semilocal_node_range has not been created yet!");
1281
1282 return _active_semilocal_node_range.get();
1283}
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Ranges for use with threading, cached so they don't have to get rebuilt all the time (which takes tim...
Definition MooseMesh.h:1675

◆ getAllElemIDs()

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

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

Definition at line 1173 of file MooseMesh.C.

1174{
1175 std::set<dof_id_type> unique_ids;
1176 for (auto & pair : _block_id_mapping[elem_id_index])
1177 for (auto & id : pair.second)
1178 unique_ids.insert(id);
1179 return unique_ids;
1180}

Referenced by MooseMesh::getElemIDMapping().

◆ getAxisymmetricRadialCoord()

unsigned int MooseMesh::getAxisymmetricRadialCoord ( ) const
inherited

Returns the desired radial direction for RZ coordinate transformation.

Returns
The coordinate direction for the radial direction

Definition at line 4460 of file MooseMesh.C.

4461{
4463 mooseError("getAxisymmetricRadialCoord() should not be called if "
4464 "setGeneralAxisymmetricCoordAxes() has been called.");
4465
4466 if (_rz_coord_axis == 0)
4467 return 1; // if the rotation axis is x (0), then the radial direction is y (1)
4468 else
4469 return 0; // otherwise the radial direction is assumed to be x, i.e., the rotation axis is y
4470}
unsigned int _rz_coord_axis
Storage for RZ axis selection.
Definition MooseMesh.h:2067
bool usingGeneralAxisymmetricCoordAxes() const
Returns true if general axisymmetric coordinate axes are being used.
Definition MooseMesh.C:4445

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

◆ getBase()

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

Definition at line 147 of file MooseBase.h.

147{ return _pars.getBase(); }
const std::string & getBase() const

Referenced by MooseBase::uniqueParameterName().

◆ getBlockConnectedBlocks()

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

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

3688{
3689 const auto it = _sub_to_data.find(subdomain_id);
3690
3691 if (it == _sub_to_data.end())
3692 mooseError("Unable to find subdomain ID: ", subdomain_id, '.');
3693
3694 return it->second.neighbor_subs;
3695}

◆ getBlocksMaxDimension()

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

Returns the maximum element dimension on the given blocks.

Definition at line 3014 of file MooseMesh.C.

3015{
3016 const auto & mesh = getMesh();
3017
3018 // Take a shortcut if possible
3019 if (const auto & elem_dims = mesh.elem_dimensions(); mesh.is_prepared() && elem_dims.size() == 1)
3020 return *elem_dims.begin();
3021
3022 unsigned short dim = 0;
3023 const auto subdomain_ids = getSubdomainIDs(blocks);
3024 const std::set<SubdomainID> subdomain_ids_set(subdomain_ids.begin(), subdomain_ids.end());
3025 for (const auto & elem : mesh.active_subdomain_set_elements_ptr_range(subdomain_ids_set))
3026 dim = std::max(dim, elem->dim());
3027
3028 // Get the maximumal globally
3029 _communicator.max(dim);
3030 return dim;
3031}
char ** blocks
std::vector< SubdomainID > getSubdomainIDs(const std::vector< SubdomainName > &subdomain_names) const
Get the associated subdomainIDs for the subdomain names that are passed in.
Definition MooseMesh.C:1728

Referenced by BlockRestrictable::initializeBlockRestrictable().

◆ getBoundariesToActiveSemiLocalElemIds()

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

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

Definition at line 1334 of file MooseMesh.C.

1335{
1336 return _bnd_elem_ids;
1337}

Referenced by MooseMesh::getBoundariesToElems().

◆ getBoundariesToElems()

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

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

Definition at line 1326 of file MooseMesh.C.

1327{
1328 mooseDeprecated("MooseMesh::getBoundariesToElems is deprecated, "
1329 "use MooseMesh::getBoundariesToActiveSemiLocalElemIds");
1331}
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:1334

◆ getBoundaryActiveNeighborElemIds()

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

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

1352{
1353 // Vector of boundary elems is updated every mesh update
1354 std::unordered_set<dof_id_type> neighbor_elems;
1355 for (const auto & bnd_elem : _bnd_elems)
1356 {
1357 const auto & [elem_ptr, elem_side, elem_bid] = *bnd_elem;
1358 if (elem_bid == bid)
1359 {
1360 const auto * neighbor = elem_ptr->neighbor_ptr(elem_side);
1361 // Dont add fully remote elements, ghosted is fine
1362 if (neighbor && neighbor != libMesh::remote_elem)
1363 {
1364 // handle mesh refinement, only return active elements near the boundary
1365 if (neighbor->active())
1366 neighbor_elems.insert(neighbor->id());
1367 else
1368 {
1369 std::vector<const Elem *> family;
1370 neighbor->active_family_tree_by_neighbor(family, elem_ptr);
1371 for (const auto & child_neighbor : family)
1372 neighbor_elems.insert(child_neighbor->id());
1373 }
1374 }
1375 }
1376 }
1377
1378 return neighbor_elems;
1379}

◆ getBoundaryActiveSemiLocalElemIds()

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

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

1341{
1342 // The boundary to element map is computed on every mesh update
1343 const auto it = _bnd_elem_ids.find(bid);
1344 if (it == _bnd_elem_ids.end())
1345 // Boundary is not local to this domain, return an empty set
1346 return std::unordered_set<dof_id_type>{};
1347 return it->second;
1348}

◆ getBoundaryConnectedBlocks()

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

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

3655{
3656 std::set<SubdomainID> subdomain_ids;
3657 for (const auto & [sub_id, data] : _sub_to_data)
3658 if (data.boundary_ids.find(bid) != data.boundary_ids.end())
3659 subdomain_ids.insert(sub_id);
3660
3661 return subdomain_ids;
3662}
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition KokkosUtils.h:40

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

◆ getBoundaryConnectedSecondaryBlocks()

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

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

3666{
3667 std::set<SubdomainID> subdomain_ids;
3668 for (const auto & it : _neighbor_subdomain_boundary_ids)
3669 if (it.second.find(bid) != it.second.end())
3670 subdomain_ids.insert(it.first);
3671
3672 return subdomain_ids;
3673}

Referenced by DomainUserObject::DomainUserObject().

◆ getBoundaryElementRange()

ConstBndElemRange * MooseMesh::getBoundaryElementRange ( )
inherited

Definition at line 1313 of file MooseMesh.C.

1314{
1315 if (!_bnd_elem_range)
1316 {
1317 TIME_SECTION("getBoundaryElementRange", 5);
1318
1319 _bnd_elem_range = std::make_unique<ConstBndElemRange>(bndElemsBegin(), bndElemsEnd());
1320 }
1321
1322 return _bnd_elem_range.get();
1323}
virtual bnd_elem_iterator bndElemsBegin()
Return iterators to the beginning/end of the boundary elements list.
Definition MooseMesh.C:1553
virtual bnd_elem_iterator bndElemsEnd()
Definition MooseMesh.C:1561

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

◆ getBoundaryID()

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

Get the associated BoundaryID for the boundary name.

Parameters
boundary_nameThe name of the boundary.
Returns
the boundary id from the passed boundary name.

Definition at line 1683 of file MooseMesh.C.

1684{
1685 if (boundary_name == "ANY_BOUNDARY_ID")
1686 mooseError("Please use getBoundaryIDs() when passing \"ANY_BOUNDARY_ID\"");
1687
1688 return MooseMeshUtils::getBoundaryID(boundary_name, getMesh());
1689}
BoundaryID getBoundaryID(const BoundaryName &boundary_name, const MeshBase &mesh)
Gets the boundary ID associated with the given BoundaryName.

Referenced by PatternedMesh::buildMesh(), StitchedMesh::buildMesh(), TiledMesh::buildMesh(), DMSetUp_Moose_Pre(), GeometricSearchData::getNearestNodeLocator(), GeometricSearchData::getPenetrationLocator(), GeometricSearchData::getQuadratureNearestNodeLocator(), GeometricSearchData::getQuadraturePenetrationLocator(), LowerBoundNodalKernel::LowerBoundNodalKernel(), NodalScalarKernel::NodalScalarKernel(), GhostPrimaryFace::operator()(), EqualValueBoundaryConstraint::populateSecondaryNodes(), MooseMesh::prepare(), LinearNodalConstraint::updateConnectivity(), and UpperBoundNodalKernel::UpperBoundNodalKernel().

◆ getBoundaryIDs() [1/4]

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

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

3051{
3052 return getMesh().get_boundary_info().get_boundary_ids();
3053}

◆ getBoundaryIDs() [2/4]

std::vector< std::vector< BoundaryID > > MooseMesh::getBoundaryIDs ( const Elem *const  elem) const
inherited

Returns a vector of vector of boundary IDs for the requested element on each of its sides.

Definition at line 3042 of file MooseMesh.C.

3043{
3044 std::vector<std::vector<BoundaryID>> ids;
3045 getMesh().get_boundary_info().side_boundary_ids(elem, ids);
3046 return ids;
3047}

◆ getBoundaryIDs() [3/4]

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

◆ getBoundaryIDs() [4/4]

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

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

Parameters
boundary_nameThe names of the boundaries.
Returns
the boundary ids from the passed boundary names.

Definition at line 1714 of file MooseMesh.C.

1716{
1718 getMesh(), boundary_name, generate_unknown, _mesh_boundary_ids);
1719}
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition MooseMesh.h:1701
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.

◆ getBoundaryName()

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

Return the name of the boundary given the id.

Definition at line 1787 of file MooseMesh.C.

1788{
1789 const BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1790
1791 // We need to figure out if this boundary is a sideset or nodeset
1792 if (boundary_info.get_side_boundary_ids().count(boundary_id))
1793 return boundary_info.get_sideset_name(boundary_id);
1794 else
1795 return boundary_info.get_nodeset_name(boundary_id);
1796}

Referenced by MooseMesh::addPeriodicVariable(), BoundaryLinearFVFluxIntegral::computeFaceInfoIntegral(), MooseMesh::detectPairedSidesets(), MooseMesh::getBoundaryString(), BoundaryLinearFVFluxIntegral::initialSetup(), BoundaryNodeIntegrityCheckThread::onNode(), and NonlinearThread::printBoundaryExecutionInformation().

◆ getBoundaryNodeRange()

ConstBndNodeRange * MooseMesh::getBoundaryNodeRange ( )
inherited

Definition at line 1300 of file MooseMesh.C.

1301{
1302 if (!_bnd_node_range)
1303 {
1304 TIME_SECTION("getBoundaryNodeRange", 5);
1305
1306 _bnd_node_range = std::make_unique<ConstBndNodeRange>(bndNodesBegin(), bndNodesEnd());
1307 }
1308
1309 return _bnd_node_range.get();
1310}
virtual bnd_node_iterator bndNodesBegin()
Return iterators to the beginning/end of the boundary nodes list.
Definition MooseMesh.C:1537
virtual bnd_node_iterator bndNodesEnd()
Definition MooseMesh.C:1545

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

◆ getBoundaryString()

std::string MooseMesh::getBoundaryString ( const BoundaryID  boundary_id) const
inherited

Return the name of the boundary given the id, if it exists.

Otherwise, return the id as a string.

Definition at line 1799 of file MooseMesh.C.

1800{
1801 const auto name = getBoundaryName(boundary_id);
1802 return name.size() ? name : std::to_string(boundary_id);
1803}

◆ getCheckedPointerParam()

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

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

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

Definition at line 459 of file MooseBase.h.

460{
461 return _pars.getCheckedPointerParam<T>(name, error_string);
462}
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.

◆ getCoarseningMap()

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

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

2638{
2639 std::pair<int, ElemType> the_pair(input_side, elem.type());
2640
2642 mooseError("Could not find a suitable qp refinement map!");
2643
2644 return _elem_type_to_coarsening_map[the_pair];
2645}

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

◆ getConstructNodeListFromSideList()

bool MooseMesh::getConstructNodeListFromSideList ( )
inlineinherited

Return construct node list from side list boolean.

Definition at line 1570 of file MooseMesh.h.

Referenced by SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater().

◆ getCoordSystem() [1/2]

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

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

xyz, rz, or r-spherical

Definition at line 4373 of file MooseMesh.C.

4374{
4375 return _coord_sys;
4376}

Referenced by MooseMesh::setGeneralAxisymmetricCoordAxes().

◆ getCoordSystem() [2/2]

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

Get the coordinate system type, e.g.

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

Definition at line 4341 of file MooseMesh.C.

4342{
4343 auto it = _coord_sys.find(sid);
4344 if (it != _coord_sys.end())
4345 return (*it).second;
4346 else
4347 mooseError("Requested subdomain ", sid, " does not exist.");
4348}

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

◆ getDataFileName()

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

Deprecated method.

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

Definition at line 21 of file DataFileInterface.C.

22{
23 _parent.mooseDeprecated("getDataFileName() is deprecated. The file path is now directly set "
24 "within the InputParameters.\nUse getParam<DataFileName>(\"",
25 param,
26 "\") instead.");
27 return _parent.getParam<DataFileName>(param);
28}
const ParallelParamObject & _parent
void mooseDeprecated(Args &&... args) const
Emits a deprecation warning prefixed with the object name and type, and a stack trace.
Definition MooseBase.h:317

◆ getDataFileNameByName()

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

Deprecated method.

Use getDataFilePath() instead.

Definition at line 31 of file DataFileInterface.C.

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

◆ getDataFilePath()

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

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

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

Definition at line 40 of file DataFileInterface.C.

41{
42 // This should only ever be used with relative paths. There is no point to
43 // use this search path with an absolute path.
44 if (std::filesystem::path(relative_path).is_absolute())
45 _parent.mooseWarning("While using getDataFilePath(\"",
46 relative_path,
47 "\"): This API should not be used for absolute paths.");
48
49 // This will search the data paths for this relative path
50 std::optional<std::string> error;
52 {
53 // Throw on error so that if getPath() fails, we can throw an error
54 // with the context of _parent.mooseError()
55 Moose::ScopedThrowOnError scoped_throw_on_error;
56
57 try
58 {
59 found_path = Moose::DataFileUtils::getPath(relative_path);
60 }
61 catch (std::exception & e)
62 {
63 error = e.what();
64 }
65 }
66
67 if (error)
68 _parent.mooseError(*error);
69
70 mooseAssert(found_path.context == Moose::DataFileUtils::Context::DATA,
71 "Should only ever obtain data");
72 mooseAssert(found_path.data_name, "Should be set");
73
74 const std::string msg =
75 "Using data file '" + found_path.path + "' from " + *found_path.data_name + " data";
76 _parent.mooseInfo(msg);
77
78 return found_path.path;
79}
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Definition MooseBase.h:299
void mooseInfo(Args &&... args) const
Emits an informational message prefixed with the object name and type, unless the application suppres...
Definition MooseBase.h:338
Scoped helper for setting Moose::_throw_on_error during this scope.
Definition Moose.h:308
@ DATA
From installed/in-tree data.
Path getPath(std::string path, const GetPathOptions &options={})
Get the data path for a given path, searching the registered data.
Representation of a data file path.
std::optional< std::string > data_name
The name of the data registry the file came from (with context == DATA)
Context context
Context for the file (where it came from)

Referenced by DataFileInterface::getDataFileNameByName().

◆ getDisplaceNodeListBySideList()

bool MooseMesh::getDisplaceNodeListBySideList ( )
inlineinherited

Return displace node list by side list boolean.

Definition at line 1573 of file MooseMesh.h.

◆ getElementIDIndex()

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

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

Definition at line 2363 of file MooseMesh.h.

2364{
2365 if (!hasElementID(id_name))
2366 mooseError("Mesh does not have element ID for ", id_name);
2367 return getMesh().get_elem_integer_index(id_name);
2368}
bool hasElementID(const std::string &id_name) const
Whether mesh has an extra element integer with a given name.
Definition MooseMesh.h:2357

Referenced by MooseMesh::areElemIDsIdentical().

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

Definition at line 1144 of file MooseMesh.C.

1145{
1146 auto & mesh_base = getMesh();
1147
1148 if (!mesh_base.has_elem_integer(from_id_name))
1149 mooseError("Mesh does not have the element integer name '", from_id_name, "'");
1150 if (!mesh_base.has_elem_integer(to_id_name))
1151 mooseError("Mesh does not have the element integer name '", to_id_name, "'");
1152
1153 const auto id1 = mesh_base.get_elem_integer_index(from_id_name);
1154 const auto id2 = mesh_base.get_elem_integer_index(to_id_name);
1155
1156 std::unordered_map<dof_id_type, std::set<dof_id_type>> id_map;
1157 for (const auto id : getAllElemIDs(id1))
1158 id_map[id] = std::set<dof_id_type>();
1159
1160 for (const auto & elem : mesh_base.active_local_element_ptr_range())
1161 id_map[elem->get_extra_integer(id1)].insert(elem->get_extra_integer(id2));
1162
1163 for (auto & [id, ids] : id_map)
1164 {
1165 libmesh_ignore(id); // avoid overzealous gcc 9.4 unused var warning
1166 comm().set_union(ids);
1167 }
1168
1169 return id_map;
1170}
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:1173
void libmesh_ignore(const Args &...)

◆ getElemIDsOnBlocks()

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

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

Definition at line 1183 of file MooseMesh.C.

1184{
1185 std::set<dof_id_type> unique_ids;
1186 for (auto & blk : blks)
1187 {
1188 auto it = _block_id_mapping[elem_id_index].find(blk);
1189 if (it == _block_id_mapping[elem_id_index].end())
1190 mooseError("Block ", blk, " is not available on the mesh");
1191
1192 for (auto & mid : it->second)
1193 unique_ids.insert(mid);
1194 }
1195 return unique_ids;
1196}

◆ getFileName()

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

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

1224{ return ""; }

◆ getGeneralAxisymmetricCoordAxis()

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

Gets the general axisymmetric coordinate axis for a block.

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

Definition at line 4435 of file MooseMesh.C.

4436{
4437 auto it = _subdomain_id_to_rz_coord_axis.find(subdomain_id);
4438 if (it != _subdomain_id_to_rz_coord_axis.end())
4439 return (*it).second;
4440 else
4441 mooseError("Requested subdomain ", subdomain_id, " does not exist.");
4442}
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:2070

◆ getGhostedBoundaries()

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

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

Definition at line 3349 of file MooseMesh.C.

3350{
3351 return _ghosted_boundaries;
3352}

◆ getGhostedBoundaryInflation()

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

Return a writable reference to the _ghosted_boundaries_inflation vector.

Definition at line 3355 of file MooseMesh.C.

3356{
3358}
std::vector< Real > _ghosted_boundaries_inflation
Definition MooseMesh.h:1755

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

◆ getGhostingPatchSize()

unsigned int MooseMesh::getGhostingPatchSize ( ) const
inlineinherited

Getter for the ghosting_patch_size parameter.

Definition at line 634 of file MooseMesh.h.

634{ 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:1761

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

◆ getHigherDSide()

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

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

Definition at line 1703 of file MooseMesh.C.

1704{
1706
1708 return it->second;
1709 else
1710 return libMesh::invalid_uint;
1711}

◆ getHitNode() [1/2]

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

Definition at line 136 of file MooseBase.h.

136{ return getHitNode(_pars); }

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

◆ getHitNode() [2/2]

const hit::Node * MooseBase::getHitNode ( const InputParameters &  params)
staticprivateinherited

Internal method for getting a hit node (if available) given a set of parameters.

Needs to be static so that we can call it externally from InputParameters for errors that do not have context of the MooseBase

Definition at line 167 of file MooseBase.C.

168{
169 if (const auto hit_node = params.getHitNode())
170 if (!hit_node->isRoot())
171 return hit_node;
172 return nullptr;
173}
const hit::Node * getHitNode(const std::string &param) const

◆ getInflatedProcessorBoundingBox()

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

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

3553{
3554 // Grab a bounding box to speed things up. Note that
3555 // local_bounding_box is *not* equivalent to processor_bounding_box
3556 // with processor_id() except in serial.
3557 BoundingBox bbox = MeshTools::create_local_bounding_box(getMesh());
3558
3559 // Inflate the bbox just a bit to deal with roundoff
3560 // Adding 1% of the diagonal size in each direction on each end
3561 Real inflation_amount = inflation_multiplier * (bbox.max() - bbox.min()).norm();
3562 Point inflation(inflation_amount, inflation_amount, inflation_amount);
3563
3564 bbox.first -= inflation; // min
3565 bbox.second += inflation; // max
3566
3567 return bbox;
3568}
libMesh::BoundingBox create_local_bounding_box(const MeshBase &mesh)
LIBMESH_DEVICE_INLINE auto norm(const T &a)

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

◆ getInterfaceConnectedBlocks()

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

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

3677{
3678 std::set<SubdomainID> subdomain_ids = getBoundaryConnectedBlocks(bid);
3679 for (const auto & it : _neighbor_subdomain_boundary_ids)
3680 if (it.second.find(bid) != it.second.end())
3681 subdomain_ids.insert(it.first);
3682
3683 return subdomain_ids;
3684}
std::set< SubdomainID > getBoundaryConnectedBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary.
Definition MooseMesh.C:3654

◆ getKokkosMesh() [1/2]

Moose::Kokkos::Mesh * MooseMesh::getKokkosMesh ( )
inlineinherited

Accessor for Kokkos mesh object.

Definition at line 678 of file MooseMesh.h.

678{ return _kokkos_mesh.get(); }
std::unique_ptr< Moose::Kokkos::Mesh > _kokkos_mesh
Pointer to Kokkos mesh object.
Definition MooseMesh.h:1613

◆ getKokkosMesh() [2/2]

const Moose::Kokkos::Mesh * MooseMesh::getKokkosMesh ( ) const
inlineinherited

Definition at line 679 of file MooseMesh.h.

679{ return _kokkos_mesh.get(); }

◆ getLocalNodeRange()

ConstNodeRange * MooseMesh::getLocalNodeRange ( )
inherited

Definition at line 1286 of file MooseMesh.C.

1287{
1288 if (!_local_node_range)
1289 {
1290 TIME_SECTION("getLocalNodeRange", 5);
1291
1292 _local_node_range = std::make_unique<ConstNodeRange>(getMesh().local_nodes_begin(),
1293 getMesh().local_nodes_end());
1294 }
1295
1296 return _local_node_range.get();
1297}
std::unique_ptr< libMesh::ConstNodeRange > _local_node_range
Definition MooseMesh.h:1677

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

◆ getLowerDElem()

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

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

1693{
1694 auto it = _higher_d_elem_side_to_lower_d_elem.find(std::make_pair(elem, side));
1695
1697 return it->second;
1698 else
1699 return nullptr;
1700}

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

◆ getLowerDElemMap()

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

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

Definition at line 2397 of file MooseMesh.h.

2398{
2400}

◆ getMaxInDimension()

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

Reimplemented in AnnularMesh, and GeneratedMesh.

Definition at line 2193 of file MooseMesh.C.

2194{
2195 mooseAssert(_mesh, "The MeshBase has not been constructed");
2196 mooseAssert(component < _bounds.size(), "Requested dimension out of bounds");
2197
2198 return _bounds[component][MAX];
2199}

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

◆ getMaxLeafSize()

unsigned int MooseMesh::getMaxLeafSize ( ) const
inlineinherited

Getter for the maximum leaf size parameter.

Definition at line 639 of file MooseMesh.h.

639{ return _max_leaf_size; }
unsigned int _max_leaf_size
Definition MooseMesh.h:1764

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

◆ getMaxNodesPerElem()

unsigned int MooseMesh::getMaxNodesPerElem ( ) const
inlineinherited

Get the maximum number of nodes per element.

Definition at line 1304 of file MooseMesh.h.

1304{ return _max_nodes_per_elem; }

◆ getMaxNodesPerSide()

unsigned int MooseMesh::getMaxNodesPerSide ( ) const
inlineinherited

Get the maximum number of nodes per side.

Definition at line 1309 of file MooseMesh.h.

1309{ return _max_nodes_per_side; }

◆ getMaxSidesPerElem()

unsigned int MooseMesh::getMaxSidesPerElem ( ) const
inlineinherited

Get the maximum number of sides per element.

Definition at line 1299 of file MooseMesh.h.

1299{ return _max_sides_per_elem; }

◆ getMesh() [1/4]

MeshBase & MooseMesh::getMesh ( )
inherited

Accessor for the underlying libMesh Mesh object.

Definition at line 3581 of file MooseMesh.C.

3582{
3583 mooseAssert(_mesh, "Mesh hasn't been created");
3584 return *_mesh;
3585}

Referenced by CopyMeshPartitioner::_do_partition(), MooseMesh::activeLocalElementsBegin(), MooseMesh::activeLocalElementsBegin(), MooseMesh::activeLocalElementsEnd(), MooseMesh::activeLocalElementsEnd(), Adaptivity::adaptMesh(), FEProblemBase::addAnyRedistributers(), MooseMesh::addQuadratureNode(), MooseMesh::addUniqueNode(), MultiAppConservativeTransfer::adjustTransferredSolution(), MultiAppConservativeTransfer::adjustTransferredSolutionNearestPoint(), Assembly::Assembly(), MooseMesh::buildActiveSideList(), MooseMesh::buildBndElemList(), MFEMMesh::buildDummyMooseMesh(), MooseMesh::buildElemIDInfo(), MooseMesh::buildFiniteVolumeInfo(), MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildLowerDMesh(), AnnularMesh::buildMesh(), ConcentricCircleMesh::buildMesh(), FileMesh::buildMesh(), GeneratedMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), PatternedMesh::buildMesh(), RinglebMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), StitchedMesh::buildMesh(), TiledMesh::buildMesh(), ImageMesh::buildMesh2D(), ImageMesh::buildMesh3D(), MooseMesh::buildNodeList(), MooseMesh::buildNodeListFromSideList(), MooseMesh::buildPeriodicNodeMap(), MooseMesh::buildPeriodicNodeSets(), MooseMesh::buildPRefinementAndCoarseningMaps(), buildSerialMFEMMesh(), MooseMesh::buildSideList(), MooseMesh::cacheChangedLists(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MooseMesh::cacheInfo(), MooseMesh::changeBoundaryId(), MooseMesh::checkCoordinateSystems(), MortarConsumerInterface::checkPetrovGalerkinQuadraticFaces(), MooseMesh::computeMaxPerElemAndSide(), NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), PenetrationThread::createInfoForElem(), MortarInterfaceWarehouse::createMortarInterface(), MooseMesh::detectOrthogonalDimRanges(), MooseMesh::detectPairedSidesets(), MooseMesh::dimension(), DisplacedProblem::UpdateDisplacedMeshThread::displaceNodesWithoutDofs(), ExtraElementIntegerDivision::divisionIndex(), FunctorBinnedValuesDivision::divisionIndex(), SubdomainsDivision::divisionIndex(), DumpObjectsProblem::dumpVariableHelper(), ElementalVariableValue::ElementalVariableValue(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementMaterialSampler::ElementMaterialSampler(), MooseMesh::elemPtr(), MooseMesh::elemPtr(), FunctorNodalCorrector::execute(), MultiAppUserObjectTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElemSideNeighborLayersTester::execute(), NodalNormalsCorner::execute(), NodalNormalsPreprocessor::execute(), MultiAppMFEMTolibMeshShapeEvaluationTransfer::extractlibMeshNodePositions(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), CentroidMultiApp::fillPositions(), QuadraturePointMultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), ActivateElementsUserObjectBase::finalize(), SidesetAroundSubdomainUpdater::finalize(), FunctorNodalCorrector::FunctorNodalCorrector(), ElementSubdomainModifierBase::gatherMovingBoundaryChanges(), ElementSubdomainModifierBase::gatherMovingBoundaryChangesHelper(), MooseMesh::getActiveLocalElementRange(), MooseMesh::getActiveNodeRange(), MooseMesh::getBlocksMaxDimension(), MooseMesh::getBoundaryID(), MooseMesh::getBoundaryIDs(), MooseMesh::getBoundaryIDs(), MooseMesh::getBoundaryIDs(), MooseMesh::getBoundaryIDs(), MooseMesh::getBoundaryName(), MooseMesh::getElementIDIndex(), MooseMesh::getElemIDMapping(), FEProblemBase::getEvaluableElementRange(), MooseMesh::getInflatedProcessorBoundingBox(), MooseMesh::getLocalNodeRange(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearEvaluableElementRange(), MooseMesh::getPointLocator(), MooseMesh::getSubdomainID(), MooseMesh::getSubdomainIDs(), MooseMesh::getSubdomainIDs(), MooseMesh::getSubdomainName(), MooseMesh::ghostGhostedBoundaries(), Exodus::handleExodusIOMeshRenumbering(), MooseMesh::hasElementID(), MooseMesh::hasLowerD(), MooseMesh::hasSingleSubdomain(), MooseMesh::init(), DisplacedProblem::UpdateDisplacedMeshThread::init(), ExtraElementIntegerDivision::initialize(), ElementCentroidPositions::initialize(), ElementGroupCentroidPositions::initialize(), FunctorExtremaPositions::initialize(), FunctorPositions::initialize(), NodePositions::initialize(), ParsedDownSelectionPositions::initialize(), QuadraturePointsPositions::initialize(), FunctorTimes::initialize(), VerifyElementUniqueID::initialize(), VerifyNodalUniqueID::initialize(), AuxKernelBase::initialSetup(), NodalVariableValue::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), SampledOutput::initSample(), MooseMesh::internalNodeToElemMap(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), MooseMesh::isSurfaceElemOnNodeset(), MooseMesh::localNodesBegin(), MooseMesh::localNodesBegin(), MooseMesh::localNodesEnd(), MooseMesh::localNodesEnd(), NodalConstraint::localSecondaryNodes(), Moose::Mortar::loopOverMortarSegments(), MooseMesh::maxElemId(), MooseMesh::maxNodeId(), GhostingUserObject::meshChanged(), RadialAverage::meshChanged(), DisplacedProblem::meshChanged(), FEProblemBase::meshChanged(), MoveNodesByParsedExpressionModifier::moveNodes(), NearestNodeLocator::nearestNode(), MooseMesh::nElem(), MooseMesh::nNodes(), NodalPatchRecovery::NodalPatchRecovery(), NodalVariableValue::NodalVariableValue(), ComputeNodalUserObjectsThread::onNode(), MortarUserObjectThread::operator()(), CacheInfoThread::operator()(), ProxyRelationshipManager::operator()(), PenetrationThread::operator()(), ComputeMortarFunctor::operator()(), XDA::output(), Exodus::outputEmptyTimestep(), Exodus::outputNodalVariables(), Nemesis::outputSetup(), MooseMesh::possiblyRebuildNodeToElemMap(), MooseMesh::prepare(), MoveNodesByParsedExpressionModifier::prepare(), BoundaryPreservedMarker::preserveBoundary(), MooseMesh::printInfo(), FEProblemBase::projectInitialConditionOnCustomRange(), MultiAppMFEMTolibMeshShapeEvaluationTransfer::projectlibMeshNodalValues(), FEProblemBase::projectSolution(), MooseMesh::queryElemPtr(), MooseMesh::queryElemPtr(), MooseMesh::queryNodePtr(), FileMesh::read(), PropertyReadFile::readData(), RedistributeProperties::redistribute(), SubProblem::restrictionBoundaryCheckName(), SubProblem::restrictionSubdomainCheckName(), MooseMesh::setBoundaryName(), NonlinearSystemBase::setConstraintSecondaryValues(), XFEMInterface::setDisplacedMesh(), ActivateElementsUserObjectBase::setNewBoundayName(), MooseMesh::setPartitionerHelper(), MooseMesh::setSubdomainName(), Moose::PeriodicBCHelper::setupPeriodicBoundaries(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), MooseMesh::sideWithBoundaryID(), MoveNodesToGeometryModifierBase::snapNodes(), MultiAppDofCopyTransfer::transfer(), MultiAppMFEMTolibMeshShapeEvaluationTransfer::transferVariables(), DisplacedProblem::undisplaceMesh(), MooseMesh::update(), MooseMesh::updateActiveSemiLocalNodeRange(), Adaptivity::updateErrorVectors(), RandomData::updateGenerators(), DisplacedProblem::updateMesh(), DisplacedProblem::updateMesh(), SampledOutput::updateSample(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), MoveNodesByParsedExpressionModifier::writeOutputs(), and MooseMesh::writeRecoveryFiles().

◆ getMesh() [2/4]

const MeshBase & MooseMesh::getMesh ( ) const
inherited

Definition at line 3588 of file MooseMesh.C.

3589{
3590 mooseAssert(_mesh, "Mesh hasn't been created");
3591 return *_mesh;
3592}

◆ getMesh() [3/4]

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

◆ getMesh() [4/4]

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

◆ getMeshDisplacementVariable()

const std::string & MFEMMesh::getMeshDisplacementVariable ( ) const
inlineinherited

Returns an optional reference to displacement variable name.

Definition at line 56 of file MFEMMesh.h.

◆ getMeshPtr()

const MeshBase * MooseMesh::getMeshPtr ( ) const
inherited

◆ getMFEMParMesh() [1/2]

mfem::ParMesh & MFEMMesh::getMFEMParMesh ( )
inlineinherited

Accessors for the _mfem_par_mesh object.

Definition at line 33 of file MFEMMesh.h.

33{ return *_mfem_par_mesh; }

Referenced by MFEMMesh::getMFEMParMesh().

◆ getMFEMParMesh() [2/2]

const mfem::ParMesh & MFEMMesh::getMFEMParMesh ( ) const
inlineinherited

Definition at line 102 of file MFEMMesh.h.

103{
104 return const_cast<MFEMMesh *>(this)->getMFEMParMesh();
105}
mfem::ParMesh & getMFEMParMesh()
Accessors for the _mfem_par_mesh object.
Definition MFEMMesh.h:33

◆ getMFEMParMeshPtr()

std::shared_ptr< mfem::ParMesh > MFEMMesh::getMFEMParMeshPtr ( )
inlineinherited

Copy a shared_ptr to the mfem::ParMesh object.

Definition at line 39 of file MFEMMesh.h.

39{ return _mfem_par_mesh; }

Referenced by MFEMProblem::setMesh().

◆ getMinInDimension()

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

Returns the min or max of the requested dimension respectively.

Reimplemented in AnnularMesh, and GeneratedMesh.

Definition at line 2184 of file MooseMesh.C.

2185{
2186 mooseAssert(_mesh, "The MeshBase has not been constructed");
2187 mooseAssert(component < _bounds.size(), "Requested dimension out of bounds");
2188
2189 return _bounds[component][MIN];
2190}

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

◆ getMooseApp()

MooseApp & MooseBase::getMooseApp ( ) const
inlineinherited

Get the MooseApp this class is associated with.

Definition at line 87 of file MooseBase.h.

87{ return _app; }

Referenced by ChainControlSetupAction::act(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), FEProblemBase::advanceState(), ParsedChainControl::buildFunction(), MooseMesh::cacheChangedLists(), ReporterTransferInterface::checkHasReporterValue(), LinearFVGradientManager::checkRestartedGradientHistory(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), Coupleable::checkWritableVar(), ComponentPhysicsInterface::ComponentPhysicsInterface(), Coupleable::Coupleable(), MortarInterfaceWarehouse::createMortarInterface(), EigenProblem::doFreeNonlinearPowerIterations(), GreaterThanLessThanPostprocessor::execute(), Terminator::execute(), WorkBalance::execute(), FEProblemSolve::FEProblemSolve(), RadialAverage::finalize(), SolutionInvalidInterface::flagInvalidSolutionInternal(), ChainControl::getChainControlDataSystem(), FEProblemBase::getDistribution(), FEProblemBase::getFunction(), FEProblemBase::getFVInterpolationMethod(), FEProblemBase::getMultiApp(), FEProblemBase::getSampler(), DefaultConvergenceBase::getSharedExecutionerParam(), FEProblemBase::getUserObjectBase(), FEProblemBase::getVectorPostprocessorObjectByName(), ChainControlDataPostprocessor::initialSetup(), MaterialPropertyInterface::MaterialPropertyInterface(), MooseLinearVariableFV< OutputType >::MooseLinearVariableFV(), MooseVariableDataFV< OutputType >::MooseVariableDataFV(), SubProblem::numThreads(), ProgressOutput::output(), PetscOutputInterface::petscLinearOutput(), PetscOutputInterface::petscNonlinearOutput(), Moose::PetscSupport::PetscOptionsScope::PetscOptionsScope(), PetscOutputInterface::PetscOutputInterface(), PostprocessorInterface::postprocessorsAdded(), MultiApp::preTransfer(), AuxiliarySystem::registerFVGradient(), Reporter::Reporter(), ReporterInterface::reportersAdded(), MultiApp::restore(), and VectorPostprocessorInterface::vectorPostprocessorsAdded().

◆ getNodeBlockIds()

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

Return list of blocks to which the given node belongs.

The node may belong to any element this rank holds, local or ghosted, including the parent elements that adaptive refinement keeps. Callers that loop over more than this rank's local nodes rely on this, e.g. MultiApp transfers looping over a parent or child app's mesh, and MoveNodesToGeometryModifierBase looping over every node of a replicated mesh.

Definition at line 1479 of file MooseMesh.C.

1480{
1481 // cacheInfo() records nothing in this case, and every node belongs to the mesh's only subdomain
1482 if (hasSingleSubdomain())
1483 {
1484 if (!getMesh().query_node_ptr(node.id()))
1485 mooseError("Unable to find node: ", node.id(), " in any block list.");
1486 return getMesh().get_mesh_subdomains();
1487 }
1488
1489 // Away from an interface, which is almost every node, this is the only lookup needed
1490 if (const auto it = _node_block.find(node.id()); it != _node_block.end())
1491 return libmesh_map_find(_block_singletons, it->second);
1492
1493 const auto it = _interface_node_blocks.find(node.id());
1494
1495 if (it == _interface_node_blocks.end())
1496 mooseError("Unable to find node: ", node.id(), " in any block list.");
1497
1498 return it->second;
1499}

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

◆ getNodeList()

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

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

Definition at line 3603 of file MooseMesh.C.

3604{
3605 std::map<boundary_id_type, std::vector<dof_id_type>>::const_iterator it =
3606 _node_set_nodes.find(nodeset_id);
3607
3608 if (it == _node_set_nodes.end())
3609 {
3610 // On a distributed mesh we might not know about a remote nodeset,
3611 // so we'll return an empty vector and hope the nodeset exists
3612 // elsewhere.
3613 if (!getMesh().is_serial())
3614 {
3615 static const std::vector<dof_id_type> empty_vec;
3616 return empty_vec;
3617 }
3618 // On a replicated mesh we should know about every nodeset and if
3619 // we're asked for one that doesn't exist then it must be a bug.
3620 else
3621 {
3622 mooseError("Unable to nodeset ID: ", nodeset_id, '.');
3623 }
3624 }
3625
3626 return it->second;
3627}

Referenced by MoveNodesByParsedExpressionModifier::moveNodes(), NodalScalarKernel::NodalScalarKernel(), EqualValueBoundaryConstraint::populateSecondaryNodes(), MoveNodesToGeometryModifierBase::snapNodes(), and LinearNodalConstraint::updateConnectivity().

◆ getNormalByBoundaryID()

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

Returns the normal vector associated with a given BoundaryID.

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

Definition at line 2873 of file MooseMesh.C.

2874{
2875 mooseAssert(_boundary_to_normal_map.get() != nullptr, "Boundary To Normal Map not built!");
2876
2877 // Note: Boundaries that are not in the map (existing boundaries) will default
2878 // construct a new RealVectorValue - (x,y,z)=(0, 0, 0)
2879 return (*_boundary_to_normal_map)[id];
2880}
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:1707

◆ getPairedBoundaryMapping()

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

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

Must have called detectPairedSidesets() prior to using.

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

Definition at line 2350 of file MooseMesh.C.

2351{
2353 mooseError("Trying to retrieve automatic paired mapping for a mesh that is not regular and "
2354 "orthogonal");
2355
2356 mooseAssert(component < dimension(), "Requested dimension out of bounds");
2357
2359 mooseError("MooseMesh::getPairedBoundaryMapping(): Paired boundaries not built; must call "
2360 "detectPairedSidesets() first");
2361
2362 if (component < _paired_boundary->size())
2363 return &(*_paired_boundary)[component];
2364 else
2365 return nullptr;
2366}
bool hasDetectedPairedSidesets() const
Whether or not detectedPairedSidesets() has been called.
Definition MooseMesh.h:1005

Referenced by MooseMesh::addPeriodicVariable().

◆ getParallelType()

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

Definition at line 1169 of file MooseMesh.h.

1169{ return _parallel_type; }

Referenced by MultiAppDofCopyTransfer::initialSetup().

◆ getParam() [1/2]

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

Retrieve a parameter for the object.

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

Definition at line 415 of file MooseBase.h.

416{
417 return InputParameters::getParamHelper<T>(name, _pars);
418}

Referenced by CommonOutputAction::act(), CreateDisplacedProblemAction::act(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), CylinderComponent::addMeshGenerators(), FEProblemBase::addOutput(), ArrayParsedAux::ArrayParsedAux(), BicubicSplineFunction::BicubicSplineFunction(), SurfaceDelaunayGeneratorBase::checkBoundaryAndHolesParams(), MortarContactPressureProvider::checkConsumer(), Console::Console(), CutMeshByLevelSetGenerator::CutMeshByLevelSetGenerator(), DebugResidualAux::DebugResidualAux(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DiffusionPhysicsBase::DiffusionPhysicsBase(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), MFEMEigenvaluesPostprocessor::execute(), FEProblemSolve::FEProblemSolve(), SurfaceDelaunayGeneratorBase::fillDelaunayOptions(), ParsedVectorReporter::finalize(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), ParsedSubdomainGeneratorBase::functionInitialize(), BlockDeletionGenerator::generate(), BoundaryLayerSubdomainGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), FileMeshGenerator::generate(), MeshExtruderGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), SubdomainsFromPartitionerGenerator::generate(), GenericConstantRankTwoTensorTempl< is_ad >::GenericConstantRankTwoTensorTempl(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::GenericConstantSymmetricRankTwoTensorTempl(), GeometricSearchInterface::GeometricSearchInterface(), MooseApp::getCheckpointDirectories(), DataFileInterface::getDataFileName(), ExecutorInterface::getExecutor(), DefaultConvergenceBase::getSharedExecutionerParam(), AddVariableAction::init(), AdvancedOutput::init(), FixedPointIterationAdaptiveDT::init(), TimeSequenceStepper::init(), AdvancedOutput::initAvailableLists(), AttribThread::initFrom(), AttribSysNum::initFrom(), AttribResidualObject::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), SampledOutput::initSample(), IterationAdaptiveDT::limitDTToPostprocessorValue(), LinearNodalConstraint::LinearNodalConstraint(), MooseMesh::MooseMesh(), MooseVariableBase::MooseVariableBase(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), MultiPostprocessorConvergence::MultiPostprocessorConvergence(), PerfGraphOutput::output(), Console::outputSystemInformation(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedGenerateNodeset::ParsedGenerateNodeset(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterialTempl< is_ad >::ParsedMaterialTempl(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), ParsedReporterBase::ParsedReporterBase(), ParsedVectorReporter::ParsedVectorReporter(), ProjectSideSetOntoLevelSetGenerator::ProjectSideSetOntoLevelSetGenerator(), ReferenceResidualInterface::ReferenceResidualInterface(), Moose::FV::setInterpolationMethod(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), Output::setWallTimeIntervalFromCommandLineParam(), PetscOutput::solveSetup(), TimePeriod::TimePeriod(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorOfPostprocessors::VectorOfPostprocessors(), and XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve().

◆ getParam() [2/2]

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

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

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

Definition at line 452 of file MooseBase.h.

453{
454 return _pars.get<T1, T2>(param1, param2);
455}

◆ getPatchSize()

unsigned int MooseMesh::getPatchSize ( ) const
inherited

Getter for the patch_size parameter.

Definition at line 3534 of file MooseMesh.C.

3535{
3536 return _patch_size;
3537}
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition MooseMesh.h:1758

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

◆ getPatchUpdateStrategy()

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

Get the current patch update strategy.

Definition at line 3546 of file MooseMesh.C.

3547{
3549}
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition MooseMesh.h:1767

Referenced by FEProblemBase::possiblyRebuildGeomSearchPatches().

◆ getPCoarseningMap()

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

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

4557{
4559}
const std::vector< QpMap > & getPCoarseningMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > &) const
Definition MooseMesh.C:4534

Referenced by ProjectMaterialProperties::onElement().

◆ getPCoarseningMapHelper()

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

Definition at line 4534 of file MooseMesh.C.

4537{
4538 mooseAssert(elem.active() && elem.p_refinement_flag() == Elem::JUST_COARSENED,
4539 "These are the conditions that should be met for requesting a coarsening map");
4540 return libmesh_map_find(map, std::make_pair(elem.type(), elem.p_level()));
4541}

Referenced by MooseMesh::getPCoarseningMap(), and MooseMesh::getPCoarseningSideMap().

◆ getPCoarseningSideMap()

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

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

Referenced by ProjectMaterialProperties::onBoundary().

◆ getPointLocator()

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

◆ getPRefinementMap()

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

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

4545{
4547}
const std::vector< QpMap > & getPRefinementMapHelper(const Elem &elem, const std::map< std::pair< libMesh::ElemType, unsigned int >, std::vector< QpMap > > &) const
Definition MooseMesh.C:4523

Referenced by ProjectMaterialProperties::onElement().

◆ getPRefinementMapHelper()

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

Definition at line 4523 of file MooseMesh.C.

4526{
4527 // We are actually seeking the map stored with the p_level - 1 key, e.g. the refinement map that
4528 // maps from the previous p_level to this element's p_level
4529 return libmesh_map_find(map,
4530 std::make_pair(elem.type(), cast_int<unsigned int>(elem.p_level() - 1)));
4531}

Referenced by MooseMesh::getPRefinementMap(), and MooseMesh::getPRefinementSideMap().

◆ getPRefinementSideMap()

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

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

Referenced by ProjectMaterialProperties::onBoundary().

◆ getQuadratureNode()

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

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

1654{
1655 mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes.find(elem->id()) !=
1657 "Elem has no quadrature nodes!");
1658 mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()].find(side) !=
1660 "Side has no quadrature nodes!");
1661 mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) !=
1663 "qp not found on side!");
1664
1665 return _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
1666}

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

◆ getRefinementMap()

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

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

2574{
2575 if (child == -1) // Doing volume mapping or parent side mapping
2576 {
2577 mooseAssert(parent_side == child_side,
2578 "Parent side must match child_side if not passing a specific child!");
2579
2580 std::pair<int, ElemType> the_pair(parent_side, elem.type());
2581
2583 mooseError("Could not find a suitable qp refinement map!");
2584
2585 return _elem_type_to_refinement_map[the_pair];
2586 }
2587 else // Need to map a child side to parent volume qps
2588 {
2589 std::pair<int, int> child_pair(child, child_side);
2590
2593 _elem_type_to_child_side_refinement_map[elem.type()].find(child_pair) ==
2595 mooseError("Could not find a suitable qp refinement map!");
2596
2597 return _elem_type_to_child_side_refinement_map[elem.type()][child_pair];
2598 }
2599
2606}

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

◆ getRenamedParam()

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

Retrieve a renamed parameter for the object.

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

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

Definition at line 429 of file MooseBase.h.

430{
431 // Most important: accept new parameter
432 if (isParamSetByUser(new_name) && !isParamValid(old_name))
433 return getParam<T>(new_name);
434 // Second most: accept old parameter
435 if (isParamValid(old_name) && !isParamSetByUser(new_name))
436 return getParam<T>(old_name);
437 // Third most: accept default for new parameter
438 if (isParamValid(new_name) && !isParamValid(old_name))
439 return getParam<T>(new_name);
440 // Refuse: no default, no value passed
441 if (!isParamValid(old_name) && !isParamValid(new_name))
442 mooseError("parameter '" + new_name +
443 "' is being retrieved without being set.\nDid you misspell it?");
444 // Refuse: both old and new parameters set by user
445 else
446 mooseError("Parameter '" + new_name + "' may not be provided alongside former parameter '" +
447 old_name + "'");
448}

◆ 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 294 of file Restartable.h.

295{
296 return declareRestartableDataHelper<T>(data_name, nullptr).get();
297}

◆ getSharedPtr() [1/2]

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

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

Wrapper around shared_from_this().

Definition at line 70 of file MooseObject.C.

71{
72 try
73 {
74 return shared_from_this();
75 }
76 catch (std::bad_weak_ptr &)
77 {
78 mooseError(not_shared_error);
79 }
80}

Referenced by MFEMProblem::addImagComponentToBC(), MFEMProblem::addImagComponentToKernel(), MFEMProblem::addRealComponentToBC(), MFEMProblem::addRealComponentToKernel(), and WebServerControl::addServerAction().

◆ getSharedPtr() [2/2]

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

Definition at line 83 of file MooseObject.C.

84{
85 try
86 {
87 return shared_from_this();
88 }
89 catch (std::bad_weak_ptr &)
90 {
91 mooseError(not_shared_error);
92 }
93}

◆ getSubdomainBoundaryIds()

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

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

3631{
3632 const auto it = _sub_to_data.find(subdomain_id);
3633
3634 if (it == _sub_to_data.end())
3635 mooseError("Unable to find subdomain ID: ", subdomain_id, '.');
3636
3637 return it->second.boundary_ids;
3638}

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

◆ getSubdomainID()

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

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

1723{
1724 return MooseMeshUtils::getSubdomainID(subdomain_name, getMesh());
1725}
SubdomainID getSubdomainID(const SubdomainName &subdomain_name, const MeshBase &mesh)
Gets the subdomain ID associated with the given SubdomainName.

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

◆ getSubdomainIDs() [1/2]

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

Definition at line 1734 of file MooseMesh.C.

1735{
1736 return MooseMeshUtils::getSubdomainIDs(getMesh(), subdomain_name);
1737}
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.

◆ getSubdomainIDs() [2/2]

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

◆ getSubdomainInterfaceBoundaryIds()

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

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

3642{
3643 const auto & bnd_ids = getSubdomainBoundaryIds(subdomain_id);
3644 std::set<BoundaryID> boundary_ids(bnd_ids.begin(), bnd_ids.end());
3645 std::unordered_map<SubdomainID, std::set<BoundaryID>>::const_iterator it =
3646 _neighbor_subdomain_boundary_ids.find(subdomain_id);
3647
3648 boundary_ids.insert(it->second.begin(), it->second.end());
3649
3650 return boundary_ids;
3651}
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:3630

◆ getSubdomainName()

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

◆ getSubdomainNames()

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

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

1765{
1766 std::vector<SubdomainName> names(subdomain_ids.size());
1767
1768 for (unsigned int i = 0; i < subdomain_ids.size(); i++)
1769 names[i] = getSubdomainName(subdomain_ids[i]);
1770
1771 return names;
1772}

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

◆ getUniqueCoordSystem()

Moose::CoordinateSystemType MooseMesh::getUniqueCoordSystem ( ) const
inherited

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

Definition at line 4351 of file MooseMesh.C.

4352{
4353 const auto unique_system = _coord_sys.find(*meshSubdomains().begin())->second;
4354 // Check that it is actually unique
4355 bool result = std::all_of(
4356 std::next(_coord_sys.begin()),
4357 _coord_sys.end(),
4358 [unique_system](
4359 typename std::unordered_map<SubdomainID, Moose::CoordinateSystemType>::const_reference
4360 item) { return (item.second == unique_system); });
4361 if (!result)
4362 mooseError("The unique coordinate system of the mesh was requested by the mesh contains "
4363 "multiple blocks with different coordinate systems");
4364
4366 mooseError("General axisymmetric coordinate axes are being used, and it is currently "
4367 "conservatively assumed that in this case there is no unique coordinate system.");
4368
4369 return unique_system;
4370}

Referenced by HDGKernel::HDGKernel().

◆ ghostGhostedBoundaries()

void MooseMesh::ghostGhostedBoundaries ( )
inherited

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

Definition at line 3422 of file MooseMesh.C.

3423{
3424 // No need to do this if using a serial mesh
3425 // We do not need to ghost boundary elements when _need_ghost_ghosted_boundaries
3426 // is not true. _need_ghost_ghosted_boundaries can be set by a mesh generator
3427 // where boundaries are already ghosted accordingly
3429 return;
3430
3431 TIME_SECTION("GhostGhostedBoundaries", 3);
3432
3433 parallel_object_only();
3434
3435 DistributedMesh & mesh = dynamic_cast<DistributedMesh &>(getMesh());
3436
3437 // We clear ghosted elements that were added by previous invocations of this
3438 // method but leave ghosted elements that were added by other code, e.g.
3439 // OversampleOutput, untouched
3440 mesh.clear_extra_ghost_elems(_ghost_elems_from_ghost_boundaries);
3442
3443 std::set<const Elem *, CompareElemsByLevel> boundary_elems_to_ghost;
3444 std::set<Node *> connected_nodes_to_ghost;
3445
3446 std::vector<const Elem *> family_tree;
3447
3448 for (const auto & t : mesh.get_boundary_info().build_side_list())
3449 {
3450 auto elem_id = std::get<0>(t);
3451 auto bc_id = std::get<2>(t);
3452
3453 if (_ghosted_boundaries.find(bc_id) != _ghosted_boundaries.end())
3454 {
3455 Elem * elem = mesh.elem_ptr(elem_id);
3456
3457#ifdef LIBMESH_ENABLE_AMR
3458 elem->family_tree(family_tree);
3459 Elem * parent = elem->parent();
3460 while (parent)
3461 {
3462 family_tree.push_back(parent);
3463 parent = parent->parent();
3464 }
3465#else
3466 family_tree.clear();
3467 family_tree.push_back(elem);
3468#endif
3469 for (const auto & felem : family_tree)
3470 {
3471 boundary_elems_to_ghost.insert(felem);
3472
3473 // The entries of connected_nodes_to_ghost need to be
3474 // non-constant, so that they will work in things like
3475 // UpdateDisplacedMeshThread. The container returned by
3476 // family_tree contains const Elems even when the Elem
3477 // it is called on is non-const, so once that interface
3478 // gets fixed we can remove this const_cast.
3479 for (unsigned int n = 0; n < felem->n_nodes(); ++n)
3480 connected_nodes_to_ghost.insert(const_cast<Node *>(felem->node_ptr(n)));
3481 }
3482 }
3483 }
3484
3485 // Surface elements on a ghosted nodeset are their own faces on that boundary. A mesh with a
3486 // single element dimension has no surface elements
3487 std::vector<BoundaryID> ghosted_nodesets;
3488 if (!mesh.preparation().has_cached_elem_data || mesh.elem_dimensions().size() > 1)
3489 for (const auto bc_id : _ghosted_boundaries)
3490 if (!_mesh_sideset_ids.count(bc_id))
3491 ghosted_nodesets.push_back(bc_id);
3492 if (!ghosted_nodesets.empty())
3493 {
3494 const auto mesh_dim = dimension();
3495 for (const auto & elem : mesh.active_local_element_ptr_range())
3496 {
3497 if (elem->dim() + 1u != mesh_dim || elem->interior_parent())
3498 continue;
3499 for (const auto bc_id : ghosted_nodesets)
3500 if (isSurfaceElemOnNodeset(*elem, bc_id))
3501 {
3502 boundary_elems_to_ghost.insert(elem);
3503 for (auto & node : elem->node_ref_range())
3504 connected_nodes_to_ghost.insert(&node);
3505 break;
3506 }
3507 }
3508 }
3509
3510 // We really do want to store this by value instead of by reference
3511 const auto prior_ghost_elems = mesh.extra_ghost_elems();
3512
3513 mesh.comm().allgather_packed_range(&mesh,
3514 connected_nodes_to_ghost.begin(),
3515 connected_nodes_to_ghost.end(),
3516 extra_ghost_elem_inserter<Node>(mesh));
3517
3518 mesh.comm().allgather_packed_range(&mesh,
3519 boundary_elems_to_ghost.begin(),
3520 boundary_elems_to_ghost.end(),
3521 extra_ghost_elem_inserter<Elem>(mesh));
3522
3523 const auto & current_ghost_elems = mesh.extra_ghost_elems();
3524
3525 std::set_difference(current_ghost_elems.begin(),
3526 current_ghost_elems.end(),
3527 prior_ghost_elems.begin(),
3528 prior_ghost_elems.end(),
3531}
bool _need_ghost_ghosted_boundaries
A parallel mesh generator such as DistributedRectilinearMeshGenerator already make everything ready.
Definition MooseMesh.h:2031
bool isSurfaceElemOnNodeset(const Elem &elem, BoundaryID bnd_id) const
Returns true if elem is a surface element without an interior parent, e.g.
Definition MooseMesh.C:3724
std::set< BoundaryID > _mesh_sideset_ids
Definition MooseMesh.h:1702
std::set< Elem * > _ghost_elems_from_ghost_boundaries
Set of elements ghosted by ghostGhostedBoundaries.
Definition MooseMesh.h:2025
void family_tree(T elem, std::vector< T > &family, bool reset=true)

Referenced by FEProblemBase::ghostGhostedBoundaries().

◆ hasBase()

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

Definition at line 142 of file MooseBase.h.

142{ return _pars.hasBase(); }
bool hasBase() const

◆ hasDetectedPairedSidesets()

bool MooseMesh::hasDetectedPairedSidesets ( ) const
inlineinherited

Whether or not detectedPairedSidesets() has been called.

Definition at line 1005 of file MooseMesh.h.

1005{ return _paired_boundary.has_value(); }

Referenced by MooseMesh::getPairedBoundaryMapping(), and Moose::PeriodicBCHelper::setupPeriodicBoundaries().

◆ hasElementID()

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

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

Definition at line 2357 of file MooseMesh.h.

2358{
2359 return getMesh().has_elem_integer(id_name);
2360}

Referenced by MooseMesh::getElementIDIndex().

◆ hasLowerD()

bool MooseMesh::hasLowerD ( ) const
inlineinherited
Returns
Whether there are any lower-dimensional blocks

Definition at line 1558 of file MooseMesh.h.

1558{ return getMesh().elem_dimensions().size() > 1; }

Referenced by GhostLowerDElems::operator()().

◆ hasMeshBase()

bool MooseMesh::hasMeshBase ( ) const
inlineinherited

Whether mesh base object was constructed or not.

Definition at line 1257 of file MooseMesh.h.

1257{ return _mesh.get() != nullptr; }

Referenced by MeshGeneratorMesh::buildMesh(), and buildSerialMFEMMesh().

◆ hasSecondOrderElements()

bool MooseMesh::hasSecondOrderElements ( )
inherited

check if the mesh has SECOND order elements

Definition at line 3861 of file MooseMesh.C.

3862{
3863 bool mesh_has_second_order_elements = false;
3864 for (auto it = activeLocalElementsBegin(), end = activeLocalElementsEnd(); it != end; ++it)
3865 if ((*it)->default_order() == SECOND)
3866 {
3867 mesh_has_second_order_elements = true;
3868 break;
3869 }
3870
3871 // We checked our local elements, so take the max over all processors.
3872 comm().max(mesh_has_second_order_elements);
3873 return mesh_has_second_order_elements;
3874}
const MeshBase::element_iterator activeLocalElementsEnd()
Definition MooseMesh.C:3165
MeshBase::element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition MooseMesh.C:3159

Referenced by Assembly::Assembly(), and SolutionUserObjectBase::SolutionUserObjectBase().

◆ hasSingleSubdomain()

bool MooseMesh::hasSingleSubdomain ( ) const
inlineprotectedinherited

Whether the elements of the mesh all have the same subdomain, according to the subdomain set that libMesh caches, which cacheInfo() refreshes.

In that case cacheInfo() skips filling _node_block and _interface_node_blocks, and getNodeBlockIds() returns that set for every node.

Definition at line 1734 of file MooseMesh.h.

1734{ return getMesh().get_mesh_subdomains().size() == 1; }

Referenced by MooseMesh::cacheInfo(), and MooseMesh::getNodeBlockIds().

◆ init()

void MFEMMesh::init ( )
overridevirtualinherited

Initialize the MFEM ParMesh and placeholder MOOSE mesh.

Reimplemented from MooseMesh.

Definition at line 48 of file MFEMMesh.C.

49{
50 // MooseMesh::init() handles the libMesh dummy mesh:
51 // - recovery: reads the libMesh mesh back from its checkpoint file
52 // - normal run: calls buildMesh(), which for MFEMMesh builds both the
53 // dummy libMesh mesh and the MFEM ParMesh
55
57 {
58 // MooseMesh::init() already restored the libMesh dummy mesh from its checkpoint.
59 // Now restore the MFEM parallel mesh from its own checkpoint file.
60 const auto checkpoint_file = _app.getRestartRecoverFileBase() + _app.checkpointSuffix() +
61 ".mfem.mesh." + std::to_string(this->processor_id());
62 std::ifstream input(checkpoint_file);
63 if (!input)
64 mooseError("Unable to open MFEM recovery mesh file '", checkpoint_file, "'.");
65
66 _mfem_par_mesh = std::make_shared<mfem::ParMesh>(this->comm().get(), input);
67
68 if (isParamSetByUser("displacement"))
69 _mesh_displacement_variable = getParam<std::string>("displacement");
70 }
71}
static const std::string & checkpointSuffix()
The file suffix for the checkpoint mesh.
Definition MooseApp.C:3082
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
Definition MooseApp.h:509
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition MooseApp.C:1712
virtual void init()
Initialize the Mesh object.
Definition MooseMesh.C:2936
bool allowRecovery() const
Returns whether this mesh is allowed to read a recovery file.
Definition MooseMesh.h:1586

◆ interiorLowerDBlocks()

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

◆ internalNodeToElemMap()

std::unordered_map< dof_id_type, std::vector< dof_id_type > > & MooseMesh::internalNodeToElemMap ( )
privateinherited

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

Definition at line 1222 of file MooseMesh.C.

1223{
1224 if (!_node_to_elem_map_built) // Guard the creation with a double checked lock
1225 {
1226 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1227
1229 {
1230 // This is allowing the timing to be run even with threads
1231 // This is safe because all threads will be waiting on this section when it runs
1232 // NOTE: Do not copy this construction to other places without thinking REALLY hard about it
1233 // The PerfGraph is NOT threadsafe and will cause all kinds of havok if care isn't taken
1235 Threads::in_threads = false;
1236 TIME_SECTION("nodeToElemMap", 5, "Building Node To Elem Map");
1238
1239 mooseAssert(_node_to_elem_map.empty(), "Expected empty map before building");
1240 for (const auto & elem : getMesh().active_element_ptr_range())
1241 for (unsigned int n = 0; n < elem->n_nodes(); n++)
1242 _node_to_elem_map[elem->node_id(n)].push_back(elem->id());
1243
1244 _node_to_elem_map_built = true; // MUST be set at the end for double-checked locking to work!
1245 }
1246 }
1247 return _node_to_elem_map;
1248}
std::unordered_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:1684
bool _node_to_elem_map_built
Whether _node_to_elem_map has been built.
Definition MooseMesh.h:1687
spin_mutex spin_mtx

Referenced by MooseMesh::addQuadratureNode(), MooseMesh::nodeToElemMap(), and MooseMesh::possiblyRebuildNodeToElemMap().

◆ isBoundaryElem() [1/2]

bool MooseMesh::isBoundaryElem ( dof_id_type  elem_id) const
inherited

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

Definition at line 3737 of file MooseMesh.C.

3738{
3739 bool found_elem = false;
3740 for (const auto & it : _bnd_elem_ids)
3741 {
3742 if (it.second.find(elem_id) != it.second.end())
3743 {
3744 found_elem = true;
3745 break;
3746 }
3747 }
3748 return found_elem;
3749}

Referenced by BoundaryMarker::computeElementMarker().

◆ isBoundaryElem() [2/2]

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

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

Definition at line 3752 of file MooseMesh.C.

3753{
3754 bool found_elem = false;
3755 auto it = _bnd_elem_ids.find(bnd_id);
3756 if (it != _bnd_elem_ids.end())
3757 if (it->second.find(elem_id) != it->second.end())
3758 found_elem = true;
3759 return found_elem;
3760}

◆ isBoundaryFullyExternalToSubdomains()

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

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

1384{
1385 mooseAssert(_bnd_elem_range, "Boundary element range is not initialized");
1386
1387 // On a distributed mesh the boundary element range only holds the local and ghosted sides, so
1388 // each process checks the sides of the elements it owns and the answers are combined. The
1389 // owner always has the neighbor across the side, while a ghosted element may not. The loop
1390 // therefore must not return early: every process has to reach the reduction.
1391 bool crosses_subdomains = false;
1392
1393 // Loop over all side elements of the mesh, select those on the boundary
1394 for (const auto & bnd_elem : *_bnd_elem_range)
1395 {
1396 const auto & [elem_ptr, elem_side, elem_bid] = *bnd_elem;
1397 if (elem_bid == bid && elem_ptr->processor_id() == processor_id())
1398 {
1399 // If an element is internal to the group of subdomain, check the neighbor
1400 if (blk_group.find(elem_ptr->subdomain_id()) != blk_group.end())
1401 {
1402 const auto * const neighbor = elem_ptr->neighbor_ptr(elem_side);
1403
1404 // If we did not ghost the neighbor, we cannot decide
1405 if (neighbor == libMesh::remote_elem)
1406 mooseError("Insufficient level of geometrical ghosting to determine "
1407 "if a boundary is internal to the mesh");
1408 // If the neighbor does not exist, then we are on the edge of the mesh
1409 if (!neighbor)
1410 continue;
1411 // If the neighbor is also in the group of subdomain,
1412 // then the boundary cuts the subdomains
1413 if (blk_group.find(neighbor->subdomain_id()) != blk_group.end())
1414 {
1415 crosses_subdomains = true;
1416 break;
1417 }
1418 }
1419 }
1420 }
1421
1422 comm().max(crosses_subdomains);
1423 return !crosses_subdomains;
1424}

◆ isBoundaryNode() [1/2]

bool MooseMesh::isBoundaryNode ( dof_id_type  node_id) const
inherited

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

Definition at line 3698 of file MooseMesh.C.

3699{
3700 bool found_node = false;
3701 for (const auto & it : _bnd_node_ids)
3702 {
3703 if (it.second.find(node_id) != it.second.end())
3704 {
3705 found_node = true;
3706 break;
3707 }
3708 }
3709 return found_node;
3710}

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

◆ isBoundaryNode() [2/2]

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

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

Definition at line 3713 of file MooseMesh.C.

3714{
3715 bool found_node = false;
3716 std::map<boundary_id_type, std::set<dof_id_type>>::const_iterator it = _bnd_node_ids.find(bnd_id);
3717 if (it != _bnd_node_ids.end())
3718 if (it->second.find(node_id) != it->second.end())
3719 found_node = true;
3720 return found_node;
3721}

◆ isCustomPartitionerRequested()

bool MooseMesh::isCustomPartitionerRequested ( ) const
inherited

Setter and getter for _custom_partitioner_requested.

Definition at line 3855 of file MooseMesh.C.

3856{
3858}

◆ isDisplaced() [1/2]

bool MooseMesh::isDisplaced ( ) const
inlineinherited

whether this mesh is a displaced mesh

Definition at line 1381 of file MooseMesh.h.

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

◆ isDisplaced() [2/2]

void MooseMesh::isDisplaced ( bool  is_displaced)
inlineinherited

Set whether this mesh is a displaced mesh.

Definition at line 1376 of file MooseMesh.h.

1376{ _is_displaced = is_displaced; }

◆ isDistributedMesh()

bool MFEMMesh::isDistributedMesh ( ) const
inlineoverridevirtualinherited

Returns the final Mesh distribution type.

Reimplemented from MooseMesh.

Definition at line 64 of file MFEMMesh.h.

64{ return true; }

◆ isFiniteVolumeInfoDirty()

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

Definition at line 1472 of file MooseMesh.h.

1472{ return _finite_volume_info_dirty; }

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

◆ isKokkosObject()

bool MooseObject::isKokkosObject ( ) const
inlineinherited

Get whether this object is a Kokkos functor The parameter MooseBase::kokkos_object_param is set by the Kokkos base classes.

Definition at line 63 of file MooseObject.h.

63{ return parameters().isKokkosObject(); }
bool isKokkosObject() const
Returns whether this InputParameters belongs to a Kokkos object Checks whether MooseBase::kokkos_obje...

Referenced by AttribKokkos::initFrom(), BlockRestrictable::initializeBlockRestrictable(), and BoundaryRestrictable::initializeBoundaryRestrictable().

◆ isParallelTypeForced()

bool MooseMesh::isParallelTypeForced ( ) const
inlineinherited

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

Definition at line 1159 of file MooseMesh.h.

1159{ return _parallel_type_overridden; }

◆ isParamSetByUser()

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

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

Parameters
nameThe name of the parameter to test

Definition at line 205 of file MooseBase.h.

206 {
208 }
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.

Referenced by DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), DiffusionPhysicsBase::addInitialConditions(), CylinderComponent::addMeshGenerators(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), MFEMMesh::buildMesh(), MFEMBoundarySubMesh::buildSubMesh(), MFEMDomainSubMesh::buildSubMesh(), SurfaceDelaunayGeneratorBase::checkBoundaryAndHolesParams(), LibtorchNeuralNetControl::conditionalParameterError(), ConservativeAdvectionBCTempl< is_ad >::ConservativeAdvectionBCTempl(), MFEMNewtonNonlinearSolver::ConstructSolver(), MooseApp::copyInputs(), DiffusionPhysicsBase::DiffusionPhysicsBase(), MooseApp::errorCheck(), FileMesh::FileMesh(), FullSolveMultiApp::FullSolveMultiApp(), MeshDiagnosticsGenerator::generate(), OrientSurfaceMeshGenerator::generate(), SurfaceSubdomainsFromAllNormalsGenerator::generate(), MFEMVectorFESpace::getFECName(), MooseBase::getRenamedParam(), MFEMEigenproblem::getRHSCoefficient(), DefaultConvergenceBase::getSharedExecutionerParam(), AddVariableAction::init(), MFEMMesh::init(), PhysicsBase::initializePhysics(), LibtorchNeuralNetControl::initialSetup(), ElementSubdomainModifierBase::initialSetup(), LibtorchNeuralNetControl::loadControlNeuralNetFromFile(), MatrixSymmetryCheck::MatrixSymmetryCheck(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MFEMEigenproblem::MFEMEigenproblem(), MFEMGeneratedMeshGenerator::MFEMGeneratedMeshGenerator(), MFEMVariable::MFEMVariable(), MooseApp::MooseApp(), MortarConstraintBase::MortarConstraintBase(), MoveNodesByParsedExpressionModifier::moveNodes(), MultiAppGeneralFieldFunctorTransfer::MultiAppGeneralFieldFunctorTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), OrientSurfaceMeshGenerator::OrientSurfaceMeshGenerator(), SolutionInvalidityOutput::output(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PetscExternalPartitioner::partition(), PolyLineMeshFollowingNodeSetGenerator::PolyLineMeshFollowingNodeSetGenerator(), MooseMesh::prepare(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), PhysicsBase::reportPotentiallyMissedParameters(), MooseApp::run(), MooseApp::runInputFile(), MooseApp::runInputs(), MooseApp::setMFEMDevice(), Moose::MFEM::LinearSolverBase::SetPreconditioner(), MFEMHypreBoomerAMG::SetSolverParameters(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), SmoothMeshGenerator::SmoothMeshGenerator(), SurfaceSubdomainsDelaunayRemesher::SurfaceSubdomainsDelaunayRemesher(), SurfaceSubdomainsFromAllNormalsGenerator::SurfaceSubdomainsFromAllNormalsGenerator(), TagVectorAux::TagVectorAux(), TimedSubdomainModifier::TimedSubdomainModifier(), TimeIntegratedPostprocessor::TimeIntegratedPostprocessor(), TriToQuadConverter::TriToQuadConverter(), XYFrontalDelaunayGenerator::XYFrontalDelaunayGenerator(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

◆ isParamValid()

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

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 199 of file MooseBase.h.

199{ return _pars.isParamValid(name); }
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...

Referenced by GridPartitioner::_do_partition(), HierarchicalGridPartitioner::_do_partition(), AddVariableAction::act(), AutoCheckpointAction::act(), CommonOutputAction::act(), ComposeTimeStepperAction::act(), CopyNodalVarsAction::act(), CreateDisplacedProblemAction::act(), SetAdaptivityOptionsAction::act(), SetupDebugAction::act(), SetupMeshCompleteAction::act(), DiffusionCG::addFEKernels(), DiffusionFV::addFVBCs(), DiffusionFV::addFVKernels(), DiffusionPhysicsBase::addInitialConditions(), ComponentJunction::addMeshGenerators(), CylinderComponent::addMeshGenerators(), DiffusionPhysicsBase::addPostprocessors(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayVarReductionAux::ArrayVarReductionAux(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BSplineCurveGenerator::BSplineCurveGenerator(), TimedSubdomainModifier::buildFromFile(), ParsedChainControl::buildFunction(), GeneratedMesh::buildMesh(), MooseMesh::buildTypedMesh(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), SurfaceDelaunayGeneratorBase::checkBoundaryAndHolesParams(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), LibmeshPartitioner::clone(), SampledOutput::cloneMesh(), CombinedVectorPostprocessor::CombinedVectorPostprocessor(), CombinerGenerator::CombinerGenerator(), ComponentJunction::ComponentJunction(), ConservativeAdvectionBCTempl< is_ad >::ConservativeAdvectionBCTempl(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), FEProblemSolve::convergenceSetup(), CopyMeshPartitioner::CopyMeshPartitioner(), CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(), CutMeshByLevelSetGeneratorBase::CutMeshByLevelSetGeneratorBase(), ConstantReporter::declareConstantReporterValue(), ConstantReporter::declareConstantReporterValues(), DGKernelBase::DGKernelBase(), DiffusionFluxAux::DiffusionFluxAux(), DiffusionPhysicsBase::DiffusionPhysicsBase(), DomainUserObject::DomainUserObject(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenProblemSolve::EigenProblemSolve(), ElementGenerator::ElementGenerator(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), PIDTransientControl::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FileOutput::FileOutput(), SurfaceDelaunayGeneratorBase::fillDelaunayOptions(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), FunctionDT::FunctionDT(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FVInterfaceKernel::FVInterfaceKernel(), FVMassMatrix::FVMassMatrix(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), AddMetaDataGenerator::generate(), AdvancedExtruderGenerator::generate(), BlockDeletionGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), BSplineCurveGenerator::generate(), ConcentricCircleMeshGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), ElementGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), GeneratedMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), ManifoldSubdomainGenerator::generate(), MeshExtruderGenerator::generate(), OrientSurfaceMeshGenerator::generate(), ParsedExtraElementIDGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), RenumberBySubdomainGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), SphereMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainPerElementGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), XYZDelaunayGenerator::generate(), GeneratedMeshGenerator::GeneratedMeshGenerator(), PropertyReadFile::getFileNames(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::getRenamedParam(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), AddPeriodicBCAction::getVariables(), Terminator::handleMessage(), HFEMDirichletBC::HFEMDirichletBC(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), AdvancedOutput::initAvailableLists(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), SolutionAux::initialSetup(), SolutionScalarAux::initialSetup(), PIDTransientControl::initialSetup(), ParsedConvergence::initialSetup(), EigenProblemSolve::initialSetup(), MooseParsedFunction::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedVectorFunction::initialSetup(), PiecewiseTabularBase::initialSetup(), SolutionIC::initialSetup(), Console::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MultiAppVariableValueSampleTransfer::initialSetup(), SampledOutput::initSample(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), PNGOutput::makePNG(), MassMatrix::MassMatrix(), MatCoupledForce::MatCoupledForce(), MeshGeneratorComponent::MeshGeneratorComponent(), MooseApp::MooseApp(), MooseMesh::MooseMesh(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MooseVariableFV< RealEigenVector >::MooseVariableFV(), MortarConstraintBase::MortarConstraintBase(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldKDTreeTransferBase::MultiAppGeneralFieldKDTreeTransferBase(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiPostprocessorConvergence::MultiPostprocessorConvergence(), MultiSystemSolveObject::MultiSystemSolveObject(), NEML2Action::NEML2Action(), NodeSetsGeneratorBase::NodeSetsGeneratorBase(), EigenExecutionerBase::normalizeSolution(), OrientSurfaceMeshGenerator::OrientSurfaceMeshGenerator(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedSubdomainGeneratorBase::ParsedSubdomainGeneratorBase(), PetscOutput::PetscOutput(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), EqualValueBoundaryConstraint::pickPrimaryNode(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularBase::PiecewiseTabularBase(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), EqualValueBoundaryConstraint::populateSecondaryNodes(), MooseMesh::prepare(), MultiApp::readCommandLineArguments(), SolutionUserObjectBase::readExodusIIOrNemesis(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), ReporterPointSource::ReporterPointSource(), PhysicsBase::reportPotentiallyMissedParameters(), ParsedSubdomainMeshGenerator::setBlockName(), MooseMesh::setCoordSystem(), FileOutput::setFileBaseInternal(), SideSetsGeneratorBase::setup(), SurfaceMeshGeneratorBase::setup(), Split::setup(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), Output::setWallTimeIntervalFromCommandLineParam(), SideDiffusiveFluxIntegralTempl< is_ad, T >::SideDiffusiveFluxIntegralTempl(), SideSetsGeneratorBase::SideSetsGeneratorBase(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), SolutionUserObjectBase::SolutionUserObjectBase(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), PIDTransientControl::timestepSetup(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), TransientBase::TransientBase(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

◆ isPartitionerForced()

bool MooseMesh::isPartitionerForced ( ) const
inlineinherited

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

Definition at line 1179 of file MooseMesh.h.

1179{ return _partitioner_overridden; }
bool _partitioner_overridden
Definition MooseMesh.h:1618

◆ isRegularOrthogonal()

bool MooseMesh::isRegularOrthogonal ( )
inlineinherited

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

Definition at line 1209 of file MooseMesh.h.

1209{ return _regular_orthogonal_mesh; }

Referenced by AddPeriodicBCAction::act(), and AddPeriodicBCAction::onSetupPeriodicBoundary().

◆ isSemiLocal()

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

Returns true if the node is semi-local.

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

Definition at line 1013 of file MooseMesh.C.

1014{
1015 return _semilocal_node_list.find(node) != _semilocal_node_list.end();
1016}
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition MooseMesh.h:1669

◆ isSplit()

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

Definition at line 1495 of file MooseMesh.h.

1495{ return _is_split; }

◆ isSurfaceElemOnNodeset()

bool MooseMesh::isSurfaceElemOnNodeset ( const Elem &  elem,
BoundaryID  bnd_id 
) const
inherited

Returns true if elem is a surface element without an interior parent, e.g.

of a rigid surface mesh, and all of its nodes are on the nodeset bnd_id, in which case the element is its own face on that boundary. Always false if bnd_id is a sideset, so any contact boundary may be passed.

Definition at line 3724 of file MooseMesh.C.

3725{
3726 if (elem.dim() == 0 || elem.dim() + 1u != dimension() || elem.interior_parent() ||
3727 _mesh_sideset_ids.count(bnd_id))
3728 return false;
3729 const auto & binfo = getMesh().get_boundary_info();
3730 for (const auto & node : elem.node_ref_range())
3731 if (!binfo.has_boundary_id(&node, bnd_id))
3732 return false;
3733 return true;
3734}

Referenced by PenetrationThread::createInfoForElem(), MooseMesh::ghostGhostedBoundaries(), and PenetrationThread::operator()().

◆ isTranslatedPeriodic() [1/3]

bool MooseMesh::isTranslatedPeriodic ( const MooseVariableBase &  var,
const unsigned int  component 
) const
inherited

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

Parameters
var- The variable
component- An integer representing the desired component (dimension)

Definition at line 2264 of file MooseMesh.C.

2265{
2266 return isTranslatedPeriodic(var.sys().number(), var.number(), component);
2267}
bool isTranslatedPeriodic(const unsigned int sys_num, const unsigned int var_num, const unsigned int component) const
Returns whether this generated mesh is periodic in the given dimension for the given variable on the ...
Definition MooseMesh.C:2255
SystemBase & sys()
Get the system this variable is part of.
unsigned int number() const
Get variable number coming from libMesh.
unsigned int number() const
Gets the number of this system.

◆ isTranslatedPeriodic() [2/3]

bool MooseMesh::isTranslatedPeriodic ( const unsigned int  sys_num,
const unsigned int  var_num,
const unsigned int  component 
) const
inherited

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

Parameters
sys_num- The number of the system the variable is on
var_num- The variable number
component- An integer representing the desired component (dimension)

Definition at line 2255 of file MooseMesh.C.

2258{
2259 mooseAssert(component < dimension(), "Requested dimension out of bounds");
2260 return queryPeriodicDimensions(sys_num, var_num)[component];
2261}
const std::array< bool, 3 > & queryPeriodicDimensions(const unsigned int sys_num, const unsigned int var_num) const
Query the translated periodic dimension flags for the given variable on the given system.
Definition MooseMesh.C:2240

Referenced by MooseMesh::isTranslatedPeriodic(), and MooseMesh::isTranslatedPeriodic().

◆ isTranslatedPeriodic() [3/3]

bool MooseMesh::isTranslatedPeriodic ( const unsigned int  var_num,
const unsigned int  component 
) const
inherited

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

Deprecated method; assumes the system number is 0. Use the method that additionally takes the system number or the MooseVariableBase instead.

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

Definition at line 2270 of file MooseMesh.C.

2271{
2272 mooseDoOnce(mooseDeprecated(
2273 "MooseMesh::isTranslatedPeriodic(const unsigned int, const unsigned int) is deprecated. Use "
2274 "the method that additionally takes the system number or the MooseVariableBase instead."));
2275 return isTranslatedPeriodic(0, var_num, component);
2276}

◆ lengthUnit()

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

Definition at line 4496 of file MooseMesh.C.

4497{
4498 mooseAssert(_coord_transform, "This must be non-null");
4499 return _coord_transform->lengthUnit();
4500}

◆ localNodesBegin() [1/2]

MeshBase::node_iterator MooseMesh::localNodesBegin ( )
inherited

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

Definition at line 3135 of file MooseMesh.C.

3136{
3137 return getMesh().local_nodes_begin();
3138}

◆ localNodesBegin() [2/2]

MeshBase::const_node_iterator MooseMesh::localNodesBegin ( ) const
inherited

Definition at line 3147 of file MooseMesh.C.

3148{
3149 return getMesh().local_nodes_begin();
3150}

◆ localNodesEnd() [1/2]

MeshBase::node_iterator MooseMesh::localNodesEnd ( )
inherited

Definition at line 3141 of file MooseMesh.C.

3142{
3143 return getMesh().local_nodes_end();
3144}

◆ localNodesEnd() [2/2]

MeshBase::const_node_iterator MooseMesh::localNodesEnd ( ) const
inherited

Definition at line 3153 of file MooseMesh.C.

3154{
3155 return getMesh().local_nodes_end();
3156}

◆ mapPoints()

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

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

2651{
2652 unsigned int n_from = from.size();
2653 unsigned int n_to = to.size();
2654
2655 qp_map.resize(n_from);
2656
2657 for (unsigned int i = 0; i < n_from; ++i)
2658 {
2659 const Point & from_point = from[i];
2660
2661 QpMap & current_map = qp_map[i];
2662
2663 for (unsigned int j = 0; j < n_to; ++j)
2664 {
2665 const Point & to_point = to[j];
2666 Real distance = (from_point - to_point).norm();
2667
2668 if (distance < current_map._distance)
2669 {
2670 current_map._distance = distance;
2671 current_map._from = i;
2672 current_map._to = j;
2673 }
2674 }
2675 }
2676}
unsigned int _from
The qp to map from.
Definition MooseMesh.h:81
unsigned int _to
The qp to map to.
Definition MooseMesh.h:84
Real distance(const Point &p)

Referenced by MooseMesh::buildPRefinementAndCoarseningMaps(), and MooseMesh::findAdaptivityQpMaps().

◆ markFiniteVolumeInfoDirty()

void MooseMesh::markFiniteVolumeInfoDirty ( )
inlineinherited

Mark the finite volume information as dirty.

Definition at line 1467 of file MooseMesh.h.

1467{ _finite_volume_info_dirty = true; }

◆ maxElementID()

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

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

Definition at line 1272 of file MooseMesh.h.

1272{ return _max_ids[elem_id_index]; }

◆ maxElemId()

dof_id_type MooseMesh::maxElemId ( ) const
virtualinherited

Definition at line 3201 of file MooseMesh.C.

3202{
3203 return getMesh().max_elem_id();
3204}

◆ maxHLevel()

unsigned int MooseMesh::maxHLevel ( ) const
inlineinherited

Returns the maximum h-refinement level of all elements.

Definition at line 1530 of file MooseMesh.h.

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

◆ maxNodeId()

dof_id_type MooseMesh::maxNodeId ( ) const
virtualinherited

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

3196{
3197 return getMesh().max_node_id();
3198}

◆ maxPLevel()

unsigned int MooseMesh::maxPLevel ( ) const
inlineinherited

Returns the maximum p-refinement level of all elements.

Definition at line 1525 of file MooseMesh.h.

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

◆ meshBoundaryIds()

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

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

Definition at line 3285 of file MooseMesh.C.

3286{
3287 return _mesh_boundary_ids;
3288}

Referenced by BoundaryRestrictable::isBoundarySubset().

◆ meshChanged()

void MooseMesh::meshChanged ( )
inherited

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

905{
906 TIME_SECTION("meshChanged", 3, "Updating Because Mesh Changed");
907
908 update();
909
910 // Delete all of the cached ranges
911 _active_node_range.reset();
913 _local_node_range.reset();
914 _bnd_node_range.reset();
915 _bnd_elem_range.reset();
916
917 // Rebuild the ranges
923
924 // Call the callback function onMeshChanged
926}
virtual void onMeshChanged()
Declares a callback function that is executed at the conclusion of meshChanged().
Definition MooseMesh.C:929
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition MooseMesh.C:635
libMesh::ConstNodeRange * getLocalNodeRange()
Definition MooseMesh.C:1286
libMesh::NodeRange * getActiveNodeRange()
Definition MooseMesh.C:1263
libMesh::StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition MooseMesh.C:1300
const libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems,...
Definition MooseMesh.C:1257
libMesh::StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition MooseMesh.C:1313

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

◆ meshNodesetIds()

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

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

Definition at line 3297 of file MooseMesh.C.

3298{
3299 return _mesh_nodeset_ids;
3300}
std::set< BoundaryID > _mesh_nodeset_ids
Definition MooseMesh.h:1703

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

◆ meshSidesetIds()

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

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

Definition at line 3291 of file MooseMesh.C.

3292{
3293 return _mesh_sideset_ids;
3294}

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

◆ meshSubdomains()

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

◆ messagePrefix() [1/2]

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

Definition at line 256 of file MooseBase.h.

257 {
258 return messagePrefix(_pars, hit_prefix);
259 }

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

◆ messagePrefix() [2/2]

std::string MooseBase::messagePrefix ( const InputParameters &  params,
const bool  hit_prefix 
)
staticprivateinherited

Internal method for getting the message prefix for an object (object type, name, etc).

Needs to be static so that we can call it externally from InputParameters for errors that do not have context of the MooseBase

Definition at line 140 of file MooseBase.C.

141{
142 std::string prefix = "";
143
144 if (hit_prefix)
145 if (const auto node = MooseBase::getHitNode(params))
146 prefix += Moose::hitMessagePrefix(*node);
147
148 // Don't have context without type and name
149 if (!params.isMooseBaseObject())
150 return prefix;
151
152 const auto & name = params.getObjectName();
153 const std::string base = params.hasBase() ? params.getBase() : "object";
154 const bool is_main_app = base == "Application" && name == AppFactory::main_app_name;
155 prefix += "The following occurred in the ";
156 if (is_main_app)
157 prefix += "main " + base;
158 else
159 prefix += base;
160 if (base != params.getObjectName() && name.size() && !is_main_app)
161 prefix += " '" + name + "'";
162 prefix += " of type " + params.getObjectType() + ".";
163 return prefix + "\n\n";
164}
static const std::string main_app_name
The name for the "main" moose application.
Definition AppFactory.h:68
bool isMooseBaseObject() const
const std::string & getObjectType() const
const std::string & getObjectName() const
std::string hitMessagePrefix(const hit::Node &node)
Get the prefix to be associated with a hit node for a message.
Definition Moose.C:919

◆ minElementID()

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

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

Definition at line 1277 of file MooseMesh.h.

1277{ return _min_ids[elem_id_index]; }

◆ minPeriodicDistance() [1/3]

Real MooseMesh::minPeriodicDistance ( const MooseVariableBase &  var,
const Point &  p,
const Point &  q 
) const
inherited

Returns the distance between two points on the mesh taking into account periodicity for the given variable.

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

Definition at line 2333 of file MooseMesh.C.

2336{
2337 return minPeriodicDistance(var.sys().number(), var.number(), p, q);
2338}
Real minPeriodicDistance(const unsigned int sys_num, const unsigned int var_num, const Point &p, const Point &q) const
Returns the distance between two points on the mesh taking into account periodicity for the given var...
Definition MooseMesh.C:2324

◆ minPeriodicDistance() [2/3]

Real MooseMesh::minPeriodicDistance ( const unsigned int  sys_num,
const unsigned int  var_num,
const Point &  p,
const Point &  q 
) const
inherited

Returns the distance between two points on the mesh taking into account periodicity for the given variable on the given system.

Parameters
sys_num- The number of the system the variable is on
var_num- The 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 2324 of file MooseMesh.C.

2328{
2329 return minPeriodicVector(sys_num, var_num, p, q).norm();
2330}
RealVectorValue minPeriodicVector(const unsigned int sys_num, const unsigned int var_num, Point p, Point q) const
Returns the minimum vector between two points on the mesh taking into account periodicity for the giv...
Definition MooseMesh.C:2279

Referenced by MooseMesh::minPeriodicDistance(), and MooseMesh::minPeriodicDistance().

◆ minPeriodicDistance() [3/3]

Real MooseMesh::minPeriodicDistance ( const unsigned int  var_num,
const Point &  p,
const Point &  q 
) const
inherited

Returns the distance between two points on the mesh taking into account periodicity for the given variable.

Deprecated method; assumes the system number is 0. Use the method that additionally takes the system number or the MooseVariableBase instead.

Parameters
var_num- The 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 2341 of file MooseMesh.C.

2342{
2343 mooseDoOnce(mooseDeprecated("MooseMesh::minPeriodicDistance(const unsigned int, const Point &, "
2344 "const Point &) is deprecated. Use the method that additionally "
2345 "takes the system number or the MooseVariableBase instead."));
2346 return minPeriodicDistance(0, var_num, p, q);
2347}

◆ minPeriodicVector() [1/3]

RealVectorValue MooseMesh::minPeriodicVector ( const MooseVariableBase &  var,
const Point &  p,
const Point &  q 
) const
inherited

Returns the minimum vector between two points on the mesh taking into account periodicity for the given variable.

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

Definition at line 2309 of file MooseMesh.C.

2310{
2311 return minPeriodicVector(var.sys().number(), var.number(), p, q);
2312}

◆ minPeriodicVector() [2/3]

RealVectorValue MooseMesh::minPeriodicVector ( const unsigned int  sys_num,
const unsigned int  var_num,
Point  p,
Point  q 
) const
inherited

Returns the minimum vector between two points on the mesh taking into account periodicity for the given variable on the given system.

Parameters
sys_num- The number of the system the variable is on
var_num- The 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 2279 of file MooseMesh.C.

2283{
2284 const auto & periodic_dims = queryPeriodicDimensions(sys_num, var_num);
2285
2286 for (const auto i : make_range(dimension()))
2287 {
2288 // check to see if we're closer in real or periodic space in x, y, and z
2289 if (periodic_dims[i])
2290 {
2291 // Need to test order before differencing
2292 if (p(i) > q(i))
2293 {
2294 if (p(i) - q(i) > _half_range(i))
2295 p(i) -= _half_range(i) * 2;
2296 }
2297 else
2298 {
2299 if (q(i) - p(i) > _half_range(i))
2300 p(i) += _half_range(i) * 2;
2301 }
2302 }
2303 }
2304
2305 return q - p;
2306}

Referenced by MooseMesh::minPeriodicDistance(), MooseMesh::minPeriodicVector(), and MooseMesh::minPeriodicVector().

◆ minPeriodicVector() [3/3]

RealVectorValue MooseMesh::minPeriodicVector ( const unsigned int  var_num,
const Point &  p,
const Point &  q 
) const
inherited

Returns the minimum vector between two points on the mesh taking into account periodicity for the given variable on the given system.

Deprecated method; assumes the system number is 0. Use the method that additionally takes the system number or the MooseVariableBase instead.

Parameters
var_num- The 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 2315 of file MooseMesh.C.

2316{
2317 mooseDoOnce(mooseDeprecated("MooseMesh::minPeriodicVector(const unsigned int, const Point &, "
2318 "const Point &) is deprecated. Use the method that additionally "
2319 "takes the system number or the MooseVariableBase instead."));
2320 return minPeriodicVector(0, var_num, p, q);
2321}

◆ mooseDeprecated() [1/2]

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

Emits a deprecation warning prefixed with the object name and type, and a stack trace.

Definition at line 317 of file MooseBase.h.

318 {
320 _console, false, true, true, messagePrefix(true), std::forward<Args>(args)...);
321 }
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void mooseDeprecatedStream(S &oss, const bool expired, const bool print_title, const bool show_trace, Args &&... args)
Definition MooseError.h:252

Referenced by MooseApp::addCapability(), DataFileInterface::getDataFileName(), DataFileInterface::getDataFileNameByName(), MooseApp::getRecoverFileBase(), MooseApp::hasRecoverFileBase(), MooseApp::MooseApp(), and MooseApp::setupOptions().

◆ mooseDeprecated() [2/2]

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

◆ mooseDeprecatedNoTrace()

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

Emits a deprecation warning prefixed with the object name and type, and no stack trace.

Definition at line 327 of file MooseBase.h.

328 {
330 _console, false, true, false, messagePrefix(true), std::forward<Args>(args)...);
331 }

Referenced by MooseApp::MooseApp().

◆ mooseDocumentedError()

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

Definition at line 277 of file MooseBase.h.

280 {
282 repo_name, issue_num, argumentsToString(std::forward<Args>(args)...)),
283 /* with_prefix = */ true);
284 }
std::string formatMooseDocumentedError(const std::string &repo_name, const unsigned int issue_num, const std::string &msg)
Formats a documented error.
Definition MooseError.C:140

◆ mooseError()

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

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

Definition at line 271 of file MooseBase.h.

272 {
273 callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ true);
274 }

Referenced by CopyMeshPartitioner::_do_partition(), GridPartitioner::_do_partition(), HierarchicalGridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), AdaptivityAction::act(), AddBoundsVectorsAction::act(), AddFVICAction::act(), AddICAction::act(), AddMeshGeneratorAction::act(), AddPeriodicBCAction::act(), AddTimeStepperAction::act(), AddVectorPostprocessorAction::act(), ChainControlSetupAction::act(), CheckFVBCAction::act(), CheckIntegrityAction::act(), CombineComponentsMeshes::act(), CommonOutputAction::act(), CreateDisplacedProblemAction::act(), CreateExecutionerAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), CSGOnlyAction::act(), DeprecatedBlockAction::act(), InitProblemAction::act(), MaterialOutputAction::act(), SetAdaptivityOptionsAction::act(), SetupDebugAction::act(), SetupMeshAction::act(), SetupMeshCompleteAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), SplitMeshAction::act(), Action::Action(), AddActionComponentAction::AddActionComponentAction(), PhysicsComponentInterface::addBoundaryConditionsFromComponents(), MooseApp::addCapabilityInternal(), DistributedRectilinearMeshGenerator::addElement(), MooseApp::addExecutor(), SubProblem::addFunctor(), PhysicsComponentInterface::addInitialConditionsFromComponents(), ComponentJunction::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), SubProblem::addPiecewiseByBlockLambdaFunctor(), DistributedRectilinearMeshGenerator::addPoint(), DiracKernelBase::addPointWithValidId(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MooseMesh::addQuadratureNode(), AddActionComponentAction::addRelationshipManagers(), WebServerControl::addServerAction(), AddVariableAction::addVariable(), SubProblem::addVectorTag(), MooseVariableScalar::adUDot(), Output::advancedExecuteOn(), MooseVariableBase::allDofIndices(), MooseApp::appNameToLibName(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), MooseApp::attachRelationshipManagers(), MooseApp::attachRelationshipManagers(), FEProblemBase::automaticScaling(), Function::average(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), MooseMesh::buildCoarseningMap(), MultiApp::buildComm(), DistributedRectilinearMeshGenerator::buildCube(), PiecewiseTabularInterface::buildFromFile(), PiecewiseTabularInterface::buildFromJSON(), PiecewiseTabularInterface::buildFromXY(), MooseMesh::buildLowerDMesh(), GeneratedMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), TiledMesh::buildMesh(), MooseMesh::buildRefinementMap(), MaterialBase::buildRequiredMaterials(), MooseMesh::buildTypedMesh(), MooseMesh::cacheFaceInfoVariableOwnership(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), PhysicsBase::checkBlockRestrictionIdentical(), ComponentBoundaryConditionInterface::checkBoundaryConditionsAllRequested(), SubProblem::checkBoundaryMatProps(), PhysicsBase::checkComponentType(), IterationCountConvergence::checkConvergence(), MooseMesh::checkCoordinateSystems(), DiffusionLHDGAssemblyHelper::checkCoupling(), DefaultConvergenceBase::checkDuplicateSetSharedExecutionerParams(), MooseMesh::checkDuplicateSubdomainNames(), MaterialBase::checkExecutionStage(), FVFluxBC::checkFaceIntegrity(), FVInterfaceKernel::checkFaceIntegrity(), PhysicsVariableCoordinator::checkFVAdjacency(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), EigenExecutionerBase::checkIntegrity(), Eigenvalue::checkIntegrity(), ExplicitTimeIntegrator::checkLinearConvergence(), MooseApp::checkMetaDataIntegrity(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), PostprocessorInterface::checkParam(), Moose::PeriodicBCHelper::checkPeriodicParams(), Sampler::checkReinitStatus(), MultiAppTransfer::checkSiblingsTransferSupported(), NEML2Action::checkStatefulConsistency(), MaterialBase::checkStatefulSanity(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), Moose::PetscSupport::checkUserProvidedPetscOption(), MultiAppTransfer::checkVariable(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), MooseMesh::clone(), LibmeshPartitioner::clone(), CombinerGenerator::CombinerGenerator(), MooseVariableFieldBase::componentName(), VariableCondensationPreconditioner::computeDInverseDiag(), CompositionDT::computeDT(), MooseVariableFieldBase::computeFaceValues(), TimeStepper::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), MooseMesh::computeFiniteVolumeCoords(), AdvancedExtruderGenerator::computeNodeNormals(), Moose::Kokkos::ResidualObject::computeOffDiagJacobian(), MaterialBase::computeProperties(), ResidualObject::computeResidualAndJacobian(), TimeStepper::computeStep(), AStableDirk4::computeTimeDerivatives(), BDF2::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), ExplicitEuler::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), ConcentricCircleMesh::ConcentricCircleMesh(), ConditionalEnableControl::ConditionalEnableControl(), TimeStepper::constrainStep(), LibtorchNeuralNetControl::controlNeuralNet(), TransientBase::convergedToSteadyState(), ParsedConvergence::convertRealToBool(), MooseApp::copyInputs(), CopyMeshPartitioner::CopyMeshPartitioner(), MultiApp::createApp(), MooseApp::createExecutors(), AddVariableAction::createInitialConditionAction(), MooseApp::createRMFromTemplateAndInit(), Function::curl(), ReporterTransferInterface::declareClone(), Moose::Kokkos::MaterialBase::declareKokkosPropertyInternal(), MeshGenerator::declareMeshProperty(), ReporterTransferInterface::declareVectorClone(), FunctorRelationshipManager::delete_remote_elements(), MooseMesh::deleteRemoteElements(), MooseApp::determineLibtorchDeviceType(), MeshDiagnosticsGenerator::diagnosticsLog(), Function::div(), FunctorBinnedValuesDivision::divisionIndex(), FunctorRelationshipManager::dofmap_reinit(), MooseApp::dynamicAllRegistration(), MooseApp::dynamicAppRegistration(), DistributedRectilinearMeshGenerator::elemId(), MooseApp::errorCheck(), MooseMesh::errorIfDistributedMesh(), MultiAppTransfer::errorIfObjectExecutesOnTransferInSourceApp(), FixedPointSolve::examineFixedPointConvergence(), Eigenvalue::execute(), TransientBase::execute(), WebServerControl::execute(), MooseApp::executeExecutioner(), FVInterfaceKernel::faceArg1(), FVInterfaceKernel::faceArg2(), MultiApp::fillPositions(), MooseApp::finalizeRestore(), Transfer::find_sys(), PhysicsVariableCoordinator::findOrCreate(), DiracKernelInfo::findPoint(), FixedPointSolve::findTransformedSystem(), FixedPointSolve::FixedPointSolve(), FunctionDT::FunctionDT(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), LinearFVBoundaryCondition::functorFaceArg(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), AdvancedExtruderGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), CoarsenBlockGenerator::generate(), CombinerGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), DistributedRectilinearMeshGenerator::generate(), ElementOrderConversionGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), MeshCollectionGenerator::generate(), MeshDiagnosticsGenerator::generate(), MeshExtruderGenerator::generate(), MeshRepairGenerator::generate(), MoveNodeGenerator::generate(), PlaneIDMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), ProjectSideSetOntoLevelSetGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), RenumberBySubdomainGenerator::generate(), SmoothMeshGenerator::generate(), SpiralAnnularMeshGenerator::generate(), StackGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainPerElementGenerator::generate(), TiledMeshGenerator::generate(), XYMeshLineCutter::generate(), XYZDelaunayGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateCSG(), MeshGenerator::generateData(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), CircularBoundaryCorrectionGenerator::generateRadialCorrectionFactor(), MooseMesh::getAxisymmetricRadialCoord(), MooseMesh::getBlockConnectedBlocks(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), ChainControl::getChainControlDataByName(), WebServerControl::getClientInfo(), MooseMesh::getCoarseningMap(), MultiApp::getCommandLineArgs(), MooseVariableBase::getContinuity(), Control::getControllableParameterByName(), MooseMesh::getCoordSystem(), PhysicsBase::getCoupledPhysics(), PhysicsBase::getCoupledPhysics(), DataFileInterface::getDataFilePath(), TransfiniteMeshGenerator::getDiscreteEdge(), MooseVariableBase::getDofIndices(), VariableCondensationPreconditioner::getDofToCondense(), TransfiniteMeshGenerator::getEdge(), EigenExecutionerBase::getEigenSystemConvergence(), MooseMesh::getElementIDIndex(), Material::getElementIDNeighbor(), Material::getElementIDNeighborByName(), MooseMesh::getElemIDMapping(), MooseMesh::getElemIDsOnBlocks(), WebServerControl::Response::getError(), MultiApp::getExecutioner(), MooseApp::getExecutor(), MultiAppTransfer::getFromMultiApp(), MultiAppTransfer::getFromMultiAppInfo(), SubProblem::getFunctor(), MooseMesh::getGeneralAxisymmetricCoordAxis(), MaterialPropertyInterface::getGenericMaterialPropertyByName(), DistributedRectilinearMeshGenerator::getGhostNeighbors(), DistributedRectilinearMeshGenerator::getIndices(), MaterialPropertyInterface::getKokkosBlockMaterialProperty(), FunctionInterface::getKokkosFunctionByName(), MaterialPropertyInterface::getKokkosMaterialPropertyByName(), Material::getMaterialByName(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), AnnularMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MultiAppTransfer::getMultiApp(), DistributedRectilinearMeshGenerator::getNeighbors(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), MooseMesh::getPairedBoundaryMapping(), MaterialOutputAction::getParams(), PlaneIDMeshGenerator::getPlaneID(), PostprocessorInterface::getPostprocessorValueByNameInternal(), ComponentMaterialPropertyInterface::getPropertyValue(), MooseMesh::getRefinementMap(), MooseBase::getRenamedParam(), ReporterInterface::getReporterContextBaseByName(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), MooseApp::getRMClone(), MooseObject::getSharedPtr(), MooseObject::getSharedPtr(), PhysicsBase::getSolverSystem(), MooseMesh::getSubdomainBoundaryIds(), TransientBase::getTimeIntegratorNames(), MultiAppTransfer::getToMultiApp(), MultiAppTransfer::getToMultiAppInfo(), MooseMesh::getUniqueCoordSystem(), UserObjectInterface::getUserObjectBaseByName(), UserObjectInterface::getUserObjectName(), SubProblem::getVariableHelper(), AuxKernelBase::getVariableNamesHelper(), AddPeriodicBCAction::getVariables(), VectorPostprocessorInterface::getVectorPostprocessorName(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), MultiApp::globalAppToLocal(), Function::gradient(), MooseParsedFunction::gradient(), MooseVariableBase::hasDoFsOnNodes(), PostprocessorInterface::hasPostprocessor(), PostprocessorInterface::hasPostprocessorByName(), ReporterInterface::hasReporterValue(), ReporterInterface::hasReporterValueByName(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), TransientBase::incrementStepOrReject(), NEML2Action::inferMOOSEIOType(), AddVariableAction::init(), MooseMesh::init(), Sampler::init(), EigenExecutionerBase::init(), TransientBase::init(), MFEMMesh::init(), CrankNicolson::init(), ExplicitTimeIntegrator::init(), FixedPointIterationAdaptiveDT::init(), IterationAdaptiveDT::init(), MultiApp::init(), NestedDivision::initialize(), ParsedConvergence::initializeConstantSymbol(), PhysicsBase::initializePhysics(), SubProblem::initialSetup(), AuxKernelBase::initialSetup(), SolutionScalarAux::initialSetup(), FullSolveMultiApp::initialSetup(), ExplicitTimeIntegrator::initialSetup(), InternalSideIndicatorBase::InternalSideIndicatorBase(), EigenExecutionerBase::inversePowerIteration(), Sampler::isAdaptiveSamplingCompleted(), MooseMesh::isBoundaryFullyExternalToSubdomains(), MooseVariableBase::isNodal(), IterationAdaptiveDT::IterationAdaptiveDT(), IterationCountConvergence::IterationCountConvergence(), LibmeshPartitioner::LibmeshPartitioner(), MooseApp::libNameToAppName(), LineSearch::lineSearch(), LibtorchNeuralNetControl::loadControlNeuralNetFromFile(), MooseApp::loadLibraryAndDependencies(), ReporterPointMarker::markerSetup(), Material::Material(), Distribution::median(), FunctorRelationshipManager::mesh_reinit(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshRepairGenerator::MeshRepairGenerator(), SetupMeshAction::modifyParamsForUseSplit(), MooseApp::MooseApp(), MeshMetaDataInterface::mooseErrorInternal(), MooseMesh::MooseMesh(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseVariableBase::MooseVariableBase(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppTransfer::MultiAppTransfer(), NewmarkBeta::NewmarkBeta(), DistributedRectilinearMeshGenerator::nodeId(), DistributedRectilinearMeshGenerator::numNeighbors(), Output::onInterval(), FunctorRelationshipManager::operator()(), RelationshipManager::operator==(), ActionComponent::outerSurfaceArea(), ActionComponent::outerSurfaceBoundaries(), MortarNodalGeometryOutput::output(), Output::Output(), MooseApp::outputMachineReadableData(), DistributedRectilinearMeshGenerator::paritionSquarely(), ParsedConvergence::ParsedConvergence(), ParsedCurveGenerator::ParsedCurveGenerator(), ExplicitTimeIntegrator::performExplicitSolve(), PetscExternalPartitioner::PetscExternalPartitioner(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularInterface::PiecewiseTabularInterface(), CutMeshByLevelSetGeneratorBase::pointPairLevelSetInterception(), ProjectSideSetOntoLevelSetGenerator::pointPairLevelSetInterception(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessorByName(), AStableDirk4::postResidual(), ExplicitRK2::postResidual(), ExplicitTVDRK2::postResidual(), ImplicitMidpoint::postResidual(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), LStableDirk4::postResidual(), VariableCondensationPreconditioner::preallocateCondensedJacobian(), Predictor::Predictor(), TransientBase::preExecute(), MooseMesh::prepare(), MooseMesh::prepared(), FixedPointSolve::printFixedPointConvergenceReason(), MFEMFunctorMaterial::processLiterals(), MultiApp::readCommandLineArguments(), CoarsenBlockGenerator::recursiveCoarsen(), MooseApp::recursivelyCreateExecutors(), FunctorRelationshipManager::redistribute(), MooseApp::registerRestartableData(), MooseApp::registerRestartableNameWithFilter(), Sampler::reinit(), MooseApp::removeRelationshipManager(), PhysicsBase::reportPotentiallyMissedParameters(), PhysicsVariableCoordinator::requestVariable(), NEML2Action::resolveParameterName(), MooseApp::restore(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), MooseApp::run(), MooseApp::runInputs(), ScalarComponentIC::ScalarComponentIC(), DistributedRectilinearMeshGenerator::scaleNodalPositions(), FunctorRelationshipManager::set_mesh(), MooseVariableBase::setActiveTags(), DistributedRectilinearMeshGenerator::setBoundaryNames(), MooseMesh::setCoordSystem(), MooseMesh::setGeneralAxisymmetricCoordAxes(), MeshGenerator::setMeshProperty(), MooseApp::setMFEMDevice(), Sampler::setNumberOfCols(), Sampler::setNumberOfRandomSeeds(), Sampler::setNumberOfRows(), Split::setup(), TransientMultiApp::setupApp(), Moose::PeriodicBCHelper::setupAutoPeriodicBoundaries(), NEML2Action::setupDerivativeMappings(), NEML2Action::setupInputMappings(), Moose::PeriodicBCHelper::setupManualPeriodicBoundaries(), SetupMeshAction::setupMesh(), MooseApp::setupOptions(), NEML2Action::setupOutputMappings(), NEML2Action::setupParameterDerivativeMappings(), NEML2Action::setupParameterMappings(), TimeSequenceStepperBase::setupSequence(), TransientBase::setupTimeIntegrator(), PhysicsBase::shouldCreateIC(), PhysicsBase::shouldCreateTimeDerivative(), PhysicsBase::shouldCreateVariable(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), MooseVariableBase::sizeMatrixTagData(), SmoothMeshGenerator::SmoothMeshGenerator(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), Moose::MFEM::LinearSolverBase::Solve(), TimeIntegrator::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), FullSolveMultiApp::solveStep(), UserObject::spatialPoints(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), MeshRepairGenerator::splitNonConvexPolygons(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), MaterialBase::subdomainSetup(), CutMeshByLevelSetGeneratorBase::tet4ElemCutter(), Action::timedAct(), Function::timeDerivative(), Function::timeIntegral(), Moose::MFEM::TreeCotreeGauge::trueDofs(), ParsedCurveGenerator::tSectionSpaceDefiner(), MooseVariableScalar::uDot(), MooseVariableScalar::uDotDot(), MooseVariableScalar::uDotDotOld(), MooseVariableScalar::uDotOld(), MooseBase::uniqueName(), AuxScalarKernel::uOld(), ScalarKernelBase::uOld(), Function::value(), Moose::Kokkos::ResidualObject::variable(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), AddVariableAction::variableType(), SubProblem::vectorTagName(), SubProblem::vectorTagType(), Function::vectorValue(), SubProblem::verifyVectorTags(), ActionComponent::volume(), WebServerControl::WebServerControl(), WebServerControl::writePortFile(), MFEMMesh::writeRecoveryFiles(), and MooseApp::writeRestartableMetaData().

◆ mooseErrorNonPrefixed()

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

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

Definition at line 290 of file MooseBase.h.

291 {
292 callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ false);
293 }

◆ mooseInfo()

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

◆ mooseWarning() [1/2]

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

Emits a warning prefixed with object name and type.

Definition at line 299 of file MooseBase.h.

300 {
301 moose::internal::mooseWarningStream(_console, messagePrefix(true), std::forward<Args>(args)...);
302 }
void mooseWarningStream(S &oss, Args &&... args)
Definition MooseError.h:197

Referenced by DiracKernelInfo::findPoint(), DataFileInterface::getDataFilePath(), MooseApp::loadLibraryAndDependencies(), MooseBase::paramWarning(), and MooseApp::setupOptions().

◆ mooseWarning() [2/2]

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

Definition at line 73 of file SolutionInvalidInterface.h.

74 {
75 _si_moose_base.MooseBase::mooseWarning(std::forward<Args>(args)...);
76 flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": warning");
77 }

Referenced by CopyMeshPartitioner::_do_partition(), AddFunctionAction::act(), AddKernelAction::act(), CommonOutputAction::act(), MaterialOutputAction::act(), MeshOnlyAction::act(), MooseMesh::addPeriodicVariable(), BoundaryMarker::BoundaryMarker(), DistributedRectilinearMeshGenerator::buildCube(), CartesianMeshGenerator::CartesianMeshGenerator(), CheckOutputAction::checkConsoleOutput(), MultiAppTransfer::checkMultiAppExecuteOn(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkPolygons(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), MultiApp::createApp(), MeshDiagnosticsGenerator::diagnosticsLog(), CartesianGridDivision::divisionIndex(), CylindricalGridDivision::divisionIndex(), SphericalGridDivision::divisionIndex(), Postprocessor::evaluateDotWarning(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), BSplineCurveGenerator::generate(), RenumberBySubdomainGenerator::generate(), SubdomainPerElementGenerator::generate(), SurfaceMeshGeneratorBase::get2DElemNormal(), MultiAppTransfer::getAppInfo(), FunctorBinnedValuesDivision::getBinIndex(), IndicatorMarker::IndicatorMarker(), CartesianGridDivision::initialize(), CylindricalGridDivision::initialize(), SphericalGridDivision::initialize(), MaterialBase::initStatefulProperties(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MFEMRefinementMarker::MFEMRefinementMarker(), NewmarkBeta::NewmarkBeta(), Output::Output(), MaterialOutputAction::outputHelper(), Executioner::problem(), PhysicsBase::reportPotentiallyMissedParameters(), MaterialBase::resetQpProperties(), MooseMesh::setCoordSystem(), TransientMultiApp::solveStep(), MeshRepairGenerator::splitNonConvexPolygons(), and VariableCondensationPreconditioner::VariableCondensationPreconditioner().

◆ mooseWarningNonPrefixed() [1/2]

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

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

Definition at line 308 of file MooseBase.h.

309 {
310 moose::internal::mooseWarningStream(_console, std::forward<Args>(args)...);
311 }

◆ mooseWarningNonPrefixed() [2/2]

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

Definition at line 80 of file SolutionInvalidInterface.h.

81 {
82 _si_moose_base.MooseBase::mooseWarningNonPrefixed(std::forward<Args>(args)...);
83 flagSolutionWarningMultipleRegistration(_si_moose_base.name() + ": warning");
84 }

◆ nActiveElem()

dof_id_type MFEMMesh::nActiveElem ( ) const
inlineoverridevirtualinherited

Reimplemented from MooseMesh.

Definition at line 68 of file MFEMMesh.h.

68{ return _mfem_par_mesh->GetGlobalNE(); }

◆ nActiveLocalElem()

dof_id_type MFEMMesh::nActiveLocalElem ( ) const
inlineoverridevirtualinherited

Reimplemented from MooseMesh.

Definition at line 69 of file MFEMMesh.h.

69{ return _mfem_par_mesh->GetNE(); }

◆ name()

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

Get the name of the class.

Returns
The name of the class

Definition at line 103 of file MooseBase.h.

104 {
105 mooseAssert(_name.size(), "Empty name");
106 return _name;
107 }
const std::string & _name
The name of this class.
Definition MooseBase.h:387

Referenced by AdaptivityAction::act(), AddActionComponentAction::act(), AddElementalFieldAction::act(), AddPeriodicBCAction::act(), AddTimeStepperAction::act(), CommonOutputAction::act(), CopyNodalVarsAction::act(), CSGOnlyAction::act(), DeprecatedBlockAction::act(), DisplayGhostingAction::act(), MaterialOutputAction::act(), SetupResidualDebugAction::act(), SetupTimeIntegratorAction::act(), FEProblemBase::addAnyRedistributers(), Executioner::addAttributeReporter(), FEProblemBase::addAuxKernel(), MFEMProblem::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), MFEMProblem::addBoundaryCondition(), MFEMComplexWeakForm::addBoundaryCondition(), MFEMWeakForm::addBoundaryCondition(), PhysicsComponentInterface::addComponent(), FEProblemBase::addConstraint(), MFEMProblem::addConstraint(), MFEMComplexWeakForm::addConstraint(), MFEMWeakForm::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), MFEMProblem::addDefaultProblemComposer(), MFEMProblem::addDefaultWeakForm(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFESpace(), MFEMProblem::addFESpaceHierarchy(), FEProblemBase::addFunction(), MFEMProblem::addFunction(), SubProblem::addFunctor(), FEProblemBase::addFunctorMaterial(), MFEMProblem::addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addFVBC(), FEProblemBase::addFVGradientMethod(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVInterpolationMethod(), FEProblemBase::addFVKernel(), ADDGKernel::ADDGKernel(), FEProblemBase::addHDGKernel(), MFEMProblem::addImagComponentToBC(), MFEMProblem::addImagComponentToKernel(), FEProblemBase::addIndicator(), MFEMProblem::addIndicator(), FEProblemBase::addInitialCondition(), MFEMProblem::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), ElementAndTraceScalarHDGAssemblyHelper::additionalROVariables(), BoundaryIntegralValueConstraint::additionalROVariables(), DiffusionLHDGKernel::additionalROVariables(), ADKernelScalarBase::additionalROVariables(), FEProblemBase::addKernel(), MFEMProblem::addKernel(), MFEMComplexWeakForm::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblemBase::addMarker(), MFEMProblem::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), ComponentMaterialPropertyInterface::addMaterials(), FEProblemBase::addMeshDivision(), MooseApp::addMeshGenerator(), ComponentJunction::addMeshGenerators(), ComponentMeshTransformHelper::addMeshGenerators(), CylinderComponent::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMSolver(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), MFEMProblem::addObject(), FEProblemBase::addObject(), InitialConditionWarehouse::addObject(), ComponentPhysicsInterface::addPhysics(), SubProblem::addPiecewiseByBlockLambdaFunctor(), FEProblemBase::addPostprocessor(), MFEMProblem::addPostprocessor(), UserObjectBase::addPostprocessorDependencyHelper(), AuxKernelBase::addPostprocessorDependencyHelper(), InitialConditionBase::addPostprocessorDependencyHelper(), FEProblemBase::addPredictor(), MFEMProblem::addProblemComposer(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MFEMProblem::addRealComponentToBC(), MFEMProblem::addRealComponentToKernel(), AddActionComponentAction::addRelationshipManagers(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), WebServerControl::addServerActionsInternal(), PhysicsBase::addSharedAuxVariable(), PhysicsBase::addSharedSolverVariable(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), MFEMProblem::addTransfer(), PhysicsBase::addUserObject(), FEProblemBase::addUserObject(), UserObjectBase::addUserObjectDependencyHelper(), AuxKernelBase::addUserObjectDependencyHelper(), InitialConditionBase::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), MFEMProblem::addVectorPostprocessor(), UserObjectBase::addVectorPostprocessorDependencyHelper(), AuxKernelBase::addVectorPostprocessorDependencyHelper(), MFEMProblem::addWeakForm(), MooseLinearVariableFV< OutputType >::adError(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), NEML2ModelExecutor::advanceState(), MooseVariableBase::allDofIndices(), MooseApp::appBinaryName(), MooseApp::appendMeshGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), ArrayParsedAux::ArrayParsedAux(), PhysicsBase::assignBlocks(), AStableDirk4::AStableDirk4(), AuxKernelBase::AuxKernelBase(), Function::average(), MultiApp::backup(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), PiecewiseTabularInterface::buildFromFile(), PiecewiseTabularInterface::buildFromXY(), MFEMGeometricMultigridSolver::BuildMultigrid(), MooseMesh::buildNodeListFromSideList(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MooseBase::callMooseError(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), PhysicsBase::checkBlockRestrictionIdentical(), PhysicsBase::checkComponentType(), MortarContactPressureProvider::checkConsumer(), DefaultNonlinearConvergence::checkConvergence(), ParsedConvergence::checkConvergence(), checkCoupledScalarVariableBlocks(), FEProblemBase::checkDependMaterialsHelper(), MFEMConstraint::checkDisjointSubdomains(), FVFluxBC::checkFaceIntegrity(), FVInterfaceKernel::checkFaceIntegrity(), TaggingInterface::checkForNans(), SamplerBase::checkForStandardFieldVariableType(), PhysicsVariableCoordinator::checkFVAdjacency(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), NonlinearSystemBase::checkKernelCoverage(), Moose::Kokkos::Material::checkMaterialProperty(), Material::checkMaterialProperty(), MooseApp::checkMetaDataIntegrity(), Damper::checkMinDamping(), SideUserObject::checkNoInterfaceMaterialPropertyDependencies(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), Checkpoint::checkpointInfo(), LinearFVGradientManager::checkRestartedGradientHistory(), FEProblemBase::checkUserObjectNameCollision(), BlockRestrictable::checkVariable(), DomainUserObject::checkVariable(), Coupleable::checkWritableVar(), CoarsenSurfaceMeshAlongSidesetGenerator::coarsenAlongSidesets(), MooseVariableFieldBase::componentName(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), FEProblemBase::computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBase::connectControllableParams(), ConstantPostprocessor::ConstantPostprocessor(), Coupleable::coupledName(), CommonOutputAction::create(), MultiApp::createApp(), MooseApp::createExecutors(), MeshGeneratorSystem::createMeshGeneratorOrder(), MooseApp::createRecoverablePerfGraph(), MoveBoundaryNodesToCurveGenerator::curveGenerator(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), DebugResidualAux::DebugResidualAux(), MaterialBase::declareADProperty(), MFEMComplexVariable::declareCoefficients(), MFEMVariable::declareCoefficients(), MeshInfo::declareHelper(), Moose::Kokkos::MaterialBase::declareKokkosOnDemandProperty(), Moose::Kokkos::MaterialBase::declareKokkosProperty(), MeshGenerator::declareMeshesForSubByName(), MeshGenerator::declareNullMeshName(), MaterialBase::declareProperty(), MFEMCoordinateTransformations::declareRZCoefficients(), DOFMapOutput::demangle(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), MooseMesh::detectPairedSidesets(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DomainUserObject::DomainUserObject(), DumpObjectsProblem::dumpObjectHelper(), ElementDamper::ElementDamper(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementMaterialSampler::ElementMaterialSampler(), ElementValueSampler::ElementValueSampler(), EigenKernel::enabled(), MooseMesh::errorIfDistributedMesh(), SolutionUserObjectBase::evalMeshFunction(), SolutionUserObjectBase::evalMeshFunctionGradient(), SolutionUserObjectBase::evalMultiValuedMeshFunction(), SolutionUserObjectBase::evalMultiValuedMeshFunctionGradient(), GreaterThanLessThanPostprocessor::execute(), PointValue::execute(), RestartableDataReporter::execute(), MultiAppGeneralFieldTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppUserObjectTransfer::execute(), SideValueSampler::execute(), WebServerControl::execute(), ActionWarehouse::executeActionsWithAction(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FVInterfaceKernel::faceArg1(), FVInterfaceKernel::faceArg2(), NEML2ModelExecutor::failedInputDumpName(), FEProblemBase::FEProblemBase(), NEML2ModelExecutor::fillInputs(), MultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), PointSamplerBase::finalize(), ChainControl::fullControlDataName(), FunctionArrayAux::FunctionArrayAux(), FunctionDT::FunctionDT(), FVFunctionIC::functionName(), FunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), GapValueAux::GapValueAux(), AdvancedExtruderGenerator::generate(), BoundaryDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), BSplineCurveGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), ManifoldSubdomainGenerator::generate(), ParsedExtraElementIDGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), RenumberBySubdomainGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), StitchBoundaryMeshGenerator::generate(), StitchMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainsFromPartitionerGenerator::generate(), UniqueExtraIDMeshGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MooseMesh::getBoundaryString(), MultiApp::getBoundingBox(), MooseBase::getCheckedPointerParam(), MooseApp::getCheckpointDirectories(), MFEMProblem::getComplexGridFunction(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), FEProblemBase::getConvergence(), MeshGenerator::getCSGBase(), MeshGenerator::getCSGBasesByName(), UserObjectBase::getDependObjects(), FEProblemBase::getDistribution(), DistributionInterface::getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), FEProblemBase::getExecutor(), MooseApp::getExecutor(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), SubProblem::getFunctor(), FEProblemBase::getFVAdvectedInterpolationMethod(), FEProblemBase::getFVFaceInterpolationMethod(), FEProblemBase::getFVGradientMethod(), FEProblemBase::getFVGradientMethod(), FEProblemBase::getFVInterpolationMethod(), AuxKernelTempl< ComputeValueType >::getGenericMaterialProperty(), NodalPatchRecovery::getGenericMaterialProperty(), InterfaceMaterial::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialPropertyByName(), Material::getGenericOptionalMaterialProperty(), MaterialBase::getGenericZeroMaterialProperty(), MFEMProblem::getGridFunction(), FEProblemBase::getKokkosFunction(), FEProblemBase::getKokkosUserObject(), SolutionUserObjectBase::getLocalVarIndex(), Marker::getMarkerValue(), Material::getMaterial(), FEProblemBase::getMaterial(), Material::getMaterialByName(), AuxKernelTempl< ComputeValueType >::getMaterialProperty(), NodalPatchRecovery::getMaterialProperty(), InterfaceMaterial::getMaterialProperty(), Material::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), AuxKernelTempl< ComputeValueType >::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOld(), InterfaceMaterial::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), AuxKernelTempl< ComputeValueType >::getMaterialPropertyOlder(), NodalPatchRecovery::getMaterialPropertyOlder(), InterfaceMaterial::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), MFEMObject::getMatrixCoefficient(), MFEMObject::getMatrixCoefficientByName(), MeshGenerator::getMesh(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshesByName(), MooseApp::getMeshGenerator(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MFEMProblem::getMFEMObject(), ActionWarehouse::getMooseAppName(), TorchFEInterpolation::getMOOSEVariable(), MultiAppTransfer::getMultiApp(), InterfaceMaterial::getNeighborADMaterialProperty(), InterfaceMaterial::getNeighborMaterialProperty(), InterfaceMaterial::getNeighborMaterialPropertyOld(), InterfaceMaterial::getNeighborMaterialPropertyOlder(), Material::getOptionalADMaterialProperty(), Material::getOptionalMaterialProperty(), Material::getOptionalMaterialPropertyOld(), Material::getOptionalMaterialPropertyOlder(), MooseBase::getParam(), FEProblemBase::getPositionsObject(), FEProblemBase::getPostprocessorValueByName(), ComponentMaterialPropertyInterface::getPropertyValue(), ReporterData::getReporterInfo(), MFEMExecutedObject::getRequestedItems(), MooseApp::getRestartableDataMap(), MooseApp::getRestartableDataMapName(), MooseApp::getRestartableMetaData(), FEProblemBase::getSampler(), MFEMObject::getScalarCoefficient(), MFEMObject::getScalarCoefficientByName(), TimedSubdomainModifier::getSubdomainIDAndCheck(), MFEMExecutedObject::getSuppliedItems(), TransientBase::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), MFEMObject::getVectorCoefficient(), MFEMObject::getVectorCoefficientByName(), MooseParsedFunction::gradient(), LinearFVGradientManager::gradientStateVectorName(), Terminator::handleMessage(), Control::hasControllableParameterByName(), FEProblemBase::hasConvergence(), FEProblemBase::hasDistribution(), FEProblemBase::hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), FEProblemBase::hasFVGradientMethod(), FEProblemBase::hasFVInterpolationMethod(), MeshInfo::hasItem(), MooseApp::hasMeshGenerator(), MFEMProblem::hasMFEMObject(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasPostprocessorValueByName(), MooseApp::hasRelationshipManager(), MooseApp::hasRestartableDataMap(), MooseApp::hasRestartableMetaData(), FEProblemBase::hasUserObject(), NEML2Action::inferMOOSEIOType(), AddVariableAction::init(), AdvancedOutput::init(), IterationAdaptiveDT::init(), AdvancedOutput::initAvailableLists(), MeshInfo::initCombinedInfos(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), BoundaryRestrictable::initializeBoundaryRestrictable(), AuxKernelBase::initialSetup(), SolutionScalarAux::initialSetup(), MFEMScalarQuadratureFunction::initialSetup(), MFEMVectorQuadratureFunction::initialSetup(), Console::initialSetup(), JSONOutput::initialSetup(), BoundaryLinearFVFluxIntegral::initialSetup(), NodalVariableValue::initialSetup(), SideFVFluxBCIntegral::initialSetup(), MultiAppGeneralFieldFunctorTransfer::initialSetup(), MultiAppProjectionTransfer::initialSetup(), BoundaryMeshBuilder::initialSetup(), SolutionUserObjectBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), MeshGenerator::isChildMeshGenerator(), DerivativeMaterialInterface< T >::isNotObjectVariable(), MeshGenerator::isNullMeshName(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), FEProblemBase::logAdd(), MooseLinearVariableFV< OutputType >::lowerDError(), Marker::Marker(), MaterialBase::markMatPropRequested(), Material::Material(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), NEML2ModelExecutor::meshChanged(), MeshGenerator::meshPropertyPrefix(), MooseBase::messagePrefix(), MFEMGeometricMultigridSolver::MFEMGeometricMultigridSolver(), MFEMScalarQuadratureFunction::MFEMScalarQuadratureFunction(), MFEMVectorQuadratureFunction::MFEMVectorQuadratureFunction(), MooseApp::MooseApp(), OutputWarehouse::mooseConsole(), SolutionInvalidInterface::mooseDeprecated(), MooseVariableBase::MooseVariableBase(), MooseVariableInterface< T >::MooseVariableInterface(), SolutionInvalidInterface::mooseWarning(), SolutionInvalidInterface::mooseWarningNonPrefixed(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalDamper::NodalDamper(), MooseLinearVariableFV< OutputType >::nodalError(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalValueSampler::NodalValueSampler(), MeshGenerator::Comparator::operator()(), DOFMapOutput::output(), ProgressOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), ConsoleUtils::outputExecutionInformation(), MaterialOutputAction::outputHelper(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), Exodus::outputPostprocessors(), Nemesis::outputPostprocessors(), TableOutput::outputReporter(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), SolutionInvalidInterface::paramWarning(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedODEKernel::ParsedODEKernel(), ComponentPhysicsInterface::physicsExists(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseFunction::PiecewiseFunction(), PointInUnionCheckUO::PointInUnionCheckUO(), MooseApp::possiblyLoadRestartableMetaData(), MFEMExecutedObject::postprocessorDependencyKey(), PhysicsBase::prefix(), MooseMesh::prepare(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), PerfGraphLivePrint::printStats(), FEProblemBase::projectInitialConditionOnCustomRange(), MooseBase::queryParam(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), FEProblemBase::registerRandomInterface(), MooseApp::registerRestartableDataMapName(), MooseApp::registerRestartableNameWithFilter(), NodalConstraint::reinitConstraintNodes(), MaterialBase::resetQpProperties(), MultiApp::restore(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), FEProblemBase::setAuxKernelParamsAndLog(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), OutputWarehouse::setFileNumbers(), FEProblemBase::setPostprocessorValueByName(), FEProblemBase::setResidualObjectParamsAndLog(), MooseMesh::setSubdomainName(), MooseMesh::setSubdomainName(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), SurfaceMeshGeneratorBase::setup(), Split::setup(), TransientMultiApp::setupApp(), MoveNodesByParsedExpressionModifier::setupNodalOutputVariables(), SideSetExtruderGenerator::SideSetExtruderGenerator(), TransientMultiApp::solveStep(), UserObject::spatialValue(), LinearFVGradientReader::stateComponents(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), MaterialBase::storeBoundaryZeroMatProp(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), MaterialBase::storeSubdomainZeroMatProp(), SubProblem::storeSubdomainZeroMatProp(), ConstraintWarehouse::subdomainsCovered(), MaterialBase::subdomainSetup(), SumPostprocessor::SumPostprocessor(), MFEMPostprocessor::suppliedPostprocessorName(), MFEMVectorPostprocessor::suppliedVectorPostprocessorName(), BoundaryMeshBuilder::surfaceElementSet(), TorchFEInterpolation::syncWithMainThread(), TaggingInterface::TaggingInterface(), MooseLinearVariableFV< OutputType >::timeIntegratorError(), VectorPostprocessorVisualizationAux::timestepSetup(), ElementSubdomainModifierBase::timestepSetup(), to_json(), TorchPreKernel::TorchPreKernel(), MultiAppDofCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), MultiAppMFEMCopyTransfer::transferVariables(), MultiAppMFEMShapeEvaluationTransfer::transferVariables(), TransientMultiApp::TransientMultiApp(), MooseBase::typeAndName(), MooseBase::uniqueParameterName(), FVQpFluxBC::uOnGhost(), FVQpFluxBC::uOnUSub(), UserObjectBase::UserObjectBase(), UserObjectInterface::userObjectName(), ParsedAux::validateGenericVectorNames(), BreakMeshByBlockGenerator::validParams(), MeshInfo::validParams(), MFEMExecutedObject::variableDependencyKey(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), MFEMExecutedObject::vectorPostprocessorDependencyKey(), Convergence::verboseOutput(), AdvancedOutput::wantOutput(), Coupleable::writableCoupledValue(), Coupleable::writableVariable(), Console::write(), MooseApp::writeRestartableMetaData(), and XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve().

◆ needGhostGhostedBoundaries()

void MooseMesh::needGhostGhostedBoundaries ( bool  needghost)
inlineinherited

Whether or not we want to ghost ghosted boundaries.

Definition at line 624 of file MooseMesh.h.

624{ _need_ghost_ghosted_boundaries = needghost; }

Referenced by DistributedRectilinearMeshGenerator::generate().

◆ needsPrepareForUse()

void MooseMesh::needsPrepareForUse ( )
inherited

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

3274{
3275 prepared(false);
3276}
bool prepared() const
Setter/getter for whether the mesh is prepared.
Definition MooseMesh.C:3245

◆ needsRemoteElemDeletion() [1/2]

bool MooseMesh::needsRemoteElemDeletion ( ) const
inlineinherited

Whether we need to delete remote elements.

Definition at line 1237 of file MooseMesh.h.

1237{ return _need_delete; }

◆ needsRemoteElemDeletion() [2/2]

void MooseMesh::needsRemoteElemDeletion ( bool  need_delete)
inlineinherited

Set whether we need to delete remote elements.

Definition at line 1232 of file MooseMesh.h.

1232{ _need_delete = need_delete; }

◆ nElem()

dof_id_type MooseMesh::nElem ( ) const
virtualinherited

Definition at line 3189 of file MooseMesh.C.

3190{
3191 return getMesh().n_elem();
3192}

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

◆ nFace()

unsigned int MooseMesh::nFace ( ) const
inlineinherited

accessors for the FaceInfo objects

Definition at line 1315 of file MooseMesh.h.

1315{ return _face_info.size(); }

◆ nLocalNodes()

virtual dof_id_type MooseMesh::nLocalNodes ( ) const
inlinevirtualinherited

Definition at line 336 of file MooseMesh.h.

336{ return _mesh->n_local_nodes(); }

◆ nNodes()

dof_id_type MooseMesh::nNodes ( ) const
virtualinherited

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

Definition at line 3183 of file MooseMesh.C.

3184{
3185 return getMesh().n_nodes();
3186}

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

◆ node() [1/2]

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

Definition at line 849 of file MooseMesh.C.

850{
851 mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
852 return nodeRef(i);
853}
virtual const Node & nodeRef(const dof_id_type i) const
Definition MooseMesh.C:856

◆ node() [2/2]

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

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

843{
844 mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
845 return nodeRef(i);
846}

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

◆ nodePtr() [1/2]

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

Definition at line 876 of file MooseMesh.C.

877{
878 return &nodeRef(i);
879}

◆ nodePtr() [2/2]

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

Definition at line 870 of file MooseMesh.C.

871{
872 return &nodeRef(i);
873}

Referenced by ElementSubdomainModifierBase::reinitializedNodeRange().

◆ nodeRef() [1/2]

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

Definition at line 864 of file MooseMesh.C.

865{
866 return const_cast<Node &>(const_cast<const MooseMesh *>(this)->nodeRef(i));
867}
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95

◆ nodeRef() [2/2]

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

◆ nodeSetNodes()

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

Definition at line 2391 of file MooseMesh.h.

2392{
2393 return _node_set_nodes;
2394}

◆ nodeToElemMap()

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

◆ nPartitions()

virtual unsigned int MooseMesh::nPartitions ( ) const
inlinevirtualinherited

Definition at line 341 of file MooseMesh.h.

341{ return _mesh->n_partitions(); }

◆ nSubdomains()

SubdomainID MFEMMesh::nSubdomains ( ) const
inlineoverridevirtualinherited

Reimplemented from MooseMesh.

Definition at line 67 of file MFEMMesh.h.

67{ return _mfem_par_mesh->attributes.Size(); }

◆ onMeshChanged()

void MooseMesh::onMeshChanged ( )
virtualinherited

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

930{
931}

Referenced by MooseMesh::meshChanged().

◆ operator const libMesh::MeshBase &()

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

Definition at line 3572 of file MooseMesh.C.

3572{ return getMesh(); }

◆ operator libMesh::MeshBase &()

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

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

Definition at line 3570 of file MooseMesh.C.

3570{ return getMesh(); }

◆ ownedElemInfoBegin()

MooseMesh::elem_info_iterator MooseMesh::ownedElemInfoBegin ( )
inherited

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

1521{
1522 return elem_info_iterator(_elem_info.begin(),
1523 _elem_info.end(),
1524 Predicates::NotNull<std::vector<const ElemInfo *>::iterator>());
1525}

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

◆ ownedElemInfoEnd()

MooseMesh::elem_info_iterator MooseMesh::ownedElemInfoEnd ( )
inherited

Definition at line 1528 of file MooseMesh.C.

1529{
1530 return elem_info_iterator(_elem_info.end(),
1531 _elem_info.end(),
1532 Predicates::NotNull<std::vector<const ElemInfo *>::iterator>());
1533}

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

◆ ownedFaceInfoBegin()

MooseMesh::face_info_iterator MooseMesh::ownedFaceInfoBegin ( )
inherited

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

1503{
1504 return face_info_iterator(
1505 _face_info.begin(),
1506 _face_info.end(),
1507 libMesh::Predicates::pid<std::vector<const FaceInfo *>::iterator>(this->processor_id()));
1508}

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

◆ ownedFaceInfoEnd()

MooseMesh::face_info_iterator MooseMesh::ownedFaceInfoEnd ( )
inherited

Definition at line 1511 of file MooseMesh.C.

1512{
1513 return face_info_iterator(
1514 _face_info.end(),
1515 _face_info.end(),
1516 libMesh::Predicates::pid<std::vector<const FaceInfo *>::iterator>(this->processor_id()));
1517}

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

◆ paramError()

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

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

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

Definition at line 466 of file MooseBase.h.

467{
468 _pars.paramError(param, std::forward<Args>(args)...);
469}
void paramError(const std::string &param, Args... args) const
Emits a parameter error prefixed with the parameter location and object information if available.

Referenced by HierarchicalGridPartitioner::_do_partition(), AutoCheckpointAction::act(), CommonOutputAction::act(), SetupDebugAction::act(), ADArrayIntegratedBC::ADArrayIntegratedBC(), ADArrayRobinBC::ADArrayRobinBC(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), NEML2ModelExecutor::addGatheredParameter(), NEML2ModelExecutor::addGatheredVariable(), ADDGKernel::ADDGKernel(), ComponentJunction::addMeshGenerators(), CylinderComponent::addMeshGenerators(), ReporterPointSource::addPoints(), DiffusionPhysicsBase::addPostprocessors(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), ADPenaltyPeriodicSegmentalConstraint::ADPenaltyPeriodicSegmentalConstraint(), ADPeriodicSegmentalConstraint::ADPeriodicSegmentalConstraint(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), MFEMComplexScalarEssentialConstraint::ApplyConstraint(), MFEMComplexVectorEssentialConstraint::ApplyConstraint(), MFEMScalarEssentialConstraint::ApplyConstraint(), MFEMVectorEssentialConstraint::ApplyConstraint(), ArrayBodyForce::ArrayBodyForce(), ArrayCoupledForce::ArrayCoupledForce(), ArrayDGKernel::ArrayDGKernel(), ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayDirichletBC::ArrayDirichletBC(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), ArrayParsedAux::ArrayParsedAux(), ArrayPenaltyDirichletBC::ArrayPenaltyDirichletBC(), ArrayReactionNodalKernelTempl< is_ad >::ArrayReactionNodalKernelTempl(), ArrayVacuumBC::ArrayVacuumBC(), ArrayVarReductionAux::ArrayVarReductionAux(), ParsedSubdomainIDsGenerator::assignElemSubdomainID(), AuxKernelBase::AuxKernelBase(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BlockDeletionGenerator::BlockDeletionGenerator(), BlockWeightedPartitioner::BlockWeightedPartitioner(), BoundaryIntegralValueConstraint::BoundaryIntegralValueConstraint(), BoundaryLinearFVFluxIntegral::BoundaryLinearFVFluxIntegral(), BoundsBase::BoundsBase(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BSplineCurveGenerator::BSplineCurveGenerator(), BuildArrayVariableAux::BuildArrayVariableAux(), MFEMFESpaceHierarchy::buildHierarchy(), MFEMMesh::buildMesh(), TimeSequenceStepperBase::buildSequence(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), SurfaceDelaunayGeneratorBase::checkBoundaryAndHolesParams(), checkComponent(), MortarContactPressureProvider::checkConsumer(), MFEMConstraint::checkDisjointSubdomains(), Moose::Kokkos::ParsedObjectBase::checkDuplicateSymbols(), SamplerBase::checkForStandardFieldVariableType(), MeshGenerator::checkGetMesh(), ComponentInitialConditionInterface::checkInitialConditionsAllRequested(), BatchMeshGeneratorAction::checkInputParameterType(), PhysicsBase::checkIntegrityEarly(), SurfaceDelaunayGeneratorBase::checkInteriorPoints(), SideUserObject::checkNoInterfaceMaterialPropertyDependencies(), PostprocessorInterface::checkParam(), MortarConsumerInterface::checkPetrovGalerkinQuadraticFaces(), FEProblemBase::checkProblemIntegrity(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), NEML2Action::checkStatefulConsistency(), MFEMMultiAppTransfer::checkValidTransferProblemTypes(), Coupleable::checkVar(), MultiAppTransfer::checkVariable(), CircularBoundaryCorrectionGenerator::CircularBoundaryCorrectionGenerator(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), MultiAppGeneralFieldTransfer::closestToPosition(), CoarsenBlockGenerator::CoarsenBlockGenerator(), CombinedVectorPostprocessor::CombinedVectorPostprocessor(), CombinerGenerator::CombinerGenerator(), ComponentInitialConditionInterface::ComponentInitialConditionInterface(), ComponentJunction::ComponentJunction(), ComponentMaterialPropertyInterface::ComponentMaterialPropertyInterface(), CompositionDT::CompositionDT(), AdvancedExtruderGenerator::computeNodeNormals(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), LibtorchNeuralNetControl::conditionalParameterError(), ConservativeAdvectionBCTempl< is_ad >::ConservativeAdvectionBCTempl(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), ConstantVectorPostprocessor::ConstantVectorPostprocessor(), MFEMNewtonNonlinearSolver::ConstructSolver(), ContainsPointAux::ContainsPointAux(), CopyValueAux::CopyValueAux(), MultiAppGeneralFieldTransfer::correctSolutionVectorValues(), Coupleable::Coupleable(), CoupledForceTempl< is_ad >::CoupledForceTempl(), CoupledValueFunctionMaterialTempl< is_ad >::CoupledValueFunctionMaterialTempl(), MultiApp::createApp(), MeshGeneratorSystem::createMeshGenerator(), CumulativeTimeAverageFunctorAux::CumulativeTimeAverageFunctorAux(), MoveBoundaryNodesToCurveGenerator::curveGenerator(), CylindricalGridDivision::CylindricalGridDivision(), DebugResidualAux::DebugResidualAux(), ConstantReporter::declareConstantReporterValue(), ConstantReporter::declareConstantReporterValues(), AccumulateReporter::declareLateValues(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DGLowerDKernel::DGLowerDKernel(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), EigenProblem::EigenProblem(), EigenProblemSolve::EigenProblemSolve(), ElementAdaptivityLevelAux::ElementAdaptivityLevelAux(), ElementGenerator::ElementGenerator(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementLengthAux::ElementLengthAux(), ElementLpNormAux::ElementLpNormAux(), ElementNormalAux::ElementNormalAux(), ExtraIDIntegralVectorPostprocessor::elementValue(), ElementValueSampler::ElementValueSampler(), ElementVectorL2Error::ElementVectorL2Error(), EqualValueEmbeddedConstraintTempl< is_ad >::EqualValueEmbeddedConstraintTempl(), ReporterPointSource::errorCheck(), StitchMeshGeneratorBase::errorMissingBoundary(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), FunctorNodalCorrector::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), ExtraElementIDAux::ExtraElementIDAux(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::FileMeshGenerator(), FillBetweenCurvesGenerator::FillBetweenCurvesGenerator(), FillBetweenSidesetsGenerator::FillBetweenSidesetsGenerator(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), InternalSideIndicatorBase::finalize(), MeshTriangulationUtils::finalizeTriangulation(), FixedPointSolve::findTransformedSystem(), FixedPointSolve::FixedPointSolve(), ForcingFunctionAux::ForcingFunctionAux(), FullSolveMultiApp::FullSolveMultiApp(), FunctionArrayAux::FunctionArrayAux(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FunctorADConverterTempl< T >::FunctorADConverterTempl(), FunctorAux::FunctorAux(), FunctorBinnedValuesDivision::FunctorBinnedValuesDivision(), FunctorCoordinatesFunctionAux::FunctorCoordinatesFunctionAux(), FunctorElementalGradientAuxTempl< is_ad >::FunctorElementalGradientAuxTempl(), FunctorExtremaPositions::FunctorExtremaPositions(), FunctorIC::FunctorIC(), FunctorNodalCorrector::FunctorNodalCorrector(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FunctorVectorElementalAuxTempl< is_ad >::FunctorVectorElementalAuxTempl(), FVAdvection::FVAdvection(), FVFluxBC::FVFluxBC(), FVInterfaceKernel::FVInterfaceKernel(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), FVTwoVarContinuityConstraint::FVTwoVarContinuityConstraint(), Boundary2DDelaunayGenerator::General2DDelaunay(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), AddMetaDataGenerator::generate(), AdvancedExtruderGenerator::generate(), BlockDeletionGenerator::generate(), BlockToMeshConverterGenerator::generate(), Boundary2DDelaunayGenerator::generate(), BoundaryDeletionGenerator::generate(), BoundaryElementConversionGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), BreakMeshByBlockGenerator::generate(), BreakMeshByElementGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), CoarsenBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), CombinerGenerator::generate(), ConcentricCircleMeshGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), ElementsToTetrahedronsConverter::generate(), ExtraNodesetGenerator::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), ManifoldSubdomainGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), MoveBoundaryNodesToCurveGenerator::generate(), ParsedCurveGenerator::generate(), ParsedExtraElementIDGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), PlaneIDMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), ProjectSideSetOntoLevelSetGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), RenumberBySubdomainGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), StackGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainsFromPartitionerGenerator::generate(), SurfaceSubdomainsDelaunayRemesher::generate(), TriToQuadConverter::generate(), UniqueExtraIDMeshGenerator::generate(), XYFrontalDelaunayGenerator::generate(), XYMeshLineCutter::generate(), XYZDelaunayGenerator::generate(), PatternedMeshGenerator::generate(), GeneratedMeshGenerator::GeneratedMeshGenerator(), BoundaryLayerUtils::generateOffsetPolyline(), GenericConstantStdVectorMaterialTempl< is_ad >::GenericConstantStdVectorMaterialTempl(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), PropertyReadFile::getBlockData(), ComponentBoundaryConditionInterface::getBoundaryCondition(), MultiApp::getCommandLineArgs(), PropertyReadFile::getData(), PropertyReadFile::getFileNames(), Sampler::getGlobalSamples(), ComponentInitialConditionInterface::getInitialCondition(), NEML2Action::getInputParameterMapping(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), Sampler::getLocalSamples(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), FEProblemSolve::getParamFromNonlinearSystemVectorParam(), PostprocessorInterface::getPostprocessorNameInternal(), PostprocessorInterface::getPostprocessorValueInternal(), Sampler::getSampleRow(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), UserObjectInterface::getUserObjectBase(), UserObjectInterface::getUserObjectName(), AddPeriodicBCAction::getVariables(), HFEMDirichletBC::HFEMDirichletBC(), AddVariableAction::init(), TimeIntegrator::init(), MFEMTransient::init(), FEProblemBase::init(), MultiApp::init(), MFEMWeakFormBase::initEquationSystem(), DistributedPositions::initialize(), BlockWeightedPartitioner::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), PhysicsBase::initializePhysics(), ReferenceResidualConvergence::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), SolutionIC::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), ElementSubdomainModifierBase::initialSetup(), MFEMScalarCoefficientPointValueSampler::initialSetup(), FullSolveMultiApp::initialSetup(), JSONOutput::initialSetup(), BoundaryLinearFVFluxIntegral::initialSetup(), SideFVFluxBCIntegral::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeneralFieldKDTreeTransferBase::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), PointInPolyhedronCheckUO::initialSetup(), HistogramVectorPostprocessor::initialSetup(), SampledOutput::initSample(), AddMetaDataGenerator::inputChecker(), IntegratedBC::IntegratedBC(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceValueUserObjectAux::InterfaceValueUserObjectAux(), InternalSideIndicatorBase::InternalSideIndicatorBase(), InterpolatedStatefulMaterialTempl< T >::InterpolatedStatefulMaterialTempl(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), MultiApp::keepSolutionDuringRestore(), Kernel::Kernel(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationFunction::LinearCombinationFunction(), LinearFVAdvectionDiffusionFunctorRobinBC::LinearFVAdvectionDiffusionFunctorRobinBC(), LinearFVGradientAux::LinearFVGradientAux(), LinearNodalConstraint::LinearNodalConstraint(), Moose::MFEM::LinearSolverBase::LinearSolverBase(), LowerDIntegratedBC::LowerDIntegratedBC(), PNGOutput::makeMeshFunc(), MatCoupledForce::MatCoupledForce(), MaterialADConverterTempl< T >::MaterialADConverterTempl(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MatReactionTempl< is_ad >::MatReactionTempl(), MatrixSymmetryCheck::MatrixSymmetryCheck(), PatternedMeshGenerator::mergeSubdomainNameMaps(), MeshCollectionGenerator::MeshCollectionGenerator(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshDivisionAux::MeshDivisionAux(), MeshGenerator::MeshGenerator(), MeshGeneratorComponent::MeshGeneratorComponent(), MeshInfo::MeshInfo(), MFEMComplexSumAux::MFEMComplexSumAux(), MFEMEigenproblem::MFEMEigenproblem(), MFEMFunctorMaterial::MFEMFunctorMaterial(), MFEMGeneratedMeshGenerator::MFEMGeneratedMeshGenerator(), MFEMGenericFunctorMaterial::MFEMGenericFunctorMaterial(), MFEMGenericFunctorMatrixMaterial::MFEMGenericFunctorMatrixMaterial(), MFEMGenericFunctorVectorMaterial::MFEMGenericFunctorVectorMaterial(), MFEMGeometricMultigridSolver::MFEMGeometricMultigridSolver(), MFEMHypreBoomerAMG::MFEMHypreBoomerAMG(), MFEMMultiAppTransfer::MFEMMultiAppTransfer(), MFEMNDtoRTAux::MFEMNDtoRTAux(), MFEMSumAux::MFEMSumAux(), MFEMVariable::MFEMVariable(), MFEMWeakFormProblemComposerBase::MFEMWeakFormProblemComposerBase(), MooseLinearVariableFV< OutputType >::MooseLinearVariableFV(), UserObjectInterface::mooseObjectError(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MortarConstraintBase::MortarConstraintBase(), MortarNodalAuxKernelTempl< ComputeValueType >::MortarNodalAuxKernelTempl(), MultiApp::moveApp(), MoveBoundaryNodesToCurveGenerator::MoveBoundaryNodesToCurveGenerator(), MoveNodeGenerator::MoveNodeGenerator(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), TriToQuadConverter::moveSurvivingTriangles(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldFunctorTransfer::MultiAppGeneralFieldFunctorTransfer(), MultiAppGeneralFieldKDTreeTransferBase::MultiAppGeneralFieldKDTreeTransferBase(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorToAuxScalarTransfer::MultiAppPostprocessorToAuxScalarTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppProjectionTransfer::MultiAppProjectionTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppScalarToAuxScalarTransfer::MultiAppScalarToAuxScalarTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiAppVectorPostprocessorTransfer::MultiAppVectorPostprocessorTransfer(), MultiSystemSolveObject::MultiSystemSolveObject(), NearestNodeValueAux::NearestNodeValueAux(), NEML2Action::NEML2Action(), NestedDivision::NestedDivision(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), NodalValueSampler::NodalValueSampler(), NumDOFs::NumDOFs(), OrientSurfaceMeshGenerator::OrientSurfaceMeshGenerator(), MeshTriangulationUtils::outerBoundaryIds(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), ParsedPostprocessor::ParsedPostprocessor(), ParsedReporterBase::ParsedReporterBase(), ParsedScalarReporter::ParsedScalarReporter(), ParsedSubdomainGeneratorBase::ParsedSubdomainGeneratorBase(), ParsedVectorRealReductionReporter::ParsedVectorRealReductionReporter(), ParsedVectorReporter::ParsedVectorReporter(), ParsedVectorVectorRealReductionReporter::ParsedVectorVectorRealReductionReporter(), PatternedMeshGenerator::PatternedMeshGenerator(), PenaltyPeriodicSegmentalConstraint::PenaltyPeriodicSegmentalConstraint(), PeriodicSegmentalConstraint::PeriodicSegmentalConstraint(), PIDTransientControl::PIDTransientControl(), PlaneDeletionGenerator::PlaneDeletionGenerator(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), PointInPolyhedronBaseUO::PointInPolyhedronBaseUO(), PointInSignedFunctionCheckUO::PointInSignedFunctionCheckUO(), PointInUnionCheckUO::PointInUnionCheckUO(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), PolyLineMeshFollowingNodeSetGenerator::PolyLineMeshFollowingNodeSetGenerator(), EqualValueBoundaryConstraint::populateSecondaryNodes(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessor(), LibmeshPartitioner::prepareBlocksForSubdomainPartitioner(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), ProjectSideSetOntoLevelSetGenerator::ProjectSideSetOntoLevelSetGenerator(), PropertyReadFile::PropertyReadFile(), RandomIC::RandomIC(), RankTwoTensorFromComponentProperties::RankTwoTensorFromComponentProperties(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObjectBase::readExodusIIOrNemesis(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), RefineBlockGenerator::RefineBlockGenerator(), RefineSidesetGenerator::RefineSidesetGenerator(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), FEProblemBase::restoreSolutions(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), FEProblemBase::setLinearConvergenceNames(), FEProblemBase::setNonlinearConvergenceNames(), MooseMesh::setPartitioner(), Moose::MFEM::LinearSolverBase::SetPreconditioner(), Moose::MFEM::LinearSolverBase::SetPreconditionerImpl(), MFEMHypreAME::SetPreconditionerImpl(), MFEMHypreFGMRES::SetPreconditionerImpl(), MFEMHypreGMRES::SetPreconditionerImpl(), MFEMHyprePCG::SetPreconditionerImpl(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), SurfaceMeshGeneratorBase::setup(), CylinderComponent::setupComponent(), NEML2Action::setupDerivativeMappings(), NEML2Action::setupInputMappings(), MultiSystemSolveObject::setupMultiSystemFixedPointRelaxationFactors(), MoveNodesByParsedExpressionModifier::setupNodalOutputVariables(), NEML2Action::setupParameterDerivativeMappings(), SetupQuadratureAction::SetupQuadratureAction(), DomainUserObject::shouldExecuteOnBoundary(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideValueSampler::SideValueSampler(), SingleRankPartitioner::SingleRankPartitioner(), SphericalGridDivision::SphericalGridDivision(), StitchBoundaryMeshGenerator::StitchBoundaryMeshGenerator(), StitchMeshGenerator::StitchMeshGenerator(), SurfaceSubdomainsDelaunayRemesher::SurfaceSubdomainsDelaunayRemesher(), SymmetryTransformGenerator::SymmetryTransformGenerator(), TagVectorAux::TagVectorAux(), XYFrontalDelaunayGenerator::targetArea(), Terminator::Terminator(), TimeDerivativeAux::TimeDerivativeAux(), TorchPreKernel::TorchPreKernel(), Transfer::Transfer(), TransformGenerator::TransformGenerator(), TransientMultiApp::TransientMultiApp(), CylinderComponent::translation(), MeshTriangulationUtils::triangulateWithDelaunay(), TriToQuadConverter::TriToQuadConverter(), Moose::MFEM::TreeCotreeGauge::trueDofs(), ParsedCurveGenerator::tSectionSpaceDefiner(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), UserObjectBase::UserObjectBase(), Checkpoint::validateExecuteOn(), ParsedAux::validateGenericVectorNames(), SolutionAux::validateVariable(), MFEMProblem::validateVariableNumericType(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VolumeAux::VolumeAux(), WebServerControl::WebServerControl(), XYDelaunayGenerator::XYDelaunayGenerator(), XYFrontalDelaunayGenerator::XYFrontalDelaunayGenerator(), XYMeshLineCutter::XYMeshLineCutter(), XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

◆ parameters()

const InputParameters & MooseBase::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 131 of file MooseBase.h.

131{ return _pars; }

Referenced by AddActionComponentAction::act(), CommonOutputAction::act(), CSGOnlyAction::act(), MeshOnlyAction::act(), SetupDebugAction::act(), SplitMeshAction::act(), Action::Action(), FEProblemBase::addAnyRedistributers(), FEProblemBase::addAuxKernel(), MFEMProblem::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), MFEMProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), MFEMProblem::addBoundaryCondition(), FEProblemBase::addConstraint(), MFEMProblem::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), FEProblemBase::addDefaultMultiAppFixedPointConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), FEProblemBase::addDefaultNonlinearConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), FEProblemBase::addDefaultSteadyStateConvergence(), MFEMProblem::addDefaultWeakForm(), MFEMEigenproblem::addDefaultWeakForm(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), MFEMProblem::addFESpace(), MFEMProblem::addFESpaceHierarchy(), FEProblemBase::addFunction(), MFEMProblem::addFunction(), FEProblemBase::addFunctorMaterial(), MFEMProblem::addFunctorMaterial(), FEProblemBase::addFVBC(), FEProblemBase::addFVGradientMethod(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVInterpolationMethod(), FEProblemBase::addFVKernel(), MFEMProblem::addGridFunction(), FEProblemBase::addHDGKernel(), MFEMProblem::addImagComponentToBC(), MFEMProblem::addImagComponentToKernel(), FEProblemBase::addIndicator(), MFEMProblem::addIndicator(), FEProblemBase::addInitialCondition(), MFEMProblem::addInitialCondition(), DiffusionPhysicsBase::addInitialConditions(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), FEProblemBase::addKernel(), MFEMProblem::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), MFEMProblem::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMeshDivision(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), MFEMProblem::addMFEMSolver(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), MFEMProblem::addObject(), FEProblemBase::addObject(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), FEProblemBase::addPostprocessor(), MFEMProblem::addPostprocessor(), FEProblemBase::addPredictor(), MFEMProblem::addProblemComposer(), MFEMProblem::addRealComponentToBC(), MFEMProblem::addRealComponentToKernel(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), MFEMProblem::addSubMesh(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), MFEMProblem::addTransfer(), FEProblemBase::addUserObject(), DisplacedProblem::addVariable(), MFEMEigenproblem::addVariable(), MFEMProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), MFEMProblem::addVectorPostprocessor(), MFEMProblem::addWeakForm(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), assemble_l2(), Moose::assemble_matrix(), Action::associateWithParameter(), AuxKernelBase::AuxKernelBase(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), MooseMesh::buildTypedMesh(), MeshGenerator::checkGetMesh(), PostprocessorInterface::checkParam(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), SampledOutput::cloneMesh(), Moose::compute_bounds(), Moose::compute_jacobian(), Moose::compute_nearnullspace(), Moose::compute_nullspace(), Moose::compute_postcheck(), Moose::compute_transpose_nullspace(), LibtorchNeuralNetControl::conditionalParameterError(), Console::Console(), MooseMeshUtils::copyIntoMesh(), CommonOutputAction::create(), MultiApp::createApp(), Postprocessor::declareValue(), DumpObjectsProblem::deduceNecessaryParameters(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::DumpObjectsProblem(), EigenProblem::EigenProblem(), EigenProblemSolve::EigenProblemSolve(), ElementMaterialSampler::ElementMaterialSampler(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), Executor::Executor(), Exodus::Exodus(), ElementSubdomainModifierBase::extrapolatePolynomial(), FEProblem::FEProblem(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainGeneratorBase::generate(), ActionWarehouse::getCurrentActionName(), ExecutorInterface::getExecutor(), Material::getMaterial(), Moose::PeriodicBCHelper::getParams(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), AuxKernelBase::getVariableHelper(), AuxKernelBase::getVariableNamesHelper(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), MeshGeneratorSystem::hasDataDrivenAllowed(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), FEProblemBase::initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MooseObject::isKokkosObject(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), MooseApp::MooseApp(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseVariableInterface< T >::MooseVariableInterface(), MultiApp::MultiApp(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NodeFaceConstraint::NodeFaceConstraint(), ConsoleUtils::outputLegacyInformation(), OverlayMeshGenerator::OverlayMeshGenerator(), ParsedReporterBase::ParsedReporterBase(), ParsedScalarReporter::ParsedScalarReporter(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), NEML2Action::printSummary(), ProjectedStatefulMaterialStorageAction::processProperty(), PropertyReadFile::PropertyReadFile(), PseudoTimestep::PseudoTimestep(), RandomIC::RandomIC(), ReferenceResidualConvergence::ReferenceResidualConvergence(), InputParameterWarehouse::removeInputParameters(), FEProblemBase::setAuxKernelParamsAndLog(), FEProblemBase::setInputParametersFEProblem(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setResidualObjectParamsAndLog(), SideSetsGeneratorBase::setup(), MooseApp::setupOptions(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), Moose::PetscSupport::storePetscOptions(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), TransientBase::TransientBase(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

◆ paramInfo()

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

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

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

Definition at line 480 of file MooseBase.h.

481{
483 _console, messagePrefix(true), _pars.paramMessage(param, std::forward<Args>(args)...));
484}
std::string paramMessage(const std::string &param, Args... args) const
void mooseInfoStreamRepeated(S &oss, Args &&... args)
Definition MooseError.h:232

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

◆ paramWarning() [1/2]

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

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

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

Definition at line 473 of file MooseBase.h.

474{
475 mooseWarning(_pars.paramMessage(param, std::forward<Args>(args)...));
476}

◆ paramWarning() [2/2]

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

◆ partitionerName()

const MooseEnum & MooseMesh::partitionerName ( ) const
inlineinherited

Definition at line 1174 of file MooseMesh.h.

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

◆ partitioning()

MooseEnum MooseMesh::partitioning ( )
staticinherited

returns MooseMesh partitioning options so other classes can use it

Definition at line 4064 of file MooseMesh.C.

4065{
4067 "default=-3 metis=-2 parmetis=-1 linear=0 centroid hilbert_sfc morton_sfc custom", "default");
4068 return partitioning;
4069}
static MooseEnum partitioning()
returns MooseMesh partitioning options so other classes can use it
Definition MooseMesh.C:4064

Referenced by MooseMesh::partitioning(), and MooseMesh::validParams().

◆ perfGraph()

PerfGraph & PerfGraphInterface::perfGraph ( )
inherited

Get the PerfGraph.

Definition at line 86 of file PerfGraphInterface.C.

87{
88 return _pg_moose_app.perfGraph();
89}
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Definition MooseApp.h:176
MooseApp & _pg_moose_app
The MooseApp that owns the PerfGraph.

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

◆ possiblyRebuildNodeToElemMap()

bool MooseMesh::possiblyRebuildNodeToElemMap ( )
inherited

rebuild the node to element map if it's been requsted previously

Returns
Whether the map was re-built, or equivalently whether the map had been requested previously

Definition at line 608 of file MooseMesh.C.

609{
610 // *Rebuild* the node to element map. I emphasize rebuild because if it has not been built
611 // previously we won't do anything
613 {
614 mooseAssert(_node_to_elem_map.empty(), "If it hasn't been built, it better well be empty");
615 return false;
616 }
617
618 _node_to_elem_map.clear();
621
622 // Quadrature nodes are not part of the libMesh mesh, so the rebuild above drops the entries
623 // addQuadratureNode() made for them. Restore them: geometric search relies on them to decide
624 // which processor tracks a quadrature node.
625 for (const auto & [elem_id, side_map] : _elem_to_side_to_qp_to_quadrature_nodes)
626 if (getMesh().elem_ptr(elem_id)->active())
627 for (const auto & side_qps : side_map)
628 for (const auto & qp_qnode : side_qps.second)
629 _node_to_elem_map[qp_qnode.second->id()].push_back(elem_id);
630
631 return true;
632}

Referenced by MooseMesh::update().

◆ prepare() [1/2]

void MooseMesh::prepare ( )
inherited

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

Also calls update() internally.

Definition at line 399 of file MooseMesh.C.

400{
401 TIME_SECTION("prepare", 2, "Preparing Mesh", true);
402
403 parallel_object_only();
404
405 mooseAssert(_mesh, "The MeshBase has not been constructed");
406
407 if (!dynamic_cast<DistributedMesh *>(&getMesh()) || _is_nemesis)
408 // For whatever reason we do not want to allow renumbering here nor ever in the future?
409 getMesh().allow_renumbering(false);
410
411 if (!_mesh->is_prepared())
412 {
413 _mesh->complete_preparation();
414 _moose_mesh_prepared = false;
415 }
416
418 return;
419
420 // Collect (local) subdomain IDs
421 _mesh_subdomains.clear();
422 for (const auto & elem : getMesh().element_ptr_range())
423 _mesh_subdomains.insert(elem->subdomain_id());
424
425 // add explicitly requested subdomains
426 if (isParamValid("add_subdomain_ids") && !isParamValid("add_subdomain_names"))
427 {
428 // only subdomain ids are explicitly given
429 const auto & add_subdomain_id = getParam<std::vector<SubdomainID>>("add_subdomain_ids");
430 _mesh_subdomains.insert(add_subdomain_id.begin(), add_subdomain_id.end());
431 }
432 else if (isParamValid("add_subdomain_ids") && isParamValid("add_subdomain_names"))
433 {
434 const auto add_subdomain =
435 getParam<SubdomainID, SubdomainName>("add_subdomain_ids", "add_subdomain_names");
436 for (const auto & [sub_id, sub_name] : add_subdomain)
437 {
438 // add subdomain id
439 _mesh_subdomains.insert(sub_id);
440 // set name of the subdomain just added
441 setSubdomainName(sub_id, sub_name, true);
442 }
443 }
444 else if (isParamValid("add_subdomain_names"))
445 {
446 // the user has defined add_subdomain_names, but not add_subdomain_ids
447 const auto & add_subdomain_names = getParam<std::vector<SubdomainName>>("add_subdomain_names");
448
449 // to define subdomain ids, we need the largest subdomain id defined yet.
450 subdomain_id_type offset = 0;
451 if (!_mesh_subdomains.empty())
452 offset = *_mesh_subdomains.rbegin();
453
454 // add all subdomains (and auto-assign ids)
455 for (const SubdomainName & sub_name : add_subdomain_names)
456 {
457 // to avoid two subdomains with the same ID (notably on recover)
458 if (getSubdomainID(sub_name) != libMesh::Elem::invalid_subdomain_id)
459 continue;
460 const auto sub_id = ++offset;
461 // add subdomain id
462 _mesh_subdomains.insert(sub_id);
463 // set name of the subdomain just added
464 setSubdomainName(sub_id, sub_name, true);
465 }
466 }
467
468 // Make sure nodesets have been generated
470
471 // Collect (local) boundary IDs
472 const std::set<BoundaryID> & local_bids = getMesh().get_boundary_info().get_boundary_ids();
473 _mesh_boundary_ids.insert(local_bids.begin(), local_bids.end());
474
475 const std::set<BoundaryID> & local_node_bids =
476 getMesh().get_boundary_info().get_node_boundary_ids();
477 _mesh_nodeset_ids.insert(local_node_bids.begin(), local_node_bids.end());
478
479 const std::set<BoundaryID> & local_side_bids =
480 getMesh().get_boundary_info().get_side_boundary_ids();
481 _mesh_sideset_ids.insert(local_side_bids.begin(), local_side_bids.end());
482
483 // Add explicitly requested sidesets/nodesets
484 // This is done *after* the side boundaries (e.g. "right", ...) have been generated.
485 auto add_sets = [this](const bool sidesets, auto & set_ids)
486 {
487 const std::string type = sidesets ? "sideset" : "nodeset";
488 const std::string id_param = "add_" + type + "_ids";
489 const std::string name_param = "add_" + type + "_names";
490
491 if (isParamValid(id_param))
492 {
493 const auto & add_ids = getParam<std::vector<BoundaryID>>(id_param);
494 _mesh_boundary_ids.insert(add_ids.begin(), add_ids.end());
495 set_ids.insert(add_ids.begin(), add_ids.end());
497 {
498 const auto & add_names = getParam<std::vector<BoundaryName>>(name_param);
499 mooseAssert(add_names.size() == add_ids.size(),
500 "Id and name sets must be the same size when adding.");
501 for (const auto i : index_range(add_ids))
502 setBoundaryName(add_ids[i], add_names[i]);
503 }
504 }
505 else if (isParamValid(name_param))
506 {
507 // the user has defined names, but not ids
508 const auto & add_names = getParam<std::vector<BoundaryName>>(name_param);
509
510 auto & mesh_ids = sidesets ? _mesh_sideset_ids : _mesh_nodeset_ids;
511
512 // to define ids, we need the largest id defined yet.
513 boundary_id_type offset = 0;
514 if (!mesh_ids.empty())
515 offset = *mesh_ids.rbegin();
516 if (!_mesh_boundary_ids.empty())
517 offset = std::max(offset, *_mesh_boundary_ids.rbegin());
518
519 // add all sidesets/nodesets (and auto-assign ids)
520 for (const auto & name : add_names)
521 {
522 // to avoid two sets with the same ID (notably on recover)
524 continue;
525 const auto id = ++offset;
526 // add sideset id
527 _mesh_boundary_ids.insert(id);
528 set_ids.insert(id);
529 // set name of the sideset just added
531 }
532 }
533 };
534
535 add_sets(true, _mesh_sideset_ids);
536 add_sets(false, _mesh_nodeset_ids);
537
538 // Communicate subdomain and boundary IDs if this is a parallel mesh
539 if (!getMesh().is_serial())
540 {
545 }
546
548 {
550 setCoordSystem(_provided_coord_blocks, getParam<MultiMooseEnum>("coord_type"));
551 else if (_pars.isParamSetByUser("coord_type"))
553 "Trying to set coordinate system type information based on the user input file, but "
554 "the coordinate system type information has already been set programmatically! "
555 "Either remove your coordinate system type information from the input file, or contact "
556 "your application developer");
557 }
558
559 // Set general axisymmetric axes if provided
560 if (isParamValid("rz_coord_blocks") && isParamValid("rz_coord_origins") &&
561 isParamValid("rz_coord_directions"))
562 {
563 const auto rz_coord_blocks = getParam<std::vector<SubdomainName>>("rz_coord_blocks");
564 const auto rz_coord_origins = getParam<std::vector<Point>>("rz_coord_origins");
565 const auto rz_coord_directions = getParam<std::vector<RealVectorValue>>("rz_coord_directions");
566 if (rz_coord_origins.size() == rz_coord_blocks.size() &&
567 rz_coord_directions.size() == rz_coord_blocks.size())
568 {
569 std::vector<std::pair<Point, RealVectorValue>> rz_coord_axes;
570 for (unsigned int i = 0; i < rz_coord_origins.size(); ++i)
571 rz_coord_axes.push_back(std::make_pair(rz_coord_origins[i], rz_coord_directions[i]));
572
573 setGeneralAxisymmetricCoordAxes(rz_coord_blocks, rz_coord_axes);
574
575 if (isParamSetByUser("rz_coord_axis"))
576 mooseError("The parameter 'rz_coord_axis' may not be provided if 'rz_coord_blocks', "
577 "'rz_coord_origins', and 'rz_coord_directions' are provided.");
578 }
579 else
580 mooseError("The parameters 'rz_coord_blocks', 'rz_coord_origins', and "
581 "'rz_coord_directions' must all have the same size.");
582 }
583 else if (isParamValid("rz_coord_blocks") || isParamValid("rz_coord_origins") ||
584 isParamValid("rz_coord_directions"))
585 mooseError("If any of the parameters 'rz_coord_blocks', 'rz_coord_origins', and "
586 "'rz_coord_directions' are provided, then all must be provided.");
587
589
590 update();
591
592 // Check if there is subdomain name duplication for the same subdomain ID
594
596}
static const std::string name_param
The name of the parameter that contains the object name.
Definition MooseBase.h:55
void setBoundaryName(BoundaryID boundary_id, BoundaryName name)
This method sets the boundary name of the boundary based on the id parameter.
Definition MooseMesh.C:1775
bool _coord_system_set
Whether the coordinate system has been set.
Definition MooseMesh.h:2077
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition MooseMesh.C:3056
void checkDuplicateSubdomainNames()
Loop through all subdomain IDs and check if there is name duplication used for the subdomains with sa...
Definition MooseMesh.C:4503
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition MooseMesh.C:1722
bool _moose_mesh_prepared
True if prepare has been called on the mesh.
Definition MooseMesh.h:1653
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition MooseMesh.C:1683
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:4387
std::vector< SubdomainName > _provided_coord_blocks
Set for holding user-provided coordinate system type block names.
Definition MooseMesh.h:2080
void setSubdomainName(SubdomainID subdomain_id, const SubdomainName &name, const bool synchronous=false)
This method sets the name for subdomain_id to name.
Definition MooseMesh.C:1740
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:4247
bool _built_from_other_mesh
Whether or not this mesh was built from another mesh.
Definition MooseMesh.h:1595
bool detectOrthogonalDimRanges(Real tol=1e-6)
This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
Definition MooseMesh.C:1927
const BoundaryID INVALID_BOUNDARY_ID
Definition MooseTypes.C:22
auto index_range(const T &sizable)
TestClass subdomain_id_type

Referenced by MooseApp::restore(), and TransientMultiApp::setupApp().

◆ prepare() [2/2]

void MooseMesh::prepare ( const MeshBase *  mesh_to_clone)
inherited

Deprecated method; mesh_to_clone is no longer supported and must be null.

Use the no-argument prepare() instead.

Parameters
mesh_to_cloneMust be null; mesh cloning is handled elsewhere now

◆ prepared() [1/2]

bool MooseMesh::prepared ( ) const
inherited

Setter/getter for whether the mesh is prepared.

Definition at line 3245 of file MooseMesh.C.

3246{
3247 return _mesh->is_prepared() && _moose_mesh_prepared;
3248}

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

◆ prepared() [2/2]

void MooseMesh::prepared ( bool  state)
virtualinherited

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

3252{
3253 if (state)
3254 mooseError("We don't have any right to tell the libmesh mesh that it *is* prepared. Only a "
3255 "call to prepare_for_use should tell us that");
3256
3257 // Some people may call this even before we have a MeshBase object. This isn't dangerous really
3258 // because when the MeshBase object is born, it knows it's in an unprepared state
3259 if (_mesh)
3260 _mesh->unset_is_prepared();
3261
3262 // If the libMesh mesh isn't preparead, then our MooseMesh wrapper is also no longer prepared
3263 _moose_mesh_prepared = false;
3264
3270}

◆ printInfo()

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

Calls print_info() on the underlying Mesh.

Definition at line 3595 of file MooseMesh.C.

3596{
3597 os << '\n';
3598 getMesh().print_info(os, verbosity);
3599 os << std::flush;
3600}

Referenced by Adaptivity::adaptMesh().

◆ queryElemPtr() [1/2]

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

◆ queryElemPtr() [2/2]

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

Definition at line 3239 of file MooseMesh.C.

3240{
3241 return getMesh().query_elem_ptr(i);
3242}

◆ queryNodePtr() [1/2]

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

Definition at line 898 of file MooseMesh.C.

899{
900 return const_cast<Node *>(const_cast<const MooseMesh *>(this)->queryNodePtr(i));
901}

◆ queryNodePtr() [2/2]

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

Definition at line 882 of file MooseMesh.C.

883{
884 if (i > getMesh().max_node_id())
885 {
886 auto it = _quadrature_nodes.find(i);
887 if (it == _quadrature_nodes.end())
888 return nullptr;
889 auto & node_ptr = it->second;
890 mooseAssert(node_ptr, "Uninitialized quadrature node");
891 return node_ptr;
892 }
893
894 return getMesh().query_node_ptr(i);
895}

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

◆ queryParam()

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

Query a parameter for the object.

If a parameter of the given name and type does not exist or if the parameter is not valid, nullptr will be returned

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

Definition at line 422 of file MooseBase.h.

423{
424 return _pars.queryParam<T>(name);
425}
const T * queryParam(const std::string &name) const
Query a parameter.

Referenced by MFEMExecutedObject::getRequestedItems(), and MFEMGeometricMultigridSolver::MFEMGeometricMultigridSolver().

◆ queryPeriodicDimensions() [1/2]

const std::array< bool, 3 > & MooseMesh::queryPeriodicDimensions ( const MooseVariableBase &  var) const
inherited

Query the translated periodic dimension flags for the given variable.

\

Query here means that it will not error if a variable isn't found to be periodic, instead the default value is returned (false for each dimension)

Parameters
var- The variable

Definition at line 2249 of file MooseMesh.C.

2250{
2251 return queryPeriodicDimensions(var.sys().number(), var.number());
2252}

◆ queryPeriodicDimensions() [2/2]

const std::array< bool, 3 > & MooseMesh::queryPeriodicDimensions ( const unsigned int  sys_num,
const unsigned int  var_num 
) const
inherited

Query the translated periodic dimension flags for the given variable on the given system.

Query here means that it will not error if a variable isn't found to be periodic, instead the default value is returned (false for each dimension)

Parameters
sys_num- The number of the system the variable is on
var_num- The variable number

Definition at line 2240 of file MooseMesh.C.

2241{
2242 const auto key = std::make_pair(sys_num, var_num);
2243 if (const auto it = _periodic_dim.find(key); it != _periodic_dim.end())
2244 return it->second;
2245 return periodic_dim_default;
2246}

Referenced by MooseMesh::isTranslatedPeriodic(), MooseMesh::minPeriodicVector(), and MooseMesh::queryPeriodicDimensions().

◆ refinedElementRange()

ConstElemPointerRange * MooseMesh::refinedElementRange ( ) const
inherited

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

953{
954 return _refined_elements.get();
955}

Referenced by FEProblemBase::meshChanged().

◆ registerInvalidSolutionInternal()

InvalidSolutionID SolutionInvalidInterface::registerInvalidSolutionInternal ( const std::string &  message,
const bool  warning 
) const
protectedinherited

Definition at line 55 of file SolutionInvalidInterface.C.

57{
59 _si_moose_base.type(), message, warning);
60}
InvalidSolutionID registerInvalidity(const std::string &object_type, const std::string &message, const bool warning)
Call to register an invalid calculation.

◆ registerRestartableDataOnApp()

RestartableDataValue & Restartable::registerRestartableDataOnApp ( std::unique_ptr< RestartableDataValue >  data,
THREAD_ID  tid 
) const
privateinherited

Helper function for actually registering the restartable data.

Definition at line 63 of file Restartable.C.

65{
67 std::move(data), tid, _restartable_read_only, _metaname);
68}
RestartableDataValue & registerRestartableData(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
Definition MooseApp.C:2492
const RestartableDataMapName _metaname
Restartable metadata name.
const bool _restartable_read_only
Flag for toggling read only status (see ReporterData)
MooseApp & _restartable_app
Reference to the application.

Referenced by Restartable::declareRestartableDataHelper().

◆ registerRestartableNameWithFilterOnApp()

void Restartable::registerRestartableNameWithFilterOnApp ( const std::string &  name,
Moose::RESTARTABLE_FILTER  filter 
)
privateinherited

Helper function for actually registering the restartable data.

Definition at line 71 of file Restartable.C.

73{
75}
void registerRestartableNameWithFilter(const std::string &name, Moose::RESTARTABLE_FILTER filter)
NOTE: This is an internal function meant for MOOSE use only!
Definition MooseApp.C:1744

Referenced by Restartable::declareRecoverableData().

◆ 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 61 of file PerfGraphInterface.C.

63{
64 const auto timed_section_name = timedSectionName(section_name);
65 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
66 return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
67 else
68 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
69}
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID @section_name The name of the section.
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
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 72 of file PerfGraphInterface.C.

76{
77 const auto timed_section_name = timedSectionName(section_name);
78 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
80 timedSectionName(section_name), level, live_message, print_dots);
81 else
82 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
83}

◆ 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 78 of file Restartable.C.

79{
80 return _restartable_system_name + "/" + _restartable_name + "/" + data_name;
81}
const std::string _restartable_system_name
The system name this object is in.

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

◆ safeClone()

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

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.

Implements MooseMesh.

Definition at line 39 of file MFEMMeshGeneratorMesh.C.

40{
41 return _app.getFactory().copyConstruct(*this);
42}
std::unique_ptr< T > copyConstruct(const T &object)
Copy constructs the object object.
Definition Factory.h:358

◆ setAxisymmetricCoordAxis()

void MooseMesh::setAxisymmetricCoordAxis ( const MooseEnum &  rz_coord_axis)
inherited

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

4380{
4381 _rz_coord_axis = rz_coord_axis;
4382
4384}
void updateCoordTransform()
Update the coordinate transformation object based on our coordinate system data.
Definition MooseMesh.C:4451

Referenced by FEProblemBase::setAxisymmetricCoordAxis().

◆ setBoundaryName()

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

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

Definition at line 1775 of file MooseMesh.C.

1776{
1777 BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1778
1779 // We need to figure out if this boundary is a sideset or nodeset
1780 if (boundary_info.get_side_boundary_ids().count(boundary_id))
1781 boundary_info.sideset_name(boundary_id) = name;
1782 else
1783 boundary_info.nodeset_name(boundary_id) = name;
1784}

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

◆ setBoundaryToNormalMap() [1/2]

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

Definition at line 3316 of file MooseMesh.C.

3317{
3318 mooseDeprecated("setBoundaryToNormalMap(std::map<BoundaryID, RealVectorValue> * boundary_map) is "
3319 "deprecated, use the unique_ptr version instead");
3320 _boundary_to_normal_map.reset(boundary_map);
3321}

◆ setBoundaryToNormalMap() [2/2]

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

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

Definition at line 3309 of file MooseMesh.C.

3311{
3312 _boundary_to_normal_map = std::move(boundary_map);
3313}

◆ setCoordData()

void MooseMesh::setCoordData ( const MooseMesh &  other_mesh)
inherited

Set the coordinate system data to that of other_mesh.

Definition at line 4488 of file MooseMesh.C.

4489{
4490 _coord_sys = other_mesh._coord_sys;
4491 _rz_coord_axis = other_mesh._rz_coord_axis;
4493}

Referenced by DisplacedProblem::DisplacedProblem().

◆ setCoordSystem()

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

Set the coordinate system for the provided blocks to coord_sys.

Definition at line 4247 of file MooseMesh.C.

4249{
4250 TIME_SECTION("setCoordSystem", 5, "Setting Coordinate System");
4252 {
4253 const std::string param_name = isParamValid("coord_block") ? "coord_block" : "block";
4254 mooseWarning("Supplied blocks in the 'setCoordSystem' method do not match the value of the "
4255 "'Mesh/",
4256 param_name,
4257 "' parameter. Did you provide different parameter values for 'Mesh/",
4258 param_name,
4259 "' and 'Problem/block'?. We will honor the parameter value from 'Mesh/",
4260 param_name,
4261 "'");
4262 mooseAssert(_coord_system_set,
4263 "If we are arriving here due to a bad specification in the Problem block, then we "
4264 "should have already set our coordinate system subdomains from the Mesh block");
4265 return;
4266 }
4267 if (_pars.isParamSetByUser("coord_type") && getParam<MultiMooseEnum>("coord_type") != coord_sys)
4268 mooseError("Supplied coordinate systems in the 'setCoordSystem' method do not match the value "
4269 "of the 'Mesh/coord_type' parameter. Did you provide different parameter values for "
4270 "'coord_type' to 'Mesh' and 'Problem'?");
4271
4272 // If blocks contain ANY_BLOCK_ID, it should be the only block specified, and coord_sys should
4273 // have one and only one entry. In that case, the same coordinate system will be set for all
4274 // subdomains.
4275 if (blocks.size() == 1 && blocks[0] == "ANY_BLOCK_ID")
4276 {
4277 if (coord_sys.size() > 1)
4278 mooseError("If you specify ANY_BLOCK_ID as the only block, you must also specify a single "
4279 "coordinate system for it.");
4280 if (!_mesh->is_prepared())
4281 mooseError(
4282 "You cannot set the coordinate system for ANY_BLOCK_ID before the mesh is prepared. "
4283 "Please call this method after the mesh is prepared.");
4284 const auto coord_type = coord_sys.size() == 0
4286 : Moose::stringToEnum<Moose::CoordinateSystemType>(coord_sys[0]);
4287 for (const auto sid : meshSubdomains())
4288 _coord_sys[sid] = coord_type;
4289 return;
4290 }
4291
4292 // If multiple blocks are specified, but one of them is ANY_BLOCK_ID, let's emit a helpful error
4293 if (std::find(blocks.begin(), blocks.end(), "ANY_BLOCK_ID") != blocks.end())
4294 mooseError("You cannot specify ANY_BLOCK_ID together with other blocks in the "
4295 "setCoordSystem() method. If you want to set the same coordinate system for all "
4296 "blocks, use ANY_BLOCK_ID as the only block.");
4297
4298 auto subdomains = meshSubdomains();
4299 // It's possible that a user has called this API before the mesh is prepared and consequently we
4300 // don't yet have the subdomains in meshSubdomains()
4301 for (const auto & sub_name : blocks)
4302 {
4303 const auto sub_id = getSubdomainID(sub_name);
4304 subdomains.insert(sub_id);
4305 }
4306
4307 if (coord_sys.size() <= 1)
4308 {
4309 // We will specify the same coordinate system for all blocks
4310 const auto coord_type = coord_sys.size() == 0
4312 : Moose::stringToEnum<Moose::CoordinateSystemType>(coord_sys[0]);
4313 for (const auto sid : subdomains)
4314 _coord_sys[sid] = coord_type;
4315 }
4316 else
4317 {
4318 if (blocks.size() != coord_sys.size())
4319 mooseError("Number of blocks and coordinate systems does not match.");
4320
4321 for (const auto i : index_range(blocks))
4322 {
4324 Moose::CoordinateSystemType coord_type =
4325 Moose::stringToEnum<Moose::CoordinateSystemType>(coord_sys[i]);
4326 _coord_sys[sid] = coord_type;
4327 }
4328
4329 for (const auto & sid : subdomains)
4330 if (_coord_sys.find(sid) == _coord_sys.end())
4331 mooseError("Subdomain '" + Moose::stringify(sid) +
4332 "' does not have a coordinate system specified.");
4333 }
4334
4335 _coord_system_set = true;
4336
4338}
unsigned int size() const
Return the number of active items in the MultiMooseEnum.
CoordinateSystemType
Definition MooseTypes.h:869
@ COORD_XYZ
Definition MooseTypes.h:870
std::string stringify(MOOSEIOType type)
Definition NEML2Utils.C:56

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

◆ setCustomPartitioner()

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

Setter for custom partitioner.

Definition at line 3845 of file MooseMesh.C.

3846{
3847 _custom_partitioner = partitioner->clone();
3849 if (_mesh)
3850 _mesh->partitioner() = _custom_partitioner->clone();
3851 _partitioner_name = "custom";
3852}
void setIsCustomPartitionerRequested(bool cpr)
Definition MooseMesh.C:3877
virtual std::unique_ptr< Partitioner > clone() const=0

◆ setGeneralAxisymmetricCoordAxes()

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

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

4390{
4391 // Set the axes for the given blocks
4392 mooseAssert(blocks.size() == axes.size(), "Blocks and axes vectors must be the same length.");
4393 for (const auto i : index_range(blocks))
4394 {
4395 const auto subdomain_id = getSubdomainID(blocks[i]);
4396 const auto it = _coord_sys.find(subdomain_id);
4397 if (it == _coord_sys.end())
4398 mooseError("The block '",
4399 blocks[i],
4400 "' has not set a coordinate system. Make sure to call setCoordSystem() before "
4401 "setGeneralAxisymmetricCoordAxes().");
4402 else
4403 {
4404 if (it->second == Moose::COORD_RZ)
4405 {
4406 const auto direction = axes[i].second;
4407 if (direction.is_zero())
4408 mooseError("Only nonzero vectors may be supplied for RZ directions.");
4409
4410 _subdomain_id_to_rz_coord_axis[subdomain_id] =
4411 std::make_pair(axes[i].first, direction.unit());
4412 }
4413 else
4414 mooseError("The block '",
4415 blocks[i],
4416 "' was provided in setGeneralAxisymmetricCoordAxes(), but the coordinate system "
4417 "for this block is not 'RZ'.");
4418 }
4419 }
4420
4421 // Make sure there are no RZ blocks that still do not have axes
4422 const auto all_subdomain_ids = meshSubdomains();
4423 for (const auto subdomain_id : all_subdomain_ids)
4424 if (getCoordSystem(subdomain_id) == Moose::COORD_RZ &&
4426 mooseError("The block '",
4427 getSubdomainName(subdomain_id),
4428 "' was specified to use the 'RZ' coordinate system but was not given in "
4429 "setGeneralAxisymmetricCoordAxes().");
4430
4432}
const std::map< SubdomainID, Moose::CoordinateSystemType > & getCoordSystem() const
Get the map from subdomain ID to coordinate system type, e.g.
Definition MooseMesh.C:4373

Referenced by MooseMesh::prepare().

◆ setGhostedBoundaryInflation()

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

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

Definition at line 3343 of file MooseMesh.C.

3344{
3346}

◆ setIsCustomPartitionerRequested()

void MooseMesh::setIsCustomPartitionerRequested ( bool  cpr)
inherited

Definition at line 3877 of file MooseMesh.C.

3878{
3880}

Referenced by MooseMesh::setCustomPartitioner().

◆ setMeshBase()

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

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

2930{
2931 _mesh = std::move(mesh_base);
2932 _mesh->allow_remote_element_removal(_allow_remote_element_removal);
2933}

Referenced by ActionUnitTest::buildMinimalObjects(), and MooseObjectUnitTest::buildObjects().

◆ setMeshBoundaryIDs()

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

Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.

Definition at line 3303 of file MooseMesh.C.

3304{
3305 _mesh_boundary_ids = boundary_IDs;
3306}

◆ setParallelType()

void MooseMesh::setParallelType ( ParallelType  parallel_type)
inlineinherited

Allow to change parallel type.

Definition at line 2350 of file MooseMesh.h.

2351{
2352 _parallel_type = parallel_type;
2354}
void determineUseDistributedMesh()
Determine whether to use a distributed mesh.
Definition MooseMesh.C:2889

Referenced by MFEMMesh::buildDummyMooseMesh(), and MooseMesh::buildTypedMesh().

◆ setPartitioner()

void MooseMesh::setPartitioner ( MeshBase &  mesh_base,
MooseEnum &  partitioner,
bool  use_distributed_mesh,
const InputParameters &  params,
MooseObject &  context_obj 
)
staticinherited

Method for setting the partitioner on the passed in mesh_base object.

Definition at line 3786 of file MooseMesh.C.

3791{
3792 // Set the partitioner based on partitioner name
3793 switch (partitioner)
3794 {
3795 case -3: // default
3796 // We'll use the default partitioner, but notify the user of which one is being used...
3797 if (use_distributed_mesh)
3798 partitioner = "parmetis";
3799 else
3800 partitioner = "metis";
3801 break;
3802
3803 // No need to explicitily create the metis or parmetis partitioners,
3804 // They are the default for serial and parallel mesh respectively
3805 case -2: // metis
3806 case -1: // parmetis
3807 break;
3808
3809 case 0: // linear
3810 mesh_base.partitioner().reset(new libMesh::LinearPartitioner);
3811 break;
3812 case 1: // centroid
3813 {
3814 if (!params.isParamValid("centroid_partitioner_direction"))
3815 context_obj.paramError(
3816 "centroid_partitioner_direction",
3817 "If using the centroid partitioner you _must_ specify centroid_partitioner_direction!");
3818
3819 MooseEnum direction = params.get<MooseEnum>("centroid_partitioner_direction");
3820
3821 if (direction == "x")
3822 mesh_base.partitioner().reset(
3824 else if (direction == "y")
3825 mesh_base.partitioner().reset(
3827 else if (direction == "z")
3828 mesh_base.partitioner().reset(
3830 else if (direction == "radial")
3831 mesh_base.partitioner().reset(
3833 break;
3834 }
3835 case 2: // hilbert_sfc
3836 mesh_base.partitioner().reset(new libMesh::HilbertSFCPartitioner);
3837 break;
3838 case 3: // morton_sfc
3839 mesh_base.partitioner().reset(new libMesh::MortonSFCPartitioner);
3840 break;
3841 }
3842}

Referenced by MooseMesh::setPartitionerHelper().

◆ setPartitionerHelper()

void MooseMesh::setPartitionerHelper ( MeshBase *  mesh = nullptr)
protectedinherited

Definition at line 3774 of file MooseMesh.C.

3775{
3776 if (_use_distributed_mesh && (_partitioner_name != "default" && _partitioner_name != "parmetis"))
3777 {
3778 _partitioner_name = "parmetis";
3780 }
3781
3783}
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:3786

Referenced by MooseMesh::buildTypedMesh().

◆ setPatchUpdateStrategy()

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

Set the patch size update strategy.

Definition at line 3540 of file MooseMesh.C.

3541{
3542 _patch_update_strategy = patch_update_strategy;
3543}

◆ setSubdomainName() [1/2]

void MooseMesh::setSubdomainName ( MeshBase &  mesh,
SubdomainID  subdomain_id,
const SubdomainName &  name,
const bool  synchronous = false 
)
staticinherited

This method sets the name for subdomain_id on the provided mesh to name.

Definition at line 1748 of file MooseMesh.C.

1752{
1753 mooseAssert(name != "ANY_BLOCK_ID", "Cannot set subdomain name to 'ANY_BLOCK_ID'");
1754 mesh.set_subdomain_name(subdomain_id, name, synchronous);
1755}

◆ setSubdomainName() [2/2]

void MooseMesh::setSubdomainName ( SubdomainID  subdomain_id,
const SubdomainName &  name,
const bool  synchronous = false 
)
inherited

This method sets the name for subdomain_id to name.

Definition at line 1740 of file MooseMesh.C.

1743{
1744 setSubdomainName(getMesh(), subdomain_id, name, synchronous);
1745}

Referenced by MooseMesh::prepare(), and MooseMesh::setSubdomainName().

◆ setUniformRefineLevel()

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

Set uniform refinement level.

Definition at line 3330 of file MooseMesh.C.

3331{
3332 _uniform_refine_level = level;
3334}
bool _skip_deletion_repartition_after_refine
Whether or not skip remote deletion and repartition after uniform refinements.
Definition MooseMesh.h:1644
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition MooseMesh.h:1638

◆ setupFiniteVolumeMeshData()

void MooseMesh::setupFiniteVolumeMeshData ( ) const
inherited

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

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

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

◆ shouldDisplace()

bool MFEMMesh::shouldDisplace ( ) const
inlineinherited

Returns true if mesh displacement is required.

Definition at line 51 of file MFEMMesh.h.

51{ return !_mesh_displacement_variable.empty(); }

◆ sideWithBoundaryID()

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

Calls BoundaryInfo::side_with_boundary_id().

Definition at line 3129 of file MooseMesh.C.

3130{
3131 return getMesh().get_boundary_info().side_with_boundary_id(elem, boundary_id);
3132}

◆ skipDeletionRepartitionAfterRefine()

bool MooseMesh::skipDeletionRepartitionAfterRefine ( ) const
inlineinherited

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

2345{
2347}

◆ skipNoncriticalPartitioning()

bool MooseMesh::skipNoncriticalPartitioning ( ) const
virtualinherited

Definition at line 4568 of file MooseMesh.C.

4569{
4570 return _mesh->skip_noncritical_partitioning();
4571}

◆ skipPartitioning()

virtual bool MooseMesh::skipPartitioning ( ) const
inlinevirtualinherited

Definition at line 342 of file MooseMesh.h.

342{ return _mesh->skip_partitioning(); }

◆ skipRefineWhenUseSplit()

bool MooseMesh::skipRefineWhenUseSplit ( ) const
inlineinherited

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

Definition at line 593 of file MooseMesh.h.

bool _skip_refine_when_use_split
Whether or not to skip uniform refinements when using a pre-split mesh.
Definition MooseMesh.h:1641

◆ spatialDimension()

unsigned int MFEMMesh::spatialDimension ( ) const
inlineoverridevirtualinherited

Returns MeshBase::spatial_dimension.

Reimplemented from MooseMesh.

Definition at line 66 of file MFEMMesh.h.

66{ return _mfem_par_mesh->SpaceDimension(); }

◆ suppressInfo()

bool MooseBase::suppressInfo ( ) const
privateinherited

Whether the application of this object suppresses informational messages.

Definition at line 176 of file MooseBase.C.

177{
178 return _app.suppressInfo();
179}
bool suppressInfo() const
Whether informational messages are suppressed for this app.
Definition MooseApp.h:214

Referenced by MooseBase::mooseInfo().

◆ 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 55 of file PerfGraphInterface.C.

56{
57 return _prefix.empty() ? section_name : _prefix + "::" + section_name;
58}
const std::string _prefix
A prefix to use for all sections.

Referenced by PerfGraphInterface::registerTimedSection(), and PerfGraphInterface::registerTimedSection().

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

94 {
95 mooseAssert(_type.size(), "Empty type");
96 return _type;
97 }
const std::string & _type
The type of this class.
Definition MooseBase.h:384

Referenced by CreateProblemDefaultAction::act(), MaterialOutputAction::act(), SetupDebugAction::act(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addConvergence(), MFEMProblem::addDefaultProblemComposer(), MFEMProblem::addDefaultWeakForm(), FEProblemBase::addDistribution(), DistributedRectilinearMeshGenerator::addElement(), DistributedRectilinearMeshGenerator::addElement(), MooseApp::addExecutor(), MooseApp::addExecutorParams(), MFEMProblem::addFESpace(), MFEMProblem::addFESpaceHierarchy(), FEProblemBase::addFunction(), MFEMProblem::addFunction(), FEProblemBase::addMeshDivision(), MooseApp::addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addObject(), FEProblemBase::addObject(), DistributedRectilinearMeshGenerator::addPoint(), MFEMProblem::addPostprocessor(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), WebServerControl::addServerActionsInternal(), FEProblemBase::addTimeIntegrator(), MFEMProblem::addVectorPostprocessor(), SubProblem::addVectorTag(), DisplacedProblem::addVectorTag(), FEProblemBase::advanceMultiApps(), MooseApp::appendMeshGenerator(), AuxKernelBase::AuxKernelBase(), FEProblemBase::backupMultiApps(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BoundaryPreservedMarker::BoundaryPreservedMarker(), DistributedRectilinearMeshGenerator::buildCube(), MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildLowerDMesh(), MooseMesh::buildPRefinementAndCoarseningMaps(), PhysicsBase::checkComponentType(), MeshGenerator::checkGetMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), FEProblemBase::checkUserObjectNameCollision(), MFEMMultiAppTransfer::checkValidTransferProblemTypes(), MeshInfo::CombinedInfos< ElemInfoMap, ElemInfoItems >::CombinedInfos(), ElemElemConstraint::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighJacobian(), ADDGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighResidual(), ArrayDGKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), ADDGKernel::computeElemNeighResidual(), ArrayDGLowerDKernel::computeLowerDJacobian(), DGLowerDKernel::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), LowerDIntegratedBC::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpJacobian(), HFEMDirichletBC::computeLowerDQpJacobian(), ArrayHFEMDiffusion::computeLowerDQpJacobian(), HFEMDiffusion::computeLowerDQpJacobian(), ArrayLowerDIntegratedBC::computeLowerDQpOffDiagJacobian(), ArrayDGLowerDKernel::computeLowerDQpOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpOffDiagJacobian(), HFEMDirichletBC::computeLowerDQpOffDiagJacobian(), FEProblemBase::computeMultiAppsDT(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), ADDGKernel::computeOffDiagElemNeighJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ScalarKernel::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGConvection::computeQpJacobian(), ArrayDGDiffusion::computeQpJacobian(), DGDiffusion::computeQpJacobian(), InterfaceDiffusion::computeQpJacobian(), InterfaceReaction::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), ScalarKernel::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), DGConvection::computeQpResidual(), ADDGAdvection::computeQpResidual(), ADDGDiffusion::computeQpResidual(), DGDiffusion::computeQpResidual(), HFEMDiffusion::computeQpResidual(), HFEMTestJump::computeQpResidual(), HFEMTrialJump::computeQpResidual(), ADMatInterfaceReaction::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), InterfaceReaction::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), ArrayHFEMDiffusion::computeQpResidual(), FEProblemBase::computeSystems(), FEProblemBase::computeUserObjectByName(), FEProblemBase::computeUserObjects(), FEProblemBase::computeUserObjectsInternal(), FEProblemBase::createQRules(), DisplacedProblem::createQRules(), MooseApp::createRecoverablePerfGraph(), MoveBoundaryNodesToCurveGenerator::curveGenerator(), MeshGenerator::declareMeshProperty(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), FEProblemBase::execMultiAppTransfers(), SteadyBase::execute(), WebServerControl::execute(), ActionWarehouse::executeActionsWithAction(), FEProblemBase::finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), SubdomainPerElementGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), FEProblemBase::getMaterialPropertyStorageConsumers(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), MooseServer::getSyntaxMetadata(), FEProblemBase::getTransfers(), FEProblemBase::getUOQuery(), SubProblem::getVectorTags(), DisplacedProblem::getVectorTags(), CommonOutputAction::hasConsole(), FEProblemBase::hasMultiApps(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), TimeIntegrator::init(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), LinearFVAdvection::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), LinearFVDiffusion::initialSetup(), MultiAppConservativeTransfer::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), FEProblemBase::logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MooseApp::MooseApp(), MooseObject::MooseObject(), SubProblem::numVectorTags(), DisplacedProblem::numVectorTags(), AdvancedOutput::output(), Console::output(), ConsoleUtils::outputExecutionInformation(), Output::outputStep(), SampledOutput::outputStep(), FEProblemBase::outputStep(), MooseServer::parseDocumentForDiagnostics(), PointInUnionCheckUO::PointInUnionCheckUO(), MooseMesh::prepare(), MFEMFunctorMaterial::processLiterals(), ProjectedStatefulMaterialStorageAction::processProperty(), MooseApp::recursivelyCreateExecutors(), SolutionInvalidInterface::registerInvalidSolutionInternal(), FEProblemBase::restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), FEProblemBase::setCoupling(), MooseApp::setupOptions(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), Reporter::store(), MooseBase::typeAndName(), AuxScalarKernel::uOld(), ScalarKernelBase::uOld(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

◆ typeAndName()

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

Get the class's combined type and name; useful in error handling.

Returns
The type and name of this class in the form '<type()> "<name()>"'.

Definition at line 57 of file MooseBase.C.

58{
59 return type() + std::string(" \"") + name() + std::string("\"");
60}

Referenced by MaterialPropertyStorage::addProperty(), FEProblemBase::checkUserObjectNameCollision(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< T >::finalize(), ReporterData::getReporterInfo(), MFEMSamplerBase::initialSetup(), MFEMVariableSamplerBase::initialSetup(), WebServerControl::outputMessage(), and Action::timedAct().

◆ uniformRefineLevel()

unsigned int MooseMesh::uniformRefineLevel ( ) const
inherited

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

Definition at line 3324 of file MooseMesh.C.

3325{
3326 return _uniform_refine_level;
3327}

Referenced by Adaptivity::uniformRefineWithProjection().

◆ uniformRefinement()

void MFEMMesh::uniformRefinement ( mfem::Mesh &  mesh,
const unsigned int  nref 
) const
protectedinherited

Performs a uniform refinement on the chosen mesh nref times.

Definition at line 154 of file MFEMMesh.C.

155{
156 for (unsigned int i = 0; i < nref; ++i)
157 mesh.UniformRefinement();
158}

Referenced by MFEMMesh::buildMesh().

◆ uniqueName()

MooseObjectName MooseBase::uniqueName ( ) const
inherited
Returns
The unique name for accessing input parameters of this object in the InputParameterWarehouse

Definition at line 69 of file MooseBase.C.

70{
71 if (!_pars.have_parameter<std::string>(unique_name_param))
72 mooseError("uniqueName(): Object does not have a unique name");
73 return MooseObjectName(_pars.get<std::string>(unique_name_param));
74}
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
static const std::string unique_name_param
The name of the parameter that contains the unique object name.
Definition MooseBase.h:57
A class for storing the names of MooseObject by tag and object name.

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

◆ uniqueParameterName()

MooseObjectParameterName MooseBase::uniqueParameterName ( const std::string &  parameter_name) const
inherited
Returns
The unique parameter name of a valid parameter of this object for accessing parameter controls

Definition at line 63 of file MooseBase.C.

64{
65 return MooseObjectParameterName(getBase(), name(), parameter_name);
66}
const std::string & getBase() const
Definition MooseBase.h:147

◆ update()

void MooseMesh::update ( )
inherited

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

Definition at line 635 of file MooseMesh.C.

636{
637 TIME_SECTION("update", 3, "Updating Mesh", true);
638
639 // Rebuild the boundary conditions
641
644 cacheInfo();
646
647 // this will make moose mesh aware of p-refinement added by mesh generators including
648 // a file mesh generator loading a restart checkpoint file
649 _max_p_level = 0;
650 _max_h_level = 0;
651 for (const auto & elem : getMesh().active_local_element_ptr_range())
652 {
653 if (elem->p_level() > _max_p_level)
654 _max_p_level = elem->p_level();
655 if (elem->level() > _max_h_level)
656 _max_h_level = elem->level();
657 }
660
661 // the flag might have been set by calling doingPRefinement(true)
663
665
666#ifdef MOOSE_KOKKOS_ENABLED
669 _kokkos_mesh->update();
670#endif
671
673
675}
bool hasKokkosObjects() const
bool initialized() const
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition MooseApp.C:2058
void buildBndElemList()
Definition MooseMesh.C:1199
bool possiblyRebuildNodeToElemMap()
rebuild the node to element map if it's been requsted previously
Definition MooseMesh.C:608
void computeMaxPerElemAndSide()
Compute the maximum numbers per element and side.
Definition MooseMesh.C:1080
void buildElemIDInfo()
Build extra data for faster access to the information of extra element integers.
Definition MooseMesh.C:1103
void buildNodeList()
Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in t...
Definition MooseMesh.C:1046
void cacheInfo()
Definition MooseMesh.C:1427

Referenced by MooseMesh::meshChanged(), MooseMesh::MooseMesh(), and MooseMesh::prepare().

◆ updateActiveSemiLocalNodeRange()

void MooseMesh::updateActiveSemiLocalNodeRange ( std::set< dof_id_type > &  ghosted_elems)
inherited

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

973{
974 TIME_SECTION("updateActiveSemiLocalNodeRange", 5, "Updating ActiveSemiLocalNode Range");
975
976 _semilocal_node_list.clear();
977
978 // First add the nodes connected to local elems
979 const ConstElemRange * active_local_elems = getActiveLocalElementRange();
980 for (const auto & elem : *active_local_elems)
981 {
982 for (unsigned int n = 0; n < elem->n_nodes(); ++n)
983 {
984 // Since elem is const here but we require a non-const Node * to
985 // store in the _semilocal_node_list (otherwise things like
986 // UpdateDisplacedMeshThread don't work), we are using a
987 // const_cast. A more long-term fix would be to have
988 // getActiveLocalElementRange return a non-const ElemRange.
989 Node * node = const_cast<Node *>(elem->node_ptr(n));
990
992 }
993 }
994
995 // Now add the nodes connected to ghosted_elems
996 for (const auto & ghost_elem_id : ghosted_elems)
997 {
998 Elem * elem = getMesh().elem_ptr(ghost_elem_id);
999 for (unsigned int n = 0; n < elem->n_nodes(); n++)
1000 {
1001 Node * node = elem->node_ptr(n);
1002
1003 _semilocal_node_list.insert(node);
1004 }
1005 }
1006
1007 // Now create the actual range
1008 _active_semilocal_node_range = std::make_unique<SemiLocalNodeRange>(_semilocal_node_list.begin(),
1009 _semilocal_node_list.end());
1010}

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

◆ updateCoordTransform()

void MooseMesh::updateCoordTransform ( )
privateinherited

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

4452{
4453 if (!_coord_transform)
4454 _coord_transform = std::make_unique<MooseAppCoordTransform>(*this);
4455 else
4456 _coord_transform->setCoordinateSystem(*this);
4457}

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

◆ usingGeneralAxisymmetricCoordAxes()

bool MooseMesh::usingGeneralAxisymmetricCoordAxes ( ) const
inherited

Returns true if general axisymmetric coordinate axes are being used.

Definition at line 4445 of file MooseMesh.C.

4446{
4447 return _subdomain_id_to_rz_coord_axis.size() > 0;
4448}

Referenced by MooseMesh::getAxisymmetricRadialCoord(), and MooseMesh::getUniqueCoordSystem().

◆ validParams()

InputParameters MFEMMeshGeneratorMesh::validParams ( )
static

Definition at line 19 of file MFEMMeshGeneratorMesh.C.

20{
22
23 // Mark this as a mesh-generator-based mesh so SetupMeshAction routes the
24 // pipeline output to us via setMeshBase() before buildMesh() is called.
25 params.set<bool>("_mesh_generator_mesh") = true;
26
28 "Mesh type for building an mfem::ParMesh from a chain of MFEMMeshGenerator objects.");
29
30 return params;
31}
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
static InputParameters validParams()
Definition MFEMMesh.C:19

◆ writeRecoveryFiles()

std::vector< std::filesystem::path > MFEMMesh::writeRecoveryFiles ( const std::filesystem::path &  file_base)
overridevirtualinherited

Write the mesh files needed for recovery/checkpointing.

The base implementation writes the libMesh checkpoint mesh. Derived classes may extend this to write additional backend-specific files.

Returns
The additional backend-specific files written by the derived class.

Reimplemented from MooseMesh.

Definition at line 119 of file MFEMMesh.C.

120{
122
123 mooseAssert(_mfem_par_mesh, "MFEM parallel mesh is not initialized");
124
125 const auto checkpoint_file =
126 file_base.string() + ".mfem.mesh." + std::to_string(this->processor_id());
127 std::ofstream output(checkpoint_file);
128 if (!output)
129 mooseError("Unable to open MFEM recovery mesh file '", checkpoint_file, "' for writing.");
130
131 _mfem_par_mesh->ParPrint(output);
132 return {checkpoint_file};
133}
virtual std::vector< std::filesystem::path > writeRecoveryFiles(const std::filesystem::path &file_base)
Write the mesh files needed for recovery/checkpointing.
Definition MooseMesh.C:2985

Member Data Documentation

◆ _action_factory

ActionFactory& ParallelParamObject::_action_factory
protectedinherited

◆ _active_node_range

std::unique_ptr<libMesh::NodeRange> MooseMesh::_active_node_range
protectedinherited

Definition at line 1676 of file MooseMesh.h.

Referenced by MooseMesh::getActiveNodeRange(), and MooseMesh::meshChanged().

◆ _active_semilocal_node_range

std::unique_ptr<SemiLocalNodeRange> MooseMesh::_active_semilocal_node_range
protectedinherited

Ranges for use with threading, cached so they don't have to get rebuilt all the time (which takes time).

Definition at line 1675 of file MooseMesh.h.

Referenced by MooseMesh::getActiveSemiLocalNodeRange(), MooseMesh::meshChanged(), and MooseMesh::updateActiveSemiLocalNodeRange().

◆ _all_face_info

std::vector<FaceInfo> MooseMesh::_all_face_info
mutableprivateinherited

FaceInfo object storing information for face based loops.

This container holds all the FaceInfo objects accessible from this process

Definition at line 1806 of file MooseMesh.h.

Referenced by MooseMesh::allFaceInfo(), MooseMesh::buildFiniteVolumeInfo(), MooseMesh::cacheFaceInfoVariableOwnership(), and MooseMesh::computeFiniteVolumeCoords().

◆ _allow_recovery

bool MooseMesh::_allow_recovery
privateinherited

Whether or not this Mesh is allowed to read a recovery file.

Definition at line 2009 of file MooseMesh.h.

Referenced by MooseMesh::allowRecovery(), MooseMesh::allowRecovery(), and MooseMesh::init().

◆ _allow_remote_element_removal

bool MooseMesh::_allow_remote_element_removal
privateinherited

◆ _app

MooseApp& MooseBase::_app
protectedinherited

The MOOSE application this is associated with.

Definition at line 381 of file MooseBase.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), FEProblemBase::acceptInvalidSolution(), FEProblemBase::addAnyRedistributers(), MeshGenerator::addChildMeshGenerator(), FEProblemBase::addMaterialHelper(), MeshGenerator::addMeshSubgenerator(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addOutput(), MeshGenerator::addParentMeshGenerator(), FEProblemBase::allowOutput(), AStableDirk4::AStableDirk4(), FileMesh::buildMesh(), MooseMesh::buildTypedMesh(), MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), DefaultNonlinearConvergence::checkConvergence(), MeshGenerator::checkGetMesh(), FEProblemBase::checkICRestartError(), FEProblemBase::checkProblemIntegrity(), LibmeshPartitioner::clone(), BlockWeightedPartitioner::clone(), CopyMeshPartitioner::clone(), GridPartitioner::clone(), HierarchicalGridPartitioner::clone(), PetscExternalPartitioner::clone(), RandomPartitioner::clone(), SingleRankPartitioner::clone(), ElementPointNeighborLayers::clone(), ElementSideNeighborLayers::clone(), GhostAllPointNeighbors::clone(), GhostBoundary::clone(), GhostEverything::clone(), GhostHigherDLowerDPointNeighbors::clone(), GhostLowerDElems::clone(), GhostPrimaryFace::clone(), ProxyRelationshipManager::clone(), RedistributeProperties::clone(), SampledOutput::cloneMesh(), FEProblemBase::computeJacobianSys(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeLinearSystemTags(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualSys(), FEProblemBase::computeResidualTags(), Console::Console(), TimeStepper::constrainStep(), Control::Control(), CopyMeshPartitioner::CopyMeshPartitioner(), MultiApp::createApp(), MultiApp::createApps(), MoveBoundaryNodesToCurveGenerator::curveGenerator(), FEProblemBase::customSetup(), MeshGenerator::declareMeshProperty(), MeshGenerator::declareNullMeshName(), MooseMesh::determineUseDistributedMesh(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::DumpObjectsProblem(), DumpObjectsProblem::dumpVariableHelper(), EigenExecutionerBase::EigenExecutionerBase(), EigenKernel::EigenKernel(), PIDTransientControl::execute(), Eigenvalue::execute(), InversePowerMethod::execute(), NonlinearEigen::execute(), SteadyBase::execute(), TransientBase::execute(), MFEMSteady::execute(), PseudoTimestep::execute(), IterationInfo::execute(), EigenProblem::execute(), Executioner::Executioner(), Executioner::Executioner(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), FEProblemBase::FEProblemBase(), FileOutput::FileOutput(), TorchAssembly::finalize(), ChangeOverFixedPointPostprocessor::finalize(), RadialAverage::finalize(), FixedPointSolve::FixedPointSolve(), FEProblemBase::forceOutput(), FullSolveMultiApp::FullSolveMultiApp(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVAdvection::FVAdvection(), FileMeshGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), MeshGenerator::getCSGBaseByName(), FEProblemBase::getExecutor(), MeshGenerator::getMeshByName(), NumFixedPointIterations::getValue(), NumRelationshipManagers::getValue(), GhostingUserObject::GhostingUserObject(), MooseMesh::init(), Eigenvalue::init(), InversePowerMethod::init(), NonlinearEigen::init(), TransientBase::init(), MFEMMesh::init(), FEProblemBase::init(), CompositionDT::init(), SubProblem::initialSetup(), PIDTransientControl::initialSetup(), RealFunctionControl::initialSetup(), TimePeriod::initialSetup(), EigenProblemSolve::initialSetup(), FEProblemSolve::initialSetup(), Console::initialSetup(), FEProblemBase::initialSetup(), BoundaryMeshBuilder::initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPetscOutputAndSomeSolverSettings(), EigenProblem::initPetscOutputAndSomeSolverSettings(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), FEProblemBase::meshChanged(), MeshGenerator::MeshGenerator(), MFEMProblemSolve::MFEMProblemSolve(), MooseMesh::MooseMesh(), MooseMesh::MooseMesh(), MooseObject::MooseObject(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), EigenExecutionerBase::normalizeSolution(), NumFailedTimeSteps::NumFailedTimeSteps(), Checkpoint::output(), Exodus::output(), Nemesis::output(), PerfGraphOutput::output(), Tecplot::output(), MortarNodalGeometryOutput::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Exodus::outputEmptyTimestep(), Console::outputInput(), Exodus::outputInput(), Exodus::outputNodalVariables(), JSONOutput::outputReporters(), Output::outputStep(), SampledOutput::outputStep(), FEProblemBase::outputStep(), Console::outputSystemInformation(), JSONOutput::outputSystemInformation(), OverlayMeshGenerator::OverlayMeshGenerator(), MultiApp::parentOutputPositionChanged(), TransientBase::preExecute(), FEProblemBase::projectSolution(), AnnularMesh::safeClone(), ConcentricCircleMesh::safeClone(), FileMesh::safeClone(), GeneratedMesh::safeClone(), ImageMesh::safeClone(), MeshGeneratorMesh::safeClone(), PatternedMesh::safeClone(), RinglebMesh::safeClone(), SpiralAnnularMesh::safeClone(), StitchedMesh::safeClone(), TiledMesh::safeClone(), MFEMFileMesh::safeClone(), safeClone(), MultiApp::setAppOutputFileBase(), FileOutput::setFileBaseInternal(), MeshGenerator::setMeshProperty(), MeshGenerator::setMeshPropertyHelper(), FEProblemBase::setRestartFile(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), TransientBase::setupTimeIntegrator(), Output::setWallTimeIntervalFromCommandLineParam(), SideSetExtruderGenerator::SideSetExtruderGenerator(), SolutionInvalidityReporter::SolutionInvalidityReporter(), FixedPointSolve::solve(), ActuallyExplicitEuler::solve(), FEProblemBase::solve(), EigenProblem::solve(), FEProblemBase::solveLinearSystem(), PetscOutput::solveSetup(), FixedPointSolve::solveStep(), TransientMultiApp::solveStep(), FEProblemBase::subdomainSetup(), FEProblemBase::theWarehouse(), TimeExtremeValue::TimeExtremeValue(), TimeIntegratedPostprocessor::TimeIntegratedPostprocessor(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), SubProblem::timestepSetup(), PIDTransientControl::timestepSetup(), FEProblemBase::timestepSetup(), TransientBase::TransientBase(), MooseMesh::update(), TorchFEInterpolation::updateDofMap(), TorchFEInterpolation::updateGradPhi(), TorchFEInterpolation::updateInterpolations(), FEProblemBase::updateMortarMesh(), TorchFEInterpolation::updatePhi(), Console::write(), XYQuadrilateralMeshFromBoundaryCurve::XYQuadrilateralMeshFromBoundaryCurve(), and FEProblemBase::~FEProblemBase().

◆ _block_id_mapping

std::vector<std::unordered_map<SubdomainID, std::set<dof_id_type> > > MooseMesh::_block_id_mapping
privateinherited

Unique element integer IDs for each subdomain and each extra element integers.

Definition at line 2034 of file MooseMesh.h.

Referenced by MooseMesh::buildElemIDInfo(), MooseMesh::getAllElemIDs(), and MooseMesh::getElemIDsOnBlocks().

◆ _block_singletons

std::unordered_map<SubdomainID, std::set<SubdomainID> > MooseMesh::_block_singletons
protectedinherited

For each subdomain, a std::set containing just that subdomain ID, e.g.

{3} for subdomain 3. getNodeBlockIds() returns a set reference, so for a node in _node_block, which stores only a SubdomainID, it returns the stored set for that subdomain.

Definition at line 1749 of file MooseMesh.h.

Referenced by MooseMesh::cacheInfo(), and MooseMesh::getNodeBlockIds().

◆ _bnd_elem_ids

std::unordered_map<boundary_id_type, std::unordered_set<dof_id_type> > MooseMesh::_bnd_elem_ids
protectedinherited

◆ _bnd_elem_range

std::unique_ptr<libMesh::StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *> > MooseMesh::_bnd_elem_range
protectedinherited

◆ _bnd_elems

std::vector<BndElement *> MooseMesh::_bnd_elems
protectedinherited

◆ _bnd_node_ids

std::map<boundary_id_type, std::set<dof_id_type> > MooseMesh::_bnd_node_ids
protectedinherited

Map of sets of node IDs in each boundary.

Definition at line 1714 of file MooseMesh.h.

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

◆ _bnd_node_range

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

◆ _bnd_nodes

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

◆ _boundary_to_normal_map

std::unique_ptr<std::map<BoundaryID, RealVectorValue> > MooseMesh::_boundary_to_normal_map
protectedinherited

The boundary to normal map - valid only when AddAllSideSetsByNormals is active.

Definition at line 1707 of file MooseMesh.h.

Referenced by MooseMesh::getNormalByBoundaryID(), MooseMesh::setBoundaryToNormalMap(), and MooseMesh::setBoundaryToNormalMap().

◆ _bounds

std::vector<std::vector<Real> > MooseMesh::_bounds
protectedinherited

The bounds in each dimension of the mesh for regular orthogonal meshes.

Definition at line 1776 of file MooseMesh.h.

Referenced by MooseMesh::detectOrthogonalDimRanges(), MooseMesh::getMaxInDimension(), MooseMesh::getMinInDimension(), and MooseMesh::MooseMesh().

◆ _built_from_other_mesh

bool MooseMesh::_built_from_other_mesh = false
protectedinherited

Whether or not this mesh was built from another mesh.

Definition at line 1595 of file MooseMesh.h.

Referenced by MooseMesh::prepare().

◆ _coarsened_element_children

std::map<const Elem *, std::vector<const Elem *> > MooseMesh::_coarsened_element_children
protectedinherited

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

Referenced by MooseMesh::cacheChangedLists(), and MooseMesh::coarsenedElementChildren().

◆ _coarsened_elements

std::unique_ptr<ConstElemPointerRange> MooseMesh::_coarsened_elements
protectedinherited

The elements that were just coarsened.

Definition at line 1659 of file MooseMesh.h.

Referenced by MooseMesh::cacheChangedLists(), and MooseMesh::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(), MaterialOutputAction::act(), MeshOnlyAction::act(), SetupDebugAction::act(), FEProblemBase::adaptMesh(), Adaptivity::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), DefaultSteadyStateConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonConformingFaces(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), MeshDiagnosticsGenerator::checkPolygons(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkResidualConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), CoarsenSurfaceMeshAlongSidesetGenerator::coarsenAlongSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeLinearSystemTags(), LinearSystem::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), TimeStepper::constrainStep(), IterationAdaptiveDT::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), MessageFromInput::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), SidesetAroundSubdomainUpdater::finalize(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), CoarsenBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), OrientSurfaceMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), StitchMeshGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), SubProblem::initialSetup(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), SurfaceDelaunayGeneratorBase::meshNormalDeviation2D(), MooseBase::mooseDeprecated(), MooseBase::mooseDeprecatedNoTrace(), MooseBase::mooseInfo(), MooseBase::mooseWarning(), MooseBase::mooseWarningNonPrefixed(), NEML2Action::NEML2Action(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), Console::output(), DOFMapOutput::output(), MaterialPropertyDebugOutput::output(), PerfGraphOutput::output(), ReporterDebugOutput::output(), SolutionInvalidityOutput::output(), VariableResidualNormsDebugOutput::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), WebServerControl::outputMessage(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), MooseBase::paramInfo(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), DefaultMultiAppFixedPointConvergence::preLoop(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), PicardSolve::printFixedPointConvergenceHistory(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), FEProblemBase::restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), LinearSystem::solve(), NonlinearSystem::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), ImplicitMidpoint::solve(), LStableDirk2::solve(), LStableDirk3::solve(), LStableDirk4::solve(), EigenProblem::solve(), FixedPointSolve::solveStep(), TransientMultiApp::solveStep(), MeshRepairGenerator::splitNonConvexPolygons(), PerfGraphLivePrint::start(), WebServerControl::startServer(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), MFEMTransient::takeStep(), TerminateChainControl::terminate(), SubProblem::timestepSetup(), FEProblemBase::updateMeshXFEM(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _construct_node_list_from_side_list

bool MooseMesh::_construct_node_list_from_side_list
privateinherited

Whether or not to allow generation of nodesets from sidesets.

Definition at line 2012 of file MooseMesh.h.

Referenced by MooseMesh::buildNodeListFromSideList(), and MooseMesh::getConstructNodeListFromSideList().

◆ _coord_sys

std::map<SubdomainID, Moose::CoordinateSystemType>& MooseMesh::_coord_sys
privateinherited

◆ _coord_system_set

bool MooseMesh::_coord_system_set
privateinherited

Whether the coordinate system has been set.

Definition at line 2077 of file MooseMesh.h.

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

◆ _coord_transform

std::unique_ptr<MooseAppCoordTransform> MooseMesh::_coord_transform
privateinherited

A coordinate transformation object that describes how to transform this problem's coordinate system into the canonical/reference coordinate system.

Definition at line 2074 of file MooseMesh.h.

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

◆ _custom_partitioner

std::unique_ptr<libMesh::Partitioner> MooseMesh::_custom_partitioner
protectedinherited

The custom partitioner.

Definition at line 1621 of file MooseMesh.h.

Referenced by MooseMesh::buildTypedMesh(), and MooseMesh::setCustomPartitioner().

◆ _custom_partitioner_requested

bool MooseMesh::_custom_partitioner_requested
protectedinherited

◆ _displace_node_list_by_side_list

bool MooseMesh::_displace_node_list_by_side_list
privateinherited

Whether or not to displace unrelated nodesets by nodesets constructed from sidesets.

Definition at line 2016 of file MooseMesh.h.

Referenced by MooseMesh::buildNodeListFromSideList(), and MooseMesh::getDisplaceNodeListBySideList().

◆ _distribution_overridden

bool MooseMesh::_distribution_overridden
protectedinherited

Definition at line 1605 of file MooseMesh.h.

◆ _doing_p_refinement

bool MooseMesh::_doing_p_refinement
privateinherited

Whether we have p-refinement (whether exclusively p- or hp-refinement)

Definition at line 2083 of file MooseMesh.h.

Referenced by MooseMesh::doingPRefinement(), MooseMesh::doingPRefinement(), and MooseMesh::update().

◆ _elem_info

std::vector<const ElemInfo *> MooseMesh::_elem_info
mutableprivateinherited

Holds only those ElemInfo objects that have processor_id equal to this process's id, e.g.

the local ElemInfo objects

Definition at line 1802 of file MooseMesh.h.

Referenced by MooseMesh::buildFiniteVolumeInfo(), MooseMesh::elemInfoVector(), MooseMesh::ownedElemInfoBegin(), and MooseMesh::ownedElemInfoEnd().

◆ _elem_side_to_face_info

std::unordered_map<std::pair<const Elem *, unsigned int>, FaceInfo *> MooseMesh::_elem_side_to_face_info
mutableprivateinherited

Map from elem-side pair to FaceInfo.

Definition at line 1814 of file MooseMesh.h.

Referenced by MooseMesh::buildFiniteVolumeInfo(), and MooseMesh::faceInfo().

◆ _elem_to_elem_info

std::unordered_map<dof_id_type, ElemInfo> MooseMesh::_elem_to_elem_info
mutableprivateinherited

Map connecting elems with their corresponding ElemInfo, we use the element ID as the key.

Definition at line 1798 of file MooseMesh.h.

Referenced by MooseMesh::buildFiniteVolumeInfo(), MooseMesh::cacheFVElementalDoFs(), MooseMesh::computeFiniteVolumeCoords(), and MooseMesh::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
protectedinherited

◆ _elem_type_to_child_side_refinement_map

std::map<libMesh::ElemType, std::map<std::pair<int, int>, std::vector<std::vector<QpMap> > > > MooseMesh::_elem_type_to_child_side_refinement_map
privateinherited

Holds mappings for "internal" child sides to parent volume. The second key is (child, child_side).

Definition at line 1959 of file MooseMesh.h.

Referenced by MooseMesh::buildRefinementMap(), and MooseMesh::getRefinementMap().

◆ _elem_type_to_coarsening_map

std::map<std::pair<int, libMesh::ElemType>, std::vector<std::pair<unsigned int, QpMap> > > MooseMesh::_elem_type_to_coarsening_map
privateinherited

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

Referenced by MooseMesh::buildCoarseningMap(), and MooseMesh::getCoarseningMap().

◆ _elem_type_to_p_coarsening_map

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

◆ _elem_type_to_p_coarsening_side_map

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

◆ _elem_type_to_p_refinement_map

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

◆ _elem_type_to_p_refinement_side_map

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

◆ _elem_type_to_refinement_map

std::map<std::pair<int, libMesh::ElemType>, std::vector<std::vector<QpMap> > > MooseMesh::_elem_type_to_refinement_map
privateinherited

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

Referenced by MooseMesh::buildRefinementMap(), and MooseMesh::getRefinementMap().

◆ _enabled

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParameters, used by Controls for toggling on/off MooseObjects.

Definition at line 71 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _extra_bnd_nodes

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

◆ _extreme_nodes

std::vector<Node *> MooseMesh::_extreme_nodes
privateinherited

A vector containing the nodes at the corners of a regular orthogonal mesh.

Definition at line 1838 of file MooseMesh.h.

Referenced by MooseMesh::detectOrthogonalDimRanges().

◆ _face_info

std::vector<const FaceInfo *> MooseMesh::_face_info
mutableprivateinherited

Holds only those FaceInfo objects that have processor_id equal to this process's id, e.g.

the local FaceInfo objects

Definition at line 1810 of file MooseMesh.h.

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

◆ _factory

Factory& ParallelParamObject::_factory
protectedinherited

◆ _finite_volume_info_dirty

bool MooseMesh::_finite_volume_info_dirty = true
mutableprivateinherited

◆ _ghost_elems_from_ghost_boundaries

std::set<Elem *> MooseMesh::_ghost_elems_from_ghost_boundaries
privateinherited

Set of elements ghosted by ghostGhostedBoundaries.

Definition at line 2025 of file MooseMesh.h.

Referenced by MooseMesh::ghostGhostedBoundaries().

◆ _ghosted_boundaries

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

◆ _ghosted_boundaries_inflation

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

◆ _ghosting_functors

std::vector<std::unique_ptr<libMesh::GhostingFunctor> > MooseMesh::_ghosting_functors
protectedinherited

Deprecated (DO NOT USE)

Definition at line 1589 of file MooseMesh.h.

◆ _ghosting_patch_size

unsigned int MooseMesh::_ghosting_patch_size
protectedinherited

The number of nearest neighbors to consider for ghosting purposes when iteration patch update strategy is used.

Definition at line 1761 of file MooseMesh.h.

Referenced by MooseMesh::getGhostingPatchSize().

◆ _half_range

RealVectorValue MooseMesh::_half_range
privateinherited

A convenience vector used to hold values in each dimension representing half of the range.

Definition at line 1835 of file MooseMesh.h.

Referenced by MooseMesh::addPeriodicVariable(), and MooseMesh::minPeriodicVector().

◆ _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
privateinherited

Holds a map from a high-order element side to its corresponding lower-d element.

Definition at line 2005 of file MooseMesh.h.

Referenced by MooseMesh::buildLowerDMesh(), MooseMesh::getLowerDElem(), and MooseMesh::getLowerDElemMap().

◆ _id_identical_flag

std::vector<std::vector<bool> > MooseMesh::_id_identical_flag
privateinherited

Flags to indicate whether or not any two extra element integers are the same.

Definition at line 2040 of file MooseMesh.h.

Referenced by MooseMesh::areElemIDsIdentical(), and MooseMesh::buildElemIDInfo().

◆ _interface_node_blocks

std::unordered_map<dof_id_type, std::set<SubdomainID> > MooseMesh::_interface_node_blocks
protectedinherited

The full subdomain set of the nodes whose incident elements disagree, that is the nodes on a subdomain interface.

Interface nodes are typically a small fraction of the mesh, so storing a set for each of them costs little.

Definition at line 1744 of file MooseMesh.h.

Referenced by MooseMesh::cacheInfo(), and MooseMesh::getNodeBlockIds().

◆ _is_changed

bool MooseMesh::_is_changed
protectedinherited

true if mesh is changed (i.e. after adaptivity step)

Definition at line 1647 of file MooseMesh.h.

◆ _is_displaced

bool MooseMesh::_is_displaced
privateinherited

Whether this mesh is displaced.

Definition at line 2055 of file MooseMesh.h.

Referenced by MooseMesh::isDisplaced(), and MooseMesh::isDisplaced().

◆ _is_nemesis

bool MooseMesh::_is_nemesis
protectedinherited

◆ _is_split

const bool MooseMesh::_is_split
protectedinherited

Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)

Definition at line 1782 of file MooseMesh.h.

Referenced by MooseMesh::determineUseDistributedMesh(), and MooseMesh::isSplit().

◆ _kokkos_mesh

std::unique_ptr<Moose::Kokkos::Mesh> MooseMesh::_kokkos_mesh
protectedinherited

Pointer to Kokkos mesh object.

Definition at line 1613 of file MooseMesh.h.

Referenced by MooseMesh::getKokkosMesh(), MooseMesh::getKokkosMesh(), MooseMesh::MooseMesh(), MooseMesh::MooseMesh(), and MooseMesh::update().

◆ _linear_finite_volume_dofs_cached

bool MooseMesh::_linear_finite_volume_dofs_cached = false
mutableprivateinherited

Definition at line 1822 of file MooseMesh.h.

◆ _local_node_range

std::unique_ptr<libMesh::ConstNodeRange> MooseMesh::_local_node_range
protectedinherited

Definition at line 1677 of file MooseMesh.h.

Referenced by MooseMesh::getLocalNodeRange(), and MooseMesh::meshChanged().

◆ _lower_d_boundary_blocks

std::set<SubdomainID> MooseMesh::_lower_d_boundary_blocks
privateinherited

Mesh blocks for boundary lower-d elements in different types.

Definition at line 2002 of file MooseMesh.h.

Referenced by MooseMesh::boundaryLowerDBlocks(), and MooseMesh::buildLowerDMesh().

◆ _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
privateinherited

Definition at line 2006 of file MooseMesh.h.

Referenced by MooseMesh::buildLowerDMesh(), and MooseMesh::getHigherDSide().

◆ _lower_d_interior_blocks

std::set<SubdomainID> MooseMesh::_lower_d_interior_blocks
privateinherited

Mesh blocks for interior lower-d elements in different types.

Definition at line 2000 of file MooseMesh.h.

Referenced by MooseMesh::buildLowerDMesh(), and MooseMesh::interiorLowerDBlocks().

◆ _max_h_level

unsigned int MooseMesh::_max_h_level
privateinherited

Maximum h-refinement level of all elements.

Definition at line 2087 of file MooseMesh.h.

Referenced by MooseMesh::maxHLevel(), and MooseMesh::update().

◆ _max_ids

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

Maximum integer ID for each extra element integer.

Definition at line 2036 of file MooseMesh.h.

Referenced by MooseMesh::buildElemIDInfo(), and MooseMesh::maxElementID().

◆ _max_leaf_size

unsigned int MooseMesh::_max_leaf_size
protectedinherited

Definition at line 1764 of file MooseMesh.h.

Referenced by MooseMesh::getMaxLeafSize().

◆ _max_nodes_per_elem

unsigned int MooseMesh::_max_nodes_per_elem
privateinherited

The maximum number of nodes per element.

Definition at line 2046 of file MooseMesh.h.

Referenced by MooseMesh::computeMaxPerElemAndSide(), and MooseMesh::getMaxNodesPerElem().

◆ _max_nodes_per_side

unsigned int MooseMesh::_max_nodes_per_side
privateinherited

The maximum number of nodes per side.

Definition at line 2049 of file MooseMesh.h.

Referenced by MooseMesh::computeMaxPerElemAndSide(), and MooseMesh::getMaxNodesPerSide().

◆ _max_p_level

unsigned int MooseMesh::_max_p_level
privateinherited

Maximum p-refinement level of all elements.

Definition at line 2085 of file MooseMesh.h.

Referenced by MooseMesh::maxPLevel(), and MooseMesh::update().

◆ _max_sides_per_elem

unsigned int MooseMesh::_max_sides_per_elem
privateinherited

The maximum number of sides per element.

Definition at line 2043 of file MooseMesh.h.

Referenced by MooseMesh::computeMaxPerElemAndSide(), and MooseMesh::getMaxSidesPerElem().

◆ _mesh

std::unique_ptr<libMesh::MeshBase> MooseMesh::_mesh
protectedinherited

◆ _mesh_boundary_ids

std::set<BoundaryID> MooseMesh::_mesh_boundary_ids
protectedinherited

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

Referenced by MooseMesh::getBoundaryIDs(), MooseMesh::meshBoundaryIds(), MooseMesh::prepare(), and MooseMesh::setMeshBoundaryIDs().

◆ _mesh_displacement_variable

std::string MFEMMesh::_mesh_displacement_variable
protectedinherited

Holds name of variable used for mesh displacement, if set.

Definition at line 92 of file MFEMMesh.h.

Referenced by MFEMMesh::buildMesh(), MFEMMesh::getMeshDisplacementVariable(), MFEMMesh::init(), and MFEMMesh::shouldDisplace().

◆ _mesh_nodeset_ids

std::set<BoundaryID> MooseMesh::_mesh_nodeset_ids
protectedinherited

Definition at line 1703 of file MooseMesh.h.

Referenced by MooseMesh::meshNodesetIds(), and MooseMesh::prepare().

◆ _mesh_sideset_ids

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

◆ _mesh_subdomains

std::set<SubdomainID> MooseMesh::_mesh_subdomains
protectedinherited

A set of subdomain IDs currently present in the mesh.

For parallel meshes, includes subdomains defined on other processors as well.

Definition at line 1693 of file MooseMesh.h.

Referenced by MooseMesh::buildLowerDMesh(), MooseMesh::checkDuplicateSubdomainNames(), MooseMesh::meshSubdomains(), and MooseMesh::prepare().

◆ _metaname

const RestartableDataMapName Restartable::_metaname
privateinherited

Restartable metadata name.

Definition at line 247 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp().

◆ _mfem_par_mesh

std::shared_ptr<mfem::ParMesh> MFEMMesh::_mfem_par_mesh {nullptr}
protectedinherited

◆ _min_ids

std::vector<dof_id_type> MooseMesh::_min_ids
privateinherited

Minimum integer ID for each extra element integer.

Definition at line 2038 of file MooseMesh.h.

Referenced by MooseMesh::buildElemIDInfo(), and MooseMesh::minElementID().

◆ _moose_mesh_prepared

bool MooseMesh::_moose_mesh_prepared = false
protectedinherited

True if prepare has been called on the mesh.

Definition at line 1653 of file MooseMesh.h.

Referenced by MooseMesh::MooseMesh(), MooseMesh::prepare(), MooseMesh::prepared(), and MooseMesh::prepared().

◆ _name

const std::string& MooseBase::_name
protectedinherited

The name of this class.

Definition at line 387 of file MooseBase.h.

Referenced by AddFieldSplitAction::act(), AddBCAction::act(), AddConstraintAction::act(), AddControlAction::act(), AddConvergenceAction::act(), AddCorrectorAction::act(), AddDamperAction::act(), AddDGKernelAction::act(), AddDiracKernelAction::act(), AddDistributionAction::act(), AddFunctionAction::act(), AddFunctorMaterialAction::act(), AddFVBCAction::act(), AddFVGradientMethodAction::act(), AddFVInitialConditionAction::act(), AddFVInterfaceKernelAction::act(), AddFVInterpolationMethodAction::act(), AddFVKernelAction::act(), AddHDGKernelAction::act(), AddIndicatorAction::act(), AddInitialConditionAction::act(), AddInterfaceKernelAction::act(), AddKernelAction::act(), AddLinearFVBCAction::act(), AddLinearFVKernelAction::act(), AddMarkerAction::act(), AddMaterialAction::act(), AddMeshDivisionAction::act(), AddMeshGeneratorAction::act(), AddMeshModifiersAction::act(), AddMultiAppAction::act(), AddNodalKernelAction::act(), AddOutputAction::act(), AddPositionsAction::act(), AddPostprocessorAction::act(), AddReporterAction::act(), AddSamplerAction::act(), AddScalarKernelAction::act(), AddTimesAction::act(), AddTimeStepperAction::act(), AddTransferAction::act(), AddUserObjectAction::act(), AddVectorPostprocessorAction::act(), PartitionerAction::act(), ReadExecutorParamsAction::act(), SetupPreconditionerAction::act(), SetupTimeIntegratorAction::act(), AddMFEMComplexBCComponentAction::act(), AddMFEMComplexKernelComponentAction::act(), AddMFEMFESpaceAction::act(), AddMFEMFESpaceHierarchyAction::act(), AddMFEMProblemComposerAction::act(), AddMFEMSolverAction::act(), AddMFEMSubMeshAction::act(), AddMFEMWeakFormAction::act(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), PiecewiseLinearBase::buildInterpolation(), CombinerGenerator::CombinerGenerator(), Executor::Executor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), MultiApp::fillPositions(), CentroidMultiApp::fillPositions(), QuadraturePointMultiApp::fillPositions(), FunctionDT::FunctionDT(), FillBetweenCurvesGenerator::generate(), FillBetweenPointVectorsGenerator::generate(), FillBetweenSidesetsGenerator::generate(), MooseBase::MooseBase(), MooseBase::name(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseBase::setData(), and AddVariableAction::varName().

◆ _need_delete

bool MooseMesh::_need_delete
privateinherited

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

Definition at line 2019 of file MooseMesh.h.

Referenced by MooseMesh::allowRemoteElementRemoval(), MooseMesh::needsRemoteElemDeletion(), and MooseMesh::needsRemoteElemDeletion().

◆ _need_ghost_ghosted_boundaries

bool MooseMesh::_need_ghost_ghosted_boundaries
privateinherited

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

Referenced by MooseMesh::ghostGhostedBoundaries(), and MooseMesh::needGhostGhostedBoundaries().

◆ _neighbor_subdomain_boundary_ids

std::unordered_map<SubdomainID, std::set<BoundaryID> > MooseMesh::_neighbor_subdomain_boundary_ids
privateinherited

Holds a map from neighbor subomdain ids to the boundary ids that are attached to it.

Definition at line 1997 of file MooseMesh.h.

Referenced by MooseMesh::getBoundaryConnectedSecondaryBlocks(), MooseMesh::getInterfaceConnectedBlocks(), and MooseMesh::getSubdomainInterfaceBoundaryIds().

◆ _node_block

std::unordered_map<dof_id_type, SubdomainID> MooseMesh::_node_block
protectedinherited

The subdomain of the elements incident on a node, for the nodes whose incident elements all agree, which is every node away from a subdomain interface.

Left empty when hasSingleSubdomain().

Definition at line 1739 of file MooseMesh.h.

Referenced by MooseMesh::cacheInfo(), and MooseMesh::getNodeBlockIds().

◆ _node_map

std::vector<Node *> MooseMesh::_node_map
protectedinherited

Vector of all the Nodes in the mesh for determining when to add a new point.

Definition at line 1770 of file MooseMesh.h.

Referenced by MooseMesh::addUniqueNode().

◆ _node_set_nodes

std::map<boundary_id_type, std::vector<dof_id_type> > MooseMesh::_node_set_nodes
protectedinherited

list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids]

Definition at line 1752 of file MooseMesh.h.

Referenced by MooseMesh::buildNodeList(), MooseMesh::freeBndNodes(), MooseMesh::getNodeList(), and MooseMesh::nodeSetNodes().

◆ _node_to_elem_map

std::unordered_map<dof_id_type, std::vector<dof_id_type> > MooseMesh::_node_to_elem_map
protectedinherited

A map of all of the current nodes to the elements that they are connected to.

Definition at line 1684 of file MooseMesh.h.

Referenced by MooseMesh::internalNodeToElemMap(), and MooseMesh::possiblyRebuildNodeToElemMap().

◆ _node_to_elem_map_built

bool MooseMesh::_node_to_elem_map_built = false
protectedinherited

Whether _node_to_elem_map has been built.

Definition at line 1687 of file MooseMesh.h.

Referenced by MooseMesh::internalNodeToElemMap(), and MooseMesh::possiblyRebuildNodeToElemMap().

◆ _paired_boundary

std::optional<std::vector<std::pair<BoundaryID, BoundaryID> > > MooseMesh::_paired_boundary
protectedinherited

A vector holding the paired boundaries for a regular orthogonal mesh.

Definition at line 1779 of file MooseMesh.h.

Referenced by MooseMesh::detectPairedSidesets(), and MooseMesh::hasDetectedPairedSidesets().

◆ _parallel_type

ParallelType MooseMesh::_parallel_type
protectedinherited

Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.

Determines whether the underlying libMesh mesh is a ReplicatedMesh or DistributedMesh.

Definition at line 1599 of file MooseMesh.h.

Referenced by MooseMesh::determineUseDistributedMesh(), MooseMesh::getParallelType(), and MooseMesh::setParallelType().

◆ _parallel_type_overridden

bool MooseMesh::_parallel_type_overridden
protectedinherited

◆ _parent

const ParallelParamObject& DataFileInterface::_parent
privateinherited

◆ _pars

const InputParameters& MooseBase::_pars
protectedinherited

The object's parameters.

Definition at line 390 of file MooseBase.h.

Referenced by AddAuxKernelAction::act(), AddFVICAction::act(), AddICAction::act(), CommonOutputAction::act(), ComposeTimeStepperAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupDebugAction::act(), SetupMeshAction::act(), AddMFEMComplexBCComponentAction::act(), AddMFEMComplexKernelComponentAction::act(), FunctorMaterial::addFunctorPropertyByBlocks(), PNGOutput::calculateRescalingValues(), MooseBase::callMooseError(), MooseBase::connectControllableParams(), Console::Console(), MooseApp::copyInputs(), MaterialBase::declareADProperty(), Moose::Kokkos::MaterialBase::declareKokkosOnDemandProperty(), Moose::Kokkos::MaterialBase::declareKokkosProperty(), MaterialBase::declareProperty(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::generate(), MooseBase::getBase(), MooseBase::getCheckedPointerParam(), MaterialBase::getGenericZeroMaterialProperty(), MooseBase::getHitNode(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::getParam(), MooseBase::getParam(), MooseBase::hasBase(), MeshGenerator::hasGenerateCSG(), MeshGenerator::hasGenerateData(), AddVariableAction::init(), AdvancedOutput::initExecutionTypes(), EigenProblemSolve::initialSetup(), Console::initialSetup(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MultiApp::keepSolutionDuringRestore(), MooseBase::messagePrefix(), MooseApp::MooseApp(), MooseBase::MooseBase(), MultiSystemSolveObject::MultiSystemSolveObject(), MooseApp::outputMachineReadableData(), MooseBase::paramError(), MooseBase::parameters(), MooseBase::paramInfo(), MooseBase::paramWarning(), MooseMesh::prepare(), MooseBase::queryParam(), MooseMesh::setCoordSystem(), MooseMesh::setPartitionerHelper(), SetupMeshAction::setupMesh(), TransientBase::setupTimeIntegrator(), MooseApp::showInputs(), and MooseBase::uniqueName().

◆ _partitioner_name

MooseEnum MooseMesh::_partitioner_name
protectedinherited

The partitioner used on this mesh.

Definition at line 1617 of file MooseMesh.h.

Referenced by MooseMesh::partitionerName(), MooseMesh::setCustomPartitioner(), and MooseMesh::setPartitionerHelper().

◆ _partitioner_overridden

bool MooseMesh::_partitioner_overridden
protectedinherited

◆ _patch_size

unsigned int MooseMesh::_patch_size
protectedinherited

The number of nodes to consider in the NearestNode neighborhood.

Definition at line 1758 of file MooseMesh.h.

Referenced by MooseMesh::getPatchSize().

◆ _patch_update_strategy

Moose::PatchUpdateType MooseMesh::_patch_update_strategy
protectedinherited

The patch update strategy.

Definition at line 1767 of file MooseMesh.h.

Referenced by MooseMesh::getPatchUpdateStrategy(), MooseMesh::MooseMesh(), and MooseMesh::setPatchUpdateStrategy().

◆ _periodic_dim

std::map<std::pair<unsigned int, unsigned int>, std::array<bool, 3> > MooseMesh::_periodic_dim
privateinherited

A map from (system number, vector number) to which dimensions are periodic in a regular orthogonal mesh.

This data structure is populated by addPeriodicVariable.

Definition at line 1830 of file MooseMesh.h.

Referenced by MooseMesh::addPeriodicVariable(), and MooseMesh::queryPeriodicDimensions().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 135 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 138 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::timedSectionName().

◆ _provided_coord_blocks

std::vector<SubdomainName> MooseMesh::_provided_coord_blocks
privateinherited

Set for holding user-provided coordinate system type block names.

Definition at line 2080 of file MooseMesh.h.

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

◆ _quadrature_nodes

std::map<dof_id_type, Node *> MooseMesh::_quadrature_nodes
protectedinherited

◆ _refined_elements

std::unique_ptr<ConstElemPointerRange> MooseMesh::_refined_elements
protectedinherited

The elements that were just refined.

Definition at line 1656 of file MooseMesh.h.

Referenced by MooseMesh::cacheChangedLists(), and MooseMesh::refinedElementRange().

◆ _regular_orthogonal_mesh

bool MooseMesh::_regular_orthogonal_mesh
protectedinherited

Boolean indicating whether this mesh was detected to be regular and orthogonal.

Definition at line 1773 of file MooseMesh.h.

Referenced by MooseMesh::addPeriodicVariable(), MooseMesh::detectOrthogonalDimRanges(), GeneratedMesh::GeneratedMesh(), MooseMesh::getPairedBoundaryMapping(), MooseMesh::isRegularOrthogonal(), and MooseMesh::prepared().

◆ _relationship_managers

std::vector<std::shared_ptr<RelationshipManager> > MooseMesh::_relationship_managers
protectedinherited

The list of active geometric relationship managers (bound to the underlying MeshBase object).

Definition at line 1592 of file MooseMesh.h.

◆ _restartable_app

MooseApp& Restartable::_restartable_app
protectedinherited

Reference to the application.

Definition at line 234 of file Restartable.h.

Referenced by Restartable::registerRestartableDataOnApp(), and Restartable::registerRestartableNameWithFilterOnApp().

◆ _restartable_name

std::string Restartable::_restartable_name
privateinherited

The name of the object.

Definition at line 250 of file Restartable.h.

Referenced by Restartable::declareRestartableDataWithObjectNameWithContext(), and Restartable::restartableName().

◆ _restartable_read_only

const bool Restartable::_restartable_read_only
protectedinherited

Flag for toggling read only status (see ReporterData)

Definition at line 243 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 237 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 240 of file Restartable.h.

Referenced by Restartable::declareRestartableDataHelper().

◆ _rz_coord_axis

unsigned int MooseMesh::_rz_coord_axis
privateinherited

Storage for RZ axis selection.

Definition at line 2067 of file MooseMesh.h.

Referenced by MooseMesh::getAxisymmetricRadialCoord(), MooseMesh::setAxisymmetricCoordAxis(), and MooseMesh::setCoordData().

◆ _semilocal_node_list

std::set<Node *> MooseMesh::_semilocal_node_list
protectedinherited

Used for generating the semilocal node range.

Definition at line 1669 of file MooseMesh.h.

Referenced by MooseMesh::isSemiLocal(), and MooseMesh::updateActiveSemiLocalNodeRange().

◆ _si_moose_base

const MooseBase& SolutionInvalidInterface::_si_moose_base
privateinherited

◆ _si_problem

const FEProblemBase* SolutionInvalidInterface::_si_problem
privateinherited

A pointer to FEProblem base.

Definition at line 114 of file SolutionInvalidInterface.h.

Referenced by SolutionInvalidInterface::flagInvalidSolutionInternal().

◆ _skip_deletion_repartition_after_refine

bool MooseMesh::_skip_deletion_repartition_after_refine
protectedinherited

Whether or not skip remote deletion and repartition after uniform refinements.

Definition at line 1644 of file MooseMesh.h.

Referenced by MooseMesh::setUniformRefineLevel(), and MooseMesh::skipDeletionRepartitionAfterRefine().

◆ _skip_refine_when_use_split

bool MooseMesh::_skip_refine_when_use_split
protectedinherited

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

Definition at line 1641 of file MooseMesh.h.

Referenced by MooseMesh::skipRefineWhenUseSplit().

◆ _sub_to_data

std::unordered_map<SubdomainID, SubdomainData> MooseMesh::_sub_to_data
privateinherited

Holds a map from subdomain ids to associated data.

Definition at line 1994 of file MooseMesh.h.

Referenced by MooseMesh::getBlockConnectedBlocks(), MooseMesh::getBoundaryConnectedBlocks(), and MooseMesh::getSubdomainBoundaryIds().

◆ _subdomain_id_to_rz_coord_axis

std::unordered_map<SubdomainID, std::pair<Point, RealVectorValue> > MooseMesh::_subdomain_id_to_rz_coord_axis
privateinherited

◆ _type

const std::string& MooseBase::_type
protectedinherited

◆ _uniform_refine_level

unsigned int MooseMesh::_uniform_refine_level
protectedinherited

The level of uniform refinement requested (set to zero if AMR is disabled)

Definition at line 1638 of file MooseMesh.h.

Referenced by MooseMesh::setUniformRefineLevel(), and MooseMesh::uniformRefineLevel().

◆ _use_distributed_mesh

bool MooseMesh::_use_distributed_mesh
protectedinherited

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

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

◆ app_param

const std::string MooseBase::app_param = "_moose_app"
staticinherited

◆ kokkos_object_param

const std::string MooseBase::kokkos_object_param = "_kokkos_object"
staticinherited

The name of the parameter that indicates an object is a Kokkos functor.

Definition at line 64 of file MooseBase.h.

Referenced by InputParameters::isKokkosObject().

◆ moose_base_param

const std::string MooseBase::moose_base_param = "_moose_base"
staticinherited

The name of the parameter that contains the moose system base.

Definition at line 61 of file MooseBase.h.

Referenced by InputParameters::getBase(), InputParameters::hasBase(), and InputParameters::registerBase().

◆ name_param

const std::string MooseBase::name_param = "_object_name"
staticinherited

◆ periodic_dim_default

const std::array< bool, 3 > MooseMesh::periodic_dim_default {false, false, false}
staticinherited

Default value for the automatically detected paired boundaries for each unit dimension, in which the value for each unit dimension is false (not detected).

Definition at line 80 of file MooseMesh.h.

Referenced by MooseMesh::addPeriodicVariable(), MooseMesh::detectPairedSidesets(), and MooseMesh::queryPeriodicDimensions().

◆ type_param

const std::string MooseBase::type_param = "_type"
staticinherited

◆ unique_name_param

const std::string MooseBase::unique_name_param = "_unique_name"
staticinherited

The name of the parameter that contains the unique object name.

Definition at line 57 of file MooseBase.h.

Referenced by InputParameterWarehouse::addInputParameters(), AppFactory::create(), InputParameterWarehouse::removeInputParameters(), MooseBase::uniqueName(), and MooseBase::validParams().

◆ usingCombinedWarningSolutionWarnings

MooseObject::usingCombinedWarningSolutionWarnings
inherited

Definition at line 67 of file MooseObject.h.


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