www.mooseframework.org
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
RinglebMesh Class Reference

Mesh generated from parameters. More...

#include <RinglebMesh.h>

Inheritance diagram for RinglebMesh:
[legend]

Public Types

using PeriodicNodeInfo = std::pair< const Node *, BoundaryID >
 Helper type for building periodic node maps. More...
 

Public Member Functions

 RinglebMesh (const InputParameters &parameters)
 
 RinglebMesh (const RinglebMesh &)=default
 
RinglebMeshoperator= (const RinglebMesh &other_mesh)=delete
 
virtual std::unique_ptr< MooseMeshsafeClone () const override
 A safer version of the clone() method that hands back an allocated object wrapped in a smart pointer. More...
 
virtual void buildMesh () override
 Must be overridden by child classes. More...
 
std::vector< Real > arhopj (const Real &gamma, const std::vector< Real > &q, const int &index)
 
std::vector< Real > computexy (const std::vector< Real > values, const int &i, const int &index, const std::vector< Real > &ks, const std::vector< Real > &q)
 
virtual MooseMeshclone () const
 Clone method. More...
 
virtual void init ()
 Initialize the Mesh object. More...
 
virtual unsigned int dimension () const
 Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh mesh object. More...
 
std::vector< BoundaryIDgetBoundaryIDs (const Elem *const elem, const unsigned short int side) const
 Returns a vector of boundary IDs for the requested element on the requested side. More...
 
const std::set< BoundaryID > & getBoundaryIDs () const
 Returns a const reference to a set of all user-specified boundary IDs. More...
 
std::vector< BoundaryIDgetBoundaryIDs (const std::vector< BoundaryName > &boundary_name, bool generate_unknown=false) const
 Get the associated BoundaryID for the boundary names that are passed in. More...
 
void buildNodeList ()
 Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in those lists. More...
 
void buildBndElemList ()
 
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToElemMap ()
 If not already created, creates a map from every node to all elements to which they are connected. More...
 
const std::map< dof_id_type, std::vector< dof_id_type > > & nodeToActiveSemilocalElemMap ()
 If not already created, creates a map from every node to all active semilocal elements to which they are connected. More...
 
virtual bnd_node_iterator bndNodesBegin ()
 Return iterators to the beginning/end of the boundary nodes list. More...
 
virtual bnd_node_iterator bndNodesEnd ()
 
virtual bnd_elem_iterator bndElemsBegin ()
 Return iterators to the beginning/end of the boundary elements list. More...
 
virtual bnd_elem_iterator bndElemsEnd ()
 
void buildNodeListFromSideList ()
 Calls BoundaryInfo::build_node_list_from_side_list(). More...
 
void buildSideList (std::vector< dof_id_type > &el, std::vector< unsigned short int > &sl, std::vector< boundary_id_type > &il)
 Calls BoundaryInfo::build_side_list(). More...
 
std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type > > buildSideList ()
 As above, but uses the non-deprecated std::tuple interface. More...
 
unsigned int sideWithBoundaryID (const Elem *const elem, const BoundaryID boundary_id) const
 Calls BoundaryInfo::side_with_boundary_id(). More...
 
MeshBase::const_node_iterator localNodesBegin ()
 Calls local_nodes_begin/end() on the underlying libMesh mesh object. More...
 
MeshBase::const_node_iterator localNodesEnd ()
 
MeshBase::const_element_iterator activeLocalElementsBegin ()
 Calls active_local_nodes_begin/end() on the underlying libMesh mesh object. More...
 
const MeshBase::const_element_iterator activeLocalElementsEnd ()
 
virtual dof_id_type nNodes () const
 Calls n_nodes/elem() on the underlying libMesh mesh object. More...
 
virtual dof_id_type nElem () const
 
virtual dof_id_type maxNodeId () const
 Calls max_node/elem_id() on the underlying libMesh mesh object. More...
 
virtual dof_id_type maxElemId () const
 
virtual const Node & node (const dof_id_type i) const
 Various accessors (pointers/references) for Node "i". More...
 
virtual Node & node (const dof_id_type i)
 
virtual const Node & nodeRef (const dof_id_type i) const
 
virtual Node & nodeRef (const dof_id_type i)
 
virtual const Node * nodePtr (const dof_id_type i) const
 
virtual Node * nodePtr (const dof_id_type i)
 
virtual const Node * queryNodePtr (const dof_id_type i) const
 
virtual Node * queryNodePtr (const dof_id_type i)
 
virtual Elem * elem (const dof_id_type i)
 Various accessors (pointers/references) for Elem "i". More...
 
virtual const Elem * elem (const dof_id_type i) const
 
virtual Elem * elemPtr (const dof_id_type i)
 
virtual const Elem * elemPtr (const dof_id_type i) const
 
virtual Elem * queryElemPtr (const dof_id_type i)
 
virtual const Elem * queryElemPtr (const dof_id_type i) const
 
bool prepared () const
 Setter/getter for the _is_prepared flag. More...
 
void prepared (bool state)
 
void needsPrepareForUse ()
 If this method is called, we will call libMesh's prepare_for_use method when we call Moose's prepare method. More...
 
void meshChanged ()
 Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches. More...
 
virtual void onMeshChanged ()
 Declares a callback function that is executed at the conclusion of meshChanged(). More...
 
void cacheChangedLists ()
 Cache information about what elements were refined and coarsened in the previous step. More...
 
ConstElemPointerRangerefinedElementRange () const
 Return a range that is suitable for threaded execution over elements that were just refined. More...
 
ConstElemPointerRangecoarsenedElementRange () const
 Return a range that is suitable for threaded execution over elements that were just coarsened. More...
 
const std::vector< const Elem * > & coarsenedElementChildren (const Elem *elem) const
 Get the newly removed children element ids for an element that was just coarsened. More...
 
void updateActiveSemiLocalNodeRange (std::set< dof_id_type > &ghosted_elems)
 Clears the "semi-local" node list and rebuilds it. More...
 
bool isSemiLocal (Node *node)
 Returns true if the node is semi-local. More...
 
ConstElemRange * getActiveLocalElementRange ()
 Return pointers to range objects for various types of ranges (local nodes, boundary elems, etc.). More...
 
NodeRange * getActiveNodeRange ()
 
SemiLocalNodeRangegetActiveSemiLocalNodeRange () const
 
ConstNodeRange * getLocalNodeRange ()
 
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange ()
 
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange ()
 
const std::set< SubdomainID > & meshSubdomains () const
 Returns a read-only reference to the set of subdomains currently present in the Mesh. More...
 
const std::set< BoundaryID > & meshBoundaryIds () const
 Returns a read-only reference to the set of boundary IDs currently present in the Mesh. More...
 
const std::set< BoundaryID > & meshSidesetIds () const
 Returns a read-only reference to the set of sidesets currently present in the Mesh. More...
 
const std::set< BoundaryID > & meshNodesetIds () const
 Returns a read-only reference to the set of nodesets currently present in the Mesh. More...
 
void setBoundaryToNormalMap (std::unique_ptr< std::map< BoundaryID, RealVectorValue >> boundary_map)
 Sets the mapping between BoundaryID and normal vector Is called by AddAllSideSetsByNormals. More...
 
void setBoundaryToNormalMap (std::map< BoundaryID, RealVectorValue > *boundary_map)
 
void setMeshBoundaryIDs (std::set< BoundaryID > boundary_IDs)
 Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals. More...
 
const RealVectorValue & getNormalByBoundaryID (BoundaryID id) const
 Returns the normal vector associated with a given BoundaryID. More...
 
void prepare (bool force=false)
 Calls prepare_for_use() if force=true on the underlying Mesh object, then communicates various boundary information on parallel meshes. More...
 
void update ()
 Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList(). More...
 
unsigned int uniformRefineLevel () const
 Returns the level of uniform refinement requested (zero if AMR is disabled). More...
 
void setUniformRefineLevel (unsigned int)
 Set uniform refinement level. More...
 
void addGhostedBoundary (BoundaryID boundary_id)
 This will add the boundary ids to be ghosted to this processor. More...
 
void setGhostedBoundaryInflation (const std::vector< Real > &inflation)
 This sets the inflation amount for the bounding box for each partition for use in ghosting boundaries. More...
 
const std::set< unsigned int > & getGhostedBoundaries () const
 Return a writable reference to the set of ghosted boundary IDs. More...
 
const std::vector< Real > & getGhostedBoundaryInflation () const
 Return a writable reference to the _ghosted_boundaries_inflation vector. More...
 
void ghostGhostedBoundaries ()
 Actually do the ghosting of boundaries that need to be ghosted to this processor. More...
 
unsigned int getPatchSize () const
 Getter for the patch_size parameter. More...
 
unsigned int getGhostingPatchSize () const
 Getter for the ghosting_patch_size parameter. More...
 
unsigned int getMaxLeafSize () const
 Getter for the maximum leaf size parameter. More...
 
void setPatchUpdateStrategy (Moose::PatchUpdateType patch_update_strategy)
 Set the patch size update strategy. More...
 
const Moose::PatchUpdateTypegetPatchUpdateStrategy () const
 Get the current patch update strategy. More...
 
BoundingBox getInflatedProcessorBoundingBox (Real inflation_multiplier=0.01) const
 Get a (slightly inflated) processor bounding box. More...
 
 operator libMesh::MeshBase & ()
 Implicit conversion operator from MooseMesh -> libMesh::MeshBase. More...
 
 operator const libMesh::MeshBase & () const
 
MeshBase & getMesh ()
 Accessor for the underlying libMesh Mesh object. More...
 
const MeshBase & getMesh () const
 
virtual ExodusII_IO * exReader () const
 Not implemented – always returns NULL. More...
 
void printInfo (std::ostream &os=libMesh::out) const
 Calls print_info() on the underlying Mesh. More...
 
const std::set< SubdomainID > & getNodeBlockIds (const Node &node) const
 Return list of blocks to which the given node belongs. More...
 
const std::vector< dof_id_type > & getNodeList (boundary_id_type nodeset_id) const
 Return a writable reference to a vector of node IDs that belong to nodeset_id. More...
 
const Node * addUniqueNode (const Point &p, Real tol=1e-6)
 Add a new node to the mesh. More...
 
Node * addQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
 Adds a fictitious "QuadratureNode". More...
 
Node * getQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp)
 Get a specified quadrature node. More...
 
void clearQuadratureNodes ()
 Clear out any existing quadrature nodes. More...
 
BoundaryID getBoundaryID (const BoundaryName &boundary_name) const
 Get the associated BoundaryID for the boundary name. More...
 
SubdomainID getSubdomainID (const SubdomainName &subdomain_name) const
 Get the associated subdomain ID for the subdomain name. More...
 
std::vector< SubdomainIDgetSubdomainIDs (const std::vector< SubdomainName > &subdomain_name) const
 Get the associated subdomainIDs for the subdomain names that are passed in. More...
 
void setSubdomainName (SubdomainID subdomain_id, SubdomainName name)
 This method returns a writable reference to a subdomain name based on the id parameter. More...
 
const std::string & getSubdomainName (SubdomainID subdomain_id)
 Return the name of a block given an id. More...
 
void setBoundaryName (BoundaryID boundary_id, BoundaryName name)
 This method returns a writable reference to a boundary name based on the id parameter. More...
 
const std::string & getBoundaryName (BoundaryID boundary_id)
 Return the name of the boundary given the id. More...
 
void buildPeriodicNodeMap (std::multimap< dof_id_type, dof_id_type > &periodic_node_map, unsigned int var_number, PeriodicBoundaries *pbs) const
 This routine builds a multimap of boundary ids to matching boundary ids across all periodic boundaries in the system. More...
 
void buildPeriodicNodeSets (std::map< BoundaryID, std::set< dof_id_type >> &periodic_node_sets, unsigned int var_number, PeriodicBoundaries *pbs) const
 This routine builds a datastructure of node ids organized by periodic boundary ids. More...
 
Real dimensionWidth (unsigned int component) const
 Returns the width of the requested dimension. More...
 
