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

#include <FileMesh.h>

Inheritance diagram for FileMesh:
[legend]

Public Member Functions

 FileMesh (const InputParameters &parameters)
 
 FileMesh (const FileMesh &other_mesh)
 
virtual ~FileMesh ()
 
virtual MooseMeshclone () const override
 Clone method. More...
 
virtual void buildMesh () override
 Must be overridden by child classes. More...
 
void read (const std::string &file_name)
 
virtual ExodusII_IO * exReader () const override
 Not implemented – always returns NULL. More...
 
void setFileName (const std::string &file_name)
 
const std::string & getFileName () const
 
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...
 
template<typename T >
const std::set< T > & getBlockOrBoundaryIDs () const
 Templated helper that returns either block or boundary IDs depending on the template argument. More...
 
template<>
const std::set< SubdomainID > & getBlockOrBoundaryIDs () const
 
template<>
const std::set< BoundaryID > & getBlockOrBoundaryIDs () const
 
template<typename T >
getAnyID () const
 Templated helper that returns either the ang block or any boundary ID depending on the template argument. More...
 
template<>
SubdomainID getAnyID () const
 
template<>
BoundaryID getAnyID () const
 
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...
 
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...
 
void setPatchUpdateStrategy (MooseEnum patch_update_strategy)
 Set the patch size update strategy. More...
 
const MooseEnumgetPatchUpdateStrategy () 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
 
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...
 
void errorIfParallelDistribution (std::string name) const
 Deprecated. More...
 
bool isDistributedMesh () const
 Returns the final Mesh distribution type. More...
 
bool isDistributionForced () const
 Tell the user if the distribution was overriden for any reason. More...
 
bool isParallelTypeForced () const
 
const MooseEnumpartitionerName () const
 
bool isPartitionerForced () const
 Tell the user if the partitioner was overriden for any reason. More...
 
void allowRecovery (bool allow)
 Set whether or not this mesh is allowed to read a recovery file. More...
 
void 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 isCustomPartitionerRequested () const
 Setter and getter for _custom_partitioner_requested. More...
 
void setIsCustomPartitionerRequested (bool cpr)
 
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...
 
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...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp ()
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled ()
 Return the enabled status of the object. 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
 

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

Protected Attributes

std::string _file_name
 the file_name from whence this mesh came More...
 
std::unique_ptr< ExodusII_IO > _exreader
 Auxiliary object for restart. More...
 
std::vector< std::unique_ptr< GhostingFunctor > > _ghosting_functors
 
MooseEnum _mesh_distribution_type
 Can be set to PARALLEL, SERIAL, or DEFAULT. 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. NOTE: the child element pointers ARE PROBABLY INVALID. Only use them for indexing! 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...
 
MooseEnum _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...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. 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...
 
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

Definition at line 26 of file FileMesh.h.

Member Typedef Documentation

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

Definition at line 958 of file MooseMesh.h.

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

Definition at line 951 of file MooseMesh.h.

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

Definition at line 959 of file MooseMesh.h.

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

Definition at line 952 of file MooseMesh.h.

Member Enumeration Documentation

anonymous enum
protectedinherited

Convenience enums.

Enumerator

Definition at line 867 of file MooseMesh.h.

868  {
869  X = 0,
870  Y,
871  Z
872  };
anonymous enum
protectedinherited
Enumerator
MIN 
MAX 

Definition at line 873 of file MooseMesh.h.

874  {
875  MIN = 0,
876  MAX
877  };

Constructor & Destructor Documentation

FileMesh::FileMesh ( const InputParameters parameters)

Definition at line 35 of file FileMesh.C.

Referenced by clone().

36  : MooseMesh(parameters), _file_name(getParam<MeshFileName>("file"))
37 {
38  getMesh().set_mesh_dimension(getParam<MooseEnum>("dim"));
39 }
std::string _file_name
the file_name from whence this mesh came
Definition: FileMesh.h:46
MooseMesh(const InputParameters &parameters)
Typical "Moose-style" constructor and copy constructor.
Definition: MooseMesh.C:156
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
FileMesh::FileMesh ( const FileMesh other_mesh)

Definition at line 41 of file FileMesh.C.

42  : MooseMesh(other_mesh), _file_name(other_mesh._file_name)
43 {
44 }
std::string _file_name
the file_name from whence this mesh came
Definition: FileMesh.h:46
MooseMesh(const InputParameters &parameters)
Typical "Moose-style" constructor and copy constructor.
Definition: MooseMesh.C:156
FileMesh::~FileMesh ( )
virtual

Definition at line 46 of file FileMesh.C.

46 {}

Member Function Documentation

MeshBase::const_element_iterator MooseMesh::activeLocalElementsBegin ( )
inherited

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

Definition at line 2065 of file MooseMesh.C.

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