bool detectOrthogonalDimRanges (Real tol=1e-6)
 This routine determines whether the Mesh is a regular orthogonal mesh (i.e. More...
 
void addPeriodicVariable (unsigned int var_num, BoundaryID primary, BoundaryID secondary)
 For "regular orthogonal" meshes, determine if variable var_num is periodic with respect to the primary and secondary BoundaryIDs, record this fact in the _periodic_dim data structure. More...
 
bool isTranslatedPeriodic (unsigned int nonlinear_var_num, unsigned int component) const
 Returns whether this generated mesh is periodic in the given dimension for the given variable. More...
 
RealVectorValue minPeriodicVector (unsigned int nonlinear_var_num, Point p, Point q) const
 This function returns the minimum vector between two points on the mesh taking into account periodicity for the given variable number. More...
 
Real minPeriodicDistance (unsigned int nonlinear_var_num, Point p, Point q) const
 This function returns the distance between two points on the mesh taking into account periodicity for the given variable number. More...
 
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping (unsigned int component)
 This function attempts to return the paired boundary ids for the given component. More...
 
void buildRefinementAndCoarseningMaps (Assembly *assembly)
 Create the refinement and coarsening maps necessary for projection of stateful material properties when using adaptivity. More...
 
const std::vector< std::vector< QpMap > > & getRefinementMap (const Elem &elem, int parent_side, int child, int child_side)
 Get the refinement map for a given element type. More...
 
const std::vector< std::pair< unsigned int, QpMap > > & getCoarseningMap (const Elem &elem, int input_side)
 Get the coarsening map for a given element type. More...
 
void changeBoundaryId (const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 Change all the boundary IDs for a given side from old_id to new_id. More...
 
const std::set< BoundaryID > & getSubdomainBoundaryIds (SubdomainID subdomain_id) const
 Get the list of boundary ids associated with the given subdomain id. More...
 
bool isBoundaryNode (dof_id_type node_id) const
 Returns true if the requested node is in the list of boundary nodes, false otherwise. More...
 
bool isBoundaryNode (dof_id_type node_id, BoundaryID bnd_id) const
 Returns true if the requested node is in the list of boundary nodes for the specified boundary, false otherwise. More...
 
bool isBoundaryElem (dof_id_type elem_id) const
 Returns true if the requested element is in the list of boundary elements, false otherwise. More...
 
bool isBoundaryElem (dof_id_type elem_id, BoundaryID bnd_id) const
 Returns true if the requested element is in the list of boundary elements for the specified boundary, false otherwise. More...
 
void errorIfDistributedMesh (std::string name) const
 Generate a unified error message if the underlying libMesh mesh is a DistributedMesh. More...
 
bool isDistributedMesh () const
 Returns the final Mesh distribution type. More...
 
bool isParallelTypeForced () const
 Tell the user if the distribution was overriden for any reason. More...
 
const MooseEnumpartitionerName () const
 
bool isPartitionerForced () const
 Tell the user if the partitioner was overriden for any reason. More...
 
void allowRecovery (bool allow)
 Set whether or not this mesh is allowed to read a recovery file. More...
 
void addMortarInterface (const std::string &name, BoundaryName master, BoundaryName slave, SubdomainName domain_id)
 
std::vector< std::unique_ptr< MooseMesh::MortarInterface > > & getMortarInterfaces ()
 
MooseMesh::MortarInterfacegetMortarInterfaceByName (const std::string name)
 
MooseMesh::MortarInterfacegetMortarInterface (BoundaryID master, BoundaryID slave)
 
void setCustomPartitioner (Partitioner *partitioner)
 Setter for custom partitioner. More...
 
bool isRegularOrthogonal ()
 Getter to query if the mesh was detected to be regular and orthogonal. More...
 
bool hasSecondOrderElements ()
 check if the mesh has SECOND order elements More...
 
virtual std::unique_ptr< PointLocatorBase > getPointLocator () const
 Proxy function to get a (sub)PointLocator from either the underlying libMesh mesh (default), or to allow derived meshes to return a custom point locator. More...
 
virtual std::string getFileName () const
 Returns the name of the mesh file read to produce this mesh if any or an empty string otherwise. More...
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
virtual Real getMinInDimension (unsigned int component) const
 Returns the min or max of the requested dimension respectively. More...
 
virtual Real getMaxInDimension (unsigned int component) const
 
bool isCustomPartitionerRequested () const
 Setter and getter for _custom_partitioner_requested. More...
 
void setIsCustomPartitionerRequested (bool cpr)
 

Public Attributes

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

Protected Types

enum  { X = 0, Y, Z }
 Convenience enums. More...
 
enum  { MIN = 0, MAX }
 
typedef std::vector< BndNode * >::iterator bnd_node_iterator_imp
 
typedef std::vector< BndNode * >::const_iterator const_bnd_node_iterator_imp
 
typedef std::vector< BndElement * >::iterator bnd_elem_iterator_imp
 
typedef std::vector< BndElement * >::const_iterator const_bnd_elem_iterator_imp
 

Protected Member Functions

void cacheInfo ()
 
void freeBndNodes ()
 
void freeBndElems ()
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRecoverableData (std::string data_name)
 Declare a piece of data as "recoverable". More...
 
template<typename T >
T & declareRecoverableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithObjectName (std::string data_name, std::string object_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithObjectNameWithContext (std::string data_name, std::string object_name, void *context)
 Declare a piece of data as "restartable". More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level)
 Call to register a named section for timing. More...
 

Protected Attributes

const Real & _gamma
 Gamma. More...
 
const Real & _kmax
 k is a streamline parameter, i.e. More...
 
const Real & _kmin
 kmin corresponds to the outer wall More...
 
const int & _num_q_pts
 How many points to discretize the range q = (0.5, k) into. More...
 
const int & _n_extra_q_pts
 how many "extra" points should be inserted in the nearest element from the horizontal in additi /// on to the equispaced q points. More...
 
const int & _num_k_pts
 how many points in the range k=(kmin, kmax). More...
 
const boundary_id_type _inflow_bid
 The boundary ids to use for the ringleb mesh. More...
 
const boundary_id_type _outflow_bid
 
const boundary_id_type _inner_wall_bid
 
const boundary_id_type _outer_wall_bid
 
const bool & _triangles
 This parameter, if true, allows to split the quadrilateral elements into triangular elements. More...
 
std::vector< std::unique_ptr< GhostingFunctor > > _ghosting_functors
 Deprecated (DO NOT USE) More...
 
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
 The list of active geometric relationship managers (bound to the underlying MeshBase object). More...
 
MooseEnum _mesh_parallel_type
 Can be set to DISTRIBUTED, REPLICATED, or DEFAULT. More...
 
bool _use_distributed_mesh
 False by default. More...
 
bool _distribution_overridden
 
bool _parallel_type_overridden
 
std::unique_ptr< libMesh::MeshBase > _mesh
 Pointer to underlying libMesh mesh object. More...
 
MooseEnum _partitioner_name
 The partitioner used on this mesh. More...
 
bool _partitioner_overridden
 
std::unique_ptr< Partitioner > _custom_partitioner
 The custom partitioner. More...
 
bool _custom_partitioner_requested
 
unsigned int _uniform_refine_level
 The level of uniform refinement requested (set to zero if AMR is disabled) More...
 
bool _is_changed
 true if mesh is changed (i.e. after adaptivity step) More...
 
bool _is_nemesis
 True if a Nemesis Mesh was read in. More...
 
bool _is_prepared
 True if prepare has been called on the mesh. More...
 
bool _needs_prepare_for_use
 True if prepare_for_use should be called when Mesh is prepared. More...
 
std::unique_ptr< ConstElemPointerRange_refined_elements
 The elements that were just refined. More...
 
std::unique_ptr< ConstElemPointerRange_coarsened_elements
 The elements that were just coarsened. More...
 
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
 Map of Parent elements to child elements for elements that were just coarsened. More...
 
std::set< Node * > _semilocal_node_list
 Used for generating the semilocal node range. More...
 
std::unique_ptr< ConstElemRange > _active_local_elem_range
 A range for use with threading. More...
 
std::unique_ptr< SemiLocalNodeRange_active_semilocal_node_range
 
std::unique_ptr< NodeRange > _active_node_range
 
std::unique_ptr< ConstNodeRange > _local_node_range
 
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
 
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
 
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
 A map of all of the current nodes to the elements that they are connected to. More...
 
bool _node_to_elem_map_built
 
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
 A map of all of the current nodes to the active elements that they are connected to. More...
 
bool _node_to_active_semilocal_elem_map_built
 
std::set< SubdomainID_mesh_subdomains
 A set of subdomain IDs currently present in the mesh. More...
 
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
 The boundary to normal map - valid only when AddAllSideSetsByNormals is active. More...
 
std::vector< BndNode * > _bnd_nodes
 array of boundary nodes More...
 
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
 Map of sets of node IDs in each boundary. More...
 
std::vector< BndElement * > _bnd_elems
 array of boundary elems More...
 
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_elem_ids
 Map of set of elem IDs connected to each boundary. More...
 
std::map< dof_id_type, Node * > _quadrature_nodes
 
std::map< dof_id_type, std::map< unsigned int, std::map< dof_id_type, Node * > > > _elem_to_side_to_qp_to_quadrature_nodes
 
std::vector< BndNode_extra_bnd_nodes
 
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
 list of nodes that belongs to a specified block (domain) More...
 
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
 list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids] More...
 
std::set< unsigned int > _ghosted_boundaries
 
std::vector< Real > _ghosted_boundaries_inflation
 
unsigned int _patch_size
 The number of nodes to consider in the NearestNode neighborhood. More...
 
unsigned int _ghosting_patch_size
 The number of nearest neighbors to consider for ghosting purposes when iteration patch update strategy is used. More...
 
unsigned int _max_leaf_size
 
Moose::PatchUpdateType _patch_update_strategy
 The patch update strategy. More...
 
std::vector< Node * > _node_map
 Vector of all the Nodes in the mesh for determining when to add a new point. More...
 
bool _regular_orthogonal_mesh
 Boolean indicating whether this mesh was detected to be regular and orthogonal. More...
 
std::vector< std::vector< Real > > _bounds
 The bounds in each dimension of the mesh for regular orthogonal meshes. More...
 
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
 A vector holding the paired boundaries for a regular orthogonal mesh. More...
 
std::map< std::string, MortarInterface * > _mortar_interface_by_name
 Mortar interfaces mapped through their names. More...
 
std::vector< std::unique_ptr< MortarInterface > > _mortar_interface
 
std::map< std::pair< BoundaryID, BoundaryID >, MortarInterface * > _mortar_interface_by_ids
 Mortar interfaces mapped though master, slave IDs pairs. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
const InputParameters_pg_params
 Params. More...
 
PerfGraph_perf_graph
 The performance graph to add to. More...
 
std::string _prefix
 A prefix to use for all sections. More...
 
std::set< BoundaryID_mesh_boundary_ids
 A set of boundary IDs currently present in the mesh. More...
 
std::set< BoundaryID_mesh_sideset_ids
 
std::set< BoundaryID_mesh_nodeset_ids
 

Detailed Description

Mesh generated from parameters.

Definition at line 23 of file RinglebMesh.h.

Member Typedef Documentation

◆ bnd_elem_iterator_imp

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

Definition at line 955 of file MooseMesh.h.

◆ bnd_node_iterator_imp

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

Definition at line 948 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 956 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 949 of file MooseMesh.h.

◆ PeriodicNodeInfo

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

Helper type for building periodic node maps.

Definition at line 830 of file MooseMesh.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited

Convenience enums.

Enumerator

Definition at line 862 of file MooseMesh.h.

863  {
864  X = 0,
865  Y,
866  Z
867  };

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
MIN 
MAX 

Definition at line 868 of file MooseMesh.h.

869  {
870  MIN = 0,
871  MAX
872  };

Constructor & Destructor Documentation

◆ RinglebMesh() [1/2]

RinglebMesh::RinglebMesh ( const InputParameters parameters)

Definition at line 45 of file RinglebMesh.C.

47  _gamma(getParam<Real>("gamma")),
48  _kmax(getParam<Real>("kmax")),
49  _kmin(getParam<Real>("kmin")),
50  _num_q_pts(getParam<int>("num_q_pts")),
51  _n_extra_q_pts(getParam<int>("n_extra_q_pts")),
52  _num_k_pts(getParam<int>("num_k_pts")),
53  _inflow_bid(getParam<boundary_id_type>("inflow_bid")),
54  _outflow_bid(getParam<boundary_id_type>("outflow_bid")),
55  _inner_wall_bid(getParam<boundary_id_type>("inner_wall_bid")),
56  _outer_wall_bid(getParam<boundary_id_type>("outer_wall_bid")),
57  _triangles(getParam<bool>("triangles"))
58 {
59 
60  // catch likely user errors
61  if (_kmax <= _kmin)
62  mooseError("RinglebMesh: kmax must be greater than kmin");
63 }
const int & _num_q_pts
How many points to discretize the range q = (0.5, k) into.
Definition: RinglebMesh.h:61
const boundary_id_type _outer_wall_bid
Definition: RinglebMesh.h:70
const Real & _kmax
k is a streamline parameter, i.e.
Definition: RinglebMesh.h:55
const bool & _triangles
This parameter, if true, allows to split the quadrilateral elements into triangular elements...
Definition: RinglebMesh.h:73
MooseMesh(const InputParameters &parameters)
Typical "Moose-style" constructor and copy constructor.
Definition: MooseMesh.C:151
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const boundary_id_type _outflow_bid
Definition: RinglebMesh.h:70
const Real & _kmin
kmin corresponds to the outer wall
Definition: RinglebMesh.h:58
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const int & _n_extra_q_pts
how many "extra" points should be inserted in the nearest element from the horizontal in additi /// o...
Definition: RinglebMesh.h:64
const boundary_id_type _inner_wall_bid
Definition: RinglebMesh.h:70
const Real & _gamma
Gamma.
Definition: RinglebMesh.h:49
const int & _num_k_pts
how many points in the range k=(kmin, kmax).
Definition: RinglebMesh.h:67
const boundary_id_type _inflow_bid
The boundary ids to use for the ringleb mesh.
Definition: RinglebMesh.h:70

◆ RinglebMesh() [2/2]

RinglebMesh::RinglebMesh ( const RinglebMesh )
default

Member Function Documentation

◆ activeLocalElementsBegin()

MeshBase::const_element_iterator MooseMesh::activeLocalElementsBegin ( )
inherited

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

Definition at line 2169 of file MooseMesh.C.

Referenced by FEProblemBase::checkDisplacementOrders(), MooseMesh::hasSecondOrderElements(), and TopResidualDebugOutput::printTopResiduals().

2170 {
2171  return getMesh().active_local_elements_begin();
2172 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ activeLocalElementsEnd()

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

Definition at line 2175 of file MooseMesh.C.

Referenced by FEProblemBase::checkDisplacementOrders(), MooseMesh::hasSecondOrderElements(), and TopResidualDebugOutput::printTopResiduals().

2176 {
2177  return getMesh().active_local_elements_end();
2178 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ addGhostedBoundary()

void MooseMesh::addGhostedBoundary ( BoundaryID  boundary_id)
inherited

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

Definition at line 2318 of file MooseMesh.C.

Referenced by FEProblemBase::addGhostedBoundary(), and SetupMeshAction::setupMesh().

2319 {
2320  _ghosted_boundaries.insert(boundary_id);
2321 }
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:971

◆ addMortarInterface()

void MooseMesh::addMortarInterface ( const std::string &  name,
BoundaryName  master,
BoundaryName  slave,
SubdomainName  domain_id 
)
inherited

Definition at line 2703 of file MooseMesh.C.

2707 {
2708  TIME_SECTION(_add_mortar_interface_timer);
2709 
2710  SubdomainID domain_id = getSubdomainID(domain_name);
2711  boundary_id_type master_id = getBoundaryID(master);
2712  boundary_id_type slave_id = getBoundaryID(slave);
2713 
2714  std::unique_ptr<MortarInterface> iface = libmesh_make_unique<MortarInterface>();
2715 
2716  iface->_id = domain_id;
2717  iface->_master = master;
2718  iface->_slave = slave;
2719  iface->_name = name;
2720 
2721  for (auto & elem : as_range(_mesh->level_elements_begin(0), _mesh->level_elements_end(0)))
2722  {
2723  if (elem->subdomain_id() == domain_id)
2724  iface->_elems.push_back(elem);
2725  }
2726 
2727  setSubdomainName(iface->_id, name);
2728 
2729  _mortar_interface.push_back(std::move(iface));
2731  _mortar_interface_by_ids[std::pair<BoundaryID, BoundaryID>(master_id, slave_id)] =
2732  _mortar_interface.back().get();
2733 }
std::map< std::pair< BoundaryID, BoundaryID >, MortarInterface * > _mortar_interface_by_ids
Mortar interfaces mapped though master, slave IDs pairs.
Definition: MooseMesh.h:1002
PerfID _add_mortar_interface_timer
Definition: MooseMesh.h:1150
subdomain_id_type SubdomainID
Definition: MooseTypes.h:110
std::vector< std::unique_ptr< MortarInterface > > _mortar_interface
Definition: MooseMesh.h:1000
void setSubdomainName(SubdomainID subdomain_id, SubdomainName name)
This method returns a writable reference to a subdomain name based on the id parameter.
Definition: MooseMesh.C:1154
std::map< std::string, MortarInterface * > _mortar_interface_by_name
Mortar interfaces mapped through their names.
Definition: MooseMesh.h:999
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:851
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:1043
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1111

◆ addPeriodicVariable()

void MooseMesh::addPeriodicVariable ( unsigned int  var_num,
BoundaryID  primary,
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 1522 of file MooseMesh.C.

Referenced by AddPeriodicBCAction::setPeriodicVars().

1523 {
1525  return;
1526 
1527  _periodic_dim[var_num].resize(dimension());
1528 
1529  _half_range = Point(dimensionWidth(0) / 2.0, dimensionWidth(1) / 2.0, dimensionWidth(2) / 2.0);
1530 
1531  for (unsigned int component = 0; component < dimension(); ++component)
1532  {
1533  const std::pair<BoundaryID, BoundaryID> * boundary_ids = getPairedBoundaryMapping(component);
1534 
1535  if (boundary_ids != nullptr &&
1536  ((boundary_ids->first == primary && boundary_ids->second == secondary) ||
1537  (boundary_ids->first == secondary && boundary_ids->second == primary)))
1538  _periodic_dim[var_num][component] = true;
1539  }
1540 }
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:1018
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2099
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping(unsigned int component)
This function attempts to return the paired boundary ids for the given component. ...
Definition: MooseMesh.C:1585
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition: MooseMesh.C:1500
std::map< unsigned int, std::vector< bool > > _periodic_dim
A map of vectors indicating which dimensions are periodic in a regular orthogonal mesh for the specif...
Definition: MooseMesh.h:1013
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:990

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

Referenced by GeometricSearchData::generateMortarNodes(), and GeometricSearchData::generateQuadratureNodes().

966 {
967  Node * qnode;
968 
969  if (_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) ==
971  {
972  // Create a new node id starting from the max node id and counting down. This will be the least
973  // likely to collide with an existing node id.
974  // Note that we are using numeric_limits<unsigned>::max even
975  // though max_id is stored as a dof_id_type. I tried this with
976  // numeric_limits<dof_id_type>::max and it broke several tests in
977  // MOOSE. So, this is some kind of a magic number that we will
978  // just continue to use...
979  dof_id_type max_id = std::numeric_limits<unsigned int>::max() - 100;
980  dof_id_type new_id = max_id - _quadrature_nodes.size();
981 
982  if (new_id <= getMesh().max_node_id())
983  mooseError("Quadrature node id collides with existing node id!");
984 
985  qnode = new Node(point, new_id);
986 
987  // Keep track of this new node in two different ways for easy lookup
988  _quadrature_nodes[new_id] = qnode;
989  _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp] = qnode;
990 
991  if (elem->active())
992  {
993  _node_to_elem_map[new_id].push_back(elem->id());
994  _node_to_active_semilocal_elem_map[new_id].push_back(elem->id());
995  }
996  }
997  else
998  qnode = _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
999 
1000  BndNode * bnode = new BndNode(qnode, bid);
1001  _bnd_nodes.push_back(bnode);
1002  _bnd_node_ids[bid].insert(qnode->id());
1003 
1004  _extra_bnd_nodes.push_back(*bnode);
1005 
1006  // Do this so the range will be regenerated next time it is accessed
1007  _bnd_node_range.reset();
1008 
1009  return qnode;
1010 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:960
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
A map of all of the current nodes to the elements that they are connected to.
Definition: MooseMesh.h:919
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:951
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:947
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:963
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:962
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:914
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
A map of all of the current nodes to the active elements that they are connected to.
Definition: MooseMesh.h:923

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

928 {
933  if (getMesh().n_nodes() != _node_map.size())
934  {
935  _node_map.clear();
936  _node_map.reserve(getMesh().n_nodes());
937  for (const auto & node : getMesh().node_ptr_range())
938  _node_map.push_back(node);
939  }
940 
941  Node * node = nullptr;
942  for (unsigned int i = 0; i < _node_map.size(); ++i)
943  {
944  if (p.relative_fuzzy_equals(*_node_map[i], tol))
945  {
946  node = _node_map[i];
947  break;
948  }
949  }
950  if (node == nullptr)
951  {
952  node = getMesh().add_node(new Node(p));
953  _node_map.push_back(node);
954  }
955 
956  mooseAssert(node != nullptr, "Node is NULL");
957  return node;
958 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::vector< Node * > _node_map
Vector of all the Nodes in the mesh for determining when to add a new point.
Definition: MooseMesh.h:987
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:464

◆ allowRecovery()

void MooseMesh::allowRecovery ( bool  allow)
inlineinherited

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

Definition at line 770 of file MooseMesh.h.

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

◆ arhopj()

std::vector< Real > RinglebMesh::arhopj ( const Real &  gamma,
const std::vector< Real > &  q,
const int &  index 
)

Definition at line 72 of file RinglebMesh.C.

Referenced by buildMesh().

73 {
74  std::vector<Real> values(4);
75  Real a = std::sqrt(1 - ((gamma - 1) / 2.) * std::pow(q[index], 2));
76  Real rho = std::pow(a, 2. / (gamma - 1));
77  Real p = (1. / gamma) * std::pow(a, 2 * gamma / (gamma - 1));
78  Real J = 1. / a + 1. / (3. * std::pow(a, 3)) + 1. / (5. * std::pow(a, 5)) -
79  0.5 * std::log((1 + a) / (1 - a));
80  values = {a, rho, p, J};
81  return values;
82 }
Real pow(Real x, int e)
Definition: MathUtils.C:211

◆ bndElemsBegin()

MooseMesh::bnd_elem_iterator MooseMesh::bndElemsBegin ( )
virtualinherited

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

Definition at line 912 of file MooseMesh.C.

Referenced by MooseMesh::getBoundaryElementRange(), and MeshSideSet::modify().

913 {
914  Predicates::NotNull<bnd_elem_iterator_imp> p;
915  return bnd_elem_iterator(_bnd_elems.begin(), _bnd_elems.end(), p);
916 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:954

◆ bndElemsEnd()

MooseMesh::bnd_elem_iterator MooseMesh::bndElemsEnd ( )
virtualinherited

Definition at line 920 of file MooseMesh.C.

Referenced by MooseMesh::getBoundaryElementRange(), and MeshSideSet::modify().

921 {
922  Predicates::NotNull<bnd_elem_iterator_imp> p;
923  return bnd_elem_iterator(_bnd_elems.end(), _bnd_elems.end(), p);
924 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:954

◆ bndNodesBegin()

MooseMesh::bnd_node_iterator MooseMesh::bndNodesBegin ( )
virtualinherited

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

Definition at line 896 of file MooseMesh.C.

Referenced by MooseMesh::getBoundaryNodeRange().

897 {
898  Predicates::NotNull<bnd_node_iterator_imp> p;
899  return bnd_node_iterator(_bnd_nodes.begin(), _bnd_nodes.end(), p);
900 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:947

◆ bndNodesEnd()

MooseMesh::bnd_node_iterator MooseMesh::bndNodesEnd ( )
virtualinherited

Definition at line 904 of file MooseMesh.C.

Referenced by MooseMesh::getBoundaryNodeRange().

905 {
906  Predicates::NotNull<bnd_node_iterator_imp> p;
907  return bnd_node_iterator(_bnd_nodes.end(), _bnd_nodes.end(), p);
908 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:947

◆ buildBndElemList()

void MooseMesh::buildBndElemList ( )
inherited

Definition at line 709 of file MooseMesh.C.

Referenced by MeshSideSet::modify(), and MooseMesh::update().

710 {
711  TIME_SECTION(_build_bnd_elem_list_timer);
712 
713  freeBndElems();
714 
715  auto bc_tuples = getMesh().get_boundary_info().build_active_side_list();
716 
717  int n = bc_tuples.size();
718  _bnd_elems.clear();
719  _bnd_elems.reserve(n);
720  for (const auto & t : bc_tuples)
721  {
722  auto elem_id = std::get<0>(t);
723  auto side_id = std::get<1>(t);
724  auto bc_id = std::get<2>(t);
725 
726  _bnd_elems.push_back(new BndElement(getMesh().elem_ptr(elem_id), side_id, bc_id));
727  _bnd_elem_ids[bc_id].insert(elem_id);
728  }
729 }
void freeBndElems()
Definition: MooseMesh.C:374
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:958
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:954
PetscInt n
PerfID _build_bnd_elem_list_timer
Definition: MooseMesh.h:1129

◆ buildMesh()

void RinglebMesh::buildMesh ( )
overridevirtual

Must be overridden by child classes.

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

Data structure that holds pointers to the Nodes of each streamline.

Node id counter.

Vector containing the regularly spaced k values

Vector containing the regularly spaced (and the extra q points) q values

Add the extra q points

Create the nodes for the upper part

Create the nodes for the lower part

Add elements for the whole mesh

This is done in order to avoid having two nodes at the exact same location (on the straight /// line y=0)

Find neighbors, etc.

Create the triangular elements if required by the user

Create sideset names.

Implements MooseMesh.

Definition at line 108 of file RinglebMesh.C.

109 {
110  MeshBase & mesh = getMesh();
111 
113  std::vector<std::vector<Node *>> stream_nodes(_num_k_pts);
114 
116  int current_node_id = 0;
117 
119  std::vector<Real> ks(_num_k_pts);
120  Real diff = (_kmax - _kmin) / (_num_k_pts - 1);
121  for (int i = 0; i < _num_k_pts; i++)
122  ks[i] = _kmin + i * diff;
123 
124  for (int i = 0; i < _num_k_pts; i++)
125  {
126  stream_nodes[i].resize(2 * (_num_q_pts + _n_extra_q_pts));
127 
129  std::vector<Real> q(_num_q_pts);
130  Real diffq = (ks[i] - 0.5) / (_num_q_pts - 1);
131  for (int j = 0; j < _num_q_pts; j++)
132  q[j] = 0.5 + j * diffq;
133 
135  for (int j = _num_q_pts; j < _num_q_pts + _n_extra_q_pts; j++)
136  {
137  std::vector<Real>::iterator it = q.end();
138  q.insert(--it, 0.3 * q[j - 2] + 0.7 * q[j - 1]);
139  }
140 
141  std::vector<Real> vals(4);
142  std::vector<Real> xy(2);
144  for (int j = 0; j < _num_q_pts + _n_extra_q_pts; j++)
145  {
146  // Compute the different parameters
147  vals = arhopj(_gamma, q, j);
148 
149  // Compute x and y
150  xy = computexy(vals, i, j, ks, q);
151 
152  // Create a node with (x,y) coordinates as it's on the upper part of the mesh
153  if (j != _num_q_pts + _n_extra_q_pts - 1)
154  stream_nodes[i][j] = mesh.add_point(Point(xy[0], xy[1]), current_node_id++);
155  }
156 
158  for (int j = _num_q_pts + _n_extra_q_pts; j < 2 * (_num_q_pts + _n_extra_q_pts); j++)
159  {
160  int index = 2 * (_num_q_pts + _n_extra_q_pts) - 1 - j;
161  // Compute the different parameters
162  vals = arhopj(_gamma, q, index);
163 
164  // Compute x and y
165  xy = computexy(vals, i, index, ks, q);
166 
167  // Create a node with (x,-y) coordinates as it's on the lower part of the mesh
168  stream_nodes[i][j] = mesh.add_point(Point(xy[0], -xy[1]), current_node_id++);
169  }
170  }
171 
173  for (int i = 0; i < _num_k_pts - 1; i++)
174  {
175  for (int j = 0; j < 2 * (_num_q_pts + _n_extra_q_pts) - 1; j++)
176  {
178  if (j != _num_q_pts + _n_extra_q_pts - 1 and j != _num_q_pts + _n_extra_q_pts - 2)
179  {
180  Elem * elem = mesh.add_elem(new Quad4);
181  elem->set_node(0) = stream_nodes[i][j];
182  elem->set_node(1) = stream_nodes[i][j + 1];
183  elem->set_node(2) = stream_nodes[i + 1][j + 1];
184  elem->set_node(3) = stream_nodes[i + 1][j];
185 
186  if (i == 0)
187  mesh.boundary_info->add_side(elem->id(), /*side=*/0, _outer_wall_bid);
188  if (j == 0)
189  mesh.boundary_info->add_side(elem->id(), /*side=*/3, _inflow_bid);
190  if (j == 2 * (_num_q_pts + _n_extra_q_pts) - 2)
191  mesh.boundary_info->add_side(elem->id(), /*side=*/1, _outflow_bid);
192  if (i == _num_k_pts - 2)
193  mesh.boundary_info->add_side(elem->id(), /*side=*/2, _inner_wall_bid);
194  }
195  else if (j == _num_q_pts + _n_extra_q_pts - 2)
196  {
197  Elem * elem = mesh.add_elem(new Quad4);
198  elem->set_node(0) = stream_nodes[i][j];
199  elem->set_node(1) = stream_nodes[i][j + 2];
200  elem->set_node(2) = stream_nodes[i + 1][j + 2];
201  elem->set_node(3) = stream_nodes[i + 1][j];
202 
203  if (i == 0)
204  mesh.boundary_info->add_side(elem->id(), /*side=*/0, _outer_wall_bid);
205  if (i == _num_k_pts - 2)
206  mesh.boundary_info->add_side(elem->id(), /*side=*/2, _inner_wall_bid);
207  }
208  }
209  }
210 
212  mesh.prepare_for_use();
213 
215  if (_triangles)
216  MeshTools::Modification::all_tri(mesh);
217 
219  mesh.boundary_info->sideset_name(_inflow_bid) = "inflow";
220  mesh.boundary_info->sideset_name(_outflow_bid) = "outflow";
221  mesh.boundary_info->sideset_name(_inner_wall_bid) = "inner_wall";
222  mesh.boundary_info->sideset_name(_outer_wall_bid) = "outer_wall";
223 }
const int & _num_q_pts
How many points to discretize the range q = (0.5, k) into.
Definition: RinglebMesh.h:61
const boundary_id_type _outer_wall_bid
Definition: RinglebMesh.h:70
const Real & _kmax
k is a streamline parameter, i.e.
Definition: RinglebMesh.h:55
const bool & _triangles
This parameter, if true, allows to split the quadrilateral elements into triangular elements...
Definition: RinglebMesh.h:73
std::vector< Real > arhopj(const Real &gamma, const std::vector< Real > &q, const int &index)
Definition: RinglebMesh.C:72
const boundary_id_type _outflow_bid
Definition: RinglebMesh.h:70
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::vector< Real > computexy(const std::vector< Real > values, const int &i, const int &index, const std::vector< Real > &ks, const std::vector< Real > &q)
Definition: RinglebMesh.C:85
const Real & _kmin
kmin corresponds to the outer wall
Definition: RinglebMesh.h:58
const int & _n_extra_q_pts
how many "extra" points should be inserted in the nearest element from the horizontal in additi /// o...
Definition: RinglebMesh.h:64
const boundary_id_type _inner_wall_bid
Definition: RinglebMesh.h:70
const Real & _gamma
Gamma.
Definition: RinglebMesh.h:49
const int & _num_k_pts
how many points in the range k=(kmin, kmax).
Definition: RinglebMesh.h:67
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205
const boundary_id_type _inflow_bid
The boundary ids to use for the ringleb mesh.
Definition: RinglebMesh.h:70

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

Referenced by MooseMesh::update().

676 {
677  TIME_SECTION(_build_node_list_timer);
678 
679  freeBndNodes();
680 
681  auto bc_tuples = getMesh().get_boundary_info().build_node_list();
682 
683  int n = bc_tuples.size();
684  _bnd_nodes.clear();
685  _bnd_nodes.reserve(n);
686  for (const auto & t : bc_tuples)
687  {
688  auto node_id = std::get<0>(t);
689  auto bc_id = std::get<1>(t);
690 
691  _bnd_nodes.push_back(new BndNode(getMesh().node_ptr(node_id), bc_id));
692  _node_set_nodes[bc_id].push_back(node_id);
693  _bnd_node_ids[bc_id].insert(node_id);
694  }
695 
696  _bnd_nodes.reserve(_bnd_nodes.size() + _extra_bnd_nodes.size());
697  for (unsigned int i = 0; i < _extra_bnd_nodes.size(); i++)
698  {
699  BndNode * bnode = new BndNode(_extra_bnd_nodes[i]._node, _extra_bnd_nodes[i]._bnd_id);
700  _bnd_nodes.push_back(bnode);
701  _bnd_node_ids[std::get<1>(bc_tuples[i])].insert(_extra_bnd_nodes[i]._node->id());
702  }
703 
704  // This sort is here so that boundary conditions are always applied in the same order
705  std::sort(_bnd_nodes.begin(), _bnd_nodes.end(), BndNodeCompare());
706 }
Helper class for sorting Boundary Nodes so that we always get the same order of application for bound...
Definition: MooseMesh.C:651
PerfID _build_node_list_timer
Definition: MooseMesh.h:1128
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:951
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:969
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:947
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:963
PetscInt n
void freeBndNodes()
Definition: MooseMesh.C:356

◆ buildNodeListFromSideList()

void MooseMesh::buildNodeListFromSideList ( )
inherited

Calls BoundaryInfo::build_node_list_from_side_list().

Definition at line 2119 of file MooseMesh.C.

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

2120 {
2122  getMesh().get_boundary_info().build_node_list_from_side_list();
2123 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1120

◆ buildPeriodicNodeMap()

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

1210 {
1211  TIME_SECTION(_build_periodic_node_map_timer);
1212 
1213  // clear existing map
1214  periodic_node_map.clear();
1215 
1216  // get periodic nodes
1217  std::vector<PeriodicNodeInfo> periodic_nodes;
1218  for (const auto & t : getMesh().get_boundary_info().build_node_list())
1219  {
1220  // unfortunately libMesh does not give us a pointer, so we have to look it up ourselves
1221  auto node = _mesh->node_ptr(std::get<0>(t));
1222  mooseAssert(node != nullptr,
1223  "libMesh::BoundaryInfo::build_node_list() returned an ID for a non-existing node");
1224  auto bc_id = std::get<1>(t);
1225  periodic_nodes.emplace_back(node, bc_id);
1226  }
1227 
1228  // sort by boundary id
1229  std::sort(periodic_nodes.begin(),
1230  periodic_nodes.end(),
1231  [](const PeriodicNodeInfo & a, const PeriodicNodeInfo & b) -> bool {
1232  return a.second > b.second;
1233  });
1234 
1235  // build kd-tree
1236  using KDTreeType = nanoflann::KDTreeSingleIndexAdaptor<
1237  nanoflann::L2_Simple_Adaptor<Real, PointListAdaptor<PeriodicNodeInfo>>,
1239  LIBMESH_DIM>;
1240  const unsigned int max_leaf_size = 20; // slightly affects runtime
1241  auto point_list =
1242  PointListAdaptor<PeriodicNodeInfo>(periodic_nodes.begin(), periodic_nodes.end());
1243  auto kd_tree = libmesh_make_unique<KDTreeType>(
1244  LIBMESH_DIM, point_list, nanoflann::KDTreeSingleIndexAdaptorParams(max_leaf_size));
1245  mooseAssert(kd_tree != nullptr, "KDTree was not properly initialized.");
1246  kd_tree->buildIndex();
1247 
1248  // data structures for kd-tree search
1249  nanoflann::SearchParams search_params;
1250  std::vector<std::pair<std::size_t, Real>> ret_matches;
1251 
1252  // iterate over periodic nodes (boundary ids are in contiguous blocks)
1253  PeriodicBoundaryBase * periodic = nullptr;
1254  BoundaryID current_bc_id = BoundaryInfo::invalid_id;
1255  for (auto & pair : periodic_nodes)
1256  {
1257  // entering a new block of boundary IDs
1258  if (pair.second != current_bc_id)
1259  {
1260  current_bc_id = pair.second;
1261  periodic = pbs->boundary(current_bc_id);
1262  if (periodic && !periodic->is_my_variable(var_number))
1263  periodic = nullptr;
1264  }
1265 
1266  // variable is not periodic at this node, skip
1267  if (!periodic)
1268  continue;
1269 
1270  // clear result buffer
1271  ret_matches.clear();
1272 
1273  // id of the current node
1274  const auto id = pair.first->id();
1275 
1276  // position where we expect a periodic partner for the current node and boundary
1277  Point search_point = periodic->get_corresponding_pos(*pair.first);
1278 
1279  // search at the expected point
1280  kd_tree->radiusSearch(&(search_point)(0), libMesh::TOLERANCE, ret_matches, search_params);
1281  for (auto & match_pair : ret_matches)
1282  {
1283  const auto & match = periodic_nodes[match_pair.first];
1284  // add matched node if the boundary id is the corresponding id in the periodic pair
1285  if (match.second == periodic->pairedboundary)
1286  periodic_node_map.emplace(id, match.first->id());
1287  }
1288  }
1289 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::pair< const Node *, BoundaryID > PeriodicNodeInfo
Helper type for building periodic node maps.
Definition: MooseMesh.h:830
PerfID _build_periodic_node_map_timer
Definition: MooseMesh.h:1138
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:851
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:464
boundary_id_type BoundaryID
Definition: MooseTypes.h:108

◆ buildPeriodicNodeSets()

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

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

Definition at line 1292 of file MooseMesh.C.

1295 {
1296  TIME_SECTION(_build_periodic_node_sets_timer);
1297 
1298  periodic_node_sets.clear();
1299 
1300  // Loop over all the boundary nodes adding the periodic nodes to the appropriate set
1301  for (const auto & t : getMesh().get_boundary_info().build_node_list())
1302  {
1303  auto node_id = std::get<0>(t);
1304  auto bc_id = std::get<1>(t);
1305 
1306  // Is this current node on a known periodic boundary?
1307  if (periodic_node_sets.find(bc_id) != periodic_node_sets.end())
1308  periodic_node_sets[bc_id].insert(node_id);
1309  else // This still might be a periodic node but we just haven't seen this boundary_id yet
1310  {
1311  const PeriodicBoundaryBase * periodic = pbs->boundary(bc_id);
1312  if (periodic && periodic->is_my_variable(var_number))
1313  periodic_node_sets[bc_id].insert(node_id);
1314  }
1315  }
1316 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
PerfID _build_periodic_node_sets_timer
Definition: MooseMesh.h:1139

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

Referenced by FEProblemBase::initialSetup().

1604 {
1606 
1607  std::map<ElemType, Elem *> canonical_elems;
1608 
1609  // First, loop over all elements and find a canonical element for each type
1610  // Doing it this way guarantees that this is going to work in parallel
1611  for (const auto & elem : getMesh().element_ptr_range()) // TODO: Thread this
1612  {
1613  ElemType type = elem->type();
1614 
1615  if (canonical_elems.find(type) ==
1616  canonical_elems.end()) // If we haven't seen this type of elem before save it
1617  canonical_elems[type] = elem;
1618  else
1619  {
1620  Elem * stored = canonical_elems[type];
1621  if (elem->id() < stored->id()) // Arbitrarily keep the one with a lower id
1622  canonical_elems[type] = elem;
1623  }
1624  }
1625  // Now build the maps using these templates
1626  // Note: This MUST be done NOT threaded!
1627  for (const auto & can_it : canonical_elems)
1628  {
1629  Elem * elem = can_it.second;
1630 
1631  // Need to do this just once to get the right qrules put in place
1632  assembly->setCurrentSubdomainID(elem->subdomain_id());
1633  assembly->reinit(elem);
1634  assembly->reinit(elem, 0);
1635  QBase * qrule = assembly->qRule();
1636  QBase * qrule_face = assembly->qRuleFace();
1637 
1638  // Volume to volume projection for refinement
1639  buildRefinementMap(*elem, *qrule, *qrule_face, -1, -1, -1);
1640 
1641  // Volume to volume projection for coarsening
1642  buildCoarseningMap(*elem, *qrule, *qrule_face, -1);
1643 
1644  // Map the sides of children
1645  for (unsigned int side = 0; side < elem->n_sides(); side++)
1646  {
1647  // Side to side for sides that match parent's sides
1648  buildRefinementMap(*elem, *qrule, *qrule_face, side, -1, side);
1649  buildCoarseningMap(*elem, *qrule, *qrule_face, side);
1650  }
1651 
1652  // Child side to parent volume mapping for "internal" child sides
1653  for (unsigned int child = 0; child < elem->n_children(); ++child)
1654  for (unsigned int side = 0; side < elem->n_sides();
1655  ++side) // Assume children have the same number of sides!
1656  if (!elem->is_child_on_side(child, side)) // Otherwise we already computed that map
1657  buildRefinementMap(*elem, *qrule, *qrule_face, -1, child, side);
1658  }
1659 }
QBase *& qRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:246
QBase *& qRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:210
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition: Assembly.C:709
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
void buildCoarseningMap(const Elem &elem, QBase &qrule, QBase &qrule_face, int input_side)
Build the coarsening map for a given element type.
Definition: MooseMesh.C:1741
void setCurrentSubdomainID(SubdomainID i)
set the current subdomain ID
Definition: Assembly.h:280
PerfID _build_refinement_and_coarsening_maps_timer
Definition: MooseMesh.h:1145
void buildRefinementMap(const Elem &elem, QBase &qrule, QBase &qrule_face, int parent_side, int child, int child_side)
Build the refinement map for a given element type.
Definition: MooseMesh.C:1662
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205

◆ buildSideList() [1/2]

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

Calls BoundaryInfo::build_side_list().

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

Definition at line 2126 of file MooseMesh.C.

Referenced by PenetrationLocator::detectPenetration().

2129 {
2130 #ifdef LIBMESH_ENABLE_DEPRECATED
2131  mooseDeprecated("The version of MooseMesh::buildSideList() taking three arguments is "
2132  "deprecated, call the version that returns a vector of tuples instead.");
2133  getMesh().get_boundary_info().build_side_list(el, sl, il);
2134 #else
2135  libmesh_ignore(el);
2136  libmesh_ignore(sl);
2137  libmesh_ignore(il);
2138  mooseError("The version of MooseMesh::buildSideList() taking three "
2139  "arguments is not available in your version of libmesh, call the "
2140  "version that returns a vector of tuples instead.");
2141 #endif
2142 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
void mooseDeprecated(Args &&... args) const
Definition: MooseObject.h:155

◆ buildSideList() [2/2]

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

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

Definition at line 2145 of file MooseMesh.C.

2146 {
2147  return getMesh().get_boundary_info().build_side_list();
2148 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ cacheChangedLists()

void MooseMesh::cacheChangedLists ( )
inherited

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

Definition at line 563 of file MooseMesh.C.

Referenced by FEProblemBase::meshChangedHelper().

564 {
565  TIME_SECTION(_cache_changed_lists_timer);
566 
567  ConstElemRange elem_range(getMesh().local_elements_begin(), getMesh().local_elements_end(), 1);
568  CacheChangedListsThread cclt(*this);
569  Threads::parallel_reduce(elem_range, cclt);
570 
572 
573  _refined_elements = libmesh_make_unique<ConstElemPointerRange>(cclt._refined_elements.begin(),
574  cclt._refined_elements.end());
575  _coarsened_elements = libmesh_make_unique<ConstElemPointerRange>(cclt._coarsened_elements.begin(),
576  cclt._coarsened_elements.end());
577  _coarsened_element_children = cclt._coarsened_element_children;
578 }
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:890
PerfID _cache_changed_lists_timer
Definition: MooseMesh.h:1126
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:893
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:900

◆ cacheInfo()

void MooseMesh::cacheInfo ( )
protectedinherited

Definition at line 856 of file MooseMesh.C.

Referenced by MooseMesh::update().

857 {
858  TIME_SECTION(_cache_info_timer);
859 
860  // TODO: Thread this!
861  for (const auto & elem : getMesh().element_ptr_range())
862  {
863  SubdomainID subdomain_id = elem->subdomain_id();
864 
865  for (unsigned int side = 0; side < elem->n_sides(); side++)
866  {
867  std::vector<BoundaryID> boundaryids = getBoundaryIDs(elem, side);
868 
869  std::set<BoundaryID> & subdomain_set = _subdomain_boundary_ids[subdomain_id];
870 
871  subdomain_set.insert(boundaryids.begin(), boundaryids.end());
872  }
873 
874  for (unsigned int nd = 0; nd < elem->n_nodes(); ++nd)
875  {
876  Node & node = *elem->node_ptr(nd);
877  _block_node_list[node.id()].insert(elem->subdomain_id());
878  }
879  }
880 }
const std::set< BoundaryID > & getBoundaryIDs() const
Returns a const reference to a set of all user-specified boundary IDs.
Definition: MooseMesh.C:2113
subdomain_id_type SubdomainID
Definition: MooseTypes.h:110
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:966
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
PerfID _cache_info_timer
Definition: MooseMesh.h:1137
std::map< SubdomainID, std::set< BoundaryID > > _subdomain_boundary_ids
Holds a map from subomdain ids to the boundary ids that are attached to it.
Definition: MooseMesh.h:1114
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:464
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205

◆ changeBoundaryId()

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

Referenced by MeshExtruder::changeID().

1952 {
1953  TIME_SECTION(_change_boundary_id_timer);
1954 
1955  // Get a reference to our BoundaryInfo object, we will use it several times below...
1956  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1957 
1958  // Container to catch ids passed back from BoundaryInfo
1959  std::vector<boundary_id_type> old_ids;
1960 
1961  // Only level-0 elements store BCs. Loop over them.
1962  for (auto & elem : as_range(getMesh().level_elements_begin(0), getMesh().level_elements_end(0)))
1963  {
1964  unsigned int n_sides = elem->n_sides();
1965  for (unsigned int s = 0; s != n_sides; ++s)
1966  {
1967  boundary_info.boundary_ids(elem, s, old_ids);
1968  if (std::find(old_ids.begin(), old_ids.end(), old_id) != old_ids.end())
1969  {
1970  std::vector<boundary_id_type> new_ids(old_ids);
1971  std::replace(new_ids.begin(), new_ids.end(), old_id, new_id);
1972  if (delete_prev)
1973  {
1974  boundary_info.remove_side(elem, s);
1975  boundary_info.add_side(elem, s, new_ids);
1976  }
1977  else
1978  boundary_info.add_side(elem, s, new_ids);
1979  }
1980  }
1981  }
1982 
1983  // Remove any remaining references to the old ID from the
1984  // BoundaryInfo object. This prevents things like empty sidesets
1985  // from showing up when printing information, etc.
1986  if (delete_prev)
1987  boundary_info.remove_id(old_id);
1988 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
PerfID _change_boundary_id_timer
Definition: MooseMesh.h:1146
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205

◆ clearQuadratureNodes()

void MooseMesh::clearQuadratureNodes ( )
inherited

Clear out any existing quadrature nodes.

Most likely called before re-adding them.

Definition at line 1031 of file MooseMesh.C.

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

1032 {
1033  // Delete all the quadrature nodes
1034  for (auto & it : _quadrature_nodes)
1035  delete it.second;
1036 
1037  _quadrature_nodes.clear();
1039  _extra_bnd_nodes.clear();
1040 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:960
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:963
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:962

◆ clone()

MooseMesh & MooseMesh::clone ( ) const
virtualinherited

Clone method.

Allocates memory you are responsible to clean up.

Definition at line 2001 of file MooseMesh.C.

Referenced by TiledMesh::buildMesh().

2002 {
2003  mooseError("MooseMesh::clone() is no longer supported, use MooseMesh::safeClone() instead.");
2004 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140

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

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

594 {
595  auto elem_to_child_pair = _coarsened_element_children.find(elem);
596  mooseAssert(elem_to_child_pair != _coarsened_element_children.end(), "Missing element in map");
597  return elem_to_child_pair->second;
598 }
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205
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:900

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

Referenced by FEProblemBase::meshChangedHelper().

588 {
589  return _coarsened_elements.get();
590 }
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:893

◆ computexy()

std::vector< Real > RinglebMesh::computexy ( const std::vector< Real >  values,
const int &  i,
const int &  index,
const std::vector< Real > &  ks,
const std::vector< Real > &  q 
)

Definition at line 85 of file RinglebMesh.C.

Referenced by buildMesh().

90 {
91  std::vector<Real> xy(2);
92 
93  // Compute x(q,k)
94  xy[0] = 0.5 / values[1] * (2. / ks[i] / ks[i] - 1. / q[index] / q[index]) - 0.5 * values[3];
95 
96  // Compute the term that goes under the sqrt sign
97  // If 1 - (q/k)^2 is slightly negative, we make it zero.
98  Real sqrt_term = 1. - q[index] * q[index] / ks[i] / ks[i];
99  sqrt_term = std::max(sqrt_term, 0.);
100 
101  // Compute y(q,k)
102  xy[1] = 1. / (ks[i] * values[1] * q[index]) * std::sqrt(sqrt_term);
103 
104  return xy;
105 }

◆ declareRecoverableData() [1/2]

template<typename T >
T & Restartable::declareRecoverableData ( std::string  data_name)
protectedinherited

Declare a piece of data as "recoverable".

This means that in the event of a recovery 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)

Definition at line 269 of file Restartable.h.

270 {
271  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
272 
273  registerRecoverableDataOnApp(full_name);
274 
275  return declareRestartableDataWithContext<T>(data_name, nullptr);
276 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
void registerRecoverableDataOnApp(std::string name)
Helper function for actually registering the restartable data.
Definition: Restartable.C:54

◆ declareRecoverableData() [2/2]

template<typename T >
T & Restartable::declareRecoverableData ( std::string  data_name,
const T &  init_value 
)
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 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)
init_valueThe initial value of the data

Definition at line 280 of file Restartable.h.

281 {
282  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
283 
284  registerRecoverableDataOnApp(full_name);
285 
286  return declareRestartableDataWithContext<T>(data_name, init_value, nullptr);
287 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
void registerRecoverableDataOnApp(std::string name)
Helper function for actually registering the restartable data.
Definition: Restartable.C:54

◆ declareRestartableData() [1/2]

template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name)
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)

Definition at line 202 of file Restartable.h.

203 {
204  return declareRestartableDataWithContext<T>(data_name, nullptr);
205 }

◆ declareRestartableData() [2/2]

template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name,
const T &  init_value 
)
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)
init_valueThe initial value of the data

Definition at line 209 of file Restartable.h.

210 {
211  return declareRestartableDataWithContext<T>(data_name, init_value, nullptr);
212 }

◆ declareRestartableDataWithContext() [1/2]

template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
void *  context 
)
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)
contextContext pointer that will be passed to the load and store functions

Definition at line 216 of file Restartable.h.

217 {
218  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
219  auto data_ptr = libmesh_make_unique<RestartableData<T>>(full_name, context);
220  T & restartable_data_ref = data_ptr->get();
221 
222  registerRestartableDataOnApp(full_name, std::move(data_ptr), _restartable_tid);
223 
224  return restartable_data_ref;
225 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:197
void registerRestartableDataOnApp(std::string name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid)
Helper function for actually registering the restartable data.
Definition: Restartable.C:46

◆ declareRestartableDataWithContext() [2/2]

template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
const T &  init_value,
void *  context 
)
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)
init_valueThe initial value of the data
contextContext pointer that will be passed to the load and store functions

Definition at line 229 of file Restartable.h.

232 {
233  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
234  auto data_ptr = libmesh_make_unique<RestartableData<T>>(full_name, context);
235  data_ptr->set() = init_value;
236 
237  T & restartable_data_ref = data_ptr->get();
238  registerRestartableDataOnApp(full_name, std::move(data_ptr), _restartable_tid);
239 
240  return restartable_data_ref;
241 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:197
void registerRestartableDataOnApp(std::string name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid)
Helper function for actually registering the restartable data.
Definition: Restartable.C:46

◆ declareRestartableDataWithObjectName()

template<typename T >
T & Restartable::declareRestartableDataWithObjectName ( std::string  data_name,
std::string  object_name 
)
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.

Definition at line 245 of file Restartable.h.

246 {
247  return declareRestartableDataWithObjectNameWithContext<T>(data_name, object_name, nullptr);
248 }

◆ declareRestartableDataWithObjectNameWithContext()

template<typename T >
T & Restartable::declareRestartableDataWithObjectNameWithContext ( std::string  data_name,
std::string  object_name,
void *  context 
)
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

Definition at line 252 of file Restartable.h.

255 {
256  std::string old_name = _restartable_name;
257 
258  _restartable_name = object_name;
259 
260  T & value = declareRestartableDataWithContext<T>(data_name, context);
261 
262  _restartable_name = old_name;
263 
264  return value;
265 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191

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

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

1320 {
1322 
1324  return true;
1325 
1326  std::vector<Real> min(3, std::numeric_limits<Real>::max());
1327  std::vector<Real> max(3, std::numeric_limits<Real>::min());
1328  unsigned int dim = getMesh().mesh_dimension();
1329 
1330  // Find the bounding box of our mesh
1331  for (const auto & node : getMesh().node_ptr_range())
1332  for (unsigned int i = 0; i < dim; ++i)
1333  {
1334  if ((*node)(i) < min[i])
1335  min[i] = (*node)(i);
1336  if ((*node)(i) > max[i])
1337  max[i] = (*node)(i);
1338  }
1339 
1340  this->comm().max(max);
1341  this->comm().min(min);
1342 
1343  _extreme_nodes.resize(8); // 2^LIBMESH_DIM
1344  // Now make sure that there are actual nodes at all of the extremes
1345  std::vector<bool> extreme_matches(8, false);
1346  std::vector<unsigned int> comp_map(3);
1347  for (const auto & node : getMesh().node_ptr_range())
1348  {
1349  // See if the current node is located at one of the extremes
1350  unsigned int coord_match = 0;
1351 
1352  for (unsigned int i = 0; i < dim; ++i)
1353  {
1354  if (std::abs((*node)(i)-min[i]) < tol)
1355  {
1356  comp_map[i] = MIN;
1357  ++coord_match;
1358  }
1359  else if (std::abs((*node)(i)-max[i]) < tol)
1360  {
1361  comp_map[i] = MAX;
1362  ++coord_match;
1363  }
1364  }
1365 
1366  if (coord_match == dim) // Found a coordinate at one of the extremes
1367  {
1368  _extreme_nodes[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = node;
1369  extreme_matches[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = true;
1370  }
1371  }
1372 
1373  // See if we matched all of the extremes for the mesh dimension
1374  this->comm().max(extreme_matches);
1375  if (std::count(extreme_matches.begin(), extreme_matches.end(), true) == (1 << dim))
1376  _regular_orthogonal_mesh = true;
1377 
1378  // Set the bounds
1379  _bounds.resize(LIBMESH_DIM);
1380  for (unsigned int i = 0; i < dim; ++i)
1381  {
1382  _bounds[i].resize(2);
1383  _bounds[i][MIN] = min[i];
1384  _bounds[i][MAX] = max[i];
1385  }
1386  for (unsigned int i = dim; i < LIBMESH_DIM; ++i)
1387  {
1388  _bounds[i].resize(2);
1389  _bounds[i][MIN] = 0;
1390  _bounds[i][MAX] = 0;
1391  }
1392 
1393  return _regular_orthogonal_mesh;
1394 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:993
std::vector< Node * > _extreme_nodes
A vector containing the nodes at the corners of a regular orthogonal mesh.
Definition: MooseMesh.h:1021
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
MPI_Comm comm
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:464
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:990
PerfID _detect_orthogonal_dim_ranges_timer
Definition: MooseMesh.h:1140

◆ dimension()

unsigned int MooseMesh::dimension ( ) const
virtualinherited

◆ dimensionWidth()

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

Returns the width of the requested dimension.

Definition at line 1500 of file MooseMesh.C.

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

1501 {
1502  return getMaxInDimension(component) - getMinInDimension(component);
1503 }
virtual Real getMaxInDimension(unsigned int component) const
Definition: MooseMesh.C:1514
virtual Real getMinInDimension(unsigned int component) const
Returns the min or max of the requested dimension respectively.
Definition: MooseMesh.C:1506

◆ elem() [1/2]

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

◆ elem() [2/2]

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

Definition at line 2212 of file MooseMesh.C.

2213 {
2214  mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
2215  return elemPtr(i);
2216 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2219
void mooseDeprecated(Args &&... args) const
Definition: MooseObject.h:155

◆ elemPtr() [1/2]

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

◆ elemPtr() [2/2]

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

Definition at line 2225 of file MooseMesh.C.

2226 {
2227  return getMesh().elem_ptr(i);
2228 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 91 of file MooseObject.h.

Referenced by EigenKernel::enabled().

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

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

Referenced by FEProblemBase::checkProblemIntegrity(), ElementsAlongLine::ElementsAlongLine(), ElementsAlongPlane::ElementsAlongPlane(), IntersectionPointsAlongLine::IntersectionPointsAlongLine(), BreakMeshByBlock::modify(), SideSetsFromPoints::modify(), SideSetsFromNormals::modify(), MeshSideSet::modify(), ParsedAddSideset::modify(), AddAllSideSetsByNormals::modify(), AddSideSetsFromBoundingBox::modify(), MultiAppInterpolationTransfer::MultiAppInterpolationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodeElemConstraint::NodeElemConstraint(), NonlocalIntegratedBC::NonlocalIntegratedBC(), NonlocalKernel::NonlocalKernel(), PatternedMesh::PatternedMesh(), StitchedMesh::StitchedMesh(), and TiledMesh::TiledMesh().

2631 {
2633  mooseError("Cannot use ",
2634  name,
2635  " with DistributedMesh!\n",
2636  "Consider specifying parallel_type = 'replicated' in your input file\n",
2637  "to prevent it from being run with DistributedMesh.");
2638 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:846
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ exReader()

ExodusII_IO * MooseMesh::exReader ( ) const
virtualinherited

Not implemented – always returns NULL.

Reimplemented in FileMesh.

Definition at line 2526 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup().

2527 {
2528  // TODO: Implement or remove
2529  return nullptr;
2530 }

◆ freeBndElems()

void MooseMesh::freeBndElems ( )
protectedinherited

Definition at line 374 of file MooseMesh.C.

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

375 {
376  // free memory
377  for (auto & belem : _bnd_elems)
378  delete belem;
379 
380  for (auto & it : _bnd_elem_ids)
381  it.second.clear();
382 
383  _bnd_elem_ids.clear();
384 }
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:958
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:954

◆ freeBndNodes()

void MooseMesh::freeBndNodes ( )
protectedinherited

Definition at line 356 of file MooseMesh.C.

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

357 {
358  // free memory
359  for (auto & bnode : _bnd_nodes)
360  delete bnode;
361 
362  for (auto & it : _node_set_nodes)
363  it.second.clear();
364 
365  _node_set_nodes.clear();
366 
367  for (auto & it : _bnd_node_ids)
368  it.second.clear();
369 
370  _bnd_node_ids.clear();
371 }
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:951
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:969
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:947

◆ getActiveLocalElementRange()

ConstElemRange * MooseMesh::getActiveLocalElementRange ( )
inherited

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

Definition at line 779 of file MooseMesh.C.

Referenced by NonlinearSystemBase::computeDamping(), AuxiliarySystem::computeElementalVars(), FEProblemBase::computeIndicators(), NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), FEProblemBase::computeMarkers(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::computeUserObjects(), FEProblemBase::createQRules(), LayeredBase::getBounds(), NonlinearSystemBase::init(), FEProblemBase::initialSetup(), MooseMesh::meshChanged(), DOFMapOutput::output(), FEProblemBase::projectSolution(), NonlinearSystemBase::setVariableGlobalDoFs(), TransientMultiApp::solveStep(), Transient::solveStep(), MooseMesh::updateActiveSemiLocalNodeRange(), Adaptivity::updateErrorVectors(), and SystemBase::zeroVariables().

780 {
782  {
784 
785  _active_local_elem_range = libmesh_make_unique<ConstElemRange>(
786  getMesh().active_local_elements_begin(), getMesh().active_local_elements_end(), GRAIN_SIZE);
787  }
788 
789  return _active_local_elem_range.get();
790 }
static const int GRAIN_SIZE
Definition: MooseMesh.C:57
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:909
PerfID _get_active_local_element_range_timer
Definition: MooseMesh.h:1132

◆ getActiveNodeRange()

NodeRange * MooseMesh::getActiveNodeRange ( )
inherited

Definition at line 793 of file MooseMesh.C.

Referenced by MooseMesh::meshChanged().

794 {
795  if (!_active_node_range)
796  {
797  TIME_SECTION(_get_active_node_range_timer);
798 
799  _active_node_range = libmesh_make_unique<NodeRange>(
800  getMesh().active_nodes_begin(), getMesh().active_nodes_end(), GRAIN_SIZE);
801  }
802 
803  return _active_node_range.get();
804 }
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:912
static const int GRAIN_SIZE
Definition: MooseMesh.C:57
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
PerfID _get_active_node_range_timer
Definition: MooseMesh.h:1133

◆ getActiveSemiLocalNodeRange()

SemiLocalNodeRange * MooseMesh::getActiveSemiLocalNodeRange ( ) const
inherited

Definition at line 807 of file MooseMesh.C.

808 {
809  mooseAssert(_active_semilocal_node_range,
810  "_active_semilocal_node_range has not been created yet!");
811 
812  return _active_semilocal_node_range.get();
813 }
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:911

◆ getBoundaryElementRange()

ConstBndElemRange * MooseMesh::getBoundaryElementRange ( )
inherited

Definition at line 843 of file MooseMesh.C.

Referenced by AuxiliarySystem::computeElementalVars(), DMMooseGetEmbedding_Private(), GeometricSearchData::generateQuadratureNodes(), MultiAppNearestNodeTransfer::getLocalEntities(), MooseMesh::meshChanged(), and GeometricSearchData::updateQuadratureNodes().

844 {
845  if (!_bnd_elem_range)
846  {
847  TIME_SECTION(_get_boundary_element_range_timer);
849  libmesh_make_unique<ConstBndElemRange>(bndElemsBegin(), bndElemsEnd(), GRAIN_SIZE);
850  }
851 
852  return _bnd_elem_range.get();
853 }
virtual bnd_elem_iterator bndElemsEnd()
Definition: MooseMesh.C:920
virtual bnd_elem_iterator bndElemsBegin()
Return iterators to the beginning/end of the boundary elements list.
Definition: MooseMesh.C:912
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:916
static const int GRAIN_SIZE
Definition: MooseMesh.C:57
PerfID _get_boundary_element_range_timer
Definition: MooseMesh.h:1136

◆ getBoundaryID()

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

Get the associated BoundaryID for the boundary name.

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

Definition at line 1043 of file MooseMesh.C.

Referenced by AddPeriodicBCAction::act(), MooseMesh::addMortarInterface(), ConstraintWarehouse::addObject(), TiledMesh::buildMesh(), StitchedMesh::buildMesh(), PatternedMesh::buildMesh(), DMSetUp_Moose_Pre(), MultiAppNearestNodeTransfer::getLocalEntities(), GeometricSearchData::getMortarNearestNodeLocator(), GeometricSearchData::getMortarPenetrationLocator(), MultiAppNearestNodeTransfer::getNearestNode(), GeometricSearchData::getNearestNodeLocator(), GeometricSearchData::getPenetrationLocator(), GeometricSearchData::getQuadratureNearestNodeLocator(), GeometricSearchData::getQuadraturePenetrationLocator(), LinearNodalConstraint::LinearNodalConstraint(), BreakBoundaryOnSubdomain::modify(), MeshSideSet::modify(), NodalScalarKernel::NodalScalarKernel(), GeometricSearchData::reinitMortarNodes(), SetupMeshAction::setupMesh(), and EqualValueBoundaryConstraint::updateConstrainedNodes().

1044 {
1045  if (boundary_name == "ANY_BOUNDARY_ID")
1046  mooseError("Please use getBoundaryIDs() when passing \"ANY_BOUNDARY_ID\"");
1047 
1049  std::istringstream ss(boundary_name);
1050 
1051  if (!(ss >> id))
1052  id = getMesh().get_boundary_info().get_id_by_name(boundary_name);
1053 
1054  return id;
1055 }
const BoundaryID INVALID_BOUNDARY_ID
Definition: MooseTypes.h:331
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
boundary_id_type BoundaryID
Definition: MooseTypes.h:108

◆ getBoundaryIDs() [1/3]

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

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

Definition at line 2105 of file MooseMesh.C.

Referenced by MeshExtruder::changeID(), NonlinearSystemBase::computeJacobianInternal(), BreakMeshByBlockBase::findFreeBoundaryId(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::initializeBoundaryRestrictable(), BoundaryRestrictable::meshBoundaryIDs(), BreakBoundaryOnSubdomain::modify(), SideSetsFromNormals::modify(), SideSetsFromPoints::modify(), SideSetsBetweenSubdomains::modify(), AddExtraNodeset::modify(), ParsedAddSideset::modify(), SideSetsAroundSubdomain::modify(), ElementDeleterBase::modify(), BoundingBoxNodeSet::modify(), and AddSideSetsFromBoundingBox::modify().

2106 {
2107  std::vector<BoundaryID> ids;
2108  getMesh().get_boundary_info().boundary_ids(elem, side, ids);
2109  return ids;
2110 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205

◆ getBoundaryIDs() [2/3]

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

Referenced by MooseMesh::cacheInfo().

2114 {
2115  return getMesh().get_boundary_info().get_boundary_ids();
2116 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ getBoundaryIDs() [3/3]

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.

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

If the conversion from a name to a number fails, that means that this must be a named boundary. We will look in the complete map for this sideset and create a new name/ID pair if requested.

Definition at line 1058 of file MooseMesh.C.

1060 {
1061  const BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1062  const std::map<BoundaryID, std::string> & sideset_map = boundary_info.get_sideset_name_map();
1063  const std::map<BoundaryID, std::string> & nodeset_map = boundary_info.get_nodeset_name_map();
1064 
1065  std::set<BoundaryID> boundary_ids = boundary_info.get_boundary_ids();
1066 
1067  // On a distributed mesh we may have boundary ids that only exist on
1068  // other processors.
1069  if (!this->getMesh().is_replicated())
1070  _communicator.set_union(boundary_ids);
1071 
1072  BoundaryID max_boundary_id = boundary_ids.empty() ? 0 : *(boundary_ids.rbegin());
1073 
1074  std::vector<BoundaryID> ids(boundary_name.size());
1075  for (unsigned int i = 0; i < boundary_name.size(); i++)
1076  {
1077  if (boundary_name[i] == "ANY_BOUNDARY_ID")
1078  {
1079  ids.assign(_mesh_boundary_ids.begin(), _mesh_boundary_ids.end());
1080  if (i)
1081  mooseWarning("You passed \"ANY_BOUNDARY_ID\" in addition to other boundary_names. This "
1082  "may be a logic error.");
1083  break;
1084  }
1085 
1086  BoundaryID id;
1087  std::istringstream ss(boundary_name[i]);
1088 
1089  if (!(ss >> id) || !ss.eof())
1090  {
1096  if (generate_unknown &&
1097  !MooseUtils::doesMapContainValue(sideset_map, std::string(boundary_name[i])) &&
1098  !MooseUtils::doesMapContainValue(nodeset_map, std::string(boundary_name[i])))
1099  id = ++max_boundary_id;
1100  else
1101  id = boundary_info.get_id_by_name(boundary_name[i]);
1102  }
1103 
1104  ids[i] = id;
1105  }
1106 
1107  return ids;
1108 }
void mooseWarning(Args &&... args) const
Definition: MooseObject.h:149
bool doesMapContainValue(const std::map< T1, T2 > &the_map, const T2 &value)
This routine is a simple helper function for searching a map by values instead of keys...
Definition: MooseUtils.h:173
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:938
boundary_id_type BoundaryID
Definition: MooseTypes.h:108

◆ getBoundaryName()

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

Return the name of the boundary given the id.

Definition at line 1182 of file MooseMesh.C.

Referenced by MaterialPropertyDebugOutput::printMaterialMap().

1183 {
1184  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1185 
1186  std::vector<BoundaryID> side_boundaries;
1187  boundary_info.build_side_boundary_ids(side_boundaries);
1188 
1189  // We need to figure out if this boundary is a sideset or nodeset
1190  if (std::find(side_boundaries.begin(), side_boundaries.end(), boundary_id) !=
1191  side_boundaries.end())
1192  return boundary_info.get_sideset_name(boundary_id);
1193  else
1194  return boundary_info.get_nodeset_name(boundary_id);
1195 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ getBoundaryNodeRange()

ConstBndNodeRange * MooseMesh::getBoundaryNodeRange ( )
inherited

Definition at line 830 of file MooseMesh.C.

Referenced by NonlinearSystemBase::computeJacobianBlocks(), NonlinearSystemBase::computeJacobianInternal(), NonlinearSystemBase::computeNodalBCs(), AuxiliarySystem::computeNodalVars(), NonlinearSystemBase::computeResidualInternal(), DMMooseGetEmbedding_Private(), NearestNodeLocator::findNodes(), MultiAppNearestNodeTransfer::getLocalEntities(), MultiAppNearestNodeTransfer::getNearestNode(), MooseMesh::meshChanged(), FEProblemBase::projectSolution(), NonlinearSystemBase::setInitialSolution(), and NearestNodeLocator::updatePatch().

831 {
832  if (!_bnd_node_range)
833  {
834  TIME_SECTION(_get_boundary_node_range_timer);
836  libmesh_make_unique<ConstBndNodeRange>(bndNodesBegin(), bndNodesEnd(), GRAIN_SIZE);
837  }
838 
839  return _bnd_node_range.get();
840 }
virtual bnd_node_iterator bndNodesEnd()
Definition: MooseMesh.C:904
PerfID _get_boundary_node_range_timer
Definition: MooseMesh.h:1135
virtual bnd_node_iterator bndNodesBegin()
Return iterators to the beginning/end of the boundary nodes list.
Definition: MooseMesh.C:896
static const int GRAIN_SIZE
Definition: MooseMesh.C:57
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:914

◆ getCheckedPointerParam()

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

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 72 of file MooseObject.h.

73  {
74  return parameters().getCheckedPointerParam<T>(name, error_string);
75  }
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

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

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

1770 {
1771  std::pair<int, ElemType> the_pair(input_side, elem.type());
1772 
1773  if (_elem_type_to_coarsening_map.find(the_pair) == _elem_type_to_coarsening_map.end())
1774  mooseError("Could not find a suitable qp refinement map!");
1775 
1776  return _elem_type_to_coarsening_map[the_pair];
1777 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::map< std::pair< int, ElemType >, std::vector< std::pair< unsigned int, QpMap > > > _elem_type_to_coarsening_map
Holds mappings for volume to volume and parent side to child side.
Definition: MooseMesh.h:1111
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205

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

827 { return ""; }

◆ getGhostedBoundaries()

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

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

Definition at line 2330 of file MooseMesh.C.

2331 {
2332  return _ghosted_boundaries;
2333 }
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:971

◆ getGhostedBoundaryInflation()

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

Return a writable reference to the _ghosted_boundaries_inflation vector.

Definition at line 2336 of file MooseMesh.C.

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

2337 {
2339 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:972

◆ getGhostingPatchSize()

unsigned int MooseMesh::getGhostingPatchSize ( ) const
inlineinherited

Getter for the ghosting_patch_size parameter.

Definition at line 440 of file MooseMesh.h.

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

440 { 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:978

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

Referenced by PointSamplerBase::execute().

2490 {
2491  // Grab a bounding box to speed things up. Note that
2492  // local_bounding_box is *not* equivalent to processor_bounding_box
2493  // with processor_id() except in serial.
2494  BoundingBox bbox = MeshTools::create_local_bounding_box(getMesh());
2495 
2496  // Inflate the bbox just a bit to deal with roundoff
2497  // Adding 1% of the diagonal size in each direction on each end
2498  Real inflation_amount = inflation_multiplier * (bbox.max() - bbox.min()).norm();
2499  Point inflation(inflation_amount, inflation_amount, inflation_amount);
2500 
2501  bbox.first -= inflation; // min
2502  bbox.second += inflation; // max
2503 
2504  return bbox;
2505 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ getLocalNodeRange()

ConstNodeRange * MooseMesh::getLocalNodeRange ( )
inherited

Definition at line 816 of file MooseMesh.C.

Referenced by NonlinearSystemBase::computeDamping(), NonlinearSystemBase::computeJacobianInternal(), AuxiliarySystem::computeNodalVars(), NonlinearSystemBase::computeResidualInternal(), FEProblemBase::computeUserObjects(), and MooseMesh::meshChanged().

817 {
818  if (!_local_node_range)
819  {
820  TIME_SECTION(_get_local_node_range_timer);
821 
822  _local_node_range = libmesh_make_unique<ConstNodeRange>(
823  getMesh().local_nodes_begin(), getMesh().local_nodes_end(), GRAIN_SIZE);
824  }
825 
826  return _local_node_range.get();
827 }
static const int GRAIN_SIZE
Definition: MooseMesh.C:57
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
PerfID _get_local_node_range_timer
Definition: MooseMesh.h:1134
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:913

◆ getMaxInDimension()

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

Reimplemented in AnnularMesh, DistributedGeneratedMesh, and GeneratedMesh.

Definition at line 1514 of file MooseMesh.C.

Referenced by MooseMesh::dimensionWidth().

1515 {
1516  mooseAssert(component < _bounds.size(), "Requested dimension out of bounds");
1517 
1518  return _bounds[component][MAX];
1519 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:993

◆ getMaxLeafSize()

unsigned int MooseMesh::getMaxLeafSize ( ) const
inlineinherited

Getter for the maximum leaf size parameter.

Definition at line 445 of file MooseMesh.h.

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

445 { return _max_leaf_size; };
unsigned int _max_leaf_size
Definition: MooseMesh.h:981

◆ getMesh() [1/2]

MeshBase & MooseMesh::getMesh ( )
inherited

Accessor for the underlying libMesh Mesh object.

Definition at line 2512 of file MooseMesh.C.

Referenced by MooseMesh::activeLocalElementsBegin(), MooseMesh::activeLocalElementsEnd(), Adaptivity::adaptMesh(), BreakMeshByBlock::addInterfaceBoundary(), MooseMesh::addQuadratureNode(), MooseMesh::addUniqueNode(), GeometricRelationshipManager::attachGeometricFunctorHelper(), RelationshipManager::attachRelationshipManagers(), MooseMesh::buildBndElemList(), TiledMesh::buildMesh(), FileMesh::buildMesh(), AnnularMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), buildMesh(), DistributedGeneratedMesh::buildMesh(), GeneratedMesh::buildMesh(), ConcentricCircleMesh::buildMesh(), ImageMesh::buildMesh2D(), ImageMesh::buildMesh3D(), MooseMesh::buildNodeList(), MooseMesh::buildNodeListFromSideList(), MooseMesh::buildPeriodicNodeMap(), MooseMesh::buildPeriodicNodeSets(), MooseMesh::buildRefinementAndCoarseningMaps(), MooseMesh::buildSideList(), MooseMesh::cacheChangedLists(), MooseMesh::cacheInfo(), MooseMesh::changeBoundaryId(), MeshExtruder::changeID(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkProblemIntegrity(), NonlinearSystemBase::constraintJacobians(), NonlinearSystemBase::constraintResiduals(), MooseMesh::detectOrthogonalDimRanges(), MooseMesh::detectPairedSidesets(), MooseMesh::dimension(), DumpObjectsProblem::dumpVariableHelper(), ElementalVariableValue::ElementalVariableValue(), MooseMesh::elemPtr(), NodalNormalsCorner::execute(), MultiAppUserObjectTransfer::execute(), MultiAppInterpolationTransfer::execute(), NodalNormalsPreprocessor::execute(), FileMesh::FileMesh(), CentroidMultiApp::fillPositions(), AddSideSetsBase::flood(), MooseMesh::getActiveLocalElementRange(), MooseMesh::getActiveNodeRange(), MooseMesh::getBoundaryID(), MooseMesh::getBoundaryIDs(), MooseMesh::getBoundaryName(), FEProblemBase::getEvaluableElementRange(), MooseMesh::getInflatedProcessorBoundingBox(), MultiAppNearestNodeTransfer::getLocalEntities(), MooseMesh::getLocalNodeRange(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), MultiAppNearestNodeTransfer::getNearestNode(), MooseMesh::getNodeList(), MooseMesh::getPointLocator(), MooseMesh::getSubdomainID(), MooseMesh::getSubdomainIDs(), MooseMesh::getSubdomainName(), MooseMesh::ghostGhostedBoundaries(), UpdateDisplacedMeshThread::init(), MooseMesh::init(), VerifyElementUniqueID::initialize(), VerifyNodalUniqueID::initialize(), OversampleOutput::initOversample(), MooseMesh::localNodesBegin(), MooseMesh::localNodesEnd(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), MooseMesh::maxElemId(), MooseMesh::maxNodeId(), GeometryBase::meshChanged(), Nemesis::meshChanged(), BreakBoundaryOnSubdomain::modify(), BreakMeshByBlock::modify(), SideSetsFromPoints::modify(), SideSetsBetweenSubdomains::modify(), SideSetsFromNormals::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), MeshSideSet::modify(), LowerDBlockFromSideset::modify(), AssignSubdomainID::modify(), SmoothMesh::modify(), AssignElementSubdomainID::modify(), SideSetsAroundSubdomain::modify(), ParsedAddSideset::modify(), AddAllSideSetsByNormals::modify(), ElementDeleterBase::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), SubdomainBoundingBox::modify(), MooseMesh::MooseMesh(), MooseMesh::nElem(), MooseMesh::nNodes(), NodalPatchRecovery::NodalPatchRecovery(), NodalVariableValue::NodalVariableValue(), MooseMesh::nodePtr(), MooseMesh::nodeRef(), MooseMesh::nodeToActiveSemilocalElemMap(), MooseMesh::nodeToElemMap(), ComputeNodalUserObjectsThread::onNode(), XDA::output(), ConsoleUtils::outputMeshInformation(), PatternedMesh::PatternedMesh(), MooseMesh::prepare(), EqualValueEmbeddedConstraint::prepareSlaveToMasterMap(), MooseMesh::printInfo(), MooseMesh::queryElemPtr(), MooseMesh::queryNodePtr(), FileMesh::read(), SubProblem::restrictionBoundaryCheckName(), SubProblem::restrictionSubdomainCheckName(), MooseMesh::setBoundaryName(), NonlinearSystemBase::setConstraintSlaveValues(), XFEMInterface::setDisplacedMesh(), XFEMInterface::setMesh(), MooseMesh::setSubdomainName(), ImageSampler::setupImageSampler(), SetupMeshAction::setupMesh(), MooseMesh::sideWithBoundaryID(), StitchedMesh::StitchedMesh(), MultiAppCopyTransfer::transfer(), DisplacedProblem::undisplaceMesh(), MooseMesh::updateActiveSemiLocalNodeRange(), EqualValueBoundaryConstraint::updateConstrainedNodes(), Adaptivity::updateErrorVectors(), RandomData::updateGenerators(), and DisplacedProblem::updateMesh().

2513 {
2514  mooseAssert(_mesh, "Mesh hasn't been created");
2515  return *_mesh;
2516 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:851

◆ getMesh() [2/2]

const MeshBase & MooseMesh::getMesh ( ) const
inherited

Definition at line 2519 of file MooseMesh.C.

2520 {
2521  mooseAssert(_mesh, "Mesh hasn't been created");
2522  return *_mesh;
2523 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:851

◆ getMinInDimension()

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

Returns the min or max of the requested dimension respectively.

Reimplemented in AnnularMesh, DistributedGeneratedMesh, and GeneratedMesh.

Definition at line 1506 of file MooseMesh.C.

Referenced by MooseMesh::dimensionWidth().

1507 {
1508  mooseAssert(component < _bounds.size(), "Requested dimension out of bounds");
1509 
1510  return _bounds[component][MIN];
1511 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:993

◆ getMooseApp()

MooseApp& MooseObject::getMooseApp ( ) const
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 86 of file MooseObject.h.

Referenced by RestartableDataIO::createBackup(), RestartableDataIO::deserializeRestartableData(), ConsoleUtils::outputMeshInformation(), Resurrector::restartRestartableData(), and RestartableDataIO::restoreBackup().

86 { return _app; }
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171

◆ getMortarInterface()

MooseMesh::MortarInterface * MooseMesh::getMortarInterface ( BoundaryID  master,
BoundaryID  slave 
)
inherited

Definition at line 2651 of file MooseMesh.C.

Referenced by GeometricSearchData::generateMortarNodes().

2652 {
2653  std::map<std::pair<BoundaryID, BoundaryID>, MortarInterface *>::iterator it =
2654  _mortar_interface_by_ids.find(std::pair<BoundaryID, BoundaryID>(master, slave));
2655  if (it != _mortar_interface_by_ids.end())
2656  return (*it).second;
2657  else
2658  mooseError(
2659  "Requesting non-existing mortar interface (master = ", master, ", slave = ", slave, ").");
2660 }
std::map< std::pair< BoundaryID, BoundaryID >, MortarInterface * > _mortar_interface_by_ids
Mortar interfaces mapped though master, slave IDs pairs.
Definition: MooseMesh.h:1002
void mooseError(Args &&... args) const
Definition: MooseObject.h:140

◆ getMortarInterfaceByName()

MooseMesh::MortarInterface * MooseMesh::getMortarInterfaceByName ( const std::string  name)
inherited

Definition at line 2641 of file MooseMesh.C.

2642 {
2643  std::map<std::string, MortarInterface *>::iterator it = _mortar_interface_by_name.find(name);
2644  if (it != _mortar_interface_by_name.end())
2645  return (*it).second;
2646  else
2647  mooseError("Requesting non-existent mortar interface '", name, "'.");
2648 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::map< std::string, MortarInterface * > _mortar_interface_by_name
Mortar interfaces mapped through their names.
Definition: MooseMesh.h:999
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getMortarInterfaces()

std::vector<std::unique_ptr<MooseMesh::MortarInterface> >& MooseMesh::getMortarInterfaces ( )
inlineinherited

◆ getNodeBlockIds()

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

Return list of blocks to which the given node belongs.

Definition at line 883 of file MooseMesh.C.

Referenced by BreakMeshByBlock::modify(), ComputeNodalUserObjectsThread::onNode(), ComputeNodalAuxVarsThread::onNode(), ComputeNodalKernelsThread::onNode(), ComputeNodalKernelJacobiansThread::onNode(), and TopResidualDebugOutput::printTopResiduals().

884 {
885  std::map<dof_id_type, std::set<SubdomainID>>::const_iterator it =
886  _block_node_list.find(node.id());
887 
888  if (it == _block_node_list.end())
889  mooseError("Unable to find node: ", node.id(), " in any block list.");
890 
891  return it->second;
892 }
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:966
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:464

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

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

2540 {
2541  std::map<boundary_id_type, std::vector<dof_id_type>>::const_iterator it =
2542  _node_set_nodes.find(nodeset_id);
2543 
2544  if (it == _node_set_nodes.end())
2545  {
2546  // On a distributed mesh we might not know about a remote nodeset,
2547  // so we'll return an empty vector and hope the nodeset exists
2548  // elsewhere.
2549  if (!getMesh().is_serial())
2550  {
2551  static const std::vector<dof_id_type> empty_vec;
2552  return empty_vec;
2553  }
2554  // On a replicated mesh we should know about every nodeset and if
2555  // we're asked for one that doesn't exist then it must be a bug.
2556  else
2557  {
2558  mooseError("Unable to nodeset ID: ", nodeset_id, '.');
2559  }
2560  }
2561 
2562  return it->second;
2563 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
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:969
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

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

1992 {
1993  mooseAssert(_boundary_to_normal_map.get() != nullptr, "Boundary To Normal Map not built!");
1994 
1995  // Note: Boundaries that are not in the map (existing boundaries) will default
1996  // construct a new RealVectorValue - (x,y,z)=(0, 0, 0)
1997  return (*_boundary_to_normal_map)[id];
1998 }
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:944

◆ getPairedBoundaryMapping()

const std::pair< BoundaryID, BoundaryID > * MooseMesh::getPairedBoundaryMapping ( unsigned int  component)
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).

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

Definition at line 1585 of file MooseMesh.C.

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

1586 {
1588  mooseError("Trying to retrieve automatic paired mapping for a mesh that is not regular and "
1589  "orthogonal");
1590 
1591  mooseAssert(component < dimension(), "Requested dimension out of bounds");
1592 
1593  if (_paired_boundary.empty())
1595 
1596  if (component < _paired_boundary.size())
1597  return &_paired_boundary[component];
1598  else
1599  return nullptr;
1600 }
void detectPairedSidesets()
This routine detects paired sidesets of a regular orthogonal mesh (.i.e.
Definition: MooseMesh.C:1397
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2099
std::vector< std::pair< BoundaryID, BoundaryID > > _paired_boundary
A vector holding the paired boundaries for a regular orthogonal mesh.
Definition: MooseMesh.h:996
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:990

◆ getParam()

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

Referenced by FEProblemBase::addMaterialHelper(), ConstraintWarehouse::addObject(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromXandY(), DerivativeParsedMaterial::DerivativeParsedMaterial(), EigenKernel::EigenKernel(), FEProblemBase::FEProblemBase(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), SideSetsBetweenSubdomainsGenerator::generate(), ExtraNodesetGenerator::generate(), MeshExtruderGenerator::generate(), SideSetsAroundSubdomainGenerator::generate(), GenericConstantRankTwoTensor::GenericConstantRankTwoTensor(), TimeSequenceStepper::init(), AttribThread::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), AdvancedOutput::initialSetup(), SideSetsBetweenSubdomains::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), SideSetsAroundSubdomain::modify(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterial::ParsedMaterial(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), and VectorOfPostprocessors::VectorOfPostprocessors().

186 {
187  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
188 }
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getPatchSize()

unsigned int MooseMesh::getPatchSize ( ) const
inherited

Getter for the patch_size parameter.

Definition at line 2471 of file MooseMesh.C.

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

2472 {
2473  return _patch_size;
2474 }
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:975

◆ getPatchUpdateStrategy()

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

Get the current patch update strategy.

Definition at line 2483 of file MooseMesh.C.

Referenced by FEProblemBase::possiblyRebuildGeomSearchPatches().

2484 {
2485  return _patch_update_strategy;
2486 }
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:984

◆ getPointLocator()

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

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

Definition at line 2697 of file MooseMesh.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute(), PointValue::execute(), MultiAppVariableValueSampleTransfer::execute(), IntersectionPointsAlongLine::execute(), ElementsAlongLine::execute(), FindValueOnLine::initialize(), PointSamplerBase::initialize(), and EqualValueEmbeddedConstraint::prepareSlaveToMasterMap().

2698 {
2699  return getMesh().sub_point_locator();
2700 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

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

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

1016 {
1017  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes.find(elem->id()) !=
1019  "Elem has no quadrature nodes!");
1020  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()].find(side) !=
1022  "Side has no quadrature nodes!");
1023  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) !=
1024  _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].end(),
1025  "qp not found on side!");
1026 
1027  return _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
1028 }
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:962
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205

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

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

1706 {
1707  if (child == -1) // Doing volume mapping or parent side mapping
1708  {
1709  mooseAssert(parent_side == child_side,
1710  "Parent side must match child_side if not passing a specific child!");
1711 
1712  std::pair<int, ElemType> the_pair(parent_side, elem.type());
1713 
1714  if (_elem_type_to_refinement_map.find(the_pair) == _elem_type_to_refinement_map.end())
1715  mooseError("Could not find a suitable qp refinement map!");
1716 
1717  return _elem_type_to_refinement_map[the_pair];
1718  }
1719  else // Need to map a child side to parent volume qps
1720  {
1721  std::pair<int, int> child_pair(child, child_side);
1722 
1723  if (_elem_type_to_child_side_refinement_map.find(elem.type()) ==
1725  _elem_type_to_child_side_refinement_map[elem.type()].find(child_pair) ==
1727  mooseError("Could not find a suitable qp refinement map!");
1728 
1729  return _elem_type_to_child_side_refinement_map[elem.type()][child_pair];
1730  }
1731 
1738 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::map< ElemType, std::map< std::pair< int, int >, std::vector< std::vector< QpMap > > > > _elem_type_to_child_side_refinement_map
Holds mappings for "internal" child sides to parent volume. The second key is (child, child_side).
Definition: MooseMesh.h:1107
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205
std::map< std::pair< int, ElemType >, std::vector< std::vector< QpMap > > > _elem_type_to_refinement_map
Holds mappings for volume to volume and parent side to child side.
Definition: MooseMesh.h:1103

◆ getSubdomainBoundaryIds()

const std::set< BoundaryID > & MooseMesh::getSubdomainBoundaryIds ( 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 2566 of file MooseMesh.C.

Referenced by FEProblemBase::prepareMaterials().

2567 {
2568  std::map<SubdomainID, std::set<BoundaryID>>::const_iterator it =
2569  _subdomain_boundary_ids.find(subdomain_id);
2570 
2571  if (it == _subdomain_boundary_ids.end())
2572  mooseError("Unable to find subdomain ID: ", subdomain_id, '.');
2573 
2574  return it->second;
2575 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
std::map< SubdomainID, std::set< BoundaryID > > _subdomain_boundary_ids
Holds a map from subomdain ids to the boundary ids that are attached to it.
Definition: MooseMesh.h:1114

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

Referenced by MooseMesh::addMortarInterface(), ConstraintWarehouse::addObject(), and FEProblemBase::setCoordSystem().

1112 {
1113  if (subdomain_name == "ANY_BLOCK_ID")
1114  mooseError("Please use getSubdomainIDs() when passing \"ANY_BLOCK_ID\"");
1115 
1117  std::istringstream ss(subdomain_name);
1118 
1119  if (!(ss >> id) || !ss.eof())
1120  id = getMesh().get_id_by_name(subdomain_name);
1121 
1122  return id;
1123 }
subdomain_id_type SubdomainID
Definition: MooseTypes.h:110
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.h:329
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ getSubdomainIDs()

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

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

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

Definition at line 1126 of file MooseMesh.C.

Referenced by BlockRestrictable::hasBlocks(), BlockRestrictable::initializeBlockRestrictable(), LayeredBase::LayeredBase(), SideSetsBetweenSubdomains::modify(), SideSetsAroundSubdomain::modify(), RenameBlock::modify(), and LibmeshPartitioner::prepare_blocks_for_subdomain_partitioner().

1127 {
1128  std::vector<SubdomainID> ids(subdomain_name.size());
1129 
1130  for (unsigned int i = 0; i < subdomain_name.size(); i++)
1131  {
1132  if (subdomain_name[i] == "ANY_BLOCK_ID")
1133  {
1134  ids.assign(_mesh_subdomains.begin(), _mesh_subdomains.end());
1135  if (i)
1136  mooseWarning("You passed \"ANY_BLOCK_ID\" in addition to other block names. This may be a "
1137  "logic error.");
1138  break;
1139  }
1140 
1142  std::istringstream ss(subdomain_name[i]);
1143 
1144  if (!(ss >> id) || !ss.eof())
1145  id = getMesh().get_id_by_name(subdomain_name[i]);
1146 
1147  ids[i] = id;
1148  }
1149 
1150  return ids;
1151 }
void mooseWarning(Args &&... args) const
Definition: MooseObject.h:149
subdomain_id_type SubdomainID
Definition: MooseTypes.h:110
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.h:329
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:930

◆ getSubdomainName()

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

Return the name of a block given an id.

Definition at line 1160 of file MooseMesh.C.

Referenced by BreakMeshByBlockBase::generateBoundaryName(), MaterialPropertyDebugOutput::printMaterialMap(), and TopResidualDebugOutput::printTopResiduals().

1161 {
1162  return getMesh().subdomain_name(subdomain_id);
1163 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ ghostGhostedBoundaries()

void MooseMesh::ghostGhostedBoundaries ( )
inherited

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

Definition at line 2400 of file MooseMesh.C.

Referenced by FEProblemBase::ghostGhostedBoundaries(), and SetupMeshAction::setupMesh().

2401 {
2402  // No need to do this if using a serial mesh
2403  if (!_use_distributed_mesh)
2404  return;
2405 
2406  TIME_SECTION(_ghost_ghosted_boundaries_timer);
2407 
2408  DistributedMesh & mesh = dynamic_cast<DistributedMesh &>(getMesh());
2409 
2410  // We would like to clear ghosted elements that were added by
2411  // previous invocations of this method; however we can't do so
2412  // simply without also clearing ghosted elements that were added by
2413  // other code; e.g. OversampleOutput. So for now we'll just
2414  // swallow the inefficiency that can come from leaving unnecessary
2415  // elements ghosted after AMR.
2416  // mesh.clear_extra_ghost_elems();
2417 
2418  std::set<const Elem *, CompareElemsByLevel> boundary_elems_to_ghost;
2419  std::set<Node *> connected_nodes_to_ghost;
2420 
2421  std::vector<const Elem *> family_tree;
2422 
2423  for (const auto & t : mesh.get_boundary_info().build_side_list())
2424  {
2425  auto elem_id = std::get<0>(t);
2426  auto bc_id = std::get<2>(t);
2427 
2428  if (_ghosted_boundaries.find(bc_id) != _ghosted_boundaries.end())
2429  {
2430  Elem * elem = mesh.elem_ptr(elem_id);
2431 
2432 #ifdef LIBMESH_ENABLE_AMR
2433  elem->family_tree(family_tree);
2434  Elem * parent = elem->parent();
2435  while (parent)
2436  {
2437  family_tree.push_back(parent);
2438  parent = parent->parent();
2439  }
2440 #else
2441  family_tree.clear();
2442  family_tree.push_back(elem);
2443 #endif
2444  for (const auto & felem : family_tree)
2445  {
2446  boundary_elems_to_ghost.insert(felem);
2447 
2448  // The entries of connected_nodes_to_ghost need to be
2449  // non-constant, so that they will work in things like
2450  // UpdateDisplacedMeshThread. The container returned by
2451  // family_tree contains const Elems even when the Elem
2452  // it is called on is non-const, so once that interface
2453  // gets fixed we can remove this const_cast.
2454  for (unsigned int n = 0; n < felem->n_nodes(); ++n)
2455  connected_nodes_to_ghost.insert(const_cast<Node *>(felem->node_ptr(n)));
2456  }
2457  }
2458  }
2459 
2460  mesh.comm().allgather_packed_range(&mesh,
2461  connected_nodes_to_ghost.begin(),
2462  connected_nodes_to_ghost.end(),
2463  extra_ghost_elem_inserter<Node>(mesh));
2464  mesh.comm().allgather_packed_range(&mesh,
2465  boundary_elems_to_ghost.begin(),
2466  boundary_elems_to_ghost.end(),
2467  extra_ghost_elem_inserter<Elem>(mesh));
2468 }
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:846
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
PetscInt n
PerfID _ghost_ghosted_boundaries_timer
Definition: MooseMesh.h:1149
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:971

◆ hasSecondOrderElements()

bool MooseMesh::hasSecondOrderElements ( )
inherited

check if the mesh has SECOND order elements

Definition at line 2675 of file MooseMesh.C.

2676 {
2677  bool mesh_has_second_order_elements = false;
2678  for (auto it = activeLocalElementsBegin(), end = activeLocalElementsEnd(); it != end; ++it)
2679  if ((*it)->default_order() == SECOND)
2680  {
2681  mesh_has_second_order_elements = true;
2682  break;
2683  }
2684 
2685  // We checked our local elements, so take the max over all processors.
2686  comm().max(mesh_has_second_order_elements);
2687  return mesh_has_second_order_elements;
2688 }
MeshBase::const_element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2169
MPI_Comm comm
const MeshBase::const_element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:2175

◆ init()

void MooseMesh::init ( )
virtualinherited

Initialize the Mesh object.

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

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

Definition at line 2007 of file MooseMesh.C.

Referenced by GridPartitioner::_do_partition().

2008 {
2010  mooseError("You cannot use the mesh splitter capability with DistributedMesh!");
2011 
2012  TIME_SECTION(_init_timer);
2013 
2015  {
2016  // Check of partitioner is supplied (not allowed if custom partitioner is used)
2017  if (!parameters().isParamSetByAddParam("partitioner"))
2018  mooseError("If partitioner block is provided, partitioner keyword cannot be used!");
2019  // Set custom partitioner
2020  if (!_custom_partitioner.get())
2021  mooseError("Custom partitioner requested but not set!");
2022  getMesh().partitioner().reset(_custom_partitioner.release());
2023  }
2024  else
2025  {
2026  // Set standard partitioner
2027  // Set the partitioner based on partitioner name
2028  switch (_partitioner_name)
2029  {
2030  case -3: // default
2031  // We'll use the default partitioner, but notify the user of which one is being used...
2033  _partitioner_name = "parmetis";
2034  else
2035  _partitioner_name = "metis";
2036  break;
2037 
2038  // No need to explicitily create the metis or parmetis partitioners,
2039  // They are the default for serial and parallel mesh respectively
2040  case -2: // metis
2041  case -1: // parmetis
2042  break;
2043 
2044  case 0: // linear
2045  getMesh().partitioner().reset(new LinearPartitioner);
2046  break;
2047  case 1: // centroid
2048  {
2049  if (!isParamValid("centroid_partitioner_direction"))
2050  mooseError("If using the centroid partitioner you _must_ specify "
2051  "centroid_partitioner_direction!");
2052 
2053  MooseEnum direction = getParam<MooseEnum>("centroid_partitioner_direction");
2054 
2055  if (direction == "x")
2056  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::X));
2057  else if (direction == "y")
2058  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Y));
2059  else if (direction == "z")
2060  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Z));
2061  else if (direction == "radial")
2062  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::RADIAL));
2063  break;
2064  }
2065  case 2: // hilbert_sfc
2066  getMesh().partitioner().reset(new HilbertSFCPartitioner);
2067  break;
2068  case 3: // morton_sfc
2069  getMesh().partitioner().reset(new MortonSFCPartitioner);
2070  break;
2071  }
2072  }
2073 
2075  {
2076  // Some partitioners are not idempotent. Some recovery data
2077  // files require partitioning to match mesh partitioning. This
2078  // means that, when recovering, we can't safely repartition.
2079  const bool skip_partitioning_later = getMesh().skip_partitioning();
2080  getMesh().skip_partitioning(true);
2081  const bool allow_renumbering_later = getMesh().allow_renumbering();
2082  getMesh().allow_renumbering(false);
2083 
2084  // For now, only read the recovery mesh on the Ultimate Master..
2085  // sub-apps need to just build their mesh like normal
2086  {
2087  TIME_SECTION(_read_recovered_mesh_timer);
2088  getMesh().read(_app.getRecoverFileBase() + "_mesh." + _app.getRecoverFileSuffix());
2089  }
2090 
2091  getMesh().allow_renumbering(allow_renumbering_later);
2092  getMesh().skip_partitioning(skip_partitioning_later);
2093  }
2094  else // Normally just build the mesh
2095  buildMesh();
2096 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:859
std::string getRecoverFileBase()
The file_base for the recovery file.
Definition: MooseApp.h:356
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:854
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
virtual void buildMesh()=0
Must be overridden by child classes.
bool isSplitMesh() const
Whether or not this is a split mesh operation.
Definition: MooseApp.C:864
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1117
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:846
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
PerfID _init_timer
Definition: MooseMesh.h:1147
PerfID _read_recovered_mesh_timer
Definition: MooseMesh.h:1148
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:32
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
std::string getRecoverFileSuffix()
The suffix for the recovery file.
Definition: MooseApp.h:372
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:81
bool isUltimateMaster()
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:526
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:852
std::unique_ptr< Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:858

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

2605 {
2606  bool found_elem = false;
2607  for (const auto & it : _bnd_elem_ids)
2608  {
2609  if (it.second.find(elem_id) != it.second.end())
2610  {
2611  found_elem = true;
2612  break;
2613  }
2614  }
2615  return found_elem;
2616 }
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:958

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

2620 {
2621  bool found_elem = false;
2622  std::map<boundary_id_type, std::set<dof_id_type>>::const_iterator it = _bnd_elem_ids.find(bnd_id);
2623  if (it != _bnd_elem_ids.end())
2624  if (it->second.find(elem_id) != it->second.end())
2625  found_elem = true;
2626  return found_elem;
2627 }
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_elem_ids
Map of set of elem IDs connected to each boundary.
Definition: MooseMesh.h:958

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

Referenced by NodalNormalsPreprocessor::execute().

2579 {
2580  bool found_node = false;
2581  for (const auto & it : _bnd_node_ids)
2582  {
2583  if (it.second.find(node_id) != it.second.end())
2584  {
2585  found_node = true;
2586  break;
2587  }
2588  }
2589  return found_node;
2590 }
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:951

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

2594 {
2595  bool found_node = false;
2596  std::map<boundary_id_type, std::set<dof_id_type>>::const_iterator it = _bnd_node_ids.find(bnd_id);
2597  if (it != _bnd_node_ids.end())
2598  if (it->second.find(node_id) != it->second.end())
2599  found_node = true;
2600  return found_node;
2601 }
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:951

◆ isCustomPartitionerRequested()

bool MooseMesh::isCustomPartitionerRequested ( ) const
inherited

Setter and getter for _custom_partitioner_requested.

Definition at line 2669 of file MooseMesh.C.

2670 {
2672 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:859

◆ isDistributedMesh()

bool MooseMesh::isDistributedMesh ( ) const
inlineinherited

◆ isParallelTypeForced()

bool MooseMesh::isParallelTypeForced ( ) const
inlineinherited

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

Definition at line 755 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

755 { return _parallel_type_overridden; }
bool _parallel_type_overridden
Definition: MooseMesh.h:848

◆ isParamValid()

bool MooseObject::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 81 of file MooseObject.h.

Referenced by AdvancedOutput::AdvancedOutput(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), DistributedGeneratedMesh::buildMesh(), GeneratedMesh::buildMesh(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CSVReader::CSVReader(), MultiAppNearestNodeTransfer::execute(), Exodus::Exodus(), FEProblemBase::FEProblemBase(), FileOutput::FileOutput(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), RenameBoundaryGenerator::generate(), ElementSubdomainIDGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ExtraNodesetGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), MeshSideSetGenerator::generate(), RenameBlockGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), MeshExtruderGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), PatternedMeshGenerator::generate(), MultiAppNearestNodeTransfer::getLocalEntities(), MeshGenerator::getMesh(), MultiAppNearestNodeTransfer::getNearestNode(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), MooseMesh::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), SolutionAux::initialSetup(), MooseParsedVectorFunction::initialSetup(), Console::initialSetup(), Receiver::initialSetup(), SolutionFunction::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), AdvancedOutput::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), BreakBoundaryOnSubdomain::modify(), MeshExtruder::modify(), MeshSideSet::modify(), LowerDBlockFromSideset::modify(), AssignElementSubdomainID::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), SubdomainBoundingBox::modify(), MooseMesh::MooseMesh(), EigenExecutionerBase::normalizeSolution(), Output::Output(), PetscOutput::PetscOutput(), Piecewise::Piecewise(), SolutionUserObject::readExodusII(), RenameBlock::RenameBlock(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), SolutionUserObject::SolutionUserObject(), and TimePeriod::TimePeriod().

81 { return _pars.isParamValid(name); }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ isPartitionerForced()

bool MooseMesh::isPartitionerForced ( ) const
inlineinherited

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

Definition at line 765 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

765 { return _partitioner_overridden; }
bool _partitioner_overridden
Definition: MooseMesh.h:855

◆ isRegularOrthogonal()

bool MooseMesh::isRegularOrthogonal ( )
inlineinherited

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

Definition at line 812 of file MooseMesh.h.

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

◆ isSemiLocal()

bool MooseMesh::isSemiLocal ( Node *  node)
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 642 of file MooseMesh.C.

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

◆ isTranslatedPeriodic()

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

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

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

Definition at line 1543 of file MooseMesh.C.

Referenced by MooseMesh::minPeriodicVector().

1544 {
1545  mooseAssert(component < dimension(), "Requested dimension out of bounds");
1546 
1547  if (_periodic_dim.find(nonlinear_var_num) != _periodic_dim.end())
1548  return _periodic_dim.at(nonlinear_var_num)[component];
1549  else
1550  return false;
1551 }
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2099
std::map< unsigned int, std::vector< bool > > _periodic_dim
A map of vectors indicating which dimensions are periodic in a regular orthogonal mesh for the specif...
Definition: MooseMesh.h:1013

◆ localNodesBegin()

MeshBase::const_node_iterator MooseMesh::localNodesBegin ( )
inherited

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

Definition at line 2157 of file MooseMesh.C.

Referenced by MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppNearestNodeTransfer::getNearestNode(), TopResidualDebugOutput::printTopResiduals(), and OversampleOutput::updateOversample().

2158 {
2159  return getMesh().local_nodes_begin();
2160 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ localNodesEnd()

MeshBase::const_node_iterator MooseMesh::localNodesEnd ( )
inherited

Definition at line 2163 of file MooseMesh.C.

Referenced by MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppNearestNodeTransfer::getNearestNode(), TopResidualDebugOutput::printTopResiduals(), and OversampleOutput::updateOversample().

2164 {
2165  return getMesh().local_nodes_end();
2166 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ maxElemId()

dof_id_type MooseMesh::maxElemId ( ) const
virtualinherited

Definition at line 2199 of file MooseMesh.C.

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

2200 {
2201  return getMesh().max_elem_id();
2202 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

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

2194 {
2195  return getMesh().max_node_id();
2196 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

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

Referenced by AddPeriodicBCAction::autoTranslationBoundaries(), BoundaryRestrictable::isBoundarySubset(), and AddAllSideSetsByNormals::modify().

2268 {
2269  return _mesh_boundary_ids;
2270 }
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:938

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

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

533 {
534  TIME_SECTION(_mesh_changed_timer);
535 
536  update();
537 
538  // Delete all of the cached ranges
539  _active_local_elem_range.reset();
540  _active_node_range.reset();
542  _local_node_range.reset();
543  _bnd_node_range.reset();
544  _bnd_elem_range.reset();
545 
546  // Rebuild the ranges
552 
553  // Call the callback function onMeshChanged
554  onMeshChanged();
555 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:779
virtual void onMeshChanged()
Declares a callback function that is executed at the conclusion of meshChanged(). ...
Definition: MooseMesh.C:558
ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:816
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:912
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:916
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:445
PerfID _mesh_changed_timer
Definition: MooseMesh.h:1125
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:914
NodeRange * getActiveNodeRange()
Definition: MooseMesh.C:793
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:909
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:843
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:830
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:911
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:913

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

Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().

2280 {
2281  return _mesh_nodeset_ids;
2282 }
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:940

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

Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().

2274 {
2275  return _mesh_sideset_ids;
2276 }
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:939

◆ meshSubdomains()

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

◆ minPeriodicDistance()

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

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

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

Definition at line 1579 of file MooseMesh.C.

1580 {
1581  return minPeriodicVector(nonlinear_var_num, p, q).norm();
1582 }
RealVectorValue minPeriodicVector(unsigned int nonlinear_var_num, Point p, Point q) const
This function returns the minimum vector between two points on the mesh taking into account periodici...
Definition: MooseMesh.C:1554

◆ minPeriodicVector()

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

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

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

Definition at line 1554 of file MooseMesh.C.

Referenced by MooseMesh::minPeriodicDistance().

1555 {
1556  for (unsigned int i = 0; i < dimension(); ++i)
1557  {
1558  // check to see if we're closer in real or periodic space in x, y, and z
1559  if (isTranslatedPeriodic(nonlinear_var_num, i))
1560  {
1561  // Need to test order before differencing
1562  if (p(i) > q(i))
1563  {
1564  if (p(i) - q(i) > _half_range(i))
1565  p(i) -= _half_range(i) * 2;
1566  }
1567  else
1568  {
1569  if (q(i) - p(i) > _half_range(i))
1570  p(i) += _half_range(i) * 2;
1571  }
1572  }
1573  }
1574 
1575  return q - p;
1576 }
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:1018
bool isTranslatedPeriodic(unsigned int nonlinear_var_num, unsigned int component) const
Returns whether this generated mesh is periodic in the given dimension for the given variable...
Definition: MooseMesh.C:1543
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:2099

◆ mooseDeprecated()

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

◆ mooseError()

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

Definition at line 140 of file MooseObject.h.

Referenced by PetscExternalPartitioner::_do_partition(), GridPartitioner::_do_partition(), FEProblemBase::addConstraint(), FEProblemBase::addInitialCondition(), FEProblem::addLineSearch(), FEProblemBase::addLineSearch(), FEProblemBase::addOutput(), DiracKernel::addPointWithValidId(), FEProblemBase::addPostprocessor(), MooseMesh::addQuadratureNode(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AllSideSetsByNormalsGenerator::AllSideSetsByNormalsGenerator(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), DerivativeParsedMaterialHelper::assembleDerivatives(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BoundsAux::BoundsAux(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), MooseMesh::buildCoarseningMap(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), Piecewise::buildFromXY(), TiledMesh::buildMesh(), FileMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), DistributedGeneratedMesh::buildMesh(), GeneratedMesh::buildMesh(), ImageMeshGenerator::buildMesh3D(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), MooseMesh::buildSideList(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), SubProblem::checkBoundaryMatProps(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), Material::checkExecutionStage(), BreakMeshByBlockBase::checkInputParameter(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), ActuallyExplicitEuler::checkLinearConvergence(), FEProblemBase::checkProblemIntegrity(), Material::checkStatefulSanity(), FEProblemBase::checkUserObjects(), LibmeshPartitioner::clone(), MooseMesh::clone(), ComparisonPostprocessor::comparisonIsTrue(), CompositeFunction::CompositeFunction(), ElementLpNormAux::compute(), ElementH1ErrorFunctionAux::compute(), NodalPatchRecovery::compute(), InterfaceKernel::computeElemNeighJacobian(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), HistogramVectorPostprocessor::computeHistogram(), EqualValueEmbeddedConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualType(), StatisticsVectorPostprocessor::computeStatValue(), Material::computeSubdomainProperties(), BDF2::computeTimeDerivatives(), ExplicitEuler::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), ActuallyExplicitEuler::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), AStableDirk4::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), PenetrationAux::computeValue(), ConcentricCircleMesh::ConcentricCircleMesh(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), TimeStepper::constrainStep(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), CoupledForce::CoupledForce(), DebugResidualAux::DebugResidualAux(), BicubicSplineFunction::derivative(), DerivativeSumMaterial::DerivativeSumMaterial(), DGKernel::DGKernel(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementQualityAux::ElementQualityAux(), MooseMesh::errorIfDistributedMesh(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), PerflogDumper::execute(), MultiAppPostprocessorTransfer::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElementQualityChecker::execute(), NodalValueSampler::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), FindValueOnLine::execute(), TimeExtremeValue::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFit::execute(), LeastSquaresFitHistory::execute(), FEProblemBase::executeControls(), MultiAppVectorPostprocessorTransfer::executeFromMultiapp(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), Exodus::Exodus(), FileOutput::FileOutput(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), ElementQualityChecker::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), Transfer::find_sys(), BreakMeshByBlockBase::findFreeBoundaryId(), BreakMeshByBlockGeneratorBase::findFreeBoundaryId(), FunctionDT::FunctionDT(), FunctionMaterialBase::FunctionMaterialBase(), ParsedMaterialHelper::functionParse(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GapValueAux::GapValueAux(), ExtraNodesetGenerator::generate(), ElementSubdomainIDGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), StitchedMeshGenerator::generate(), GeneratedMeshGenerator::generate(), MeshExtruderGenerator::generate(), SpiralAnnularMeshGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), PatternedMeshGenerator::generate(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), RandomICBase::generateRandom(), GenericConstantMaterial::GenericConstantMaterial(), GenericFunctionMaterial::GenericFunctionMaterial(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), MooseMesh::getCoarseningMap(), Control::getControllableParameterByName(), FEProblemBase::getCoordSystem(), PiecewiseConstant::getDirection(), FEProblemBase::getDistribution(), ElementGenerator::getElemType(), MultiApp::getExecutioner(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), DistributedGeneratedMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMaxShapeFunctions(), AnnularMesh::getMinInDimension(), DistributedGeneratedMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MooseMesh::getMortarInterface(), MooseMesh::getMortarInterfaceByName(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), MaterialStdVectorAux::getRealValue(), MooseMesh::getRefinementMap(), FEProblemBase::getSampler(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), DisplacedProblem::getStandardVariable(), FEProblemBase::getStandardVariable(), MooseMesh::getSubdomainBoundaryIds(), MooseMesh::getSubdomainID(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), PerformanceData::getValue(), Residual::getValue(), PerfGraphData::getValue(), LineValueSampler::getValue(), FindValueOnLine::getValueAtPoint(), SubProblem::getVariableHelper(), SubProblem::getVectorTagID(), DisplacedProblem::getVectorVariable(), FEProblemBase::getVectorVariable(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), AdvancedOutput::hasOutputHelper(), CrankNicolson::init(), CSVTimeSequenceStepper::init(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), Transient::init(), MooseMesh::init(), FEProblemBase::init(), NumPicardIterations::initialize(), PiecewiseBase::initialSetup(), FullSolveMultiApp::initialSetup(), SolutionAux::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), SolutionFunction::initialSetup(), SolutionUserObject::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Material::initStatefulProperties(), Function::integral(), InterfaceKernel::InterfaceKernel(), InterfaceTimeKernel::InterfaceTimeKernel(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), LayeredSideIntegral::LayeredSideIntegral(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LinearCombinationFunction::LinearCombinationFunction(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), LineSearch::lineSearch(), LineValueSampler::LineValueSampler(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAux::MaterialRealVectorValueAux(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), SubProblem::meshChanged(), MeshExtruder::MeshExtruder(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshSideSetGenerator::MeshSideSetGenerator(), SideSetsFromNormals::modify(), SideSetsFromPoints::modify(), BreakMeshByBlockBase::modify(), MeshExtruder::modify(), AddExtraNodeset::modify(), AssignElementSubdomainID::modify(), SmoothMesh::modify(), AddAllSideSetsByNormals::modify(), ElementDeleterBase::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), SubdomainBoundingBox::modify(), MooseMesh::MooseMesh(), MultiAppMeshFunctionTransfer::MultiAppMeshFunctionTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), RenameBlockGenerator::newBlockID(), RenameBlock::newBlockID(), RenameBlockGenerator::newBlockName(), RenameBlock::newBlockName(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), NodalScalarKernel::NodalScalarKernel(), NodalVariableValue::NodalVariableValue(), NumDOFs::NumDOFs(), NumNonlinearIterations::NumNonlinearIterations(), NumVars::NumVars(), ElementSideNeighborLayers::operator()(), ElementPointNeighbors::operator()(), RelationshipManager::operator==(), XDA::output(), SolutionHistory::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), Exodus::outputSetup(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), MooseObject::paramError(), PiecewiseBilinear::parse(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PatternedMesh::PatternedMesh(), PetscExternalPartitioner::PetscExternalPartitioner(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Piecewise::Piecewise(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMulticonstant::PiecewiseMulticonstant(), PiecewiseMultiInterpolation::PiecewiseMultiInterpolation(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), ImplicitMidpoint::postResidual(), ExplicitTVDRK2::postResidual(), LStableDirk4::postResidual(), AStableDirk4::postResidual(), ExplicitRK2::postResidual(), Predictor::Predictor(), SolutionUserObject::readExodusII(), SolutionUserObject::readXda(), EqualValueEmbeddedConstraint::reinitConstraint(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RenameBlock::RenameBlock(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), ScalarComponentIC::ScalarComponentIC(), BicubicSplineFunction::secondDerivative(), FEProblemBase::setCoordSystem(), PiecewiseBase::setData(), EigenProblem::setEigenproblemType(), Sampler::setNumberOfRequiedRandomSeeds(), Exodus::setOutputDimension(), Split::setup(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideSetsFromNormals::SideSetsFromNormals(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPoints::SideSetsFromPoints(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObject::SolutionUserObject(), ActuallyExplicitEuler::solve(), FullSolveMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), StitchedMesh::StitchedMesh(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), Constraint::subdomainSetup(), Console::systemInfoFlags(), Terminator::Terminator(), TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction(), ThreadedGeneralUserObject::ThreadedGeneralUserObject(), ThreadedGeneralUserObject::threadJoin(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), TiledMeshGenerator::TiledMeshGenerator(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppCopyTransfer::transfer(), MultiAppMeshFunctionTransfer::transferVariable(), Transient::Transient(), TransientMultiApp::TransientMultiApp(), FEProblemBase::uDotDotOldRequested(), FEProblemBase::uDotOldRequested(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), Axisymmetric2D3DSolutionFunction::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), MultiAppTransfer::variableIntegrityCheck(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), VectorNodalBC::VectorNodalBC(), VectorOfPostprocessors::VectorOfPostprocessors(), VectorPostprocessorFunction::VectorPostprocessorFunction(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), VolumeHistogram::VolumeHistogram(), VTKOutput::VTKOutput(), DOFMapOutput::writeStreamToFile(), and Console::writeStreamToFile().

141  {
142  std::ostringstream oss;
143  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
144  std::string msg = oss.str();
145  callMooseErrorRaw(msg, &_app);
146  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:87
void callMooseErrorRaw(std::string &msg, MooseApp *app)
Definition: MooseObject.C:57
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171

◆ mooseInfo()

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

◆ mooseWarning()

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

◆ name()

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

Get the name of the object.

Returns
The name of the object

Definition at line 51 of file MooseObject.h.

Referenced by GridPartitioner::_do_partition(), FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), Executioner::addAttributeReporter(), DumpObjectsProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarKernel(), DumpObjectsProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), DumpObjectsProblem::addDGKernel(), FEProblemBase::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), DumpObjectsProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), FEProblemBase::addInterfaceKernel(), DumpObjectsProblem::addKernel(), FEProblemBase::addKernel(), FEProblemBase::addMarker(), DumpObjectsProblem::addMaterial(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), MooseMesh::addMortarInterface(), FEProblemBase::addMultiApp(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addNodalKernel(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AllSideSetsByNormalsGenerator::AllSideSetsByNormalsGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), DerivativeParsedMaterialHelper::assembleDerivatives(), AStableDirk4::AStableDirk4(), Function::average(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), FEProblemBase::checkDependMaterialsHelper(), Damper::checkMinDamping(), Material::checkStatefulSanity(), CompositeFunction::CompositeFunction(), Material::computeSubdomainProperties(), VectorPostprocessorVisualizationAux::computeValue(), AuxKernel::coupledCallback(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), MultiApp::createApp(), FEProblemBase::declareVectorPostprocessorVector(), DOFMapOutput::demangle(), DerivativeSumMaterial::DerivativeSumMaterial(), DGKernel::DGKernel(), DumpObjectsProblem::dumpObjectHelper(), ElementValueSampler::ElementValueSampler(), MooseMesh::errorIfDistributedMesh(), AB2PredictorCorrector::estimateTimeError(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), StatisticsVectorPostprocessor::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppVectorPostprocessorTransfer::execute(), HistogramVectorPostprocessor::execute(), MultiAppCopyTransfer::execute(), Exodus::Exodus(), FileOutput::FileOutput(), MultiApp::fillPositions(), PointSamplerBase::finalize(), DerivativeParsedMaterialHelper::findMatPropDerivative(), FunctionDT::FunctionDT(), GeneralUserObject::GeneralUserObject(), LowerDBlockFromSidesetGenerator::generate(), StitchedMeshGenerator::generate(), Material::getADMaterialProperty(), MultiApp::getBoundingBox(), MooseObject::getCheckedPointerParam(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), FEProblemBase::getDistribution(), MultiApp::getExecutioner(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), Marker::getMarkerValue(), FEProblemBase::getMaterial(), NodalPatchRecovery::getMaterialProperty(), AuxKernel::getMaterialProperty(), Material::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), AuxKernel::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), MeshGenerator::getMesh(), MooseMesh::getMortarInterfaceByName(), OutputWarehouse::getOutput(), MooseObject::getParam(), GeneralUserObject::getPostprocessorValue(), AuxKernel::getPostprocessorValue(), FEProblemBase::getPostprocessorValue(), GeneralUserObject::getPostprocessorValueByName(), AuxKernel::getPostprocessorValueByName(), FEProblemBase::getPostprocessorValueOld(), FEProblemBase::getPostprocessorValueOlder(), FEProblemBase::getSampler(), AuxKernel::getScatterVectorPostprocessorValue(), FEProblemBase::getScatterVectorPostprocessorValue(), AuxKernel::getScatterVectorPostprocessorValueByName(), FEProblemBase::getScatterVectorPostprocessorValueOld(), Transient::getTimeStepperName(), AuxKernel::getUserObject(), InitialConditionBase::getUserObject(), FEProblemBase::getUserObject(), InitialConditionBase::getUserObjectBase(), AuxKernel::getUserObjectBase(), FEProblemBase::getUserObjectBase(), AuxKernel::getUserObjectByName(), InitialConditionBase::getUserObjectByName(), GeneralUserObject::getVectorPostprocessorValue(), AuxKernel::getVectorPostprocessorValue(), FEProblemBase::getVectorPostprocessorValue(), GeneralUserObject::getVectorPostprocessorValueByName(), AuxKernel::getVectorPostprocessorValueByName(), FEProblemBase::getVectorPostprocessorValueOld(), FEProblemBase::hasFunction(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasUserObject(), FEProblemBase::hasVectorPostprocessor(), FEProblemBase::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), CSVReader::initialize(), StatisticsVectorPostprocessor::initialize(), HistogramVectorPostprocessor::initialize(), MultiAppProjectionTransfer::initialSetup(), DerivativeFunctionMaterialBase::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPostprocessorData(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), Material::initStatefulProperties(), FEProblemBase::initVectorPostprocessorData(), Function::integral(), InterfaceKernel::InterfaceKernel(), MooseObject::isParamValid(), LinearCombinationFunction::LinearCombinationFunction(), Marker::Marker(), MatDiffusionBase< Real >::MatDiffusionBase(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshSideSetGenerator::MeshSideSetGenerator(), ElementDeleterBase::modify(), MooseVariableInterface< Real >::MooseVariableInterface(), NearestPointBase< LayeredAverage >::NearestPointBase(), NodalValueSampler::NodalValueSampler(), NodalVariableValue::NodalVariableValue(), DOFMapOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), ConsoleUtils::outputOutputInformation(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PointSamplerBase::PointSamplerBase(), Registry::registerObjectsTo(), FEProblemBase::registerRandomInterface(), Material::resetQpProperties(), Sampler::Sampler(), ScalarComponentIC::ScalarComponentIC(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), OutputWarehouse::setFileNumbers(), Exodus::setOutputDimension(), MooseMesh::setSubdomainName(), Split::setup(), TransientMultiApp::setupApp(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), SubProblem::storeSubdomainZeroMatProp(), TaggingInterface::TaggingInterface(), ThreadedGeneralUserObject::ThreadedGeneralUserObject(), TiledMeshGenerator::TiledMeshGenerator(), Function::timeDerivative(), VectorPostprocessorVisualizationAux::timestepSetup(), TransientMultiApp::TransientMultiApp(), MultiAppTransfer::variableIntegrityCheck(), and AdvancedOutput::wantOutput().

51 { return _name; }
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:177

◆ 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 MeshModifiers (i.e. Element deletion).

Definition at line 2255 of file MooseMesh.C.

Referenced by LowerDBlockFromSideset::modify(), and ElementDeleterBase::modify().

2256 {
2257  _needs_prepare_for_use = true;
2258 }
bool _needs_prepare_for_use
True if prepare_for_use should be called when Mesh is prepared.
Definition: MooseMesh.h:887

◆ nElem()

dof_id_type MooseMesh::nElem ( ) const
virtualinherited

Definition at line 2187 of file MooseMesh.C.

2188 {
2189  return getMesh().n_elem();
2190 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ nNodes()

dof_id_type MooseMesh::nNodes ( ) const
virtualinherited

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

Definition at line 2181 of file MooseMesh.C.

2182 {
2183  return getMesh().n_nodes();
2184 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ node() [1/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 464 of file MooseMesh.C.

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

465 {
466  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
467  return nodeRef(i);
468 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:478
void mooseDeprecated(Args &&... args) const
Definition: MooseObject.h:155

◆ node() [2/2]

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

Definition at line 471 of file MooseMesh.C.

472 {
473  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
474  return nodeRef(i);
475 }
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:478
void mooseDeprecated(Args &&... args) const
Definition: MooseObject.h:155

◆ nodePtr() [1/2]

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

Definition at line 496 of file MooseMesh.C.

Referenced by dataLoad().

497 {
498  if (i > getMesh().max_node_id())
499  return (*_quadrature_nodes.find(i)).second;
500 
501  return getMesh().node_ptr(i);
502 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:960
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ nodePtr() [2/2]

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

Definition at line 505 of file MooseMesh.C.

506 {
507  if (i > getMesh().max_node_id())
508  return _quadrature_nodes[i];
509 
510  return getMesh().node_ptr(i);
511 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:960
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ nodeRef() [1/2]

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

◆ nodeRef() [2/2]

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

Definition at line 487 of file MooseMesh.C.

488 {
489  if (i > getMesh().max_node_id())
490  return *_quadrature_nodes[i];
491 
492  return getMesh().node_ref(i);
493 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:960
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ nodeToActiveSemilocalElemMap()

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

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

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

Note
Extra ghosted elements are not included in this map!

Definition at line 754 of file MooseMesh.C.

755 {
756  if (!_node_to_active_semilocal_elem_map_built) // Guard the creation with a double checked lock
757  {
758  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
759 
761 
763  {
764  for (const auto & elem :
765  as_range(getMesh().semilocal_elements_begin(), getMesh().semilocal_elements_end()))
766  if (elem->active())
767  for (unsigned int n = 0; n < elem->n_nodes(); n++)
768  _node_to_active_semilocal_elem_map[elem->node_id(n)].push_back(elem->id());
769 
771  true; // MUST be set at the end for double-checked locking to work!
772  }
773  }
774 
776 }
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:924
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
PetscInt n
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205
PerfID _node_to_active_semilocal_elem_map_timer
Definition: MooseMesh.h:1131
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
A map of all of the current nodes to the active elements that they are connected to.
Definition: MooseMesh.h:923

◆ nodeToElemMap()

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

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

Definition at line 732 of file MooseMesh.C.

Referenced by NodalPatchRecovery::compute(), PenetrationLocator::detectPenetration(), DMMooseGetEmbedding_Private(), NonlinearSystemBase::findImplicitGeometricCouplingEntries(), NearestNodeLocator::findNodes(), LinearNodalConstraint::LinearNodalConstraint(), BreakMeshByBlock::modify(), EqualValueBoundaryConstraint::updateConstrainedNodes(), RandomData::updateGenerators(), and NearestNodeLocator::updatePatch().

733 {
734  if (!_node_to_elem_map_built) // Guard the creation with a double checked lock
735  {
736  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
737 
739  {
740  TIME_SECTION(_node_to_elem_map_timer);
741 
742  for (const auto & elem : getMesh().active_element_ptr_range())
743  for (unsigned int n = 0; n < elem->n_nodes(); n++)
744  _node_to_elem_map[elem->node_id(n)].push_back(elem->id());
745 
746  _node_to_elem_map_built = true; // MUST be set at the end for double-checked locking to work!
747  }
748  }
749 
750  return _node_to_elem_map;
751 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:920
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
A map of all of the current nodes to the elements that they are connected to.
Definition: MooseMesh.h:919
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
PetscInt n
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205
PerfID _node_to_elem_map_timer
Definition: MooseMesh.h:1130

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

Referenced by MooseMesh::meshChanged().

559 {
560 }

◆ operator const libMesh::MeshBase &()

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

Definition at line 2509 of file MooseMesh.C.

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

◆ operator libMesh::MeshBase &()

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

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

Definition at line 2507 of file MooseMesh.C.

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

◆ operator=()

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

◆ paramError()

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

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 100 of file MooseObject.h.

Referenced by ADKernel< compute_stage >::ADKernel(), DGKernel::DGKernel(), ElementValueSampler::ElementValueSampler(), IntegratedBC::IntegratedBC(), Kernel::Kernel(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalValueSampler::NodalValueSampler(), RandomIC::RandomIC(), and MultiAppCopyTransfer::transfer().

101  {
102  auto prefix = param + ": ";
103  if (!_pars.inputLocation(param).empty())
104  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
105  mooseError(prefix, args...);
106  }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ parameters()

const InputParameters& MooseObject::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 57 of file MooseObject.h.

Referenced by FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), DumpObjectsProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarKernel(), DumpObjectsProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), DumpObjectsProblem::addDGKernel(), FEProblemBase::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), DumpObjectsProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), FEProblemBase::addInterfaceKernel(), DumpObjectsProblem::addKernel(), FEProblemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), DumpObjectsProblem::addMaterial(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addNodalKernel(), FEProblemBase::addOutput(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVectorPostprocessor(), AdvancedOutput::AdvancedOutput(), assemble_l2(), Moose::assemble_matrix(), AuxKernel::AuxKernel(), AuxScalarKernel::AuxScalarKernel(), BoundsAux::BoundsAux(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), Moose::compute_bounds(), Moose::compute_jacobian(), Moose::compute_nearnullspace(), Moose::compute_nullspace(), Moose::compute_postcheck(), Moose::compute_transpose_nullspace(), Console::Console(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Executioner::Executioner(), Exodus::Exodus(), FEProblem::FEProblem(), GapValueAux::GapValueAux(), MooseObject::getCheckedPointerParam(), MooseMesh::init(), BlockRestrictable::initializeBlockRestrictable(), FEProblemBase::initNullSpaceVectors(), InterfaceKernel::InterfaceKernel(), isValid(), LayeredSideIntegral::LayeredSideIntegral(), MooseVariableInterface< Real >::MooseVariableInterface(), NearestPointBase< LayeredAverage >::NearestPointBase(), NodeFaceConstraint::NodeFaceConstraint(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), MultiAppProjectionTransfer::projectSolution(), RandomIC::RandomIC(), InputParameterWarehouse::removeInputParameters(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), DumpObjectsProblem::stringifyParameters(), and Transient::Transient().

57 { return _pars; }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168

◆ paramInfo()

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

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

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

Definition at line 131 of file MooseObject.h.

132  {
133  auto prefix = param + ": ";
134  if (!_pars.inputLocation(param).empty())
135  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
136  mooseInfo(prefix, args...);
137  }
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
void mooseInfo(Args &&... args) const
Definition: MooseObject.h:161
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ paramWarning()

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

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 115 of file MooseObject.h.

116  {
117  auto prefix = param + ": ";
118  if (!_pars.inputLocation(param).empty())
119  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
120  mooseWarning(prefix, args...);
121  }
void mooseWarning(Args &&... args) const
Definition: MooseObject.h:149
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ partitionerName()

const MooseEnum& MooseMesh::partitionerName ( ) const
inlineinherited

Definition at line 760 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

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

◆ prepare()

void MooseMesh::prepare ( bool  force = false)
inherited

Calls prepare_for_use() if force=true on the underlying Mesh object, then communicates various boundary information on parallel meshes.

Also calls update() internally.

Definition at line 387 of file MooseMesh.C.

Referenced by SetupMeshCompleteAction::completeSetup(), and MeshModifier::modifyMeshHelper().

388 {
389  TIME_SECTION(_prepare_timer);
390 
391  if (dynamic_cast<DistributedMesh *>(&getMesh()) && !_is_nemesis)
392  {
393  // Call prepare_for_use() and don't mess with the renumbering
394  // setting
395  if (force || _needs_prepare_for_use)
396  getMesh().prepare_for_use();
397  }
398  else
399  {
400  // Call prepare_for_use() and DO NOT allow renumbering
401  getMesh().allow_renumbering(false);
402  if (force || _needs_prepare_for_use)
403  getMesh().prepare_for_use();
404  }
405 
406  // Collect (local) subdomain IDs
407  _mesh_subdomains.clear();
408  for (const auto & elem : getMesh().element_ptr_range())
409  _mesh_subdomains.insert(elem->subdomain_id());
410 
411  // Make sure nodesets have been generated
413 
414  // Collect (local) boundary IDs
415  const std::set<BoundaryID> & local_bids = getMesh().get_boundary_info().get_boundary_ids();
416  _mesh_boundary_ids.insert(local_bids.begin(), local_bids.end());
417 
418  const std::set<BoundaryID> & local_node_bids =
419  getMesh().get_boundary_info().get_node_boundary_ids();
420  _mesh_nodeset_ids.insert(local_node_bids.begin(), local_node_bids.end());
421 
422  const std::set<BoundaryID> & local_side_bids =
423  getMesh().get_boundary_info().get_side_boundary_ids();
424  _mesh_sideset_ids.insert(local_side_bids.begin(), local_side_bids.end());
425 
426  // Communicate subdomain and boundary IDs if this is a parallel mesh
427  if (!getMesh().is_serial())
428  {
429  _communicator.set_union(_mesh_subdomains);
430  _communicator.set_union(_mesh_boundary_ids);
431  _communicator.set_union(_mesh_nodeset_ids);
432  _communicator.set_union(_mesh_sideset_ids);
433  }
434 
436 
437  update();
438 
439  // Prepared has been called
440  _is_prepared = true;
441  _needs_prepare_for_use = false;
442 }
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:881
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:884
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:2119
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:445
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:940
PerfID _prepare_timer
Timers.
Definition: MooseMesh.h:1123
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:938
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:939
bool detectOrthogonalDimRanges(Real tol=1e-6)
This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
Definition: MooseMesh.C:1319
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:930
bool _needs_prepare_for_use
True if prepare_for_use should be called when Mesh is prepared.
Definition: MooseMesh.h:887

◆ prepared() [1/2]

bool MooseMesh::prepared ( ) const
inherited

Setter/getter for the _is_prepared flag.

Definition at line 2243 of file MooseMesh.C.

Referenced by SetupMeshCompleteAction::completeSetup(), and MooseApp::executeMeshModifiers().

2244 {
2245  return _is_prepared;
2246 }
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:884

◆ prepared() [2/2]

void MooseMesh::prepared ( bool  state)
inherited

Definition at line 2249 of file MooseMesh.C.

2250 {
2251  _is_prepared = state;
2252 }
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:884

◆ printInfo()

void MooseMesh::printInfo ( std::ostream &  os = libMesh::out) const
inherited

Calls print_info() on the underlying Mesh.

Definition at line 2533 of file MooseMesh.C.

Referenced by Adaptivity::adaptMesh().

2534 {
2535  getMesh().print_info(os);
2536 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ queryElemPtr() [1/2]

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

Definition at line 2231 of file MooseMesh.C.

Referenced by EqualValueBoundaryConstraint::updateConstrainedNodes().

2232 {
2233  return getMesh().query_elem_ptr(i);
2234 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ queryElemPtr() [2/2]

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

Definition at line 2237 of file MooseMesh.C.

2238 {
2239  return getMesh().query_elem_ptr(i);
2240 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ queryNodePtr() [1/2]

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

Definition at line 514 of file MooseMesh.C.

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

515 {
516  if (i > getMesh().max_node_id())
517  return (*_quadrature_nodes.find(i)).second;
518 
519  return getMesh().query_node_ptr(i);
520 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:960
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

◆ queryNodePtr() [2/2]

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

Definition at line 523 of file MooseMesh.C.

524 {
525  if (i > getMesh().max_node_id())
526  return _quadrature_nodes[i];
527 
528  return getMesh().query_node_ptr(i);
529 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:960
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512

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

Referenced by FEProblemBase::meshChangedHelper().

582 {
583  return _refined_elements.get();
584 }
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:890

◆ registerTimedSection()

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
)
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 50 of file PerfGraphInterface.C.

51 {
52  if (_prefix != "")
53  return _perf_graph.registerSection(_prefix + "::" + section_name, level);
54  else
55  return _perf_graph.registerSection(section_name, level);
56 }
PerfGraph & _perf_graph
The performance graph to add to.
std::string _prefix
A prefix to use for all sections.
PerfID registerSection(const std::string &section_name, unsigned int level)
Registers a named section of code.
Definition: PerfGraph.C:41

◆ safeClone()

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

67 {
68  return libmesh_make_unique<RinglebMesh>(*this);
69 }

◆ setBoundaryName()

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

This method returns a writable reference to a boundary name based on the id parameter.

Definition at line 1166 of file MooseMesh.C.

Referenced by SetupMeshAction::setupMesh().

1167 {
1168  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1169 
1170  std::vector<BoundaryID> side_boundaries;
1171  boundary_info.build_side_boundary_ids(side_boundaries);
1172 
1173  // We need to figure out if this boundary is a sideset or nodeset
1174  if (std::find(side_boundaries.begin(), side_boundaries.end(), boundary_id) !=
1175  side_boundaries.end())
1176  boundary_info.sideset_name(boundary_id) = name;
1177  else
1178  boundary_info.nodeset_name(boundary_id) = name;
1179 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ setBoundaryToNormalMap() [1/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 2291 of file MooseMesh.C.

Referenced by AddAllSideSetsByNormals::modify().

2293 {
2294  _boundary_to_normal_map = std::move(boundary_map);
2295 }
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:944

◆ setBoundaryToNormalMap() [2/2]

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

Definition at line 2298 of file MooseMesh.C.

2299 {
2300  mooseDeprecated("setBoundaryToNormalMap(std::map<BoundaryID, RealVectorValue> * boundary_map) is "
2301  "deprecated, use the unique_ptr version instead");
2302  _boundary_to_normal_map.reset(boundary_map);
2303 }
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:944
void mooseDeprecated(Args &&... args) const
Definition: MooseObject.h:155

◆ setCustomPartitioner()

void MooseMesh::setCustomPartitioner ( Partitioner *  partitioner)
inherited

Setter for custom partitioner.

Definition at line 2663 of file MooseMesh.C.

2664 {
2665  _custom_partitioner = partitioner->clone();
2666 }
std::unique_ptr< Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:858

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

Referenced by SetupMeshAction::setupMesh().

2325 {
2326  _ghosted_boundaries_inflation = inflation;
2327 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:972

◆ setIsCustomPartitionerRequested()

void MooseMesh::setIsCustomPartitionerRequested ( bool  cpr)
inherited

Definition at line 2691 of file MooseMesh.C.

2692 {
2694 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:859

◆ setMeshBoundaryIDs()

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

Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.

Definition at line 2285 of file MooseMesh.C.

Referenced by AddAllSideSetsByNormals::modify().

2286 {
2287  _mesh_boundary_ids = boundary_IDs;
2288 }
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:938

◆ setPatchUpdateStrategy()

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

Set the patch size update strategy.

Definition at line 2477 of file MooseMesh.C.

2478 {
2479  _patch_update_strategy = patch_update_strategy;
2480 }
Moose::PatchUpdateType _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:984

◆ setSubdomainName()

void MooseMesh::setSubdomainName ( SubdomainID  subdomain_id,
SubdomainName  name 
)
inherited

This method returns a writable reference to a subdomain name based on the id parameter.

Definition at line 1154 of file MooseMesh.C.

Referenced by MooseMesh::addMortarInterface(), MooseMesh::MooseMesh(), and SetupMeshAction::setupMesh().

1155 {
1156  getMesh().subdomain_name(subdomain_id) = name;
1157 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ setUniformRefineLevel()

void MooseMesh::setUniformRefineLevel ( unsigned int  level)
inherited

Set uniform refinement level.

Definition at line 2312 of file MooseMesh.C.

Referenced by SetupMeshAction::setupMesh().

2313 {
2314  _uniform_refine_level = level;
2315 }
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:875

◆ sideWithBoundaryID()

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

Calls BoundaryInfo::side_with_boundary_id().

Definition at line 2151 of file MooseMesh.C.

2152 {
2153  return getMesh().get_boundary_info().side_with_boundary_id(elem, boundary_id);
2154 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2512
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2205

◆ type()

const std::string& MooseObject::type ( ) const
inlineinherited

Get the type of this object.

Returns
the name of the type of this object

Definition at line 45 of file MooseObject.h.

Referenced by DumpObjectsProblem::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), DumpObjectsProblem::addAuxVariable(), DisplacedProblem::addAuxVariable(), FEProblemBase::addAuxVariable(), DumpObjectsProblem::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), DumpObjectsProblem::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), DumpObjectsProblem::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), DumpObjectsProblem::addKernel(), DumpObjectsProblem::addMaterial(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarVariable(), PhysicsBasedPreconditioner::addSystem(), FEProblemBase::addTimeIntegrator(), DumpObjectsProblem::addVariable(), DisplacedProblem::addVariable(), FEProblemBase::addVariable(), FEProblemBase::advanceMultiApps(), FEProblemBase::backupMultiApps(), MooseMesh::buildRefinementAndCoarseningMaps(), FEProblemBase::computeAuxiliaryKernels(), ElemElemConstraint::computeElemNeighJacobian(), InterfaceKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighResidual(), InterfaceKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), FEProblemBase::computeMultiAppsDT(), InterfaceKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), DGConvection::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGDiffusion::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), DGConvection::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), DGDiffusion::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), EqualValueEmbeddedConstraint::computeQpResidual(), FEProblemBase::computeUserObjects(), DisplacedProblem::createQRules(), FEProblemBase::createQRules(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), FEProblemBase::execTransfers(), FEProblemBase::finishMultiAppStep(), ElementSubdomainIDGenerator::generate(), ElementGenerator::getElemType(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), FEProblemBase::getTransfers(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), SolutionUserObject::initialSetup(), AdvancedOutput::initShowHideLists(), AssignElementSubdomainID::modify(), ControlOutput::output(), Gnuplot::output(), Exodus::output(), CSV::output(), Console::output(), Nemesis::output(), AdvancedOutput::output(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), FEProblemBase::restoreMultiApps(), FEProblemBase::setCoupling(), FileOutput::shouldOutput(), Output::shouldOutput(), AdvancedOutput::shouldOutput(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), and AdvancedOutput::wantOutput().

45 { return _type; }
const std::string & _type
The type of this object (the Class name)
Definition: MooseObject.h:174

◆ uniformRefineLevel()

unsigned int MooseMesh::uniformRefineLevel ( ) const
inherited

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

Definition at line 2306 of file MooseMesh.C.

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

2307 {
2308  return _uniform_refine_level;
2309 }
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:875

◆ update()

void MooseMesh::update ( )
inherited

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

Definition at line 445 of file MooseMesh.C.

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

446 {
447  TIME_SECTION(_update_timer);
448 
449  // Rebuild the boundary conditions
451 
452  // Update the node to elem map
453  _node_to_elem_map.clear();
454  _node_to_elem_map_built = false;
457 
458  buildNodeList();
460  cacheInfo();
461 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:920
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
A map of all of the current nodes to the elements that they are connected to.
Definition: MooseMesh.h:919
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:924
void cacheInfo()
Definition: MooseMesh.C:856
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
D