2066 {
2067  return getMesh().active_local_elements_begin();
2068 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
const MeshBase::const_element_iterator MooseMesh::activeLocalElementsEnd ( )
inherited

Definition at line 2071 of file MooseMesh.C.

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

2072 {
2073  return getMesh().active_local_elements_end();
2074 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
void MooseMesh::addGhostedBoundary ( BoundaryID  boundary_id)
inherited

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

Definition at line 2214 of file MooseMesh.C.

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

2215 {
2216  _ghosted_boundaries.insert(boundary_id);
2217 }
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:974
void MooseMesh::addMortarInterface ( const std::string &  name,
BoundaryName  master,
BoundaryName  slave,
SubdomainName  domain_id 
)
inherited

Definition at line 2607 of file MooseMesh.C.

2611 {
2612  SubdomainID domain_id = getSubdomainID(domain_name);
2613  boundary_id_type master_id = getBoundaryID(master);
2614  boundary_id_type slave_id = getBoundaryID(slave);
2615 
2616  std::unique_ptr<MortarInterface> iface = libmesh_make_unique<MortarInterface>();
2617 
2618  iface->_id = domain_id;
2619  iface->_master = master;
2620  iface->_slave = slave;
2621  iface->_name = name;
2622 
2623  MeshBase::element_iterator el = _mesh->level_elements_begin(0);
2624  const MeshBase::element_iterator end_el = _mesh->level_elements_end(0);
2625  for (; el != end_el; ++el)
2626  {
2627  Elem * elem = *el;
2628  if (elem->subdomain_id() == domain_id)
2629  iface->_elems.push_back(elem);
2630  }
2631 
2632  setSubdomainName(iface->_id, name);
2633 
2634  _mortar_interface.push_back(std::move(iface));
2636  _mortar_interface_by_ids[std::pair<BoundaryID, BoundaryID>(master_id, slave_id)] =
2637  _mortar_interface.back().get();
2638 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
std::map< std::pair< BoundaryID, BoundaryID >, MortarInterface * > _mortar_interface_by_ids
Mortar interfaces mapped though master, slave IDs pairs.
Definition: MooseMesh.h:1002
subdomain_id_type SubdomainID
Definition: MooseTypes.h:77
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
Get the associated subdomain ID for the subdomain name.
Definition: MooseMesh.C:1036
std::vector< std::unique_ptr< MortarInterface > > _mortar_interface
Definition: MooseMesh.h:1000
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:968
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:1079
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:856
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
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 1427 of file MooseMesh.C.

Referenced by AddPeriodicBCAction::setPeriodicVars().

1428 {
1430  return;
1431 
1432  _periodic_dim[var_num].resize(dimension());
1433 
1434  _half_range = Point(dimensionWidth(0) / 2.0, dimensionWidth(1) / 2.0, dimensionWidth(2) / 2.0);
1435 
1436  for (unsigned int component = 0; component < dimension(); ++component)
1437  {
1438  const std::pair<BoundaryID, BoundaryID> * boundary_ids = getPairedBoundaryMapping(component);
1439 
1440  if (boundary_ids != nullptr &&
1441  ((boundary_ids->first == primary && boundary_ids->second == secondary) ||
1442  (boundary_ids->first == secondary && boundary_ids->second == primary)))
1443  _periodic_dim[var_num][component] = true;
1444  }
1445 }
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:1984
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition: MooseMesh.C:1403
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:1491
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
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 886 of file MooseMesh.C.

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

891 {
892  Node * qnode;
893 
894  if (_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) ==
896  {
897  // Create a new node id starting from the max node id and counting down. This will be the least
898  // likely to collide with an existing node id.
899  // Note that we are using numeric_limits<unsigned>::max even
900  // though max_id is stored as a dof_id_type. I tried this with
901  // numeric_limits<dof_id_type>::max and it broke several tests in
902  // MOOSE. So, this is some kind of a magic number that we will
903  // just continue to use...
904  dof_id_type max_id = std::numeric_limits<unsigned int>::max() - 100;
905  dof_id_type new_id = max_id - _quadrature_nodes.size();
906 
907  if (new_id <= getMesh().max_node_id())
908  mooseError("Quadrature node id collides with existing node id!");
909 
910  qnode = new Node(point, new_id);
911 
912  // Keep track of this new node in two different ways for easy lookup
913  _quadrature_nodes[new_id] = qnode;
914  _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp] = qnode;
915 
916  if (elem->active())
917  {
918  _node_to_elem_map[new_id].push_back(elem->id());
919  _node_to_active_semilocal_elem_map[new_id].push_back(elem->id());
920  }
921  }
922  else
923  qnode = _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
924 
925  BndNode * bnode = new BndNode(qnode, bid);
926  _bnd_nodes.push_back(bnode);
927  _bnd_node_ids[bid].insert(qnode->id());
928 
929  _extra_bnd_nodes.push_back(*bnode);
930 
931  // Do this so the range will be regenerated next time it is accessed
932  _bnd_node_range.reset();
933 
934  return qnode;
935 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:963
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:920
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:954
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:950
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:966
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:965
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:915
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
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:924
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 852 of file MooseMesh.C.

853 {
858  if (getMesh().n_nodes() != _node_map.size())
859  {
860  _node_map.clear();
861  _node_map.reserve(getMesh().n_nodes());
862  for (const auto & node : getMesh().node_ptr_range())
863  _node_map.push_back(node);
864  }
865 
866  Node * node = nullptr;
867  for (unsigned int i = 0; i < _node_map.size(); ++i)
868  {
869  if (p.relative_fuzzy_equals(*_node_map[i], tol))
870  {
871  node = _node_map[i];
872  break;
873  }
874  }
875  if (node == nullptr)
876  {
877  node = getMesh().add_node(new Node(p));
878  _node_map.push_back(node);
879  }
880 
881  mooseAssert(node != nullptr, "Node is NULL");
882  return node;
883 }
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:423
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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
void MooseMesh::allowRecovery ( bool  allow)
inlineinherited

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

Definition at line 785 of file MooseMesh.h.

785 { _allow_recovery = allow; }
bool _allow_recovery
Whether or not this Mesh is allowed to read a recovery file.
Definition: MooseMesh.h:1117
MooseMesh::bnd_elem_iterator MooseMesh::bndElemsBegin ( )
virtualinherited

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

Definition at line 837 of file MooseMesh.C.

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

838 {
839  Predicates::NotNull<bnd_elem_iterator_imp> p;
840  return bnd_elem_iterator(_bnd_elems.begin(), _bnd_elems.end(), p);
841 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:957
MooseMesh::bnd_elem_iterator MooseMesh::bndElemsEnd ( )
virtualinherited

Definition at line 845 of file MooseMesh.C.

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

846 {
847  Predicates::NotNull<bnd_elem_iterator_imp> p;
848  return bnd_elem_iterator(_bnd_elems.end(), _bnd_elems.end(), p);
849 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:957
MooseMesh::bnd_node_iterator MooseMesh::bndNodesBegin ( )
virtualinherited

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

Definition at line 821 of file MooseMesh.C.

Referenced by MooseMesh::getBoundaryNodeRange().

822 {
823  Predicates::NotNull<bnd_node_iterator_imp> p;
824  return bnd_node_iterator(_bnd_nodes.begin(), _bnd_nodes.end(), p);
825 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:950
MooseMesh::bnd_node_iterator MooseMesh::bndNodesEnd ( )
virtualinherited

Definition at line 829 of file MooseMesh.C.

Referenced by MooseMesh::getBoundaryNodeRange().

830 {
831  Predicates::NotNull<bnd_node_iterator_imp> p;
832  return bnd_node_iterator(_bnd_nodes.end(), _bnd_nodes.end(), p);
833 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:950
void MooseMesh::buildBndElemList ( )
inherited

Boundary node list (node ids and corresponding side-set ids, arrays always have the same length)

Definition at line 661 of file MooseMesh.C.

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

662 {
663  freeBndElems();
664 
666  std::vector<dof_id_type> elems;
667  std::vector<unsigned short int> sides;
668  std::vector<boundary_id_type> ids;
669  getMesh().get_boundary_info().build_active_side_list(elems, sides, ids);
670 
671  int n = elems.size();
672  _bnd_elems.resize(n);
673  for (int i = 0; i < n; i++)
674  {
675  _bnd_elems[i] = new BndElement(getMesh().elem_ptr(elems[i]), sides[i], ids[i]);
676  _bnd_elem_ids[ids[i]].insert(elems[i]);
677  }
678 }
void freeBndElems()
Definition: MooseMesh.C:337
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:961
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:957
PetscInt n
void FileMesh::buildMesh ( )
overridevirtual

Must be overridden by child classes.

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

Implements MooseMesh.

Definition at line 55 of file FileMesh.C.

56 {
57  std::string _file_name = getParam<MeshFileName>("file");
58 
59  Moose::perf_log.push("Read Mesh", "Setup");
60  if (_is_nemesis)
61  {
62  // Nemesis_IO only takes a reference to DistributedMesh, so we can't be quite so short here.
63  DistributedMesh & pmesh = cast_ref<DistributedMesh &>(getMesh());
64  Nemesis_IO(pmesh).read(_file_name);
65 
66  getMesh().allow_renumbering(false);
67 
68  // Even if we want repartitioning when load balancing later, we'll
69  // begin with the default partitioning defined by the Nemesis
70  // file.
71  bool skip_partitioning_later = getMesh().skip_partitioning();
72  getMesh().skip_partitioning(true);
73  getMesh().prepare_for_use();
74  getMesh().skip_partitioning(skip_partitioning_later);
75  }
76  else // not reading Nemesis files
77  {
78  // See if the user has requested reading a solution from the file. If so, we'll need to read
79  // the mesh with the exodus reader instead of using mesh.read(). This will read the mesh on
80  // every processor
81 
82  if (_app.setFileRestart() && (_file_name.rfind(".exd") < _file_name.size() ||
83  _file_name.rfind(".e") < _file_name.size()))
84  {
86 
87  _exreader = libmesh_make_unique<ExodusII_IO>(getMesh());
88  _exreader->read(_file_name);
89 
90  getMesh().allow_renumbering(false);
91  getMesh().prepare_for_use();
92  }
93  else
94  {
95  auto slash_pos = _file_name.find_last_of("/");
96  auto path = _file_name.substr(0, slash_pos);
97  auto file = _file_name.substr(slash_pos + 1);
98 
99  bool restarting;
100  // If we are reading a mesh while restarting, then we might have
101  // a solution file that relies on that mesh partitioning and/or
102  // numbering. In that case, we need to turn off repartitioning
103  // and renumbering, at least at first.
104  if (file == "LATEST")
105  {
106  std::list<std::string> dir_list(1, path);
107  std::list<std::string> files = MooseUtils::getFilesInDirs(dir_list);
108 
109  // Fill in the name of the LATEST file so we can open it and read it.
110  _file_name = MooseUtils::getLatestMeshCheckpointFile(files);
111  restarting = true;
112  }
113  else
114  restarting = _file_name.rfind(".cpa") < _file_name.size() ||
115  _file_name.rfind(".cpr") < _file_name.size();
116 
117  const bool skip_partitioning_later = restarting && getMesh().skip_partitioning();
118  const bool allow_renumbering_later = restarting && getMesh().allow_renumbering();
119 
120  if (restarting)
121  {
122  getMesh().skip_partitioning(true);
123  getMesh().allow_renumbering(false);
124  }
125 
126  MooseUtils::checkFileReadable(_file_name);
127  getMesh().read(_file_name);
128 
129  if (restarting)
130  {
131  getMesh().allow_renumbering(allow_renumbering_later);
132  getMesh().skip_partitioning(skip_partitioning_later);
133  }
134  }
135  }
136 
137  Moose::perf_log.pop("Read Mesh", "Setup");
138 }
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:886
bool & setFileRestart()
This method is here so we can determine whether or not we need to use a separate reader to read the m...
Definition: MooseApp.h:271
std::string _file_name
the file_name from whence this mesh came
Definition: FileMesh.h:46
std::list< std::string > getFilesInDirs(const std::list< std::string > &directory_list)
Retrieves the names of all of the files contained within the list of directories passed into the rout...
Definition: MooseUtils.C:466
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:121
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
PerfLog perf_log
Perflog to be used by applications.
std::string getLatestMeshCheckpointFile(const std::list< std::string > &checkpoint_files)
Returns the most recent checkpoint or mesh file given a list of files.
Definition: MooseUtils.C:495
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
std::unique_ptr< ExodusII_IO > _exreader
Auxiliary object for restart.
Definition: FileMesh.h:48
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.

Boundary node list (node ids and corresponding side-set ids, arrays always have the same length)

Definition at line 628 of file MooseMesh.C.

Referenced by MooseMesh::update().

629 {
630  freeBndNodes();
631 
633  std::vector<dof_id_type> nodes;
634  std::vector<boundary_id_type> ids;
635  getMesh().get_boundary_info().build_node_list(nodes, ids);
636 
637  int n = nodes.size();
638  _bnd_nodes.resize(n);
639  for (int i = 0; i < n; i++)
640  {
641  _bnd_nodes[i] = new BndNode(getMesh().node_ptr(nodes[i]), ids[i]);
642  _node_set_nodes[ids[i]].push_back(nodes[i]);
643  _bnd_node_ids[ids[i]].insert(nodes[i]);
644  }
645 
646  _bnd_nodes.reserve(_bnd_nodes.size() + _extra_bnd_nodes.size());
647  for (unsigned int i = 0; i < _extra_bnd_nodes.size(); i++)
648  {
649  BndNode * bnode = new BndNode(_extra_bnd_nodes[i]._node, _extra_bnd_nodes[i]._bnd_id);
650  _bnd_nodes.push_back(bnode);
651  _bnd_node_ids[ids[i]].insert(_extra_bnd_nodes[i]._node->id());
652  }
653 
654  BndNodeCompare mein_kompfare;
655 
656  // This sort is here so that boundary conditions are always applied in the same order
657  std::sort(_bnd_nodes.begin(), _bnd_nodes.end(), mein_kompfare);
658 }
Helper class for sorting Boundary Nodes so that we always get the same order of application for bound...
Definition: MooseMesh.C:604
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:954
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:972
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:950
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:966
PetscInt n
void freeBndNodes()
Definition: MooseMesh.C:319
void MooseMesh::buildNodeListFromSideList ( )
inherited

Calls BoundaryInfo::build_node_list_from_side_list().

Definition at line 2032 of file MooseMesh.C.

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

2033 {
2035  getMesh().get_boundary_info().build_node_list_from_side_list();
2036 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1120
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 1123 of file MooseMesh.C.

1126 {
1127  mooseAssert(!Threads::in_threads,
1128  "This function should only be called outside of a threaded "
1129  "region due to the use of PointLocator");
1130 
1131  periodic_node_map.clear();
1132 
1133  std::unique_ptr<PointLocatorBase> point_locator = getMesh().sub_point_locator();
1134 
1135  // Get a const reference to the BoundaryInfo object that we will use several times below...
1136  const BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1137 
1138  // A typedef makes the code below easier to read...
1139  typedef std::multimap<dof_id_type, dof_id_type>::iterator IterType;
1140 
1141  // Container to catch IDs passed back from the BoundaryInfo object
1142  std::vector<boundary_id_type> bc_ids;
1143 
1144  for (const auto & elem : getMesh().active_element_ptr_range())
1145  for (unsigned int s = 0; s < elem->n_sides(); ++s)
1146  {
1147  if (elem->neighbor_ptr(s))
1148  continue;
1149 
1150  boundary_info.boundary_ids(elem, s, bc_ids);
1151  for (const auto & boundary_id : bc_ids)
1152  {
1153  const PeriodicBoundaryBase * periodic = pbs->boundary(boundary_id);
1154  if (periodic && periodic->is_my_variable(var_number))
1155  {
1156  const Elem * neigh = pbs->neighbor(boundary_id, *point_locator, elem, s);
1157  unsigned int s_neigh =
1158  boundary_info.side_with_boundary_id(neigh, periodic->pairedboundary);
1159 
1160  std::unique_ptr<const Elem> elem_side = elem->build_side_ptr(s);
1161  std::unique_ptr<const Elem> neigh_side = neigh->build_side_ptr(s_neigh);
1162 
1163  // At this point we have matching sides - lets find matching nodes
1164  for (unsigned int i = 0; i < elem_side->n_nodes(); ++i)
1165  {
1166  const Node * master_node = elem->node_ptr(i);
1167  Point master_point = periodic->get_corresponding_pos(*master_node);
1168  for (unsigned int j = 0; j < neigh_side->n_nodes(); ++j)
1169  {
1170  const Node * slave_node = neigh_side->node_ptr(j);
1171  if (master_point.absolute_fuzzy_equals(*slave_node))
1172  {
1173  // Avoid inserting any duplicates
1174  std::pair<IterType, IterType> iters =
1175  periodic_node_map.equal_range(master_node->id());
1176  bool found = false;
1177  for (IterType map_it = iters.first; map_it != iters.second; ++map_it)
1178  if (map_it->second == slave_node->id())
1179  found = true;
1180  if (!found)
1181  {
1182  periodic_node_map.insert(std::make_pair(master_node->id(), slave_node->id()));
1183  periodic_node_map.insert(std::make_pair(slave_node->id(), master_node->id()));
1184  }
1185  }
1186  }
1187  }
1188  }
1189  }
1190  }
1191 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
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 1194 of file MooseMesh.C.

1197 {
1198  periodic_node_sets.clear();
1199 
1200  std::vector<dof_id_type> nl;
1201  std::vector<boundary_id_type> il;
1202 
1203  getMesh().get_boundary_info().build_node_list(nl, il);
1204 
1205  // Loop over all the boundary nodes adding the periodic nodes to the appropriate set
1206  for (unsigned int i = 0; i < nl.size(); ++i)
1207  {
1208  // Is this current node on a known periodic boundary?
1209  if (periodic_node_sets.find(il[i]) != periodic_node_sets.end())
1210  periodic_node_sets[il[i]].insert(nl[i]);
1211  else // This still might be a periodic node but we just haven't seen this boundary_id yet
1212  {
1213  const PeriodicBoundaryBase * periodic = pbs->boundary(il[i]);
1214  if (periodic && periodic->is_my_variable(var_number))
1215  periodic_node_sets[il[i]].insert(nl[i]);
1216  }
1217  }
1218 }
NonlinearSystemBase * nl
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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 1509 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup().

1510 {
1511  std::map<ElemType, Elem *> canonical_elems;
1512 
1513  // First, loop over all elements and find a canonical element for each type
1514  // Doing it this way guarantees that this is going to work in parallel
1515  for (const auto & elem : getMesh().element_ptr_range()) // TODO: Thread this
1516  {
1517  ElemType type = elem->type();
1518 
1519  if (canonical_elems.find(type) ==
1520  canonical_elems.end()) // If we haven't seen this type of elem before save it
1521  canonical_elems[type] = elem;
1522  else
1523  {
1524  Elem * stored = canonical_elems[type];
1525  if (elem->id() < stored->id()) // Arbitrarily keep the one with a lower id
1526  canonical_elems[type] = elem;
1527  }
1528  }
1529  // Now build the maps using these templates
1530  // Note: This MUST be done NOT threaded!
1531  for (const auto & can_it : canonical_elems)
1532  {
1533  Elem * elem = can_it.second;
1534 
1535  // Need to do this just once to get the right qrules put in place
1536  assembly->setCurrentSubdomainID(elem->subdomain_id());
1537  assembly->reinit(elem);
1538  assembly->reinit(elem, 0);
1539  QBase * qrule = assembly->qRule();
1540  QBase * qrule_face = assembly->qRuleFace();
1541 
1542  // Volume to volume projection for refinement
1543  buildRefinementMap(*elem, *qrule, *qrule_face, -1, -1, -1);
1544 
1545  // Volume to volume projection for coarsening
1546  buildCoarseningMap(*elem, *qrule, *qrule_face, -1);
1547 
1548  // Map the sides of children
1549  for (unsigned int side = 0; side < elem->n_sides(); side++)
1550  {
1551  // Side to side for sides that match parent's sides
1552  buildRefinementMap(*elem, *qrule, *qrule_face, side, -1, side);
1553  buildCoarseningMap(*elem, *qrule, *qrule_face, side);
1554  }
1555 
1556  // Child side to parent volume mapping for "internal" child sides
1557  for (unsigned int child = 0; child < elem->n_children(); ++child)
1558  for (unsigned int side = 0; side < elem->n_sides();
1559  ++side) // Assume children have the same number of sides!
1560  if (!elem->is_child_on_side(child, side)) // Otherwise we already computed that map
1561  buildRefinementMap(*elem, *qrule, *qrule_face, -1, child, side);
1562  }
1563 }
QBase *& qRuleFace()
Returns the reference to the current quadrature being used on a current face.
Definition: Assembly.h:165
QBase *& qRule()
Returns the reference to the current quadrature being used.
Definition: Assembly.h:129
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition: Assembly.C:650
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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:1643
MatType type
void setCurrentSubdomainID(SubdomainID i)
set the current subdomain ID
Definition: Assembly.h:199
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:1566
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
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.

Definition at line 2039 of file MooseMesh.C.

Referenced by PenetrationLocator::detectPenetration().

2042 {
2043  getMesh().get_boundary_info().build_side_list(el, sl, il);
2044 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
void MooseMesh::cacheChangedLists ( )
inherited

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

Definition at line 520 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged().

521 {
522  ConstElemRange elem_range(getMesh().local_elements_begin(), getMesh().local_elements_end(), 1);
523  CacheChangedListsThread cclt(*this);
524  Threads::parallel_reduce(elem_range, cclt);
525 
527 
528  _refined_elements = libmesh_make_unique<ConstElemPointerRange>(cclt._refined_elements.begin(),
529  cclt._refined_elements.end());
530  _coarsened_elements = libmesh_make_unique<ConstElemPointerRange>(cclt._coarsened_elements.begin(),
531  cclt._coarsened_elements.end());
532  _coarsened_element_children = cclt._coarsened_element_children;
533 }
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:895
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:898
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
Map of Parent elements to child elements for elements that were just coarsened. NOTE: the child eleme...
Definition: MooseMesh.h:901
void MooseMesh::cacheInfo ( )
protectedinherited

Definition at line 783 of file MooseMesh.C.

Referenced by MooseMesh::update().

784 {
785  // TODO: Thread this!
786  for (const auto & elem : getMesh().element_ptr_range())
787  {
788  SubdomainID subdomain_id = elem->subdomain_id();
789 
790  for (unsigned int side = 0; side < elem->n_sides(); side++)
791  {
792  std::vector<BoundaryID> boundaryids = getBoundaryIDs(elem, side);
793 
794  std::set<BoundaryID> & subdomain_set = _subdomain_boundary_ids[subdomain_id];
795 
796  subdomain_set.insert(boundaryids.begin(), boundaryids.end());
797  }
798 
799  for (unsigned int nd = 0; nd < elem->n_nodes(); ++nd)
800  {
801  Node & node = *elem->node_ptr(nd);
802  _block_node_list[node.id()].insert(elem->subdomain_id());
803  }
804  }
805 }
subdomain_id_type SubdomainID
Definition: MooseTypes.h:77
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:423
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:969
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
const std::set< BoundaryID > & getBoundaryIDs() const
Returns a const reference to a set of all user-specified boundary IDs.
Definition: MooseMesh.C:1998
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 Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
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 1847 of file MooseMesh.C.

Referenced by MeshExtruder::changeID().

1850 {
1851  // Get a reference to our BoundaryInfo object, we will use it several times below...
1852  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1853 
1854  // Container to catch ids passed back from BoundaryInfo
1855  std::vector<boundary_id_type> old_ids;
1856 
1857  // Only level-0 elements store BCs. Loop over them.
1858  MeshBase::element_iterator el = getMesh().level_elements_begin(0);
1859  const MeshBase::element_iterator end_el = getMesh().level_elements_end(0);
1860  for (; el != end_el; ++el)
1861  {
1862  Elem * elem = *el;
1863  unsigned int n_sides = elem->n_sides();
1864  for (unsigned int s = 0; s != n_sides; ++s)
1865  {
1866  boundary_info.boundary_ids(elem, s, old_ids);
1867  if (std::find(old_ids.begin(), old_ids.end(), old_id) != old_ids.end())
1868  {
1869  std::vector<boundary_id_type> new_ids(old_ids);
1870  std::replace(new_ids.begin(), new_ids.end(), old_id, new_id);
1871  if (delete_prev)
1872  {
1873  boundary_info.remove_side(elem, s);
1874  boundary_info.add_side(elem, s, new_ids);
1875  }
1876  else
1877  boundary_info.add_side(elem, s, new_ids);
1878  }
1879  }
1880  }
1881 
1882  // Remove any remaining references to the old ID from the
1883  // BoundaryInfo object. This prevents things like empty sidesets
1884  // from showing up when printing information, etc.
1885  if (delete_prev)
1886  boundary_info.remove_id(old_id);
1887 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
void MooseMesh::clearQuadratureNodes ( )
inherited

Clear out any existing quadrature nodes.

Most likely called before re-adding them.

Definition at line 956 of file MooseMesh.C.

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

957 {
958  // Delete all the quadrature nodes
959  for (auto & it : _quadrature_nodes)
960  delete it.second;
961 
962  _quadrature_nodes.clear();
964  _extra_bnd_nodes.clear();
965 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:963
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:966
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:965
MooseMesh & FileMesh::clone ( ) const
overridevirtual

Clone method.

Allocates memory you are responsible to clean up.

Implements MooseMesh.

Definition at line 49 of file FileMesh.C.

50 {
51  return *(new FileMesh(*this));
52 }
FileMesh(const InputParameters &parameters)
Definition: FileMesh.C:35
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 548 of file MooseMesh.C.

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

549 {
550  auto elem_to_child_pair = _coarsened_element_children.find(elem);
551  mooseAssert(elem_to_child_pair != _coarsened_element_children.end(), "Missing element in map");
552  return elem_to_child_pair->second;
553 }
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
Map of Parent elements to child elements for elements that were just coarsened. NOTE: the child eleme...
Definition: MooseMesh.h:901
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 542 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged().

543 {
544  return _coarsened_elements.get();
545 }
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:898
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 224 of file Restartable.h.

225 {
226  return declareRestartableDataWithContext<T>(data_name, NULL);
227 }
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 231 of file Restartable.h.

232 {
233  return declareRestartableDataWithContext<T>(data_name, init_value, NULL);
234 }
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 238 of file Restartable.h.

239 {
241  mooseError("No valid SubProblem found for ", _restartable_system_name, "/", _restartable_name);
242 
243  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
244  RestartableData<T> * data_ptr = new RestartableData<T>(full_name, context);
245 
247 
248  return data_ptr->get();
249 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:202
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::string _restartable_name
The name of the object.
Definition: Restartable.h:196
void registerRestartableDataOnSubProblem(std::string name, RestartableDataValue *data, THREAD_ID tid)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:49
Concrete definition of a parameter value for a specified type.
SubProblem * _restartable_subproblem
Pointer to the SubProblem class.
Definition: Restartable.h:208
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:205
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 253 of file Restartable.h.

256 {
258  mooseError("No valid SubProblem found for ", _restartable_system_name, "/", _restartable_name);
259 
260  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
261  RestartableData<T> * data_ptr = new RestartableData<T>(full_name, context);
262 
263  data_ptr->set() = init_value;
264 
266 
267  return data_ptr->get();
268 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:202
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::string _restartable_name
The name of the object.
Definition: Restartable.h:196
void registerRestartableDataOnSubProblem(std::string name, RestartableDataValue *data, THREAD_ID tid)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:49
Concrete definition of a parameter value for a specified type.
SubProblem * _restartable_subproblem
Pointer to the SubProblem class.
Definition: Restartable.h:208
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:205
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 1221 of file MooseMesh.C.

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

1222 {
1224  return true;
1225 
1226  std::vector<Real> min(3, std::numeric_limits<Real>::max());
1227  std::vector<Real> max(3, std::numeric_limits<Real>::min());
1228  unsigned int dim = getMesh().mesh_dimension();
1229 
1230  // Find the bounding box of our mesh
1231  for (const auto & node : getMesh().node_ptr_range())
1232  for (unsigned int i = 0; i < dim; ++i)
1233  {
1234  if ((*node)(i) < min[i])
1235  min[i] = (*node)(i);
1236  if ((*node)(i) > max[i])
1237  max[i] = (*node)(i);
1238  }
1239 
1240  this->comm().max(max);
1241  this->comm().min(min);
1242 
1243  _extreme_nodes.resize(8); // 2^LIBMESH_DIM
1244  // Now make sure that there are actual nodes at all of the extremes
1245  std::vector<bool> extreme_matches(8, false);
1246  std::vector<unsigned int> comp_map(3);
1247  for (const auto & node : getMesh().node_ptr_range())
1248  {
1249  // See if the current node is located at one of the extremes
1250  unsigned int coord_match = 0;
1251 
1252  for (unsigned int i = 0; i < dim; ++i)
1253  {
1254  if (std::abs((*node)(i)-min[i]) < tol)
1255  {
1256  comp_map[i] = MIN;
1257  ++coord_match;
1258  }
1259  else if (std::abs((*node)(i)-max[i]) < tol)
1260  {
1261  comp_map[i] = MAX;
1262  ++coord_match;
1263  }
1264  }
1265 
1266  if (coord_match == dim) // Found a coordinate at one of the extremes
1267  {
1268  _extreme_nodes[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = node;
1269  extreme_matches[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = true;
1270  }
1271  }
1272 
1273  // See if we matched all of the extremes for the mesh dimension
1274  this->comm().max(extreme_matches);
1275  if (std::count(extreme_matches.begin(), extreme_matches.end(), true) != std::pow(2.0, (int)dim))
1276  return false; // This is not a regular orthogonal mesh
1277 
1278  // This is a regular orthogonal mesh, so set the bounds
1279  _regular_orthogonal_mesh = true;
1280  _bounds.resize(LIBMESH_DIM);
1281  for (unsigned int i = 0; i < dim; ++i)
1282  {
1283  _bounds[i].resize(2);
1284  _bounds[i][MIN] = min[i];
1285  _bounds[i][MAX] = max[i];
1286  }
1287  for (unsigned int i = dim; i < LIBMESH_DIM; ++i)
1288  {
1289  _bounds[i].resize(2);
1290  _bounds[i][MIN] = 0;
1291  _bounds[i][MAX] = 0;
1292  }
1293 
1294  return true;
1295 }
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
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:423
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
MPI_Comm comm
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:990
unsigned int MooseMesh::dimension ( ) const
virtualinherited
Real MooseMesh::dimensionWidth ( unsigned int  component) const
inherited

Returns the width of the requested dimension.

Definition at line 1403 of file MooseMesh.C.

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

1404 {
1405  return getMaxInDimension(component) - getMinInDimension(component);
1406 }
virtual Real getMaxInDimension(unsigned int component) const
Definition: MooseMesh.C:1418
virtual Real getMinInDimension(unsigned int component) const
Returns the min or max of the requested dimension respectively.
Definition: MooseMesh.C:1409
Elem * MooseMesh::elem ( const dof_id_type  i)
virtualinherited

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

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

Definition at line 2101 of file MooseMesh.C.

Referenced by MooseMesh::addMortarInterface(), AnnularMesh::buildMesh(), MooseMesh::buildPeriodicNodeMap(), MooseMesh::buildRefinementAndCoarseningMaps(), MooseMesh::cacheInfo(), MooseMesh::changeBoundaryId(), MooseMesh::detectPairedSidesets(), MooseMesh::findAdaptivityQpMaps(), MooseMesh::ghostGhostedBoundaries(), MooseMesh::nodeToElemMap(), MooseMesh::prepare(), and MooseMesh::updateActiveSemiLocalNodeRange().

2102 {
2103  mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
2104  return elemPtr(i);
2105 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2115
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
const Elem * MooseMesh::elem ( const dof_id_type  i) const
virtualinherited

Definition at line 2108 of file MooseMesh.C.

2109 {
2110  mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
2111  return elemPtr(i);
2112 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2115
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
Elem * MooseMesh::elemPtr ( const dof_id_type  i)
virtualinherited
const Elem * MooseMesh::elemPtr ( const dof_id_type  i) const
virtualinherited

Definition at line 2121 of file MooseMesh.C.

2122 {
2123  return getMesh().elem_ptr(i);
2124 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
virtual bool MooseObject::enabled ( )
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 77 of file MooseObject.h.

Referenced by EigenKernel::enabled().

77 { return _enabled; }
const bool & _enabled
Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.
Definition: MooseObject.h:117
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 2526 of file MooseMesh.C.

Referenced by FEProblemBase::checkProblemIntegrity(), ElementsAlongLine::ElementsAlongLine(), MooseMesh::errorIfParallelDistribution(), SolutionUserObject::initialSetup(), IntersectionPointsAlongLine::IntersectionPointsAlongLine(), SideSetsFromNormals::modify(), SideSetsFromPoints::modify(), MeshSideSet::modify(), ParsedAddSideset::modify(), AddAllSideSetsByNormals::modify(), AddSideSetsFromBoundingBox::modify(), MultiAppInterpolationTransfer::MultiAppInterpolationTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NonlocalIntegratedBC::NonlocalIntegratedBC(), NonlocalKernel::NonlocalKernel(), PatternedMesh::PatternedMesh(), StitchedMesh::StitchedMesh(), and TiledMesh::TiledMesh().

2527 {
2529  mooseError("Cannot use ",
2530  name,
2531  " with DistributedMesh!\n",
2532  "Consider specifying parallel_type = 'replicated' in your input file\n",
2533  "to prevent it from being run with DistributedMesh.");
2534 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:851
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
void MooseMesh::errorIfParallelDistribution ( std::string  name) const
inherited

Deprecated.

Just calls errorIfDistributedMesh().

Definition at line 2537 of file MooseMesh.C.

2538 {
2540  "errorIfParallelDistribution() is deprecated, call errorIfDistributedMesh() instead.");
2542 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
Definition: MooseMesh.C:2526
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
virtual ExodusII_IO* FileMesh::exReader ( ) const
inlineoverridevirtual

Not implemented – always returns NULL.

Reimplemented from MooseMesh.

Definition at line 38 of file FileMesh.h.

38 { return _exreader.get(); }
std::unique_ptr< ExodusII_IO > _exreader
Auxiliary object for restart.
Definition: FileMesh.h:48
void MooseMesh::freeBndElems ( )
protectedinherited

Definition at line 337 of file MooseMesh.C.

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

338 {
339  // free memory
340  for (auto & belem : _bnd_elems)
341  delete belem;
342 
343  for (auto & it : _bnd_elem_ids)
344  it.second.clear();
345 
346  _bnd_elem_ids.clear();
347 }
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:961
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:957
void MooseMesh::freeBndNodes ( )
protectedinherited

Definition at line 319 of file MooseMesh.C.

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

320 {
321  // free memory
322  for (auto & bnode : _bnd_nodes)
323  delete bnode;
324 
325  for (auto & it : _node_set_nodes)
326  it.second.clear();
327 
328  _node_set_nodes.clear();
329 
330  for (auto & it : _bnd_node_ids)
331  it.second.clear();
332 
333  _bnd_node_ids.clear();
334 }
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:954
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:972
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:950
ConstElemRange * MooseMesh::getActiveLocalElementRange ( )
inherited

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

Definition at line 724 of file MooseMesh.C.

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

725 {
727  _active_local_elem_range = libmesh_make_unique<ConstElemRange>(
728  getMesh().active_local_elements_begin(), getMesh().active_local_elements_end(), GRAIN_SIZE);
729 
730  return _active_local_elem_range.get();
731 }
static const int GRAIN_SIZE
Definition: MooseMesh.C:60
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:910
NodeRange * MooseMesh::getActiveNodeRange ( )
inherited

Definition at line 734 of file MooseMesh.C.

Referenced by MooseMesh::meshChanged().

735 {
736  if (!_active_node_range)
737  _active_node_range = libmesh_make_unique<NodeRange>(
738  getMesh().active_nodes_begin(), getMesh().active_nodes_end(), GRAIN_SIZE);
739 
740  return _active_node_range.get();
741 }
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:913
static const int GRAIN_SIZE
Definition: MooseMesh.C:60
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
SemiLocalNodeRange * MooseMesh::getActiveSemiLocalNodeRange ( ) const
inherited

Definition at line 744 of file MooseMesh.C.

745 {
746  mooseAssert(_active_semilocal_node_range,
747  "_active_semilocal_node_range has not been created yet!");
748 
749  return _active_semilocal_node_range.get();
750 }
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:912
template<typename T >
T MooseMesh::getAnyID ( ) const
inherited

Templated helper that returns either the ang block or any boundary ID depending on the template argument.

Referenced by SubProblem::checkMatProps().

template<>
SubdomainID MooseMesh::getAnyID ( ) const
inherited

Definition at line 2019 of file MooseMesh.C.

2020 {
2021  return Moose::ANY_BLOCK_ID;
2022 }
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.h:117
template<>
BoundaryID MooseMesh::getAnyID ( ) const
inherited

Definition at line 2026 of file MooseMesh.C.

2027 {
2028  return Moose::ANY_BOUNDARY_ID;
2029 }
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.h:119
template<typename T >
const std::set<T>& MooseMesh::getBlockOrBoundaryIDs ( ) const
inherited

Templated helper that returns either block or boundary IDs depending on the template argument.

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

Definition at line 2005 of file MooseMesh.C.

2006 {
2007  return meshSubdomains();
2008 }
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:2157
template<>
const std::set<BoundaryID>& MooseMesh::getBlockOrBoundaryIDs ( ) const
inherited

Definition at line 2012 of file MooseMesh.C.

2013 {
2014  return getBoundaryIDs();
2015 }
const std::set< BoundaryID > & getBoundaryIDs() const
Returns a const reference to a set of all user-specified boundary IDs.
Definition: MooseMesh.C:1998
ConstBndElemRange * MooseMesh::getBoundaryElementRange ( )
inherited

Definition at line 773 of file MooseMesh.C.

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

774 {
775  if (!_bnd_elem_range)
777  libmesh_make_unique<ConstBndElemRange>(bndElemsBegin(), bndElemsEnd(), GRAIN_SIZE);
778 
779  return _bnd_elem_range.get();
780 }
virtual bnd_elem_iterator bndElemsEnd()
Definition: MooseMesh.C:845
virtual bnd_elem_iterator bndElemsBegin()
Return iterators to the beginning/end of the boundary elements list.
Definition: MooseMesh.C:837
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:917
static const int GRAIN_SIZE
Definition: MooseMesh.C:60
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 968 of file MooseMesh.C.

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

969 {
970  if (boundary_name == "ANY_BOUNDARY_ID")
971  mooseError("Please use getBoundaryIDs() when passing \"ANY_BOUNDARY_ID\"");
972 
974  std::istringstream ss(boundary_name);
975 
976  if (!(ss >> id))
977  id = getMesh().get_boundary_info().get_id_by_name(boundary_name);
978 
979  return id;
980 }
const BoundaryID INVALID_BOUNDARY_ID
Definition: MooseTypes.h:120
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
boundary_id_type BoundaryID
Definition: MooseTypes.h:75
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 1990 of file MooseMesh.C.

Referenced by MeshExtruder::changeID(), NonlinearSystemBase::computeJacobianInternal(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::initializeBoundaryRestrictable(), BoundaryRestrictable::meshBoundaryIDs(), BreakBoundaryOnSubdomain::modify(), SideSetsFromNormals::modify(), SideSetsBetweenSubdomains::modify(), SideSetsFromPoints::modify(), AddExtraNodeset::modify(), ParsedAddSideset::modify(), SideSetsAroundSubdomain::modify(), ElementDeleterBase::modify(), BoundingBoxNodeSet::modify(), AddSideSetsFromBoundingBox::modify(), and ThreadedElementLoopBase< RangeType >::operator()().

1991 {
1992  std::vector<BoundaryID> ids;
1993  getMesh().get_boundary_info().boundary_ids(elem, side, ids);
1994  return ids;
1995 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
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 1998 of file MooseMesh.C.

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

1999 {
2000  return getMesh().get_boundary_info().get_boundary_ids();
2001 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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 983 of file MooseMesh.C.

985 {
986  const BoundaryInfo & boundary_info = getMesh().get_boundary_info();
987  const std::map<BoundaryID, std::string> & sideset_map = boundary_info.get_sideset_name_map();
988  const std::map<BoundaryID, std::string> & nodeset_map = boundary_info.get_nodeset_name_map();
989 
990  std::set<BoundaryID> boundary_ids = boundary_info.get_boundary_ids();
991 
992  // On a distributed mesh we may have boundary ids that only exist on
993  // other processors.
994  if (!this->getMesh().is_replicated())
995  _communicator.set_union(boundary_ids);
996 
997  BoundaryID max_boundary_id = boundary_ids.empty() ? 0 : *(boundary_ids.rbegin());
998 
999  std::vector<BoundaryID> ids(boundary_name.size());
1000  for (unsigned int i = 0; i < boundary_name.size(); i++)
1001  {
1002  if (boundary_name[i] == "ANY_BOUNDARY_ID")
1003  {
1004  ids.assign(_mesh_boundary_ids.begin(), _mesh_boundary_ids.end());
1005  if (i)
1006  mooseWarning("You passed \"ANY_BOUNDARY_ID\" in addition to other boundary_names. This "
1007  "may be a logic error.");
1008  break;
1009  }
1010 
1011  BoundaryID id;
1012  std::istringstream ss(boundary_name[i]);
1013 
1014  if (!(ss >> id) || !ss.eof())
1015  {
1021  if (generate_unknown &&
1022  !MooseUtils::doesMapContainValue(sideset_map, std::string(boundary_name[i])) &&
1023  !MooseUtils::doesMapContainValue(nodeset_map, std::string(boundary_name[i])))
1024  id = ++max_boundary_id;
1025  else
1026  id = boundary_info.get_id_by_name(boundary_name[i]);
1027  }
1028 
1029  ids[i] = id;
1030  }
1031 
1032  return ids;
1033 }
void mooseWarning(Args &&...args) const
Definition: MooseObject.h:89
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:150
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:941
boundary_id_type BoundaryID
Definition: MooseTypes.h:75
const std::string & MooseMesh::getBoundaryName ( BoundaryID  boundary_id)
inherited

Return the name of the boundary given the id.

Definition at line 1107 of file MooseMesh.C.

Referenced by MaterialPropertyDebugOutput::printMaterialMap().

1108 {
1109  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1110 
1111  std::vector<BoundaryID> side_boundaries;
1112  boundary_info.build_side_boundary_ids(side_boundaries);
1113 
1114  // We need to figure out if this boundary is a sideset or nodeset
1115  if (std::find(side_boundaries.begin(), side_boundaries.end(), boundary_id) !=
1116  side_boundaries.end())
1117  return boundary_info.get_sideset_name(boundary_id);
1118  else
1119  return boundary_info.get_nodeset_name(boundary_id);
1120 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
ConstBndNodeRange * MooseMesh::getBoundaryNodeRange ( )
inherited

Definition at line 763 of file MooseMesh.C.

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

764 {
765  if (!_bnd_node_range)
767  libmesh_make_unique<ConstBndNodeRange>(bndNodesBegin(), bndNodesEnd(), GRAIN_SIZE);
768 
769  return _bnd_node_range.get();
770 }
virtual bnd_node_iterator bndNodesEnd()
Definition: MooseMesh.C:829
virtual bnd_node_iterator bndNodesBegin()
Return iterators to the beginning/end of the boundary nodes list.
Definition: MooseMesh.C:821
static const int GRAIN_SIZE
Definition: MooseMesh.C:60
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:915
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 1669 of file MooseMesh.C.

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

1670 {
1671  std::pair<int, ElemType> the_pair(input_side, elem.type());
1672 
1673  if (_elem_type_to_coarsening_map.find(the_pair) == _elem_type_to_coarsening_map.end())
1674  mooseError("Could not find a suitable qp refinement map!");
1675 
1676  return _elem_type_to_coarsening_map[the_pair];
1677 }
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
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
const std::string& FileMesh::getFileName ( ) const
inline

Definition at line 42 of file FileMesh.h.

42 { return _file_name; }
std::string _file_name
the file_name from whence this mesh came
Definition: FileMesh.h:46
const std::set< unsigned int > & MooseMesh::getGhostedBoundaries ( ) const
inherited

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

Definition at line 2226 of file MooseMesh.C.

2227 {
2228  return _ghosted_boundaries;
2229 }
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:974
const std::vector< Real > & MooseMesh::getGhostedBoundaryInflation ( ) const
inherited

Return a writable reference to the _ghosted_boundaries_inflation vector.

Definition at line 2232 of file MooseMesh.C.

Referenced by NearestNodeLocator::findNodes().

2233 {
2235 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:975
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 2385 of file MooseMesh.C.

Referenced by PointSamplerBase::execute().

2386 {
2387  // Grab a bounding box to speed things up. Note that
2388  // local_bounding_box is *not* equivalent to processor_bounding_box
2389  // with processor_id() except in serial.
2390  BoundingBox bbox = MeshTools::create_local_bounding_box(getMesh());
2391 
2392  // Inflate the bbox just a bit to deal with roundoff
2393  // Adding 1% of the diagonal size in each direction on each end
2394  Real inflation_amount = inflation_multiplier * (bbox.max() - bbox.min()).norm();
2395  Point inflation(inflation_amount, inflation_amount, inflation_amount);
2396 
2397  bbox.first -= inflation; // min
2398  bbox.second += inflation; // max
2399 
2400  return bbox;
2401 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
ConstNodeRange * MooseMesh::getLocalNodeRange ( )
inherited

Definition at line 753 of file MooseMesh.C.

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

754 {
755  if (!_local_node_range)
756  _local_node_range = libmesh_make_unique<ConstNodeRange>(
757  getMesh().local_nodes_begin(), getMesh().local_nodes_end(), GRAIN_SIZE);
758 
759  return _local_node_range.get();
760 }
static const int GRAIN_SIZE
Definition: MooseMesh.C:60
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:914
Real MooseMesh::getMaxInDimension ( unsigned int  component) const
virtualinherited

Reimplemented in AnnularMesh, and GeneratedMesh.

Definition at line 1418 of file MooseMesh.C.

Referenced by MooseMesh::dimensionWidth().

1419 {
1420  mooseAssert(_regular_orthogonal_mesh, "The current mesh is not a regular orthogonal mesh");
1421  mooseAssert(component < LIBMESH_DIM, "Requested dimension out of bounds");
1422 
1423  return _bounds[component][MAX];
1424 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:993
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:990
MeshBase & MooseMesh::getMesh ( )
inherited

Accessor for the underlying libMesh Mesh object.

Definition at line 2408 of file MooseMesh.C.

Referenced by MooseMesh::activeLocalElementsBegin(), MooseMesh::activeLocalElementsEnd(), Adaptivity::adaptMesh(), MooseMesh::addQuadratureNode(), MooseMesh::addUniqueNode(), MooseMesh::buildBndElemList(), TiledMesh::buildMesh(), buildMesh(), AnnularMesh::buildMesh(), GeneratedMesh::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(), MooseMesh::detectOrthogonalDimRanges(), MooseMesh::detectPairedSidesets(), MooseMesh::dimension(), ElementalVariableValue::ElementalVariableValue(), MooseMesh::elemPtr(), NodalNormalsCorner::execute(), MultiAppUserObjectTransfer::execute(), MultiAppInterpolationTransfer::execute(), NodalNormalsPreprocessor::execute(), FileMesh(), AddSideSetsBase::flood(), MooseMesh::getActiveLocalElementRange(), MooseMesh::getActiveNodeRange(), MooseMesh::getBoundaryID(), MooseMesh::getBoundaryIDs(), MooseMesh::getBoundaryName(), MooseMesh::getInflatedProcessorBoundingBox(), MooseMesh::getLocalNodeRange(), MultiAppNearestNodeTransfer::getLocalNodes(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), MultiAppNearestNodeTransfer::getNearestNode(), MooseMesh::getNodeList(), MooseMesh::getPointLocator(), MooseMesh::getSubdomainID(), MooseMesh::getSubdomainIDs(), MooseMesh::getSubdomainName(), NumElems::getValue(), 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(), SideSetsFromPoints::modify(), SideSetsBetweenSubdomains::modify(), SideSetsFromNormals::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), MeshSideSet::modify(), AssignElementSubdomainID::modify(), AssignSubdomainID::modify(), SideSetsAroundSubdomain::modify(), ParsedAddSideset::modify(), ElementDeleterBase::modify(), AddAllSideSetsByNormals::modify(), RenameBlock::modify(), ParsedSubdomainMeshModifier::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), SubdomainBoundingBox::modify(), MooseMesh::MooseMesh(), MooseMesh::nElem(), MooseMesh::nNodes(), NodalVariableValue::NodalVariableValue(), MooseMesh::nodePtr(), MooseMesh::nodeRef(), MooseMesh::nodeToActiveSemilocalElemMap(), MooseMesh::nodeToElemMap(), ComputeNodalUserObjectsThread::onNode(), MooseMesh::operator const libMesh::MeshBase &(), MooseMesh::operator libMesh::MeshBase &(), XDA::output(), ConsoleUtils::outputMeshInformation(), PatternedMesh::PatternedMesh(), MooseMesh::prepare(), MooseMesh::printInfo(), TopResidualDebugOutput::printTopResiduals(), MooseMesh::queryElemPtr(), MooseMesh::queryNodePtr(), read(), MooseVariable::reinitNodes(), MooseVariable::reinitNodesNeighbor(), SubProblem::restrictionCheckName(), MooseMesh::setBoundaryName(), 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().

2409 {
2410  mooseAssert(_mesh, "Mesh hasn't been created");
2411  return *_mesh;
2412 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:856
const MeshBase & MooseMesh::getMesh ( ) const
inherited

Definition at line 2415 of file MooseMesh.C.

2416 {
2417  mooseAssert(_mesh, "Mesh hasn't been created");
2418  return *_mesh;
2419 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:856
Real MooseMesh::getMinInDimension ( unsigned int  component) const
virtualinherited

Returns the min or max of the requested dimension respectively.

Reimplemented in AnnularMesh, and GeneratedMesh.

Definition at line 1409 of file MooseMesh.C.

Referenced by MooseMesh::dimensionWidth().

1410 {
1411  mooseAssert(_regular_orthogonal_mesh, "The current mesh is not a regular orthogonal mesh");
1412  mooseAssert(component < LIBMESH_DIM, "Requested dimension out of bounds");
1413 
1414  return _bounds[component][MIN];
1415 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:993
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:990
MooseApp& MooseObject::getMooseApp ( )
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 72 of file MooseObject.h.

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

72 { return _app; }
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
MooseMesh::MortarInterface * MooseMesh::getMortarInterface ( BoundaryID  master,
BoundaryID  slave 
)
inherited

Definition at line 2555 of file MooseMesh.C.

Referenced by GeometricSearchData::generateMortarNodes().

2556 {
2557  std::map<std::pair<BoundaryID, BoundaryID>, MortarInterface *>::iterator it =
2558  _mortar_interface_by_ids.find(std::pair<BoundaryID, BoundaryID>(master, slave));
2559  if (it != _mortar_interface_by_ids.end())
2560  return (*it).second;
2561  else
2562  mooseError(
2563  "Requesting non-existing mortar interface (master = ", master, ", slave = ", slave, ").");
2564 }
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:80
MooseMesh::MortarInterface * MooseMesh::getMortarInterfaceByName ( const std::string  name)
inherited

Definition at line 2545 of file MooseMesh.C.

2546 {
2547  std::map<std::string, MortarInterface *>::iterator it = _mortar_interface_by_name.find(name);
2548  if (it != _mortar_interface_by_name.end())
2549  return (*it).second;
2550  else
2551  mooseError("Requesting non-existent mortar interface '", name, "'.");
2552 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
std::map< std::string, MortarInterface * > _mortar_interface_by_name
Mortar interfaces mapped through their names.
Definition: MooseMesh.h:999
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
std::vector<std::unique_ptr<MooseMesh::MortarInterface> >& MooseMesh::getMortarInterfaces ( )
inlineinherited
const std::set< SubdomainID > & MooseMesh::getNodeBlockIds ( const Node &  node) const
inherited

Return list of blocks to which the given node belongs.

Definition at line 808 of file MooseMesh.C.

Referenced by ComputeNodalUserObjectsThread::onNode(), ComputeNodalAuxVarsThread::onNode(), ComputeNodalKernelsThread::onNode(), and ComputeNodalKernelJacobiansThread::onNode().

809 {
810  std::map<dof_id_type, std::set<SubdomainID>>::const_iterator it =
811  _block_node_list.find(node.id());
812 
813  if (it == _block_node_list.end())
814  mooseError("Unable to find node: ", node.id(), " in any block list.");
815 
816  return it->second;
817 }
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:423
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:969
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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 2435 of file MooseMesh.C.

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

2436 {
2437  std::map<boundary_id_type, std::vector<dof_id_type>>::const_iterator it =
2438  _node_set_nodes.find(nodeset_id);
2439 
2440  if (it == _node_set_nodes.end())
2441  {
2442  // On a distributed mesh we might not know about a remote nodeset,
2443  // so we'll return an empty vector and hope the nodeset exists
2444  // elsewhere.
2445  if (!getMesh().is_serial())
2446  {
2447  static const std::vector<dof_id_type> empty_vec;
2448  return empty_vec;
2449  }
2450  // On a replicated mesh we should know about every nodeset and if
2451  // we're asked for one that doesn't exist then it must be a bug.
2452  else
2453  {
2454  mooseError("Unable to nodeset ID: ", nodeset_id, '.');
2455  }
2456  }
2457 
2458  return it->second;
2459 }
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:972
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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 1890 of file MooseMesh.C.

1891 {
1892  mooseAssert(_boundary_to_normal_map.get() != nullptr, "Boundary To Normal Map not built!");
1893 
1894  // Note: Boundaries that are not in the map (existing boundaries) will default
1895  // construct a new RealVectorValue - (x,y,z)=(0, 0, 0)
1896  return (*_boundary_to_normal_map)[id];
1897 }
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:947
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 1491 of file MooseMesh.C.

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

1492 {
1494  mooseError("Trying to retrieve automatic paired mapping for a mesh that is not regular and "
1495  "orthogonal");
1496 
1497  mooseAssert(component < dimension(), "Requested dimension out of bounds");
1498 
1499  if (_paired_boundary.empty())
1501 
1502  if (component < _paired_boundary.size())
1503  return &_paired_boundary[component];
1504  else
1505  return nullptr;
1506 }
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:1984
void detectPairedSidesets()
This routine detects paired sidesets of a regular orthogonal mesh (.i.e.
Definition: MooseMesh.C:1298
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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
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 122 of file MooseObject.h.

Referenced by FEProblemBase::addMaterial(), ConstraintWarehouse::addObject(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromXandY(), EigenKernel::EigenKernel(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), GenericConstantRankTwoTensor::GenericConstantRankTwoTensor(), TimeSequenceStepper::init(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), AdvancedOutput::initialSetup(), SideSetsBetweenSubdomains::modify(), MeshExtruder::modify(), AddExtraNodeset::modify(), SideSetsAroundSubdomain::modify(), RenameBlock::modify(), MooseObject::parameters(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), and VectorOfPostprocessors::VectorOfPostprocessors().

123 {
124  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
125 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
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:111
unsigned int MooseMesh::getPatchSize ( ) const
inherited

Getter for the patch_size parameter.

Definition at line 2367 of file MooseMesh.C.

Referenced by NearestNodeLocator::findNodes().

2368 {
2369  return _patch_size;
2370 }
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:978
const MooseEnum & MooseMesh::getPatchUpdateStrategy ( ) const
inherited

Get the current patch update strategy.

Definition at line 2379 of file MooseMesh.C.

Referenced by FEProblemBase::possiblyRebuildGeomSearchPatches().

2380 {
2381  return _patch_update_strategy;
2382 }
MooseEnum _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:981
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 2601 of file MooseMesh.C.

Referenced by MultiAppVariableValueSamplePostprocessorTransfer::execute(), PointValue::execute(), MultiAppVariableValueSampleTransfer::execute(), IntersectionPointsAlongLine::execute(), ElementsAlongLine::execute(), LineMaterialSamplerBase< T >::execute(), FindValueOnLine::initialize(), and PointSamplerBase::initialize().

2602 {
2603  return getMesh().sub_point_locator();
2604 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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 938 of file MooseMesh.C.

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

941 {
942  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes.find(elem->id()) !=
944  "Elem has no quadrature nodes!");
945  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()].find(side) !=
947  "Side has no quadrature nodes!");
948  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) !=
950  "qp not found on side!");
951 
952  return _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
953 }
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:965
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
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 1607 of file MooseMesh.C.

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

1608 {
1609  if (child == -1) // Doing volume mapping or parent side mapping
1610  {
1611  mooseAssert(parent_side == child_side,
1612  "Parent side must match child_side if not passing a specific child!");
1613 
1614  std::pair<int, ElemType> the_pair(parent_side, elem.type());
1615 
1616  if (_elem_type_to_refinement_map.find(the_pair) == _elem_type_to_refinement_map.end())
1617  mooseError("Could not find a suitable qp refinement map!");
1618 
1619  return _elem_type_to_refinement_map[the_pair];
1620  }
1621  else // Need to map a child side to parent volume qps
1622  {
1623  std::pair<int, int> child_pair(child, child_side);
1624 
1625  if (_elem_type_to_child_side_refinement_map.find(elem.type()) ==
1627  _elem_type_to_child_side_refinement_map[elem.type()].find(child_pair) ==
1629  mooseError("Could not find a suitable qp refinement map!");
1630 
1631  return _elem_type_to_child_side_refinement_map[elem.type()][child_pair];
1632  }
1633 
1640 }
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
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
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
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 2462 of file MooseMesh.C.

Referenced by FEProblemBase::prepareMaterials().

2463 {
2464  std::map<SubdomainID, std::set<BoundaryID>>::const_iterator it =
2465  _subdomain_boundary_ids.find(subdomain_id);
2466 
2467  if (it == _subdomain_boundary_ids.end())
2468  mooseError("Unable to find subdomain ID: ", subdomain_id, '.');
2469 
2470  return it->second;
2471 }
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
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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 1036 of file MooseMesh.C.

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

1037 {
1038  if (subdomain_name == "ANY_BLOCK_ID")
1039  mooseError("Please use getSubdomainIDs() when passing \"ANY_BLOCK_ID\"");
1040 
1042  std::istringstream ss(subdomain_name);
1043 
1044  if (!(ss >> id) || !ss.eof())
1045  id = getMesh().get_id_by_name(subdomain_name);
1046 
1047  return id;
1048 }
subdomain_id_type SubdomainID
Definition: MooseTypes.h:77
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.h:118
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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 1051 of file MooseMesh.C.

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

1052 {
1053  std::vector<SubdomainID> ids(subdomain_name.size());
1054 
1055  for (unsigned int i = 0; i < subdomain_name.size(); i++)
1056  {
1057  if (subdomain_name[i] == "ANY_BLOCK_ID")
1058  {
1059  ids.assign(_mesh_subdomains.begin(), _mesh_subdomains.end());
1060  if (i)
1061  mooseWarning("You passed \"ANY_BLOCK_ID\" in addition to other block names. This may be a "
1062  "logic error.");
1063  break;
1064  }
1065 
1067  std::istringstream ss(subdomain_name[i]);
1068 
1069  if (!(ss >> id) || !ss.eof())
1070  id = getMesh().get_id_by_name(subdomain_name[i]);
1071 
1072  ids[i] = id;
1073  }
1074 
1075  return ids;
1076 }
void mooseWarning(Args &&...args) const
Definition: MooseObject.h:89
subdomain_id_type SubdomainID
Definition: MooseTypes.h:77
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.h:118
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:932
const std::string & MooseMesh::getSubdomainName ( SubdomainID  subdomain_id)
inherited

Return the name of a block given an id.

Definition at line 1085 of file MooseMesh.C.

Referenced by MaterialPropertyDebugOutput::printMaterialMap().

1086 {
1087  return getMesh().subdomain_name(subdomain_id);
1088 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
void MooseMesh::ghostGhostedBoundaries ( )
inherited

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

Definition at line 2296 of file MooseMesh.C.

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

2297 {
2298  // No need to do this if using a serial mesh
2299  if (!_use_distributed_mesh)
2300  return;
2301 
2302  std::vector<dof_id_type> elems;
2303  std::vector<unsigned short int> sides;
2304  std::vector<boundary_id_type> ids;
2305 
2306  DistributedMesh & mesh = dynamic_cast<DistributedMesh &>(getMesh());
2307 
2308  // We would like to clear ghosted elements that were added by
2309  // previous invocations of this method; however we can't do so
2310  // simply without also clearing ghosted elements that were added by
2311  // other code; e.g. OversampleOutput. So for now we'll just
2312  // swallow the inefficiency that can come from leaving unnecessary
2313  // elements ghosted after AMR.
2314  // mesh.clear_extra_ghost_elems();
2315 
2316  mesh.get_boundary_info().build_side_list(elems, sides, ids);
2317 
2318  std::set<const Elem *, CompareElemsByLevel> boundary_elems_to_ghost;
2319  std::set<Node *> connected_nodes_to_ghost;
2320 
2321  std::vector<const Elem *> family_tree;
2322 
2323  for (unsigned int i = 0; i < elems.size(); ++i)
2324  {
2325  if (_ghosted_boundaries.find(ids[i]) != _ghosted_boundaries.end())
2326  {
2327  Elem * elem = mesh.elem_ptr(elems[i]);
2328 
2329 #ifdef LIBMESH_ENABLE_AMR
2330  elem->family_tree(family_tree);
2331  Elem * parent = elem->parent();
2332  while (parent)
2333  {
2334  family_tree.push_back(parent);
2335  parent = parent->parent();
2336  }
2337 #else
2338  family_tree.clear();
2339  family_tree.push_back(elem);
2340 #endif
2341  for (const auto & felem : family_tree)
2342  {
2343  boundary_elems_to_ghost.insert(felem);
2344 
2345  // The entries of connected_nodes_to_ghost need to be
2346  // non-constant, so that they will work in things like
2347  // UpdateDisplacedMeshThread. Therefore, we are using the
2348  // "old" interface to get a non-const Node pointer from a
2349  // constant Elem.
2350  for (unsigned int n = 0; n < felem->n_nodes(); ++n)
2351  connected_nodes_to_ghost.insert(felem->get_node(n));
2352  }
2353  }
2354  }
2355 
2356  mesh.comm().allgather_packed_range(&mesh,
2357  connected_nodes_to_ghost.begin(),
2358  connected_nodes_to_ghost.end(),
2359  extra_ghost_elem_inserter<Node>(mesh));
2360  mesh.comm().allgather_packed_range(&mesh,
2361  boundary_elems_to_ghost.begin(),
2362  boundary_elems_to_ghost.end(),
2363  extra_ghost_elem_inserter<Elem>(mesh));
2364 }
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:851
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
PetscInt n
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:974
bool MooseMesh::hasSecondOrderElements ( )
inherited

check if the mesh has SECOND order elements

Definition at line 2579 of file MooseMesh.C.

2580 {
2581  bool mesh_has_second_order_elements = false;
2582  for (auto it = activeLocalElementsBegin(), end = activeLocalElementsEnd(); it != end; ++it)
2583  if ((*it)->default_order() == SECOND)
2584  {
2585  mesh_has_second_order_elements = true;
2586  break;
2587  }
2588 
2589  // We checked our local elements, so take the max over all processors.
2590  comm().max(mesh_has_second_order_elements);
2591  return mesh_has_second_order_elements;
2592 }
MeshBase::const_element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2065
MPI_Comm comm
const MeshBase::const_element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:2071
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 1900 of file MooseMesh.C.

1901 {
1903  {
1904  // Check of partitioner is supplied (not allowed if custom partitioner is used)
1905  if (!parameters().isParamSetByAddParam("partitioner"))
1906  mooseError("If partitioner block is provided, partitioner keyword cannot be used!");
1907  // Set custom partitioner
1908  if (!_custom_partitioner.get())
1909  mooseError("Custom partitioner requested but not set!");
1910  getMesh().partitioner().reset(_custom_partitioner.release());
1911  }
1912  else
1913  {
1914  // Set standard partitioner
1915  // Set the partitioner based on partitioner name
1916  switch (_partitioner_name)
1917  {
1918  case -3: // default
1919  // We'll use the default partitioner, but notify the user of which one is being used...
1921  _partitioner_name = "parmetis";
1922  else
1923  _partitioner_name = "metis";
1924  break;
1925 
1926  // No need to explicitily create the metis or parmetis partitioners,
1927  // They are the default for serial and parallel mesh respectively
1928  case -2: // metis
1929  case -1: // parmetis
1930  break;
1931 
1932  case 0: // linear
1933  getMesh().partitioner().reset(new LinearPartitioner);
1934  break;
1935  case 1: // centroid
1936  {
1937  if (!isParamValid("centroid_partitioner_direction"))
1938  mooseError("If using the centroid partitioner you _must_ specify "
1939  "centroid_partitioner_direction!");
1940 
1941  MooseEnum direction = getParam<MooseEnum>("centroid_partitioner_direction");
1942 
1943  if (direction == "x")
1944  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::X));
1945  else if (direction == "y")
1946  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Y));
1947  else if (direction == "z")
1948  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Z));
1949  else if (direction == "radial")
1950  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::RADIAL));
1951  break;
1952  }
1953  case 2: // hilbert_sfc
1954  getMesh().partitioner().reset(new HilbertSFCPartitioner);
1955  break;
1956  case 3: // morton_sfc
1957  getMesh().partitioner().reset(new MortonSFCPartitioner);
1958  break;
1959  }
1960  }
1961 
1963  {
1964  // Some partitioners are not idempotent. Some recovery data
1965  // files require partitioning to match mesh partitioning. This
1966  // means that, when recovering, we can't safely repartition.
1967  const bool skip_partitioning_later = getMesh().skip_partitioning();
1968  getMesh().skip_partitioning(true);
1969  const bool allow_renumbering_later = getMesh().allow_renumbering();
1970  getMesh().allow_renumbering(false);
1971 
1972  // For now, only read the recovery mesh on the Ultimate Master..
1973  // sub-apps need to just build their mesh like normal
1974  getMesh().read(_app.getRecoverFileBase() + "_mesh." + _app.getRecoverFileSuffix());
1975 
1976  getMesh().allow_renumbering(allow_renumbering_later);
1977  getMesh().skip_partitioning(skip_partitioning_later);
1978  }
1979  else // Normally just build the mesh
1980  buildMesh();
1981 }
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:607
bool _custom_partitioner_requested
Definition: MooseMesh.h:864
std::string getRecoverFileBase()
The file_base for the recovery file.
Definition: MooseApp.h:318
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:859
virtual void buildMesh()=0
Must be overridden by child classes.
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:851
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:67
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
std::string getRecoverFileSuffix()
The suffix for the recovery file.
Definition: MooseApp.h:328
bool isUltimateMaster()
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:476
std::unique_ptr< Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:863
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 2500 of file MooseMesh.C.

2501 {
2502  bool found_elem = false;
2503  for (const auto & it : _bnd_elem_ids)
2504  {
2505  if (it.second.find(elem_id) != it.second.end())
2506  {
2507  found_elem = true;
2508  break;
2509  }
2510  }
2511  return found_elem;
2512 }
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:961
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 2515 of file MooseMesh.C.

2516 {
2517  bool found_elem = false;
2518  std::map<boundary_id_type, std::set<dof_id_type>>::const_iterator it = _bnd_elem_ids.find(bnd_id);
2519  if (it != _bnd_elem_ids.end())
2520  if (it->second.find(elem_id) != it->second.end())
2521  found_elem = true;
2522  return found_elem;
2523 }
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:961
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 2474 of file MooseMesh.C.

Referenced by NodalNormalsPreprocessor::execute().

2475 {
2476  bool found_node = false;
2477  for (const auto & it : _bnd_node_ids)
2478  {
2479  if (it.second.find(node_id) != it.second.end())
2480  {
2481  found_node = true;
2482  break;
2483  }
2484  }
2485  return found_node;
2486 }
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:954
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 2489 of file MooseMesh.C.

2490 {
2491  bool found_node = false;
2492  std::map<boundary_id_type, std::set<dof_id_type>>::const_iterator it = _bnd_node_ids.find(bnd_id);
2493  if (it != _bnd_node_ids.end())
2494  if (it->second.find(node_id) != it->second.end())
2495  found_node = true;
2496  return found_node;
2497 }
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:954
bool MooseMesh::isCustomPartitionerRequested ( ) const
inherited

Setter and getter for _custom_partitioner_requested.

Definition at line 2573 of file MooseMesh.C.

2574 {
2576 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:864
bool MooseMesh::isDistributedMesh ( ) const
inlineinherited

Returns the final Mesh distribution type.

Definition at line 759 of file MooseMesh.h.

Referenced by AddPeriodicBCAction::autoTranslationBoundaries(), VerifyNodalUniqueID::finalize(), VerifyElementUniqueID::finalize(), ConsoleUtils::outputMeshInformation(), and RandomData::updateGenerators().

759 { return _use_distributed_mesh; }
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:851
bool MooseMesh::isDistributionForced ( ) const
inlineinherited

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

Definition at line 764 of file MooseMesh.h.

765  {
766  mooseDeprecated("isDistributionForced() is deprecated, call isParallelTypeFoced() instead.");
767  return isParallelTypeForced();
768  }
bool isParallelTypeForced() const
Definition: MooseMesh.h:770
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
bool MooseMesh::isParallelTypeForced ( ) const
inlineinherited

Definition at line 770 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

770 { return _parallel_type_overridden; }
bool _parallel_type_overridden
Definition: MooseMesh.h:853
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 67 of file MooseObject.h.

Referenced by BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), GeneratedMesh::buildMesh(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CSVReader::CSVReader(), MultiAppNearestNodeTransfer::execute(), FileOutput::FileOutput(), MultiApp::fillPositions(), MultiAppNearestNodeTransfer::getLocalNodes(), 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(), AssignElementSubdomainID::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), SubdomainBoundingBox::modify(), EigenExecutionerBase::normalizeSolution(), Output::Output(), Exodus::outputSetup(), PetscOutput::PetscOutput(), Piecewise::Piecewise(), SolutionUserObject::readExodusII(), RenameBlock::RenameBlock(), Piecewise::setData(), SolutionUserObject::SolutionUserObject(), and TimePeriod::TimePeriod().

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

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

Definition at line 780 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

780 { return _partitioner_overridden; }
bool _partitioner_overridden
Definition: MooseMesh.h:860
bool MooseMesh::isRegularOrthogonal ( )
inlineinherited

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

Definition at line 825 of file MooseMesh.h.

825 { return _regular_orthogonal_mesh; }
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:990
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 595 of file MooseMesh.C.

Referenced by MooseVariable::getNodalValue(), MooseVariable::getNodalValueOld(), MooseVariable::getNodalValueOlder(), MooseVariable::reinitNodes(), and MooseVariable::reinitNodesNeighbor().

596 {
597  return _semilocal_node_list.find(node) != _semilocal_node_list.end();
598 }
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:904
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:423
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 1448 of file MooseMesh.C.

Referenced by MooseMesh::minPeriodicVector().

1449 {
1450  mooseAssert(_regular_orthogonal_mesh, "The current mesh is not a regular orthogonal mesh");
1451  mooseAssert(component < dimension(), "Requested dimension out of bounds");
1452 
1453  if (_periodic_dim.find(nonlinear_var_num) != _periodic_dim.end())
1454  return _periodic_dim.at(nonlinear_var_num)[component];
1455  else
1456  return false;
1457 }
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:1984
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
MeshBase::const_node_iterator MooseMesh::localNodesBegin ( )
inherited

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

Definition at line 2053 of file MooseMesh.C.

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

2054 {
2055  return getMesh().local_nodes_begin();
2056 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
MeshBase::const_node_iterator MooseMesh::localNodesEnd ( )
inherited

Definition at line 2059 of file MooseMesh.C.

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

2060 {
2061  return getMesh().local_nodes_end();
2062 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
dof_id_type MooseMesh::maxElemId ( ) const
virtualinherited

Definition at line 2095 of file MooseMesh.C.

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

2096 {
2097  return getMesh().max_elem_id();
2098 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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 2089 of file MooseMesh.C.

2090 {
2091  return getMesh().max_node_id();
2092 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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 2163 of file MooseMesh.C.

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

2164 {
2165  return _mesh_boundary_ids;
2166 }
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:941
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 491 of file MooseMesh.C.

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

492 {
493  update();
494 
495  // Delete all of the cached ranges
496  _active_local_elem_range.reset();
497  _active_node_range.reset();
499  _local_node_range.reset();
500  _bnd_node_range.reset();
501  _bnd_elem_range.reset();
502 
503  // Rebuild the ranges
509 
510  // Call the callback function onMeshChanged
511  onMeshChanged();
512 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:724
virtual void onMeshChanged()
Declares a callback function that is executed at the conclusion of meshChanged(). ...
Definition: MooseMesh.C:515
ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:753
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:913
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:917
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:406
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:915
NodeRange * getActiveNodeRange()
Definition: MooseMesh.C:734
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:910
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:773
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:763
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:912
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:914
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 2175 of file MooseMesh.C.

Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().

2176 {
2177  return _mesh_nodeset_ids;
2178 }
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:943
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 2169 of file MooseMesh.C.

Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().

2170 {
2171  return _mesh_sideset_ids;
2172 }
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:942
const std::set< SubdomainID > & MooseMesh::meshSubdomains ( ) const
inherited

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

Definition at line 2157 of file MooseMesh.C.

Referenced by FEProblemBase::checkProblemIntegrity(), FEProblemBase::checkUserObjects(), MooseMesh::getBlockOrBoundaryIDs(), MultiApp::getBoundingBox(), BlockRestrictable::initializeBlockRestrictable(), BlockRestrictable::isBlockSubset(), BlockRestrictable::meshBlockIDs(), MooseMesh::MooseMesh(), DOFMapOutput::output(), and FEProblemBase::setCoordSystem().

2158 {
2159  return _mesh_subdomains;
2160 }
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:932
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 1485 of file MooseMesh.C.

1486 {
1487  return minPeriodicVector(nonlinear_var_num, p, q).norm();
1488 }
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:1460
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 1460 of file MooseMesh.C.

Referenced by MooseMesh::minPeriodicDistance().

1461 {
1462  for (unsigned int i = 0; i < dimension(); ++i)
1463  {
1464  // check to see if we're closer in real or periodic space in x, y, and z
1465  if (isTranslatedPeriodic(nonlinear_var_num, i))
1466  {
1467  // Need to test order before differencing
1468  if (p(i) > q(i))
1469  {
1470  if (p(i) - q(i) > _half_range(i))
1471  p(i) -= _half_range(i) * 2;
1472  }
1473  else
1474  {
1475  if (q(i) - p(i) > _half_range(i))
1476  p(i) += _half_range(i) * 2;
1477  }
1478  }
1479  }
1480 
1481  return q - p;
1482 }
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:1984
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:1448
template<typename... Args>
void MooseObject::mooseDeprecated ( Args &&...  args) const
inlineinherited
template<typename... Args>
void MooseObject::mooseError ( Args &&...  args) const
inlineinherited

Definition at line 80 of file MooseObject.h.

Referenced by FEProblemBase::addInitialCondition(), DiracKernel::addPointWithValidId(), FEProblemBase::addPostprocessor(), MooseMesh::addQuadratureNode(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AnnularMesh::AnnularMesh(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BoundsAux::BoundsAux(), MooseMesh::buildCoarseningMap(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), Piecewise::buildFromXY(), TiledMesh::buildMesh(), GeneratedMesh::buildMesh(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), EigenExecutionerBase::chebyshev(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), Material::checkExecutionStage(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), SubProblem::checkMatProps(), FEProblemBase::checkProblemIntegrity(), Material::checkStatefulSanity(), FEProblemBase::checkUserObjects(), LibmeshPartitioner::clone(), CompositeFunction::CompositeFunction(), ElementLpNormAux::compute(), ElementH1ErrorFunctionAux::compute(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), FEProblemBase::computeResidual(), Material::computeSubdomainProperties(), PenetrationAux::computeValue(), TimeStepper::constrainStep(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), DebugResidualAux::DebugResidualAux(), BicubicSplineFunction::derivative(), DGKernel::DGKernel(), SolutionUserObject::discontinuousPointValue(), SolutionUserObject::discontinuousPointValueGradient(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), MooseMesh::errorIfDistributedMesh(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), PerflogDumper::execute(), NodalValueSampler::execute(), MultiAppPostprocessorTransfer::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), FindValueOnLine::execute(), MultiAppInterpolationTransfer::execute(), TimeExtremeValue::execute(), LeastSquaresFit::execute(), FEProblemBase::executeControls(), FileOutput::FileOutput(), MultiApp::fillPositions(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), Transfer::find_sys(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FunctionDT::FunctionDT(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GapValueAux::GapValueAux(), GeneratedMesh::GeneratedMesh(), GenericConstantMaterial::GenericConstantMaterial(), GenericFunctionMaterial::GenericFunctionMaterial(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), MooseMesh::getCoarseningMap(), FEProblemBase::getCoordSystem(), PiecewiseConstant::getDirection(), FEProblemBase::getDistribution(), MultiApp::getExecutioner(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), GeneratedMesh::getMaxInDimension(), AnnularMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMaxShapeFunctions(), GeneratedMesh::getMinInDimension(), AnnularMesh::getMinInDimension(), MooseMesh::getMortarInterface(), MooseMesh::getMortarInterfaceByName(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMesh::GetPixelInfo(), MaterialStdVectorAux::getRealValue(), MooseMesh::getRefinementMap(), FEProblemBase::getSampler(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), MooseMesh::getSubdomainBoundaryIds(), MooseMesh::getSubdomainID(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), FEProblemBase::getUserObjectBase(), NumVars::getValue(), PerformanceData::getValue(), Residual::getValue(), FindValueOnLine::getValueAtPoint(), DisplacedProblem::getVariable(), FEProblemBase::getVariable(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), AdvancedOutput::hasOutputHelper(), CSVTimeSequenceStepper::init(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), MooseMesh::init(), FEProblemBase::init(), NumPicardIterations::initialize(), FullSolveMultiApp::initialSetup(), SolutionAux::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), SolutionFunction::initialSetup(), SolutionUserObject::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Material::initStatefulProperties(), Function::integral(), IntegratedBC::IntegratedBC(), InterfaceKernel::InterfaceKernel(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), KernelBase::KernelBase(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LinearCombinationFunction::LinearCombinationFunction(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< T >::LineMaterialSamplerBase(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAux::MaterialRealVectorValueAux(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), SubProblem::meshChanged(), MeshExtruder::MeshExtruder(), SideSetsFromPoints::modify(), SideSetsFromNormals::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), AssignElementSubdomainID::modify(), AddAllSideSetsByNormals::modify(), ElementDeleterBase::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), SubdomainBoundingBox::modify(), MultiAppMeshFunctionTransfer::MultiAppMeshFunctionTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), NodalBC::NodalBC(), NodalConstraint::NodalConstraint(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalVariableValue::NodalVariableValue(), NumDOFs::NumDOFs(), NumNonlinearIterations::NumNonlinearIterations(), XDA::output(), VTKOutput::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), PiecewiseBilinear::parse(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PatternedMesh::PatternedMesh(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Piecewise::Piecewise(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMultilinear::PiecewiseMultilinear(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), LStableDirk2::postStep(), LStableDirk3::postStep(), ImplicitMidpoint::postStep(), ExplicitTVDRK2::postStep(), AStableDirk4::postStep(), LStableDirk4::postStep(), ExplicitRK2::postStep(), Predictor::Predictor(), SolutionUserObject::readExodusII(), SolutionUserObject::readXda(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RenameBlock::RenameBlock(), ScalarComponentIC::ScalarComponentIC(), BicubicSplineFunction::secondDerivative(), FEProblemBase::setCoordSystem(), Piecewise::setData(), EigenProblem::setEigenproblemType(), Sampler::setNumberOfRequiedRandomSeeds(), Split::setup(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), SideSetsFromNormals::SideSetsFromNormals(), SideSetsFromPoints::SideSetsFromPoints(), SolutionUserObject::SolutionUserObject(), FullSolveMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), Constraint::subdomainSetup(), Console::systemInfoFlags(), Terminator::Terminator(), TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), MultiAppCopyTransfer::transfer(), MultiAppMeshFunctionTransfer::transferVariable(), Transient::Transient(), TransientMultiApp::TransientMultiApp(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), Axisymmetric2D3DSolutionFunction::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), MultiAppTransfer::variableIntegrityCheck(), VariableResidual::VariableResidual(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), VectorOfPostprocessors::VectorOfPostprocessors(), VectorPostprocessorFunction::VectorPostprocessorFunction(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), and VolumeHistogram::VolumeHistogram().

81  {
82  std::ostringstream oss;
83  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
84  std::string msg = oss.str();
85  callMooseErrorRaw(msg, &_app);
86  }
void mooseStreamAll(std::ostringstream &ss)
Definition: MooseError.C:78
void callMooseErrorRaw(std::string &msg, MooseApp *app)
Definition: MooseObject.C:45
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
template<typename... Args>
void MooseObject::mooseInfo ( Args &&...  args) const
inlineinherited

Definition at line 101 of file MooseObject.h.

102  {
103  moose::internal::mooseInfoStream(_console, std::forward<Args>(args)...);
104  }
void mooseInfoStream(S &oss, Args &&...args)
Definition: MooseError.h:145
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
template<typename... Args>
void MooseObject::mooseWarning ( Args &&...  args) const
inlineinherited
const std::string& MooseObject::name ( ) const
inlineinherited

Get the name of the object.

Returns
The name of the object

Definition at line 47 of file MooseObject.h.

Referenced by FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), MooseMesh::addMortarInterface(), FEProblemBase::addMultiApp(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), Output::advancedExecuteOn(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), AStableDirk4::AStableDirk4(), Function::average(), FEProblemBase::checkDependMaterialsHelper(), Damper::checkMinDamping(), Material::checkStatefulSanity(), CompositeFunction::CompositeFunction(), Material::computeSubdomainProperties(), AuxKernel::coupledCallback(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), MultiApp::createApp(), DGKernel::DGKernel(), AB2PredictorCorrector::estimateTimeError(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppCopyTransfer::execute(), FileOutput::FileOutput(), MultiApp::fillPositions(), PointSamplerBase::finalize(), GeneralUserObject::GeneralUserObject(), MultiApp::getBoundingBox(), Control::getControllableParameterHelper(), Control::getControllableValue(), AuxKernel::getDependObjects(), MultiApp::getExecutioner(), OutputWarehouse::getFileNumbers(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), OutputWarehouse::getOutput(), Transient::getTimeStepperName(), InitialCondition::getUserObject(), AuxKernel::getUserObject(), InitialCondition::getUserObjectByName(), AuxKernel::getUserObjectByName(), AdvancedOutput::hasOutputHelper(), FEProblemBase::init(), CSVReader::initialize(), MultiAppProjectionTransfer::initialSetup(), InitialCondition::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), Material::initStatefulProperties(), Function::integral(), IntegratedBC::IntegratedBC(), InterfaceKernel::InterfaceKernel(), KernelBase::KernelBase(), LinearCombinationFunction::LinearCombinationFunction(), Marker::Marker(), MaterialDerivativeTestKernelBase< T >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), ElementDeleterBase::modify(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalValueSampler::NodalValueSampler(), NodalVariableValue::NodalVariableValue(), DOFMapOutput::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), ConsoleUtils::outputOutputInformation(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), MooseObject::parameters(), Executioner::parentOutputPositionChanged(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PointSamplerBase::PointSamplerBase(), SubProblem::registerRecoverableData(), SubProblem::registerRestartableData(), Material::resetQpProperties(), Sampler::Sampler(), ScalarComponentIC::ScalarComponentIC(), MooseMesh::setBoundaryName(), Control::setControllableValue(), OutputWarehouse::setFileNumbers(), MooseMesh::setSubdomainName(), Split::setup(), TransientMultiApp::setupApp(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), Function::timeDerivative(), TransientMultiApp::TransientMultiApp(), MultiAppTransfer::variableIntegrityCheck(), VariableResidual::VariableResidual(), and AdvancedOutput::wantOutput().

47 { return _name; }
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:114
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 2151 of file MooseMesh.C.

Referenced by ElementDeleterBase::modify().

2152 {
2153  _needs_prepare_for_use = true;
2154 }
bool _needs_prepare_for_use
True if prepare_for_use should be called when Mesh is prepared.
Definition: MooseMesh.h:892
dof_id_type MooseMesh::nElem ( ) const
virtualinherited

Definition at line 2083 of file MooseMesh.C.

Referenced by NumElems::getValue().

2084 {
2085  return getMesh().n_elem();
2086 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
dof_id_type MooseMesh::nNodes ( ) const
virtualinherited

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

Definition at line 2077 of file MooseMesh.C.

Referenced by NumNodes::getValue().

2078 {
2079  return getMesh().n_nodes();
2080 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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 423 of file MooseMesh.C.

Referenced by MooseMesh::addUniqueNode(), GeneratedMesh::buildMesh(), MooseMesh::cacheInfo(), MooseMesh::detectOrthogonalDimRanges(), and MooseMesh::updateActiveSemiLocalNodeRange().

424 {
425  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
426  return nodeRef(i);
427 }
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:437
Node & MooseMesh::node ( const dof_id_type  i)
virtualinherited

Definition at line 430 of file MooseMesh.C.

431 {
432  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
433  return nodeRef(i);
434 }
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:437
const Node * MooseMesh::nodePtr ( const dof_id_type  i) const
virtualinherited

Definition at line 455 of file MooseMesh.C.

Referenced by dataLoad().

456 {
457  if (i > getMesh().max_node_id())
458  return (*_quadrature_nodes.find(i)).second;
459 
460  return getMesh().node_ptr(i);
461 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:963
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
Node * MooseMesh::nodePtr ( const dof_id_type  i)
virtualinherited

Definition at line 464 of file MooseMesh.C.

465 {
466  if (i > getMesh().max_node_id())
467  return _quadrature_nodes[i];
468 
469  return getMesh().node_ptr(i);
470 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:963
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
const Node & MooseMesh::nodeRef ( const dof_id_type  i) const
virtualinherited
Node & MooseMesh::nodeRef ( const dof_id_type  i)
virtualinherited

Definition at line 446 of file MooseMesh.C.

447 {
448  if (i > getMesh().max_node_id())
449  return *_quadrature_nodes[i];
450 
451  return getMesh().node_ref(i);
452 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:963
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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 700 of file MooseMesh.C.

701 {
702  if (!_node_to_active_semilocal_elem_map_built) // Guard the creation with a double checked lock
703  {
704  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
706  {
707  MeshBase::const_element_iterator el = getMesh().semilocal_elements_begin();
708  const MeshBase::const_element_iterator end = getMesh().semilocal_elements_end();
709 
710  for (; el != end; ++el)
711  if ((*el)->active())
712  for (unsigned int n = 0; n < (*el)->n_nodes(); n++)
713  _node_to_active_semilocal_elem_map[(*el)->node(n)].push_back((*el)->id());
714 
716  true; // MUST be set at the end for double-checked locking to work!
717  }
718  }
719 
721 }
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:925
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
PetscInt n
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:924
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 681 of file MooseMesh.C.

Referenced by PenetrationLocator::detectPenetration(), DMMooseGetEmbedding_Private(), NonlinearSystemBase::findImplicitGeometricCouplingEntries(), NearestNodeLocator::findNodes(), LinearNodalConstraint::LinearNodalConstraint(), and EqualValueBoundaryConstraint::updateConstrainedNodes().

682 {
683  if (!_node_to_elem_map_built) // Guard the creation with a double checked lock
684  {
685  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
687  {
688  for (const auto & elem : getMesh().active_element_ptr_range())
689  for (unsigned int n = 0; n < elem->n_nodes(); n++)
690  _node_to_elem_map[elem->node(n)].push_back(elem->id());
691 
692  _node_to_elem_map_built = true; // MUST be set at the end for double-checked locking to work!
693  }
694  }
695 
696  return _node_to_elem_map;
697 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:921
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:920
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
PetscInt n
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
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 515 of file MooseMesh.C.

Referenced by MooseMesh::meshChanged().

516 {
517 }
MooseMesh::operator const libMesh::MeshBase & ( ) const
inherited

Definition at line 2405 of file MooseMesh.C.

2405 { return getMesh(); }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
MooseMesh::operator libMesh::MeshBase & ( )
inherited

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

Definition at line 2403 of file MooseMesh.C.

2403 { return getMesh(); }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
const InputParameters& MooseObject::parameters ( ) const
inlineinherited
const MooseEnum& MooseMesh::partitionerName ( ) const
inlineinherited

Definition at line 775 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

775 { return _partitioner_name; }
MooseEnum _partitioner_name
The partitioner used on this mesh.
Definition: MooseMesh.h:859
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 350 of file MooseMesh.C.

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

351 {
352  if (dynamic_cast<DistributedMesh *>(&getMesh()) && !_is_nemesis)
353  {
354  // Call prepare_for_use() and don't mess with the renumbering
355  // setting
356  if (force || _needs_prepare_for_use)
357  getMesh().prepare_for_use();
358  }
359  else
360  {
361  // Call prepare_for_use() and DO NOT allow renumbering
362  getMesh().allow_renumbering(false);
363  if (force || _needs_prepare_for_use)
364  getMesh().prepare_for_use();
365  }
366 
367  // Collect (local) subdomain IDs
368  _mesh_subdomains.clear();
369  for (const auto & elem : getMesh().element_ptr_range())
370  _mesh_subdomains.insert(elem->subdomain_id());
371 
372  // Make sure nodesets have been generated
374 
375  // Collect (local) boundary IDs
376  const std::set<BoundaryID> & local_bids = getMesh().get_boundary_info().get_boundary_ids();
377  _mesh_boundary_ids.insert(local_bids.begin(), local_bids.end());
378 
379  const std::set<BoundaryID> & local_node_bids =
380  getMesh().get_boundary_info().get_node_boundary_ids();
381  _mesh_nodeset_ids.insert(local_node_bids.begin(), local_node_bids.end());
382 
383  const std::set<BoundaryID> & local_side_bids =
384  getMesh().get_boundary_info().get_side_boundary_ids();
385  _mesh_sideset_ids.insert(local_side_bids.begin(), local_side_bids.end());
386 
387  // Communicate subdomain and boundary IDs if this is a parallel mesh
388  if (!getMesh().is_serial())
389  {
390  _communicator.set_union(_mesh_subdomains);
391  _communicator.set_union(_mesh_boundary_ids);
392  _communicator.set_union(_mesh_nodeset_ids);
393  _communicator.set_union(_mesh_sideset_ids);
394  }
395 
397 
398  update();
399 
400  // Prepared has been called
401  _is_prepared = true;
402  _needs_prepare_for_use = false;
403 }
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:886
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:889
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:2032
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:406
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:943
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:941
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:942
bool detectOrthogonalDimRanges(Real tol=1e-6)
This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
Definition: MooseMesh.C:1221
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:932
bool _needs_prepare_for_use
True if prepare_for_use should be called when Mesh is prepared.
Definition: MooseMesh.h:892
bool MooseMesh::prepared ( ) const
inherited

Setter/getter for the _is_prepared flag.

Definition at line 2139 of file MooseMesh.C.

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

2140 {
2141  return _is_prepared;
2142 }
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:889
void MooseMesh::prepared ( bool  state)
inherited

Definition at line 2145 of file MooseMesh.C.

2146 {
2147  _is_prepared = state;
2148 }
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:889
void MooseMesh::printInfo ( std::ostream &  os = libMesh::out) const
inherited

Calls print_info() on the underlying Mesh.

Definition at line 2429 of file MooseMesh.C.

Referenced by Adaptivity::adaptMesh().

2430 {
2431  getMesh().print_info(os);
2432 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
Elem * MooseMesh::queryElemPtr ( const dof_id_type  i)
virtualinherited

Definition at line 2127 of file MooseMesh.C.

Referenced by EqualValueBoundaryConstraint::updateConstrainedNodes().

2128 {
2129  return getMesh().query_elem_ptr(i);
2130 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
const Elem * MooseMesh::queryElemPtr ( const dof_id_type  i) const
virtualinherited

Definition at line 2133 of file MooseMesh.C.

2134 {
2135  return getMesh().query_elem_ptr(i);
2136 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
const Node * MooseMesh::queryNodePtr ( const dof_id_type  i) const
virtualinherited

Definition at line 473 of file MooseMesh.C.

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

474 {
475  if (i > getMesh().max_node_id())
476  return (*_quadrature_nodes.find(i)).second;
477 
478  return getMesh().query_node_ptr(i);
479 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:963
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
Node * MooseMesh::queryNodePtr ( const dof_id_type  i)
virtualinherited

Definition at line 482 of file MooseMesh.C.

483 {
484  if (i > getMesh().max_node_id())
485  return _quadrature_nodes[i];
486 
487  return getMesh().query_node_ptr(i);
488 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:963
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
void FileMesh::read ( const std::string &  file_name)

Definition at line 141 of file FileMesh.C.

142 {
143  if (dynamic_cast<DistributedMesh *>(&getMesh()) && !_is_nemesis)
144  getMesh().read(file_name, /*mesh_data=*/NULL, /*skip_renumber=*/false);
145  else
146  getMesh().read(file_name, /*mesh_data=*/NULL, /*skip_renumber=*/true);
147 }
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:886
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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 536 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged().

537 {
538  return _refined_elements.get();
539 }
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:895
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 1091 of file MooseMesh.C.

Referenced by SetupMeshAction::setupMesh().

1092 {
1093  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1094 
1095  std::vector<BoundaryID> side_boundaries;
1096  boundary_info.build_side_boundary_ids(side_boundaries);
1097 
1098  // We need to figure out if this boundary is a sideset or nodeset
1099  if (std::find(side_boundaries.begin(), side_boundaries.end(), boundary_id) !=
1100  side_boundaries.end())
1101  boundary_info.sideset_name(boundary_id) = name;
1102  else
1103  boundary_info.nodeset_name(boundary_id) = name;
1104 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
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 2187 of file MooseMesh.C.

Referenced by AddAllSideSetsByNormals::modify().

2189 {
2190  _boundary_to_normal_map = std::move(boundary_map);
2191 }
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:947
void MooseMesh::setBoundaryToNormalMap ( std::map< BoundaryID, RealVectorValue > *  boundary_map)
inherited

Definition at line 2194 of file MooseMesh.C.

2195 {
2196  mooseDeprecated("setBoundaryToNormalMap(std::map<BoundaryID, RealVectorValue> * boundary_map) is "
2197  "deprecated, use the unique_ptr version instead");
2198  _boundary_to_normal_map.reset(boundary_map);
2199 }
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:947
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
void MooseMesh::setCustomPartitioner ( Partitioner *  partitioner)
inherited

Setter for custom partitioner.

Definition at line 2567 of file MooseMesh.C.

2568 {
2569  _custom_partitioner = partitioner->clone();
2570 }
std::unique_ptr< Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:863
void FileMesh::setFileName ( const std::string &  file_name)
inline

Definition at line 41 of file FileMesh.h.

41 { _file_name = file_name; }
std::string _file_name
the file_name from whence this mesh came
Definition: FileMesh.h:46
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 2220 of file MooseMesh.C.

Referenced by SetupMeshAction::setupMesh().

2221 {
2222  _ghosted_boundaries_inflation = inflation;
2223 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:975
void MooseMesh::setIsCustomPartitionerRequested ( bool  cpr)
inherited

Definition at line 2595 of file MooseMesh.C.

2596 {
2598 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:864
void MooseMesh::setMeshBoundaryIDs ( std::set< BoundaryID boundary_IDs)
inherited

Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.

Definition at line 2181 of file MooseMesh.C.

Referenced by AddAllSideSetsByNormals::modify().

2182 {
2183  _mesh_boundary_ids = boundary_IDs;
2184 }
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:941
void MooseMesh::setPatchUpdateStrategy ( MooseEnum  patch_update_strategy)
inherited

Set the patch size update strategy.

Definition at line 2373 of file MooseMesh.C.

2374 {
2375  _patch_update_strategy = patch_update_strategy;
2376 }
MooseEnum _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:981
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 1079 of file MooseMesh.C.

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

1080 {
1081  getMesh().subdomain_name(subdomain_id) = name;
1082 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
void MooseMesh::setUniformRefineLevel ( unsigned int  level)
inherited

Set uniform refinement level.

Definition at line 2208 of file MooseMesh.C.

Referenced by SetupMeshAction::setupMesh().

2209 {
2210  _uniform_refine_level = level;
2211 }
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:880
unsigned int MooseMesh::sideWithBoundaryID ( const Elem *const  elem,
const BoundaryID  boundary_id 
) const
inherited

Calls BoundaryInfo::side_with_boundary_id().

Definition at line 2047 of file MooseMesh.C.

2048 {
2049  return getMesh().get_boundary_info().side_with_boundary_id(elem, boundary_id);
2050 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
unsigned int MooseMesh::uniformRefineLevel ( ) const
inherited

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

Definition at line 2202 of file MooseMesh.C.

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

2203 {
2204  return _uniform_refine_level;
2205 }
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:880
void MooseMesh::update ( )
inherited

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

Definition at line 406 of file MooseMesh.C.

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

407 {
408  // Rebuild the boundary conditions
410 
411  // Update the node to elem map
412  _node_to_elem_map.clear();
413  _node_to_elem_map_built = false;
416 
417  buildNodeList();
419  cacheInfo();
420 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:921
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:920
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:925
void cacheInfo()
Definition: MooseMesh.C:783
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:2032
void buildBndElemList()
Definition: MooseMesh.C:661
void buildNodeList()
Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in t...
Definition: MooseMesh.C:628
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:924
void MooseMesh::updateActiveSemiLocalNodeRange ( std::set< dof_id_type > &  ghosted_elems)
inherited

Clears the "semi-local" node list and rebuilds it.

Semi-local nodes consist of all nodes that belong to local and ghost elements.

Definition at line 556 of file MooseMesh.C.

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

557 {
558  _semilocal_node_list.clear();
559 
560  // First add the nodes connected to local elems
561  ConstElemRange * active_local_elems = getActiveLocalElementRange();
562  for (const auto & elem : *active_local_elems)
563  {
564  for (unsigned int n = 0; n < elem->n_nodes(); ++n)
565  {
566  // Since elem is const here but we require a non-const Node * to
567  // store in the _semilocal_node_list (otherwise things like
568  // UpdateDisplacedMeshThread don't work), we are using a
569  // const_cast. A more long-term fix would be to have
570  // getActiveLocalElementRange return a non-const ElemRange.
571  Node * node = const_cast<Node *>(elem->node_ptr(n));
572 
573  _semilocal_node_list.insert(node);
574  }
575  }
576 
577  // Now add the nodes connected to ghosted_elems
578  for (const auto & ghost_elem_id : ghosted_elems)
579  {
580  Elem * elem = getMesh().elem_ptr(ghost_elem_id);
581  for (unsigned int n = 0; n < elem->n_nodes(); n++)
582  {
583  Node * node = elem->node_ptr(n);
584 
585  _semilocal_node_list.insert(node);
586  }
587  }
588 
589  // Now create the actual range
590  _active_semilocal_node_range = libmesh_make_unique<SemiLocalNodeRange>(
592 }
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:904
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:724
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:423
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2408
PetscInt n
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2101
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:912

Member Data Documentation

std::unique_ptr<ConstElemRange> MooseMesh::_active_local_elem_range
protectedinherited

A range for use with threading.

We do this so that it doesn't have to get rebuilt all the time (which takes time).

Definition at line 910 of file MooseMesh.h.

Referenced by MooseMesh::getActiveLocalElementRange(), and MooseMesh::meshChanged().

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

Definition at line 913 of file MooseMesh.h.

Referenced by MooseMesh::getActiveNodeRange(), and MooseMesh::meshChanged().

std::unique_ptr<SemiLocalNodeRange> MooseMesh::_active_semilocal_node_range
protectedinherited
MooseApp& MooseObject::_app
protectedinherited

The MooseApp this object is associated with.

Definition at line 108 of file MooseObject.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), Executioner::addAttributeReporter(), FEProblemBase::addMaterial(), FEProblemBase::addMultiApp(), FEProblemBase::allowOutput(), AStableDirk4::AStableDirk4(), buildMesh(), FEProblemBase::checkNonlinearConvergence(), OversampleOutput::cloneMesh(), FEProblemBase::computeJacobian(), FEProblemBase::computeResidualType(), Console::Console(), TimeStepper::constrainStep(), MultiApp::createApp(), EigenExecutionerBase::EigenExecutionerBase(), EigenKernel::EigenKernel(), InversePowerMethod::execute(), NonlinearEigen::execute(), Transient::execute(), Steady::execute(), FileOutput::FileOutput(), FEProblemBase::forceOutput(), MooseObject::getMooseApp(), InversePowerMethod::init(), NonlinearEigen::init(), Transient::init(), Steady::init(), MooseMesh::init(), NumPicardIterations::initialize(), TimePeriod::initialSetup(), Console::initialSetup(), MultiApp::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPetscOutput(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), InversePowerMethod::InversePowerMethod(), MooseObject::mooseError(), MooseMesh::MooseMesh(), NonlinearEigen::NonlinearEigen(), Tecplot::output(), Exodus::output(), Nemesis::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Exodus::outputEmptyTimestep(), Console::outputInput(), Exodus::outputInput(), Exodus::outputNodalVariables(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), Console::outputSystemInformation(), MultiApp::parentOutputPositionChanged(), PerformanceData::PerformanceData(), PetscOutput::petscLinearOutput(), PetscOutput::petscNonlinearOutput(), SubProblem::registerRecoverableData(), SubProblem::registerRestartableData(), FEProblemBase::setRestartFile(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), TransientMultiApp::solveStep(), FEProblemBase::subdomainSetup(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), FEProblemBase::timestepSetup(), Transient::Transient(), and Console::write().

std::map<dof_id_type, std::set<SubdomainID> > MooseMesh::_block_node_list
protectedinherited

list of nodes that belongs to a specified block (domain)

Definition at line 969 of file MooseMesh.h.

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

std::map<boundary_id_type, std::set<dof_id_type> > MooseMesh::_bnd_elem_ids
protectedinherited

Map of set of elem IDs connected to each boundary.

Definition at line 961 of file MooseMesh.h.

Referenced by MooseMesh::buildBndElemList(), MooseMesh::freeBndElems(), and MooseMesh::isBoundaryElem().

std::unique_ptr<StoredRange<MooseMesh::const_bnd_elem_iterator, const BndElement *> > MooseMesh::_bnd_elem_range
protectedinherited

Definition at line 917 of file MooseMesh.h.

Referenced by MooseMesh::getBoundaryElementRange(), and MooseMesh::meshChanged().

std::vector<BndElement *> MooseMesh::_bnd_elems
protectedinherited

array of boundary elems

Definition at line 957 of file MooseMesh.h.

Referenced by MooseMesh::bndElemsBegin(), MooseMesh::bndElemsEnd(), MooseMesh::buildBndElemList(), and MooseMesh::freeBndElems().

std::map<boundary_id_type, std::set<dof_id_type> > MooseMesh::_bnd_node_ids
protectedinherited

Map of sets of node IDs in each boundary.

Definition at line 954 of file MooseMesh.h.

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

std::unique_ptr<StoredRange<MooseMesh::const_bnd_node_iterator, const BndNode *> > MooseMesh::_bnd_node_range
protectedinherited
std::vector<BndNode *> MooseMesh::_bnd_nodes
protectedinherited
std::unique_ptr<std::map<BoundaryID, RealVectorValue> > MooseMesh::_boundary_to_normal_map
protectedinherited

The boundary to normal map - valid only when AddAllSideSetsByNormals is active.

Definition at line 947 of file MooseMesh.h.

Referenced by MooseMesh::getNormalByBoundaryID(), and MooseMesh::setBoundaryToNormalMap().

std::vector<std::vector<Real> > MooseMesh::_bounds
protectedinherited

The bounds in each dimension of the mesh for regular orthogonal meshes.

Definition at line 993 of file MooseMesh.h.

Referenced by MooseMesh::detectOrthogonalDimRanges(), MooseMesh::getMaxInDimension(), and MooseMesh::getMinInDimension().

std::map<const Elem *, std::vector<const Elem *> > MooseMesh::_coarsened_element_children
protectedinherited

Map of Parent elements to child elements for elements that were just coarsened. NOTE: the child element pointers ARE PROBABLY INVALID. Only use them for indexing!

Definition at line 901 of file MooseMesh.h.

Referenced by MooseMesh::cacheChangedLists(), and MooseMesh::coarsenedElementChildren().

std::unique_ptr<ConstElemPointerRange> MooseMesh::_coarsened_elements
protectedinherited

The elements that were just coarsened.

Definition at line 898 of file MooseMesh.h.

Referenced by MooseMesh::cacheChangedLists(), and MooseMesh::coarsenedElementRange().

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 37 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), CreateProblemAction::act(), SetupRecoverFileBaseAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), FEProblemBase::advanceMultiApps(), SimplePredictor::apply(), FEProblemBase::backupMultiApps(), FEProblemBase::checkProblemIntegrity(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualType(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), AB2PredictorCorrector::converged(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppCopyTransfer::execute(), Steady::execute(), MultiAppDTKUserObjectTransfer::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MultiApp::globalAppToLocal(), InversePowerMethod::init(), NonlinearEigen::init(), Steady::init(), FEProblemBase::initialAdaptMesh(), FEProblemBase::initialSetup(), EigenExecutionerBase::inversePowerIteration(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseObject::mooseDeprecated(), MooseObject::mooseInfo(), MooseObject::mooseWarning(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), NonlinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), Transient::solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), FEProblemBase::useFECache(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

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

The custom partitioner.

Definition at line 863 of file MooseMesh.h.

Referenced by MooseMesh::init(), and MooseMesh::setCustomPartitioner().

bool MooseMesh::_custom_partitioner_requested
protectedinherited
bool MooseMesh::_distribution_overridden
protectedinherited

Definition at line 852 of file MooseMesh.h.

Referenced by MooseMesh::MooseMesh().

std::map<dof_id_type, std::map<unsigned int, std::map<dof_id_type, Node *> > > MooseMesh::_elem_to_side_to_qp_to_quadrature_nodes
protectedinherited
const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.

Definition at line 117 of file MooseObject.h.

Referenced by MooseObject::enabled().

std::unique_ptr<ExodusII_IO> FileMesh::_exreader
protected

Auxiliary object for restart.

Definition at line 48 of file FileMesh.h.

Referenced by buildMesh(), and exReader().

std::vector<BndNode> MooseMesh::_extra_bnd_nodes
protectedinherited
std::string FileMesh::_file_name
protected

the file_name from whence this mesh came

Definition at line 46 of file FileMesh.h.

Referenced by buildMesh(), getFileName(), and setFileName().

std::set<unsigned int> MooseMesh::_ghosted_boundaries
protectedinherited
std::vector<Real> MooseMesh::_ghosted_boundaries_inflation
protectedinherited
std::vector<std::unique_ptr<GhostingFunctor> > MooseMesh::_ghosting_functors
protectedinherited

Definition at line 838 of file MooseMesh.h.

Referenced by MooseMesh::MooseMesh().

bool MooseMesh::_is_changed
protectedinherited

true if mesh is changed (i.e. after adaptivity step)

Definition at line 883 of file MooseMesh.h.

bool MooseMesh::_is_nemesis
protectedinherited

True if a Nemesis Mesh was read in.

Definition at line 886 of file MooseMesh.h.

Referenced by buildMesh(), MooseMesh::MooseMesh(), MooseMesh::prepare(), and read().

bool MooseMesh::_is_prepared
protectedinherited

True if prepare has been called on the mesh.

Definition at line 889 of file MooseMesh.h.

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

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

Definition at line 914 of file MooseMesh.h.

Referenced by MooseMesh::getLocalNodeRange(), and MooseMesh::meshChanged().

std::unique_ptr<libMesh::MeshBase> MooseMesh::_mesh
protectedinherited

Pointer to underlying libMesh mesh object.

Definition at line 856 of file MooseMesh.h.

Referenced by MooseMesh::addMortarInterface(), MooseMesh::getMesh(), and MooseMesh::MooseMesh().

std::set<BoundaryID> MooseMesh::_mesh_boundary_ids
protectedinherited

A set of boundary IDs currently present in the mesh.

In serial, this is equivalent to the values returned by _mesh.get_boundary_info().get_boundary_ids(). In parallel, it will contain off-processor boundary IDs as well.

Definition at line 941 of file MooseMesh.h.

Referenced by MooseMesh::getBoundaryIDs(), MooseMesh::meshBoundaryIds(), MooseMesh::prepare(), and MooseMesh::setMeshBoundaryIDs().

MooseEnum MooseMesh::_mesh_distribution_type
protectedinherited

Can be set to PARALLEL, SERIAL, or DEFAULT.

Determines whether the underlying libMesh mesh is a ReplicatedMesh or DistributedMesh.

Definition at line 842 of file MooseMesh.h.

Referenced by MooseMesh::MooseMesh().

std::set<BoundaryID> MooseMesh::_mesh_nodeset_ids
protectedinherited

Definition at line 943 of file MooseMesh.h.

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

MooseEnum MooseMesh::_mesh_parallel_type
protectedinherited

Can be set to DISTRIBUTED, REPLICATED, or DEFAULT.

Determines whether the underlying libMesh mesh is a ReplicatedMesh or DistributedMesh.

Definition at line 846 of file MooseMesh.h.

Referenced by MooseMesh::MooseMesh().

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

Definition at line 942 of file MooseMesh.h.

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

std::set<SubdomainID> MooseMesh::_mesh_subdomains
protectedinherited

A set of subdomain IDs currently present in the mesh.

For parallel meshes, includes subdomains defined on other processors as well.

Definition at line 932 of file MooseMesh.h.

Referenced by MooseMesh::getSubdomainIDs(), MooseMesh::meshSubdomains(), and MooseMesh::prepare().

std::vector<std::unique_ptr<MortarInterface> > MooseMesh::_mortar_interface
protectedinherited

Definition at line 1000 of file MooseMesh.h.

Referenced by MooseMesh::addMortarInterface().

std::map<std::pair<BoundaryID, BoundaryID>, MortarInterface *> MooseMesh::_mortar_interface_by_ids
protectedinherited

Mortar interfaces mapped though master, slave IDs pairs.

Definition at line 1002 of file MooseMesh.h.

Referenced by MooseMesh::addMortarInterface(), and MooseMesh::getMortarInterface().

std::map<std::string, MortarInterface *> MooseMesh::_mortar_interface_by_name
protectedinherited

Mortar interfaces mapped through their names.

Definition at line 999 of file MooseMesh.h.

Referenced by MooseMesh::addMortarInterface(), and MooseMesh::getMortarInterfaceByName().

const std::string& MooseObject::_name
protectedinherited
bool MooseMesh::_needs_prepare_for_use
protectedinherited

True if prepare_for_use should be called when Mesh is prepared.

Definition at line 892 of file MooseMesh.h.

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

std::vector<Node *> MooseMesh::_node_map
protectedinherited

Vector of all the Nodes in the mesh for determining when to add a new point.

Definition at line 987 of file MooseMesh.h.

Referenced by MooseMesh::addUniqueNode().

std::map<boundary_id_type, std::vector<dof_id_type> > MooseMesh::_node_set_nodes
protectedinherited

list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids]

Definition at line 972 of file MooseMesh.h.

Referenced by MooseMesh::buildNodeList(), MooseMesh::freeBndNodes(), and MooseMesh::getNodeList().

std::map<dof_id_type, std::vector<dof_id_type> > MooseMesh::_node_to_active_semilocal_elem_map
protectedinherited

A map of all of the current nodes to the active elements that they are connected to.

Definition at line 924 of file MooseMesh.h.

Referenced by MooseMesh::addQuadratureNode(), MooseMesh::nodeToActiveSemilocalElemMap(), and MooseMesh::update().

bool MooseMesh::_node_to_active_semilocal_elem_map_built
protectedinherited

Definition at line 925 of file MooseMesh.h.

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

std::map<dof_id_type, std::vector<dof_id_type> > MooseMesh::_node_to_elem_map
protectedinherited

A map of all of the current nodes to the elements that they are connected to.

Definition at line 920 of file MooseMesh.h.

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

bool MooseMesh::_node_to_elem_map_built
protectedinherited

Definition at line 921 of file MooseMesh.h.

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

std::vector<std::pair<BoundaryID, BoundaryID> > MooseMesh::_paired_boundary
protectedinherited

A vector holding the paired boundaries for a regular orthogonal mesh.

Definition at line 996 of file MooseMesh.h.

Referenced by MooseMesh::detectPairedSidesets(), and MooseMesh::getPairedBoundaryMapping().

bool MooseMesh::_parallel_type_overridden
protectedinherited

Definition at line 853 of file MooseMesh.h.

Referenced by MooseMesh::MooseMesh().

const InputParameters& MooseObject::_pars
protectedinherited
MooseEnum MooseMesh::_partitioner_name
protectedinherited

The partitioner used on this mesh.

Definition at line 859 of file MooseMesh.h.

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

bool MooseMesh::_partitioner_overridden
protectedinherited

Definition at line 860 of file MooseMesh.h.

Referenced by MooseMesh::MooseMesh().

unsigned int MooseMesh::_patch_size
protectedinherited

The number of nodes to consider in the NearestNode neighborhood.

Definition at line 978 of file MooseMesh.h.

Referenced by MooseMesh::getPatchSize().

MooseEnum MooseMesh::_patch_update_strategy
protectedinherited

The patch update strategy.

Definition at line 981 of file MooseMesh.h.

Referenced by MooseMesh::getPatchUpdateStrategy(), and MooseMesh::setPatchUpdateStrategy().

std::map<dof_id_type, Node *> MooseMesh::_quadrature_nodes
protectedinherited
std::unique_ptr<ConstElemPointerRange> MooseMesh::_refined_elements
protectedinherited

The elements that were just refined.

Definition at line 895 of file MooseMesh.h.

Referenced by MooseMesh::cacheChangedLists(), and MooseMesh::refinedElementRange().

bool MooseMesh::_regular_orthogonal_mesh
protectedinherited
std::set<Node *> MooseMesh::_semilocal_node_list
protectedinherited

Used for generating the semilocal node range.

Definition at line 904 of file MooseMesh.h.

Referenced by MooseMesh::isSemiLocal(), and MooseMesh::updateActiveSemiLocalNodeRange().

unsigned int MooseMesh::_uniform_refine_level
protectedinherited

The level of uniform refinement requested (set to zero if AMR is disabled)

Definition at line 880 of file MooseMesh.h.

Referenced by MooseMesh::setUniformRefineLevel(), and MooseMesh::uniformRefineLevel().

bool MooseMesh::_use_distributed_mesh
protectedinherited

False by default.

Final value is determined by several factors including the 'distribution' setting in the input file, and whether or not the Mesh file is a Nemesis file.

Definition at line 851 of file MooseMesh.h.

Referenced by MooseMesh::errorIfDistributedMesh(), MooseMesh::ghostGhostedBoundaries(), MooseMesh::init(), and MooseMesh::MooseMesh().


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