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

Mesh generated from parameters. More...

#include <AnnularMesh.h>

Inheritance diagram for AnnularMesh:
[legend]

Public Member Functions

 AnnularMesh (const InputParameters &parameters)
 
 AnnularMesh (const AnnularMesh &other_mesh)=default
 
AnnularMeshoperator= (const AnnularMesh &other_mesh)=delete
 
virtual MooseMeshclone () const override
 Clone method. More...
 
virtual void buildMesh () override
 Must be overridden by child classes. More...
 
virtual Real getMinInDimension (unsigned int component) const override
 Returns the min or max of the requested dimension respectively. More...
 
virtual Real getMaxInDimension (unsigned int component) const override
 
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
 
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
 
virtual ExodusII_IO * exReader () const
 Not implemented – always returns NULL. More...
 
void printInfo (std::ostream &os=libMesh::out) const
 Calls print_info() on the underlying Mesh. More...
 
const std::set< SubdomainID > & getNodeBlockIds (const Node &node) const
 Return list of blocks to which the given node belongs. More...
 
const std::vector< dof_id_type > & getNodeList (boundary_id_type nodeset_id) const
 Return a writable reference to a vector of node IDs that belong to nodeset_id. More...
 
const Node * addUniqueNode (const Point &p, Real tol=1e-6)
 Add a new node to the mesh. More...
 
Node * addQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
 Adds a fictitious "QuadratureNode". More...
 
Node * getQuadratureNode (const Elem *elem, const unsigned short int side, const unsigned int qp)
 Get a specified quadrature node. More...
 
void clearQuadratureNodes ()
 Clear out any existing quadrature nodes. More...
 
BoundaryID getBoundaryID (const BoundaryName &boundary_name) const
 Get the associated BoundaryID for the boundary name. More...
 
SubdomainID getSubdomainID (const SubdomainName &subdomain_name) const
 Get the associated subdomain ID for the subdomain name. More...
 
std::vector< SubdomainIDgetSubdomainIDs (const std::vector< SubdomainName > &subdomain_name) const
 Get the associated subdomainIDs for the subdomain names that are passed in. More...
 
void setSubdomainName (SubdomainID subdomain_id, SubdomainName name)
 This method returns a writable reference to a subdomain name based on the id parameter. More...
 
const std::string & getSubdomainName (SubdomainID subdomain_id)
 Return the name of a block given an id. More...
 
void setBoundaryName (BoundaryID boundary_id, BoundaryName name)
 This method returns a writable reference to a boundary name based on the id parameter. More...
 
const std::string & getBoundaryName (BoundaryID boundary_id)
 Return the name of the boundary given the id. More...
 
void buildPeriodicNodeMap (std::multimap< dof_id_type, dof_id_type > &periodic_node_map, unsigned int var_number, PeriodicBoundaries *pbs) const
 This routine builds a multimap of boundary ids to matching boundary ids across all periodic boundaries in the system. More...
 
void buildPeriodicNodeSets (std::map< BoundaryID, std::set< dof_id_type >> &periodic_node_sets, unsigned int var_number, PeriodicBoundaries *pbs) const
 This routine builds a datastructure of node ids organized by periodic boundary ids. More...
 
Real dimensionWidth (unsigned int component) const
 Returns the width of the requested dimension. More...
 
bool detectOrthogonalDimRanges (Real tol=1e-6)
 This routine determines whether the Mesh is a regular orthogonal mesh (i.e. More...
 
void addPeriodicVariable (unsigned int var_num, BoundaryID primary, BoundaryID secondary)
 For "regular orthogonal" meshes, determine if variable var_num is periodic with respect to the primary and secondary BoundaryIDs, record this fact in the _periodic_dim data structure. More...
 
bool isTranslatedPeriodic (unsigned int nonlinear_var_num, unsigned int component) const
 Returns whether this generated mesh is periodic in the given dimension for the given variable. More...
 
RealVectorValue minPeriodicVector (unsigned int nonlinear_var_num, Point p, Point q) const
 This function returns the minimum vector between two points on the mesh taking into account periodicity for the given variable number. More...
 
Real minPeriodicDistance (unsigned int nonlinear_var_num, Point p, Point q) const
 This function returns the distance between two points on the mesh taking into account periodicity for the given variable number. More...
 
const std::pair< BoundaryID, BoundaryID > * getPairedBoundaryMapping (unsigned int component)
 This function attempts to return the paired boundary ids for the given component. More...
 
void buildRefinementAndCoarseningMaps (Assembly *assembly)
 Create the refinement and coarsening maps necessary for projection of stateful material properties when using adaptivity. More...
 
const std::vector< std::vector< QpMap > > & getRefinementMap (const Elem &elem, int parent_side, int child, int child_side)
 Get the refinement map for a given element type. More...
 
const std::vector< std::pair< unsigned int, QpMap > > & getCoarseningMap (const Elem &elem, int input_side)
 Get the coarsening map for a given element type. More...
 
void changeBoundaryId (const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
 Change all the boundary IDs for a given side from old_id to new_id. More...
 
const std::set< BoundaryID > & getSubdomainBoundaryIds (SubdomainID subdomain_id) const
 Get the list of boundary ids associated with the given subdomain id. More...
 
bool isBoundaryNode (dof_id_type node_id) const
 Returns true if the requested node is in the list of boundary nodes, false otherwise. More...
 
bool isBoundaryNode (dof_id_type node_id, BoundaryID bnd_id) const
 Returns true if the requested node is in the list of boundary nodes for the specified boundary, false otherwise. More...
 
bool isBoundaryElem (dof_id_type elem_id) const
 Returns true if the requested element is in the list of boundary elements, false otherwise. More...
 
bool isBoundaryElem (dof_id_type elem_id, BoundaryID bnd_id) const
 Returns true if the requested element is in the list of boundary elements for the specified boundary, false otherwise. More...
 
void errorIfDistributedMesh (std::string name) const
 Generate a unified error message if the underlying libMesh mesh is a DistributedMesh. More...
 
bool isDistributedMesh () const
 Returns the final Mesh distribution type. More...
 
bool isParallelTypeForced () const
 Tell the user if the distribution was overriden for any reason. More...
 
const MooseEnumpartitionerName () const
 
bool isPartitionerForced () const
 Tell the user if the partitioner was overriden for any reason. More...
 
void allowRecovery (bool allow)
 Set whether or not this mesh is allowed to read a recovery file. More...
 
void addMortarInterface (const std::string &name, BoundaryName master, BoundaryName slave, SubdomainName domain_id)
 
std::vector< std::unique_ptr< MooseMesh::MortarInterface > > & getMortarInterfaces ()
 
MooseMesh::MortarInterfacegetMortarInterfaceByName (const std::string name)
 
MooseMesh::MortarInterfacegetMortarInterface (BoundaryID master, BoundaryID slave)
 
void setCustomPartitioner (Partitioner *partitioner)
 Setter for custom partitioner. More...
 
bool isRegularOrthogonal ()
 Getter to query if the mesh was detected to be regular and orthogonal. More...
 
bool hasSecondOrderElements ()
 check if the mesh has SECOND order elements More...
 
virtual std::unique_ptr< PointLocatorBase > getPointLocator () const
 Proxy function to get a (sub)PointLocator from either the underlying libMesh mesh (default), or to allow derived meshes to return a custom point locator. More...
 
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
 
bool isCustomPartitionerRequested () const
 Setter and getter for _custom_partitioner_requested. More...
 
void setIsCustomPartitionerRequested (bool cpr)
 

Public Attributes

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

Protected Types

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

Protected Member Functions

void cacheInfo ()
 
void freeBndNodes ()
 
void freeBndElems ()
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 

Protected Attributes

const unsigned _nr
 Number of elements in radial direction. More...
 
const unsigned _nt
 Number of elements in angular direction. More...
 
const Real _rmin
 Minimum radius. More...
 
const Real _rmax
 Maximum radius. More...
 
const Real _tmin
 Minimum angle. More...
 
const Real _tmax
 Maximum angle. More...
 
const Real _growth_r
 Bias on radial meshing. More...
 
const Real _len
 rmax = rmin + len + len*g + len*g^2 + len*g^3 + ... + len*g^(nr-1) = rmin + len*(1 - g^nr)/(1 - g) More...
 
const bool _full_annulus
 Whether a full annulus (as opposed to a sector) will needs to generate. More...
 
const SubdomainID _quad_subdomain_id
 Subdomain ID of created quad elements. More...
 
const SubdomainID _tri_subdomain_id
 Subdomain ID of created tri elements (that only exist if rmin=0) More...
 
std::vector< std::unique_ptr< GhostingFunctor > > _ghosting_functors
 
MooseEnum _mesh_parallel_type
 Can be set to DISTRIBUTED, REPLICATED, or DEFAULT. More...
 
bool _use_distributed_mesh
 False by default. More...
 
bool _distribution_overridden
 
bool _parallel_type_overridden
 
std::unique_ptr< libMesh::MeshBase > _mesh
 Pointer to underlying libMesh mesh object. More...
 
MooseEnum _partitioner_name
 The partitioner used on this mesh. More...
 
bool _partitioner_overridden
 
std::unique_ptr< Partitioner > _custom_partitioner
 The custom partitioner. More...
 
bool _custom_partitioner_requested
 
unsigned int _uniform_refine_level
 The level of uniform refinement requested (set to zero if AMR is disabled) More...
 
bool _is_changed
 true if mesh is changed (i.e. after adaptivity step) More...
 
bool _is_nemesis
 True if a Nemesis Mesh was read in. More...
 
bool _is_prepared
 True if prepare has been called on the mesh. More...
 
bool _needs_prepare_for_use
 True if prepare_for_use should be called when Mesh is prepared. More...
 
std::unique_ptr< ConstElemPointerRange_refined_elements
 The elements that were just refined. More...
 
std::unique_ptr< ConstElemPointerRange_coarsened_elements
 The elements that were just coarsened. More...
 
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
 Map of Parent elements to child elements for elements that were just coarsened. More...
 
std::set< Node * > _semilocal_node_list
 Used for generating the semilocal node range. More...
 
std::unique_ptr< ConstElemRange > _active_local_elem_range
 A range for use with threading. More...
 
std::unique_ptr< SemiLocalNodeRange_active_semilocal_node_range
 
std::unique_ptr< NodeRange > _active_node_range
 
std::unique_ptr< ConstNodeRange > _local_node_range
 
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
 
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
 
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
 A map of all of the current nodes to the elements that they are connected to. More...
 
bool _node_to_elem_map_built
 
std::map< dof_id_type, std::vector< dof_id_type > > _node_to_active_semilocal_elem_map
 A map of all of the current nodes to the active elements that they are connected to. More...
 
bool _node_to_active_semilocal_elem_map_built
 
std::set< SubdomainID_mesh_subdomains
 A set of subdomain IDs currently present in the mesh. More...
 
std::unique_ptr< std::map< BoundaryID, RealVectorValue > > _boundary_to_normal_map
 The boundary to normal map - valid only when AddAllSideSetsByNormals is active. More...
 
std::vector< BndNode * > _bnd_nodes
 array of boundary nodes More...
 
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_node_ids
 Map of sets of node IDs in each boundary. More...
 
std::vector< BndElement * > _bnd_elems
 array of boundary elems More...
 
std::map< boundary_id_type, std::set< dof_id_type > > _bnd_elem_ids
 Map of set of elem IDs connected to each boundary. More...
 
std::map< dof_id_type, Node * > _quadrature_nodes
 
std::map< dof_id_type, std::map< unsigned int, std::map< dof_id_type, Node * > > > _elem_to_side_to_qp_to_quadrature_nodes
 
std::vector< BndNode_extra_bnd_nodes
 
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
 list of nodes that belongs to a specified block (domain) More...
 
std::map< boundary_id_type, std::vector< dof_id_type > > _node_set_nodes
 list of nodes that belongs to a specified nodeset: indexing [nodeset_id] -> [array of node ids] More...
 
std::set< unsigned int > _ghosted_boundaries
 
std::vector< Real > _ghosted_boundaries_inflation
 
unsigned int _patch_size
 The number of nodes to consider in the NearestNode neighborhood. More...
 
MooseEnum _patch_update_strategy
 The patch update strategy. More...
 
std::string _file_name
 file_name iff this mesh was read from a file 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

Mesh generated from parameters.

Definition at line 28 of file AnnularMesh.h.

Member Typedef Documentation

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

Definition at line 929 of file MooseMesh.h.

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

Definition at line 922 of file MooseMesh.h.

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

Definition at line 930 of file MooseMesh.h.

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

Definition at line 923 of file MooseMesh.h.

Member Enumeration Documentation

anonymous enum
protectedinherited

Convenience enums.

Enumerator

Definition at line 836 of file MooseMesh.h.

837  {
838  X = 0,
839  Y,
840  Z
841  };
anonymous enum
protectedinherited
Enumerator
MIN 
MAX 

Definition at line 842 of file MooseMesh.h.

843  {
844  MIN = 0,
845  MAX
846  };

Constructor & Destructor Documentation

AnnularMesh::AnnularMesh ( const InputParameters parameters)

Definition at line 58 of file AnnularMesh.C.

Referenced by clone().

59  : MooseMesh(parameters),
60  _nr(getParam<unsigned int>("nr")),
61  _nt(getParam<unsigned int>("nt")),
62  _rmin(getParam<Real>("rmin")),
63  _rmax(getParam<Real>("rmax")),
64  _tmin(getParam<Real>("tmin")),
65  _tmax(getParam<Real>("tmax")),
66  _growth_r(getParam<Real>("growth_r")),
67  _len(_growth_r == 1.0 ? (_rmax - _rmin) / _nr
68  : (_rmax - _rmin) * (1.0 - _growth_r) / (1.0 - std::pow(_growth_r, _nr))),
69  _full_annulus(_tmin == 0.0 && _tmax == 2 * M_PI),
70  _quad_subdomain_id(getParam<SubdomainID>("quad_subdomain_id")),
71  _tri_subdomain_id(getParam<SubdomainID>("tri_subdomain_id"))
72 {
73  // catch likely user errors
74  if (_rmax <= _rmin)
75  mooseError("AnnularMesh: rmax must be greater than rmin");
76  if (_tmax <= _tmin)
77  mooseError("AnnularMesh: tmax must be greater than tmin");
78  if (_tmax - _tmin > 2 * M_PI)
79  mooseError("AnnularMesh: tmax - tmin must be <= 2 Pi");
80  if (_nt <= (_tmax - _tmin) / M_PI)
81  mooseError("AnnularMesh: nt must be greater than (tmax - tmin) / Pi in order to avoid inverted "
82  "elements");
84  mooseError("AnnularMesh: quad_subdomain_id must not equal tri_subdomain_id");
85 }
const Real _growth_r
Bias on radial meshing.
Definition: AnnularMesh.h:62
const SubdomainID _tri_subdomain_id
Subdomain ID of created tri elements (that only exist if rmin=0)
Definition: AnnularMesh.h:74
const Real _rmin
Minimum radius.
Definition: AnnularMesh.h:50
const Real _rmax
Maximum radius.
Definition: AnnularMesh.h:53
const unsigned _nr
Number of elements in radial direction.
Definition: AnnularMesh.h:44
MooseMesh(const InputParameters &parameters)
Typical "Moose-style" constructor and copy constructor.
Definition: MooseMesh.C:146
const bool _full_annulus
Whether a full annulus (as opposed to a sector) will needs to generate.
Definition: AnnularMesh.h:68
const SubdomainID _quad_subdomain_id
Subdomain ID of created quad elements.
Definition: AnnularMesh.h:71
const Real _len
rmax = rmin + len + len*g + len*g^2 + len*g^3 + ... + len*g^(nr-1) = rmin + len*(1 - g^nr)/(1 - g) ...
Definition: AnnularMesh.h:65
const Real _tmin
Minimum angle.
Definition: AnnularMesh.h:56
const Real _tmax
Maximum angle.
Definition: AnnularMesh.h:59
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
const unsigned _nt
Number of elements in angular direction.
Definition: AnnularMesh.h:47
AnnularMesh::AnnularMesh ( const AnnularMesh other_mesh)
default

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

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

2013 {
2014  return getMesh().active_local_elements_begin();
2015 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
const MeshBase::const_element_iterator MooseMesh::activeLocalElementsEnd ( )
inherited

Definition at line 2018 of file MooseMesh.C.

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

2019 {
2020  return getMesh().active_local_elements_end();
2021 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
void MooseMesh::addGhostedBoundary ( BoundaryID  boundary_id)
inherited

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

Definition at line 2161 of file MooseMesh.C.

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

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

Definition at line 2546 of file MooseMesh.C.

2550 {
2551  SubdomainID domain_id = getSubdomainID(domain_name);
2552  boundary_id_type master_id = getBoundaryID(master);
2553  boundary_id_type slave_id = getBoundaryID(slave);
2554 
2555  std::unique_ptr<MortarInterface> iface = libmesh_make_unique<MortarInterface>();
2556 
2557  iface->_id = domain_id;
2558  iface->_master = master;
2559  iface->_slave = slave;
2560  iface->_name = name;
2561 
2562  MeshBase::element_iterator el = _mesh->level_elements_begin(0);
2563  const MeshBase::element_iterator end_el = _mesh->level_elements_end(0);
2564  for (; el != end_el; ++el)
2565  {
2566  Elem * elem = *el;
2567  if (elem->subdomain_id() == domain_id)
2568  iface->_elems.push_back(elem);
2569  }
2570 
2571  setSubdomainName(iface->_id, name);
2572 
2573  _mortar_interface.push_back(std::move(iface));
2575  _mortar_interface_by_ids[std::pair<BoundaryID, BoundaryID>(master_id, slave_id)] =
2576  _mortar_interface.back().get();
2577 }
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:973
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:997
std::vector< std::unique_ptr< MortarInterface > > _mortar_interface
Definition: MooseMesh.h:971
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:929
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:1040
std::map< std::string, MortarInterface * > _mortar_interface_by_name
Mortar interfaces mapped through their names.
Definition: MooseMesh.h:970
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:825
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
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 1388 of file MooseMesh.C.

Referenced by AddPeriodicBCAction::setPeriodicVars().

1389 {
1391  return;
1392 
1393  _periodic_dim[var_num].resize(dimension());
1394 
1395  _half_range = Point(dimensionWidth(0) / 2.0, dimensionWidth(1) / 2.0, dimensionWidth(2) / 2.0);
1396 
1397  for (unsigned int component = 0; component < dimension(); ++component)
1398  {
1399  const std::pair<BoundaryID, BoundaryID> * boundary_ids = getPairedBoundaryMapping(component);
1400 
1401  if (boundary_ids != nullptr &&
1402  ((boundary_ids->first == primary && boundary_ids->second == secondary) ||
1403  (boundary_ids->first == secondary && boundary_ids->second == primary)))
1404  _periodic_dim[var_num][component] = true;
1405  }
1406 }
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:989
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:1945
Real dimensionWidth(unsigned int component) const
Returns the width of the requested dimension.
Definition: MooseMesh.C:1364
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:1452
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:984
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:961
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 847 of file MooseMesh.C.

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

852 {
853  Node * qnode;
854 
855  if (_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) ==
857  {
858  // Create a new node id starting from the max node id and counting down. This will be the least
859  // likely to collide with an existing node id.
860  // Note that we are using numeric_limits<unsigned>::max even
861  // though max_id is stored as a dof_id_type. I tried this with
862  // numeric_limits<dof_id_type>::max and it broke several tests in
863  // MOOSE. So, this is some kind of a magic number that we will
864  // just continue to use...
865  dof_id_type max_id = std::numeric_limits<unsigned int>::max() - 100;
866  dof_id_type new_id = max_id - _quadrature_nodes.size();
867 
868  if (new_id <= getMesh().max_node_id())
869  mooseError("Quadrature node id collides with existing node id!");
870 
871  qnode = new Node(point, new_id);
872 
873  // Keep track of this new node in two different ways for easy lookup
874  _quadrature_nodes[new_id] = qnode;
875  _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp] = qnode;
876 
877  if (elem->active())
878  {
879  _node_to_elem_map[new_id].push_back(elem->id());
880  _node_to_active_semilocal_elem_map[new_id].push_back(elem->id());
881  }
882  }
883  else
884  qnode = _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
885 
886  BndNode * bnode = new BndNode(qnode, bid);
887  _bnd_nodes.push_back(bnode);
888  _bnd_node_ids[bid].insert(qnode->id());
889 
890  _extra_bnd_nodes.push_back(*bnode);
891 
892  // Do this so the range will be regenerated next time it is accessed
893  _bnd_node_range.reset();
894 
895  return qnode;
896 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:934
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:893
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:925
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:921
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:937
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:936
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:888
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:2048
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:897
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 813 of file MooseMesh.C.

814 {
819  if (getMesh().n_nodes() != _node_map.size())
820  {
821  _node_map.clear();
822  _node_map.reserve(getMesh().n_nodes());
823  for (const auto & node : getMesh().node_ptr_range())
824  _node_map.push_back(node);
825  }
826 
827  Node * node = nullptr;
828  for (unsigned int i = 0; i < _node_map.size(); ++i)
829  {
830  if (p.relative_fuzzy_equals(*_node_map[i], tol))
831  {
832  node = _node_map[i];
833  break;
834  }
835  }
836  if (node == nullptr)
837  {
838  node = getMesh().add_node(new Node(p));
839  _node_map.push_back(node);
840  }
841 
842  mooseAssert(node != nullptr, "Node is NULL");
843  return node;
844 }
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:384
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
std::vector< Node * > _node_map
Vector of all the Nodes in the mesh for determining when to add a new point.
Definition: MooseMesh.h:958
void MooseMesh::allowRecovery ( bool  allow)
inlineinherited

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

Definition at line 757 of file MooseMesh.h.

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

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

Definition at line 798 of file MooseMesh.C.

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

799 {
800  Predicates::NotNull<bnd_elem_iterator_imp> p;
801  return bnd_elem_iterator(_bnd_elems.begin(), _bnd_elems.end(), p);
802 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:928
MooseMesh::bnd_elem_iterator MooseMesh::bndElemsEnd ( )
virtualinherited

Definition at line 806 of file MooseMesh.C.

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

807 {
808  Predicates::NotNull<bnd_elem_iterator_imp> p;
809  return bnd_elem_iterator(_bnd_elems.end(), _bnd_elems.end(), p);
810 }
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:928
MooseMesh::bnd_node_iterator MooseMesh::bndNodesBegin ( )
virtualinherited

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

Definition at line 782 of file MooseMesh.C.

Referenced by MooseMesh::getBoundaryNodeRange().

783 {
784  Predicates::NotNull<bnd_node_iterator_imp> p;
785  return bnd_node_iterator(_bnd_nodes.begin(), _bnd_nodes.end(), p);
786 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:921
MooseMesh::bnd_node_iterator MooseMesh::bndNodesEnd ( )
virtualinherited

Definition at line 790 of file MooseMesh.C.

Referenced by MooseMesh::getBoundaryNodeRange().

791 {
792  Predicates::NotNull<bnd_node_iterator_imp> p;
793  return bnd_node_iterator(_bnd_nodes.end(), _bnd_nodes.end(), p);
794 }
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:921
void MooseMesh::buildBndElemList ( )
inherited

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

Definition at line 622 of file MooseMesh.C.

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

623 {
624  freeBndElems();
625 
627  std::vector<dof_id_type> elems;
628  std::vector<unsigned short int> sides;
629  std::vector<boundary_id_type> ids;
630  getMesh().get_boundary_info().build_active_side_list(elems, sides, ids);
631 
632  int n = elems.size();
633  _bnd_elems.resize(n);
634  for (int i = 0; i < n; i++)
635  {
636  _bnd_elems[i] = new BndElement(getMesh().elem_ptr(elems[i]), sides[i], ids[i]);
637  _bnd_elem_ids[ids[i]].insert(elems[i]);
638  }
639 }
void freeBndElems()
Definition: MooseMesh.C:298
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:932
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:928
PetscInt n
void AnnularMesh::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 126 of file AnnularMesh.C.

127 {
128  const Real dt = (_tmax - _tmin) / _nt;
129 
130  MeshBase & mesh = getMesh();
131  mesh.clear();
132  mesh.set_mesh_dimension(2);
133  mesh.set_spatial_dimension(2);
134  BoundaryInfo & boundary_info = mesh.get_boundary_info();
135 
136  const unsigned num_angular_nodes = (_full_annulus ? _nt : _nt + 1);
137  const unsigned num_nodes =
138  (_rmin > 0.0 ? (_nr + 1) * num_angular_nodes : _nr * num_angular_nodes + 1);
139  const unsigned min_nonzero_layer_num = (_rmin > 0.0 ? 0 : 1);
140  std::vector<Node *> nodes(num_nodes);
141  unsigned node_id = 0;
142 
143  // add nodes at rmax that aren't yet connected to any elements
144  Real current_r = _rmax;
145  for (unsigned angle_num = 0; angle_num < num_angular_nodes; ++angle_num)
146  {
147  const Real angle = _tmin + angle_num * dt;
148  const Real x = current_r * std::cos(angle);
149  const Real y = current_r * std::sin(angle);
150  nodes[node_id] = mesh.add_point(Point(x, y, 0.0), node_id);
151  node_id++;
152  }
153 
154  // add nodes at smaller radii, and connect them with elements
155  for (unsigned layer_num = _nr; layer_num > min_nonzero_layer_num; --layer_num)
156  {
157  if (layer_num == 1)
158  current_r = _rmin; // account for precision loss
159  else
160  current_r -= _len * std::pow(_growth_r, layer_num - 1);
161 
162  // add node at angle = _tmin
163  nodes[node_id] = mesh.add_point(
164  Point(current_r * std::cos(_tmin), current_r * std::sin(_tmin), 0.0), node_id);
165  node_id++;
166  for (unsigned angle_num = 1; angle_num < num_angular_nodes; ++angle_num)
167  {
168  const Real angle = _tmin + angle_num * dt;
169  const Real x = current_r * std::cos(angle);
170  const Real y = current_r * std::sin(angle);
171  nodes[node_id] = mesh.add_point(Point(x, y, 0.0), node_id);
172  Elem * elem = mesh.add_elem(new Quad4);
173  elem->set_node(0) = nodes[node_id];
174  elem->set_node(1) = nodes[node_id - 1];
175  elem->set_node(2) = nodes[node_id - num_angular_nodes - 1];
176  elem->set_node(3) = nodes[node_id - num_angular_nodes];
177  elem->subdomain_id() = _quad_subdomain_id;
178  node_id++;
179 
180  if (layer_num == _nr)
181  // add outer boundary (boundary_id = 1)
182  boundary_info.add_side(elem, 2, 1);
183  if (layer_num == 1)
184  // add inner boundary (boundary_id = 0)
185  boundary_info.add_side(elem, 0, 0);
186  if (!_full_annulus && angle_num == 1)
187  // add tmin boundary (boundary_id = 2)
188  boundary_info.add_side(elem, 1, 2);
189  if (!_full_annulus && angle_num == num_angular_nodes - 1)
190  // add tmin boundary (boundary_id = 3)
191  boundary_info.add_side(elem, 3, 3);
192  }
193  if (_full_annulus)
194  {
195  // add element connecting to node at angle=0
196  Elem * elem = mesh.add_elem(new Quad4);
197  elem->set_node(0) = nodes[node_id - num_angular_nodes];
198  elem->set_node(1) = nodes[node_id - 1];
199  elem->set_node(2) = nodes[node_id - num_angular_nodes - 1];
200  elem->set_node(3) = nodes[node_id - 2 * num_angular_nodes];
201  elem->subdomain_id() = _quad_subdomain_id;
202 
203  if (layer_num == _nr)
204  // add outer boundary (boundary_id = 1)
205  boundary_info.add_side(elem, 2, 1);
206  if (layer_num == 1)
207  // add inner boundary (boundary_id = 0)
208  boundary_info.add_side(elem, 0, 0);
209  }
210  }
211 
212  // add single node at origin, if relevant
213  if (_rmin == 0.0)
214  {
215  nodes[node_id] = mesh.add_point(Point(0.0, 0.0, 0.0), node_id);
216  boundary_info.add_node(node_id, 0); // boundary_id=0 is centre
217  for (unsigned angle_num = 0; angle_num < num_angular_nodes - 1; ++angle_num)
218  {
219  Elem * elem = mesh.add_elem(new Tri3);
220  elem->set_node(0) = nodes[node_id];
221  elem->set_node(1) = nodes[node_id - num_angular_nodes + angle_num];
222  elem->set_node(2) = nodes[node_id - num_angular_nodes + angle_num + 1];
223  elem->subdomain_id() = _tri_subdomain_id;
224  }
225  if (_full_annulus)
226  {
227  Elem * elem = mesh.add_elem(new Tri3);
228  elem->set_node(0) = nodes[node_id];
229  elem->set_node(1) = nodes[node_id - 1];
230  elem->set_node(2) = nodes[node_id - num_angular_nodes];
231  elem->subdomain_id() = _tri_subdomain_id;
232  }
233  }
234 
235  boundary_info.sideset_name(0) = "rmin";
236  boundary_info.sideset_name(1) = "rmax";
237  boundary_info.nodeset_name(0) = "rmin";
238  boundary_info.nodeset_name(1) = "rmax";
239  if (!_full_annulus)
240  {
241  boundary_info.sideset_name(2) = "tmin";
242  boundary_info.sideset_name(3) = "tmax";
243  boundary_info.nodeset_name(2) = "tmin";
244  boundary_info.nodeset_name(3) = "tmax";
245  }
246 
247  mesh.prepare_for_use(false);
248 }
const Real _growth_r
Bias on radial meshing.
Definition: AnnularMesh.h:62
const SubdomainID _tri_subdomain_id
Subdomain ID of created tri elements (that only exist if rmin=0)
Definition: AnnularMesh.h:74
const Real _rmin
Minimum radius.
Definition: AnnularMesh.h:50
const Real _rmax
Maximum radius.
Definition: AnnularMesh.h:53
const unsigned _nr
Number of elements in radial direction.
Definition: AnnularMesh.h:44
static PetscErrorCode Vec x
const bool _full_annulus
Whether a full annulus (as opposed to a sector) will needs to generate.
Definition: AnnularMesh.h:68
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
const SubdomainID _quad_subdomain_id
Subdomain ID of created quad elements.
Definition: AnnularMesh.h:71
const Real _len
rmax = rmin + len + len*g + len*g^2 + len*g^3 + ... + len*g^(nr-1) = rmin + len*(1 - g^nr)/(1 - g) ...
Definition: AnnularMesh.h:65
const Real _tmin
Minimum angle.
Definition: AnnularMesh.h:56
const Real _tmax
Maximum angle.
Definition: AnnularMesh.h:59
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
const unsigned _nt
Number of elements in angular direction.
Definition: AnnularMesh.h:47
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 589 of file MooseMesh.C.

Referenced by MooseMesh::update().

590 {
591  freeBndNodes();
592 
594  std::vector<dof_id_type> nodes;
595  std::vector<boundary_id_type> ids;
596  getMesh().get_boundary_info().build_node_list(nodes, ids);
597 
598  int n = nodes.size();
599  _bnd_nodes.resize(n);
600  for (int i = 0; i < n; i++)
601  {
602  _bnd_nodes[i] = new BndNode(getMesh().node_ptr(nodes[i]), ids[i]);
603  _node_set_nodes[ids[i]].push_back(nodes[i]);
604  _bnd_node_ids[ids[i]].insert(nodes[i]);
605  }
606 
607  _bnd_nodes.reserve(_bnd_nodes.size() + _extra_bnd_nodes.size());
608  for (unsigned int i = 0; i < _extra_bnd_nodes.size(); i++)
609  {
610  BndNode * bnode = new BndNode(_extra_bnd_nodes[i]._node, _extra_bnd_nodes[i]._bnd_id);
611  _bnd_nodes.push_back(bnode);
612  _bnd_node_ids[ids[i]].insert(_extra_bnd_nodes[i]._node->id());
613  }
614 
615  BndNodeCompare mein_kompfare;
616 
617  // This sort is here so that boundary conditions are always applied in the same order
618  std::sort(_bnd_nodes.begin(), _bnd_nodes.end(), mein_kompfare);
619 }
Helper class for sorting Boundary Nodes so that we always get the same order of application for bound...
Definition: MooseMesh.C:565
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:925
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:943
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:921
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:937
PetscInt n
void freeBndNodes()
Definition: MooseMesh.C:280
void MooseMesh::buildNodeListFromSideList ( )
inherited

Calls BoundaryInfo::build_node_list_from_side_list().

Definition at line 1979 of file MooseMesh.C.

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

1980 {
1982  getMesh().get_boundary_info().build_node_list_from_side_list();
1983 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
bool _construct_node_list_from_side_list
Whether or not to allow generation of nodesets from sidesets.
Definition: MooseMesh.h:1091
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 1084 of file MooseMesh.C.

1087 {
1088  mooseAssert(!Threads::in_threads,
1089  "This function should only be called outside of a threaded "
1090  "region due to the use of PointLocator");
1091 
1092  periodic_node_map.clear();
1093 
1094  std::unique_ptr<PointLocatorBase> point_locator = getMesh().sub_point_locator();
1095 
1096  // Get a const reference to the BoundaryInfo object that we will use several times below...
1097  const BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1098 
1099  // A typedef makes the code below easier to read...
1100  typedef std::multimap<dof_id_type, dof_id_type>::iterator IterType;
1101 
1102  // Container to catch IDs passed back from the BoundaryInfo object
1103  std::vector<boundary_id_type> bc_ids;
1104 
1105  for (const auto & elem : getMesh().active_element_ptr_range())
1106  for (unsigned int s = 0; s < elem->n_sides(); ++s)
1107  {
1108  if (elem->neighbor_ptr(s))
1109  continue;
1110 
1111  boundary_info.boundary_ids(elem, s, bc_ids);
1112  for (const auto & boundary_id : bc_ids)
1113  {
1114  const PeriodicBoundaryBase * periodic = pbs->boundary(boundary_id);
1115  if (periodic && periodic->is_my_variable(var_number))
1116  {
1117  const Elem * neigh = pbs->neighbor(boundary_id, *point_locator, elem, s);
1118  unsigned int s_neigh =
1119  boundary_info.side_with_boundary_id(neigh, periodic->pairedboundary);
1120 
1121  std::unique_ptr<const Elem> elem_side = elem->build_side_ptr(s);
1122  std::unique_ptr<const Elem> neigh_side = neigh->build_side_ptr(s_neigh);
1123 
1124  // At this point we have matching sides - lets find matching nodes
1125  for (unsigned int i = 0; i < elem_side->n_nodes(); ++i)
1126  {
1127  const Node * master_node = elem->node_ptr(i);
1128  Point master_point = periodic->get_corresponding_pos(*master_node);
1129  for (unsigned int j = 0; j < neigh_side->n_nodes(); ++j)
1130  {
1131  const Node * slave_node = neigh_side->node_ptr(j);
1132  if (master_point.absolute_fuzzy_equals(*slave_node))
1133  {
1134  // Avoid inserting any duplicates
1135  std::pair<IterType, IterType> iters =
1136  periodic_node_map.equal_range(master_node->id());
1137  bool found = false;
1138  for (IterType map_it = iters.first; map_it != iters.second; ++map_it)
1139  if (map_it->second == slave_node->id())
1140  found = true;
1141  if (!found)
1142  {
1143  periodic_node_map.insert(std::make_pair(master_node->id(), slave_node->id()));
1144  periodic_node_map.insert(std::make_pair(slave_node->id(), master_node->id()));
1145  }
1146  }
1147  }
1148  }
1149  }
1150  }
1151  }
1152 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
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 1155 of file MooseMesh.C.

1158 {
1159  periodic_node_sets.clear();
1160 
1161  std::vector<dof_id_type> nl;
1162  std::vector<boundary_id_type> il;
1163 
1164  getMesh().get_boundary_info().build_node_list(nl, il);
1165 
1166  // Loop over all the boundary nodes adding the periodic nodes to the appropriate set
1167  for (unsigned int i = 0; i < nl.size(); ++i)
1168  {
1169  // Is this current node on a known periodic boundary?
1170  if (periodic_node_sets.find(il[i]) != periodic_node_sets.end())
1171  periodic_node_sets[il[i]].insert(nl[i]);
1172  else // This still might be a periodic node but we just haven't seen this boundary_id yet
1173  {
1174  const PeriodicBoundaryBase * periodic = pbs->boundary(il[i]);
1175  if (periodic && periodic->is_my_variable(var_number))
1176  periodic_node_sets[il[i]].insert(nl[i]);
1177  }
1178  }
1179 }
NonlinearSystemBase * nl
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 1470 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup().

1471 {
1472  std::map<ElemType, Elem *> canonical_elems;
1473 
1474  // First, loop over all elements and find a canonical element for each type
1475  // Doing it this way guarantees that this is going to work in parallel
1476  for (const auto & elem : getMesh().element_ptr_range()) // TODO: Thread this
1477  {
1478  ElemType type = elem->type();
1479 
1480  if (canonical_elems.find(type) ==
1481  canonical_elems.end()) // If we haven't seen this type of elem before save it
1482  canonical_elems[type] = elem;
1483  else
1484  {
1485  Elem * stored = canonical_elems[type];
1486  if (elem->id() < stored->id()) // Arbitrarily keep the one with a lower id
1487  canonical_elems[type] = elem;
1488  }
1489  }
1490  // Now build the maps using these templates
1491  // Note: This MUST be done NOT threaded!
1492  for (const auto & can_it : canonical_elems)
1493  {
1494  Elem * elem = can_it.second;
1495 
1496  // Need to do this just once to get the right qrules put in place
1497  assembly->setCurrentSubdomainID(elem->subdomain_id());
1498  assembly->reinit(elem);
1499  assembly->reinit(elem, 0);
1500  QBase * qrule = assembly->qRule();
1501  QBase * qrule_face = assembly->qRuleFace();
1502 
1503  // Volume to volume projection for refinement
1504  buildRefinementMap(*elem, *qrule, *qrule_face, -1, -1, -1);
1505 
1506  // Volume to volume projection for coarsening
1507  buildCoarseningMap(*elem, *qrule, *qrule_face, -1);
1508 
1509  // Map the sides of children
1510  for (unsigned int side = 0; side < elem->n_sides(); side++)
1511  {
1512  // Side to side for sides that match parent's sides
1513  buildRefinementMap(*elem, *qrule, *qrule_face, side, -1, side);
1514  buildCoarseningMap(*elem, *qrule, *qrule_face, side);
1515  }
1516 
1517  // Child side to parent volume mapping for "internal" child sides
1518  for (unsigned int child = 0; child < elem->n_children(); ++child)
1519  for (unsigned int side = 0; side < elem->n_sides();
1520  ++side) // Assume children have the same number of sides!
1521  if (!elem->is_child_on_side(child, side)) // Otherwise we already computed that map
1522  buildRefinementMap(*elem, *qrule, *qrule_face, -1, child, side);
1523  }
1524 }
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:2355
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:1604
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:1527
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
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 1986 of file MooseMesh.C.

Referenced by PenetrationLocator::detectPenetration().

1989 {
1990  getMesh().get_boundary_info().build_side_list(el, sl, il);
1991 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
void MooseMesh::cacheChangedLists ( )
inherited

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

Definition at line 481 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged().

482 {
483  ConstElemRange elem_range(getMesh().local_elements_begin(), getMesh().local_elements_end(), 1);
484  CacheChangedListsThread cclt(*this);
485  Threads::parallel_reduce(elem_range, cclt);
486 
488 
489  _refined_elements = libmesh_make_unique<ConstElemPointerRange>(cclt._refined_elements.begin(),
490  cclt._refined_elements.end());
491  _coarsened_elements = libmesh_make_unique<ConstElemPointerRange>(cclt._coarsened_elements.begin(),
492  cclt._coarsened_elements.end());
493  _coarsened_element_children = cclt._coarsened_element_children;
494 }
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:864
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:867
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
Map of Parent elements to child elements for elements that were just coarsened.
Definition: MooseMesh.h:874
void MooseMesh::cacheInfo ( )
protectedinherited

Definition at line 744 of file MooseMesh.C.

Referenced by MooseMesh::update().

745 {
746  // TODO: Thread this!
747  for (const auto & elem : getMesh().element_ptr_range())
748  {
749  SubdomainID subdomain_id = elem->subdomain_id();
750 
751  for (unsigned int side = 0; side < elem->n_sides(); side++)
752  {
753  std::vector<BoundaryID> boundaryids = getBoundaryIDs(elem, side);
754 
755  std::set<BoundaryID> & subdomain_set = _subdomain_boundary_ids[subdomain_id];
756 
757  subdomain_set.insert(boundaryids.begin(), boundaryids.end());
758  }
759 
760  for (unsigned int nd = 0; nd < elem->n_nodes(); ++nd)
761  {
762  Node & node = *elem->node_ptr(nd);
763  _block_node_list[node.id()].insert(elem->subdomain_id());
764  }
765  }
766 }
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:384
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:940
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
const std::set< BoundaryID > & getBoundaryIDs() const
Returns a const reference to a set of all user-specified boundary IDs.
Definition: MooseMesh.C:1959
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:1085
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
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 1808 of file MooseMesh.C.

Referenced by MeshExtruder::changeID().

1811 {
1812  // Get a reference to our BoundaryInfo object, we will use it several times below...
1813  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1814 
1815  // Container to catch ids passed back from BoundaryInfo
1816  std::vector<boundary_id_type> old_ids;
1817 
1818  // Only level-0 elements store BCs. Loop over them.
1819  MeshBase::element_iterator el = getMesh().level_elements_begin(0);
1820  const MeshBase::element_iterator end_el = getMesh().level_elements_end(0);
1821  for (; el != end_el; ++el)
1822  {
1823  Elem * elem = *el;
1824  unsigned int n_sides = elem->n_sides();
1825  for (unsigned int s = 0; s != n_sides; ++s)
1826  {
1827  boundary_info.boundary_ids(elem, s, old_ids);
1828  if (std::find(old_ids.begin(), old_ids.end(), old_id) != old_ids.end())
1829  {
1830  std::vector<boundary_id_type> new_ids(old_ids);
1831  std::replace(new_ids.begin(), new_ids.end(), old_id, new_id);
1832  if (delete_prev)
1833  {
1834  boundary_info.remove_side(elem, s);
1835  boundary_info.add_side(elem, s, new_ids);
1836  }
1837  else
1838  boundary_info.add_side(elem, s, new_ids);
1839  }
1840  }
1841  }
1842 
1843  // Remove any remaining references to the old ID from the
1844  // BoundaryInfo object. This prevents things like empty sidesets
1845  // from showing up when printing information, etc.
1846  if (delete_prev)
1847  boundary_info.remove_id(old_id);
1848 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
void MooseMesh::clearQuadratureNodes ( )
inherited

Clear out any existing quadrature nodes.

Most likely called before re-adding them.

Definition at line 917 of file MooseMesh.C.

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

918 {
919  // Delete all the quadrature nodes
920  for (auto & it : _quadrature_nodes)
921  delete it.second;
922 
923  _quadrature_nodes.clear();
925  _extra_bnd_nodes.clear();
926 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:934
std::vector< BndNode > _extra_bnd_nodes
Definition: MooseMesh.h:937
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:936
MooseMesh & AnnularMesh::clone ( ) const
overridevirtual

Clone method.

Allocates memory you are responsible to clean up.

Implements MooseMesh.

Definition at line 120 of file AnnularMesh.C.

121 {
122  return *(new AnnularMesh(*this));
123 }
AnnularMesh(const InputParameters &parameters)
Definition: AnnularMesh.C:58
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 509 of file MooseMesh.C.

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

510 {
511  auto elem_to_child_pair = _coarsened_element_children.find(elem);
512  mooseAssert(elem_to_child_pair != _coarsened_element_children.end(), "Missing element in map");
513  return elem_to_child_pair->second;
514 }
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
std::map< const Elem *, std::vector< const Elem * > > _coarsened_element_children
Map of Parent elements to child elements for elements that were just coarsened.
Definition: MooseMesh.h:874
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 503 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged().

504 {
505  return _coarsened_elements.get();
506 }
std::unique_ptr< ConstElemPointerRange > _coarsened_elements
The elements that were just coarsened.
Definition: MooseMesh.h:867
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 1182 of file MooseMesh.C.

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

1183 {
1185  return true;
1186 
1187  std::vector<Real> min(3, std::numeric_limits<Real>::max());
1188  std::vector<Real> max(3, std::numeric_limits<Real>::min());
1189  unsigned int dim = getMesh().mesh_dimension();
1190 
1191  // Find the bounding box of our mesh
1192  for (const auto & node : getMesh().node_ptr_range())
1193  for (unsigned int i = 0; i < dim; ++i)
1194  {
1195  if ((*node)(i) < min[i])
1196  min[i] = (*node)(i);
1197  if ((*node)(i) > max[i])
1198  max[i] = (*node)(i);
1199  }
1200 
1201  this->comm().max(max);
1202  this->comm().min(min);
1203 
1204  _extreme_nodes.resize(8); // 2^LIBMESH_DIM
1205  // Now make sure that there are actual nodes at all of the extremes
1206  std::vector<bool> extreme_matches(8, false);
1207  std::vector<unsigned int> comp_map(3);
1208  for (const auto & node : getMesh().node_ptr_range())
1209  {
1210  // See if the current node is located at one of the extremes
1211  unsigned int coord_match = 0;
1212 
1213  for (unsigned int i = 0; i < dim; ++i)
1214  {
1215  if (std::abs((*node)(i)-min[i]) < tol)
1216  {
1217  comp_map[i] = MIN;
1218  ++coord_match;
1219  }
1220  else if (std::abs((*node)(i)-max[i]) < tol)
1221  {
1222  comp_map[i] = MAX;
1223  ++coord_match;
1224  }
1225  }
1226 
1227  if (coord_match == dim) // Found a coordinate at one of the extremes
1228  {
1229  _extreme_nodes[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = node;
1230  extreme_matches[comp_map[X] * 4 + comp_map[Y] * 2 + comp_map[Z]] = true;
1231  }
1232  }
1233 
1234  // See if we matched all of the extremes for the mesh dimension
1235  this->comm().max(extreme_matches);
1236  if (std::count(extreme_matches.begin(), extreme_matches.end(), true) != std::pow(2.0, (int)dim))
1237  return false; // This is not a regular orthogonal mesh
1238 
1239  // This is a regular orthogonal mesh, so set the bounds
1240  _regular_orthogonal_mesh = true;
1241  _bounds.resize(LIBMESH_DIM);
1242  for (unsigned int i = 0; i < dim; ++i)
1243  {
1244  _bounds[i].resize(2);
1245  _bounds[i][MIN] = min[i];
1246  _bounds[i][MAX] = max[i];
1247  }
1248  for (unsigned int i = dim; i < LIBMESH_DIM; ++i)
1249  {
1250  _bounds[i].resize(2);
1251  _bounds[i][MIN] = 0;
1252  _bounds[i][MAX] = 0;
1253  }
1254 
1255  return true;
1256 }
std::vector< std::vector< Real > > _bounds
The bounds in each dimension of the mesh for regular orthogonal meshes.
Definition: MooseMesh.h:964
std::vector< Node * > _extreme_nodes
A vector containing the nodes at the corners of a regular orthogonal mesh.
Definition: MooseMesh.h:992
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:384
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
MPI_Comm comm
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:961
unsigned int MooseMesh::dimension ( ) const
virtualinherited
Real MooseMesh::dimensionWidth ( unsigned int  component) const
inherited

Returns the width of the requested dimension.

Definition at line 1364 of file MooseMesh.C.

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

1365 {
1366  return getMaxInDimension(component) - getMinInDimension(component);
1367 }
virtual Real getMaxInDimension(unsigned int component) const
Definition: MooseMesh.C:1379
virtual Real getMinInDimension(unsigned int component) const
Returns the min or max of the requested dimension respectively.
Definition: MooseMesh.C:1370
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 2048 of file MooseMesh.C.

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

2049 {
2050  mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
2051  return elemPtr(i);
2052 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2062
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
const Elem * MooseMesh::elem ( const dof_id_type  i) const
virtualinherited

Definition at line 2055 of file MooseMesh.C.

2056 {
2057  mooseDeprecated("MooseMesh::elem() is deprecated, please use MooseMesh::elemPtr() instead");
2058  return elemPtr(i);
2059 }
virtual Elem * elemPtr(const dof_id_type i)
Definition: MooseMesh.C:2062
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 2068 of file MooseMesh.C.

2069 {
2070  return getMesh().elem_ptr(i);
2071 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 2473 of file MooseMesh.C.

Referenced by FEProblemBase::checkProblemIntegrity(), ElementsAlongLine::ElementsAlongLine(), 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().

2474 {
2476  mooseError("Cannot use ",
2477  name,
2478  " with DistributedMesh!\n",
2479  "Consider specifying parallel_type = 'replicated' in your input file\n",
2480  "to prevent it from being run with DistributedMesh.");
2481 }
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:820
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
ExodusII_IO * MooseMesh::exReader ( ) const
virtualinherited

Not implemented – always returns NULL.

Reimplemented in FileMesh.

Definition at line 2369 of file MooseMesh.C.

Referenced by FEProblemBase::initialSetup().

2370 {
2371  // TODO: Implement or remove
2372  return nullptr;
2373 }
void MooseMesh::freeBndElems ( )
protectedinherited

Definition at line 298 of file MooseMesh.C.

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

299 {
300  // free memory
301  for (auto & belem : _bnd_elems)
302  delete belem;
303 
304  for (auto & it : _bnd_elem_ids)
305  it.second.clear();
306 
307  _bnd_elem_ids.clear();
308 }
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:932
std::vector< BndElement * > _bnd_elems
array of boundary elems
Definition: MooseMesh.h:928
void MooseMesh::freeBndNodes ( )
protectedinherited

Definition at line 280 of file MooseMesh.C.

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

281 {
282  // free memory
283  for (auto & bnode : _bnd_nodes)
284  delete bnode;
285 
286  for (auto & it : _node_set_nodes)
287  it.second.clear();
288 
289  _node_set_nodes.clear();
290 
291  for (auto & it : _bnd_node_ids)
292  it.second.clear();
293 
294  _bnd_node_ids.clear();
295 }
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:925
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:943
std::vector< BndNode * > _bnd_nodes
array of boundary nodes
Definition: MooseMesh.h:921
ConstElemRange * MooseMesh::getActiveLocalElementRange ( )
inherited

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

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

686 {
688  _active_local_elem_range = libmesh_make_unique<ConstElemRange>(
689  getMesh().active_local_elements_begin(), getMesh().active_local_elements_end(), GRAIN_SIZE);
690 
691  return _active_local_elem_range.get();
692 }
static const int GRAIN_SIZE
Definition: MooseMesh.C:60
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:883
NodeRange * MooseMesh::getActiveNodeRange ( )
inherited

Definition at line 695 of file MooseMesh.C.

Referenced by MooseMesh::meshChanged().

696 {
697  if (!_active_node_range)
698  _active_node_range = libmesh_make_unique<NodeRange>(
699  getMesh().active_nodes_begin(), getMesh().active_nodes_end(), GRAIN_SIZE);
700 
701  return _active_node_range.get();
702 }
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:886
static const int GRAIN_SIZE
Definition: MooseMesh.C:60
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
SemiLocalNodeRange * MooseMesh::getActiveSemiLocalNodeRange ( ) const
inherited

Definition at line 705 of file MooseMesh.C.

706 {
707  mooseAssert(_active_semilocal_node_range,
708  "_active_semilocal_node_range has not been created yet!");
709 
710  return _active_semilocal_node_range.get();
711 }
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:885
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 1966 of file MooseMesh.C.

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

Definition at line 1973 of file MooseMesh.C.

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

Definition at line 734 of file MooseMesh.C.

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

735 {
736  if (!_bnd_elem_range)
738  libmesh_make_unique<ConstBndElemRange>(bndElemsBegin(), bndElemsEnd(), GRAIN_SIZE);
739 
740  return _bnd_elem_range.get();
741 }
virtual bnd_elem_iterator bndElemsEnd()
Definition: MooseMesh.C:806
virtual bnd_elem_iterator bndElemsBegin()
Return iterators to the beginning/end of the boundary elements list.
Definition: MooseMesh.C:798
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:890
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 929 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().

930 {
931  if (boundary_name == "ANY_BOUNDARY_ID")
932  mooseError("Please use getBoundaryIDs() when passing \"ANY_BOUNDARY_ID\"");
933 
935  std::istringstream ss(boundary_name);
936 
937  if (!(ss >> id))
938  id = getMesh().get_boundary_info().get_id_by_name(boundary_name);
939 
940  return id;
941 }
const BoundaryID INVALID_BOUNDARY_ID
Definition: MooseTypes.h:120
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 1951 of file MooseMesh.C.

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

1952 {
1953  std::vector<BoundaryID> ids;
1954  getMesh().get_boundary_info().boundary_ids(elem, side, ids);
1955  return ids;
1956 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
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 1959 of file MooseMesh.C.

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

1960 {
1961  return getMesh().get_boundary_info().get_boundary_ids();
1962 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 944 of file MooseMesh.C.

946 {
947  const BoundaryInfo & boundary_info = getMesh().get_boundary_info();
948  const std::map<BoundaryID, std::string> & sideset_map = boundary_info.get_sideset_name_map();
949  const std::map<BoundaryID, std::string> & nodeset_map = boundary_info.get_nodeset_name_map();
950 
951  std::set<BoundaryID> boundary_ids = boundary_info.get_boundary_ids();
952 
953  // On a distributed mesh we may have boundary ids that only exist on
954  // other processors.
955  if (!this->getMesh().is_replicated())
956  _communicator.set_union(boundary_ids);
957 
958  BoundaryID max_boundary_id = boundary_ids.empty() ? 0 : *(boundary_ids.rbegin());
959 
960  std::vector<BoundaryID> ids(boundary_name.size());
961  for (unsigned int i = 0; i < boundary_name.size(); i++)
962  {
963  if (boundary_name[i] == "ANY_BOUNDARY_ID")
964  {
965  ids.assign(_mesh_boundary_ids.begin(), _mesh_boundary_ids.end());
966  if (i)
967  mooseWarning("You passed \"ANY_BOUNDARY_ID\" in addition to other boundary_names. This "
968  "may be a logic error.");
969  break;
970  }
971 
972  BoundaryID id;
973  std::istringstream ss(boundary_name[i]);
974 
975  if (!(ss >> id) || !ss.eof())
976  {
982  if (generate_unknown &&
983  !MooseUtils::doesMapContainValue(sideset_map, std::string(boundary_name[i])) &&
984  !MooseUtils::doesMapContainValue(nodeset_map, std::string(boundary_name[i])))
985  id = ++max_boundary_id;
986  else
987  id = boundary_info.get_id_by_name(boundary_name[i]);
988  }
989 
990  ids[i] = id;
991  }
992 
993  return ids;
994 }
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:2355
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:912
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 1068 of file MooseMesh.C.

Referenced by MaterialPropertyDebugOutput::printMaterialMap().

1069 {
1070  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1071 
1072  std::vector<BoundaryID> side_boundaries;
1073  boundary_info.build_side_boundary_ids(side_boundaries);
1074 
1075  // We need to figure out if this boundary is a sideset or nodeset
1076  if (std::find(side_boundaries.begin(), side_boundaries.end(), boundary_id) !=
1077  side_boundaries.end())
1078  return boundary_info.get_sideset_name(boundary_id);
1079  else
1080  return boundary_info.get_nodeset_name(boundary_id);
1081 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
ConstBndNodeRange * MooseMesh::getBoundaryNodeRange ( )
inherited

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

725 {
726  if (!_bnd_node_range)
728  libmesh_make_unique<ConstBndNodeRange>(bndNodesBegin(), bndNodesEnd(), GRAIN_SIZE);
729 
730  return _bnd_node_range.get();
731 }
virtual bnd_node_iterator bndNodesEnd()
Definition: MooseMesh.C:790
virtual bnd_node_iterator bndNodesBegin()
Return iterators to the beginning/end of the boundary nodes list.
Definition: MooseMesh.C:782
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:888
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 1630 of file MooseMesh.C.

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

1631 {
1632  std::pair<int, ElemType> the_pair(input_side, elem.type());
1633 
1634  if (_elem_type_to_coarsening_map.find(the_pair) == _elem_type_to_coarsening_map.end())
1635  mooseError("Could not find a suitable qp refinement map!");
1636 
1637  return _elem_type_to_coarsening_map[the_pair];
1638 }
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:1082
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:2048
const std::set< unsigned int > & MooseMesh::getGhostedBoundaries ( ) const
inherited

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

Definition at line 2173 of file MooseMesh.C.

2174 {
2175  return _ghosted_boundaries;
2176 }
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:945
const std::vector< Real > & MooseMesh::getGhostedBoundaryInflation ( ) const
inherited

Return a writable reference to the _ghosted_boundaries_inflation vector.

Definition at line 2179 of file MooseMesh.C.

Referenced by NearestNodeLocator::findNodes().

2180 {
2182 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:946
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 2332 of file MooseMesh.C.

Referenced by PointSamplerBase::execute().

2333 {
2334  // Grab a bounding box to speed things up. Note that
2335  // local_bounding_box is *not* equivalent to processor_bounding_box
2336  // with processor_id() except in serial.
2337  BoundingBox bbox = MeshTools::create_local_bounding_box(getMesh());
2338 
2339  // Inflate the bbox just a bit to deal with roundoff
2340  // Adding 1% of the diagonal size in each direction on each end
2341  Real inflation_amount = inflation_multiplier * (bbox.max() - bbox.min()).norm();
2342  Point inflation(inflation_amount, inflation_amount, inflation_amount);
2343 
2344  bbox.first -= inflation; // min
2345  bbox.second += inflation; // max
2346 
2347  return bbox;
2348 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
ConstNodeRange * MooseMesh::getLocalNodeRange ( )
inherited

Definition at line 714 of file MooseMesh.C.

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

715 {
716  if (!_local_node_range)
717  _local_node_range = libmesh_make_unique<ConstNodeRange>(
718  getMesh().local_nodes_begin(), getMesh().local_nodes_end(), GRAIN_SIZE);
719 
720  return _local_node_range.get();
721 }
static const int GRAIN_SIZE
Definition: MooseMesh.C:60
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:887
Real AnnularMesh::getMaxInDimension ( unsigned int  component) const
overridevirtual

Reimplemented from MooseMesh.

Definition at line 104 of file AnnularMesh.C.

105 {
106  switch (component)
107  {
108  case 0:
109  return _rmax;
110  case 1:
111  return _rmax;
112  case 2:
113  return 0.0;
114  default:
115  mooseError("Invalid component");
116  }
117 }
const Real _rmax
Maximum radius.
Definition: AnnularMesh.h:53
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
MeshBase & MooseMesh::getMesh ( )
inherited

Accessor for the underlying libMesh Mesh object.

Definition at line 2355 of file MooseMesh.C.

Referenced by MooseMesh::activeLocalElementsBegin(), MooseMesh::activeLocalElementsEnd(), Adaptivity::adaptMesh(), MooseMesh::addQuadratureNode(), MooseMesh::addUniqueNode(), MooseMesh::buildBndElemList(), TiledMesh::buildMesh(), FileMesh::buildMesh(), 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(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), NodalNormalsPreprocessor::execute(), FileMesh::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(), ParsedAddSideset::modify(), SideSetsAroundSubdomain::modify(), ElementDeleterBase::modify(), AddAllSideSetsByNormals::modify(), RenameBlock::modify(), ParsedSubdomainMeshModifier::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), SubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::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(), FileMesh::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().

2356 {
2357  mooseAssert(_mesh, "Mesh hasn't been created");
2358  return *_mesh;
2359 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:825
const MeshBase & MooseMesh::getMesh ( ) const
inherited

Definition at line 2362 of file MooseMesh.C.

2363 {
2364  mooseAssert(_mesh, "Mesh hasn't been created");
2365  return *_mesh;
2366 }
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:825
Real AnnularMesh::getMinInDimension ( unsigned int  component) const
overridevirtual

Returns the min or max of the requested dimension respectively.

Reimplemented from MooseMesh.

Definition at line 88 of file AnnularMesh.C.

89 {
90  switch (component)
91  {
92  case 0:
93  return -_rmax;
94  case 1:
95  return -_rmax;
96  case 2:
97  return 0.0;
98  default:
99  mooseError("Invalid component");
100  }
101 }
const Real _rmax
Maximum radius.
Definition: AnnularMesh.h:53
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
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 2494 of file MooseMesh.C.

Referenced by GeometricSearchData::generateMortarNodes().

2495 {
2496  std::map<std::pair<BoundaryID, BoundaryID>, MortarInterface *>::iterator it =
2497  _mortar_interface_by_ids.find(std::pair<BoundaryID, BoundaryID>(master, slave));
2498  if (it != _mortar_interface_by_ids.end())
2499  return (*it).second;
2500  else
2501  mooseError(
2502  "Requesting non-existing mortar interface (master = ", master, ", slave = ", slave, ").");
2503 }
std::map< std::pair< BoundaryID, BoundaryID >, MortarInterface * > _mortar_interface_by_ids
Mortar interfaces mapped though master, slave IDs pairs.
Definition: MooseMesh.h:973
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
MooseMesh::MortarInterface * MooseMesh::getMortarInterfaceByName ( const std::string  name)
inherited

Definition at line 2484 of file MooseMesh.C.

2485 {
2486  std::map<std::string, MortarInterface *>::iterator it = _mortar_interface_by_name.find(name);
2487  if (it != _mortar_interface_by_name.end())
2488  return (*it).second;
2489  else
2490  mooseError("Requesting non-existent mortar interface '", name, "'.");
2491 }
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:970
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 769 of file MooseMesh.C.

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

770 {
771  std::map<dof_id_type, std::set<SubdomainID>>::const_iterator it =
772  _block_node_list.find(node.id());
773 
774  if (it == _block_node_list.end())
775  mooseError("Unable to find node: ", node.id(), " in any block list.");
776 
777  return it->second;
778 }
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:384
std::map< dof_id_type, std::set< SubdomainID > > _block_node_list
list of nodes that belongs to a specified block (domain)
Definition: MooseMesh.h:940
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 2382 of file MooseMesh.C.

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

2383 {
2384  std::map<boundary_id_type, std::vector<dof_id_type>>::const_iterator it =
2385  _node_set_nodes.find(nodeset_id);
2386 
2387  if (it == _node_set_nodes.end())
2388  {
2389  // On a distributed mesh we might not know about a remote nodeset,
2390  // so we'll return an empty vector and hope the nodeset exists
2391  // elsewhere.
2392  if (!getMesh().is_serial())
2393  {
2394  static const std::vector<dof_id_type> empty_vec;
2395  return empty_vec;
2396  }
2397  // On a replicated mesh we should know about every nodeset and if
2398  // we're asked for one that doesn't exist then it must be a bug.
2399  else
2400  {
2401  mooseError("Unable to nodeset ID: ", nodeset_id, '.');
2402  }
2403  }
2404 
2405  return it->second;
2406 }
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:943
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 1851 of file MooseMesh.C.

1852 {
1853  mooseAssert(_boundary_to_normal_map.get() != nullptr, "Boundary To Normal Map not built!");
1854 
1855  // Note: Boundaries that are not in the map (existing boundaries) will default
1856  // construct a new RealVectorValue - (x,y,z)=(0, 0, 0)
1857  return (*_boundary_to_normal_map)[id];
1858 }
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:918
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 1452 of file MooseMesh.C.

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

1453 {
1455  mooseError("Trying to retrieve automatic paired mapping for a mesh that is not regular and "
1456  "orthogonal");
1457 
1458  mooseAssert(component < dimension(), "Requested dimension out of bounds");
1459 
1460  if (_paired_boundary.empty())
1462 
1463  if (component < _paired_boundary.size())
1464  return &_paired_boundary[component];
1465  else
1466  return nullptr;
1467 }
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:1945
void detectPairedSidesets()
This routine detects paired sidesets of a regular orthogonal mesh (.i.e.
Definition: MooseMesh.C:1259
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:967
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:961
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 2314 of file MooseMesh.C.

Referenced by NearestNodeLocator::findNodes().

2315 {
2316  return _patch_size;
2317 }
unsigned int _patch_size
The number of nodes to consider in the NearestNode neighborhood.
Definition: MooseMesh.h:949
const MooseEnum & MooseMesh::getPatchUpdateStrategy ( ) const
inherited

Get the current patch update strategy.

Definition at line 2326 of file MooseMesh.C.

Referenced by FEProblemBase::possiblyRebuildGeomSearchPatches().

2327 {
2328  return _patch_update_strategy;
2329 }
MooseEnum _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:952
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 2540 of file MooseMesh.C.

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

2541 {
2542  return getMesh().sub_point_locator();
2543 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 899 of file MooseMesh.C.

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

902 {
903  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes.find(elem->id()) !=
905  "Elem has no quadrature nodes!");
906  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()].find(side) !=
908  "Side has no quadrature nodes!");
909  mooseAssert(_elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side].find(qp) !=
911  "qp not found on side!");
912 
913  return _elem_to_side_to_qp_to_quadrature_nodes[elem->id()][side][qp];
914 }
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:936
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
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 1568 of file MooseMesh.C.

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

1569 {
1570  if (child == -1) // Doing volume mapping or parent side mapping
1571  {
1572  mooseAssert(parent_side == child_side,
1573  "Parent side must match child_side if not passing a specific child!");
1574 
1575  std::pair<int, ElemType> the_pair(parent_side, elem.type());
1576 
1577  if (_elem_type_to_refinement_map.find(the_pair) == _elem_type_to_refinement_map.end())
1578  mooseError("Could not find a suitable qp refinement map!");
1579 
1580  return _elem_type_to_refinement_map[the_pair];
1581  }
1582  else // Need to map a child side to parent volume qps
1583  {
1584  std::pair<int, int> child_pair(child, child_side);
1585 
1586  if (_elem_type_to_child_side_refinement_map.find(elem.type()) ==
1588  _elem_type_to_child_side_refinement_map[elem.type()].find(child_pair) ==
1590  mooseError("Could not find a suitable qp refinement map!");
1591 
1592  return _elem_type_to_child_side_refinement_map[elem.type()][child_pair];
1593  }
1594 
1601 }
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:1078
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:2048
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:1074
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 2409 of file MooseMesh.C.

Referenced by FEProblemBase::prepareMaterials().

2410 {
2411  std::map<SubdomainID, std::set<BoundaryID>>::const_iterator it =
2412  _subdomain_boundary_ids.find(subdomain_id);
2413 
2414  if (it == _subdomain_boundary_ids.end())
2415  mooseError("Unable to find subdomain ID: ", subdomain_id, '.');
2416 
2417  return it->second;
2418 }
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:1085
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 997 of file MooseMesh.C.

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

998 {
999  if (subdomain_name == "ANY_BLOCK_ID")
1000  mooseError("Please use getSubdomainIDs() when passing \"ANY_BLOCK_ID\"");
1001 
1003  std::istringstream ss(subdomain_name);
1004 
1005  if (!(ss >> id) || !ss.eof())
1006  id = getMesh().get_id_by_name(subdomain_name);
1007 
1008  return id;
1009 }
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:2355
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 1012 of file MooseMesh.C.

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

1013 {
1014  std::vector<SubdomainID> ids(subdomain_name.size());
1015 
1016  for (unsigned int i = 0; i < subdomain_name.size(); i++)
1017  {
1018  if (subdomain_name[i] == "ANY_BLOCK_ID")
1019  {
1020  ids.assign(_mesh_subdomains.begin(), _mesh_subdomains.end());
1021  if (i)
1022  mooseWarning("You passed \"ANY_BLOCK_ID\" in addition to other block names. This may be a "
1023  "logic error.");
1024  break;
1025  }
1026 
1028  std::istringstream ss(subdomain_name[i]);
1029 
1030  if (!(ss >> id) || !ss.eof())
1031  id = getMesh().get_id_by_name(subdomain_name[i]);
1032 
1033  ids[i] = id;
1034  }
1035 
1036  return ids;
1037 }
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:2355
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:904
const std::string & MooseMesh::getSubdomainName ( SubdomainID  subdomain_id)
inherited

Return the name of a block given an id.

Definition at line 1046 of file MooseMesh.C.

Referenced by MaterialPropertyDebugOutput::printMaterialMap().

1047 {
1048  return getMesh().subdomain_name(subdomain_id);
1049 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
void MooseMesh::ghostGhostedBoundaries ( )
inherited

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

Definition at line 2243 of file MooseMesh.C.

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

2244 {
2245  // No need to do this if using a serial mesh
2246  if (!_use_distributed_mesh)
2247  return;
2248 
2249  std::vector<dof_id_type> elems;
2250  std::vector<unsigned short int> sides;
2251  std::vector<boundary_id_type> ids;
2252 
2253  DistributedMesh & mesh = dynamic_cast<DistributedMesh &>(getMesh());
2254 
2255  // We would like to clear ghosted elements that were added by
2256  // previous invocations of this method; however we can't do so
2257  // simply without also clearing ghosted elements that were added by
2258  // other code; e.g. OversampleOutput. So for now we'll just
2259  // swallow the inefficiency that can come from leaving unnecessary
2260  // elements ghosted after AMR.
2261  // mesh.clear_extra_ghost_elems();
2262 
2263  mesh.get_boundary_info().build_side_list(elems, sides, ids);
2264 
2265  std::set<const Elem *, CompareElemsByLevel> boundary_elems_to_ghost;
2266  std::set<Node *> connected_nodes_to_ghost;
2267 
2268  std::vector<const Elem *> family_tree;
2269 
2270  for (unsigned int i = 0; i < elems.size(); ++i)
2271  {
2272  if (_ghosted_boundaries.find(ids[i]) != _ghosted_boundaries.end())
2273  {
2274  Elem * elem = mesh.elem_ptr(elems[i]);
2275 
2276 #ifdef LIBMESH_ENABLE_AMR
2277  elem->family_tree(family_tree);
2278  Elem * parent = elem->parent();
2279  while (parent)
2280  {
2281  family_tree.push_back(parent);
2282  parent = parent->parent();
2283  }
2284 #else
2285  family_tree.clear();
2286  family_tree.push_back(elem);
2287 #endif
2288  for (const auto & felem : family_tree)
2289  {
2290  boundary_elems_to_ghost.insert(felem);
2291 
2292  // The entries of connected_nodes_to_ghost need to be
2293  // non-constant, so that they will work in things like
2294  // UpdateDisplacedMeshThread. Therefore, we are using the
2295  // "old" interface to get a non-const Node pointer from a
2296  // constant Elem.
2297  for (unsigned int n = 0; n < felem->n_nodes(); ++n)
2298  connected_nodes_to_ghost.insert(felem->get_node(n));
2299  }
2300  }
2301  }
2302 
2303  mesh.comm().allgather_packed_range(&mesh,
2304  connected_nodes_to_ghost.begin(),
2305  connected_nodes_to_ghost.end(),
2306  extra_ghost_elem_inserter<Node>(mesh));
2307  mesh.comm().allgather_packed_range(&mesh,
2308  boundary_elems_to_ghost.begin(),
2309  boundary_elems_to_ghost.end(),
2310  extra_ghost_elem_inserter<Elem>(mesh));
2311 }
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:820
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
PetscInt n
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
std::set< unsigned int > _ghosted_boundaries
Definition: MooseMesh.h:945
bool MooseMesh::hasSecondOrderElements ( )
inherited

check if the mesh has SECOND order elements

Definition at line 2518 of file MooseMesh.C.

2519 {
2520  bool mesh_has_second_order_elements = false;
2521  for (auto it = activeLocalElementsBegin(), end = activeLocalElementsEnd(); it != end; ++it)
2522  if ((*it)->default_order() == SECOND)
2523  {
2524  mesh_has_second_order_elements = true;
2525  break;
2526  }
2527 
2528  // We checked our local elements, so take the max over all processors.
2529  comm().max(mesh_has_second_order_elements);
2530  return mesh_has_second_order_elements;
2531 }
MeshBase::const_element_iterator activeLocalElementsBegin()
Calls active_local_nodes_begin/end() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2012
MPI_Comm comm
const MeshBase::const_element_iterator activeLocalElementsEnd()
Definition: MooseMesh.C:2018
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 1861 of file MooseMesh.C.

1862 {
1864  {
1865  // Check of partitioner is supplied (not allowed if custom partitioner is used)
1866  if (!parameters().isParamSetByAddParam("partitioner"))
1867  mooseError("If partitioner block is provided, partitioner keyword cannot be used!");
1868  // Set custom partitioner
1869  if (!_custom_partitioner.get())
1870  mooseError("Custom partitioner requested but not set!");
1871  getMesh().partitioner().reset(_custom_partitioner.release());
1872  }
1873  else
1874  {
1875  // Set standard partitioner
1876  // Set the partitioner based on partitioner name
1877  switch (_partitioner_name)
1878  {
1879  case -3: // default
1880  // We'll use the default partitioner, but notify the user of which one is being used...
1882  _partitioner_name = "parmetis";
1883  else
1884  _partitioner_name = "metis";
1885  break;
1886 
1887  // No need to explicitily create the metis or parmetis partitioners,
1888  // They are the default for serial and parallel mesh respectively
1889  case -2: // metis
1890  case -1: // parmetis
1891  break;
1892 
1893  case 0: // linear
1894  getMesh().partitioner().reset(new LinearPartitioner);
1895  break;
1896  case 1: // centroid
1897  {
1898  if (!isParamValid("centroid_partitioner_direction"))
1899  mooseError("If using the centroid partitioner you _must_ specify "
1900  "centroid_partitioner_direction!");
1901 
1902  MooseEnum direction = getParam<MooseEnum>("centroid_partitioner_direction");
1903 
1904  if (direction == "x")
1905  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::X));
1906  else if (direction == "y")
1907  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Y));
1908  else if (direction == "z")
1909  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::Z));
1910  else if (direction == "radial")
1911  getMesh().partitioner().reset(new CentroidPartitioner(CentroidPartitioner::RADIAL));
1912  break;
1913  }
1914  case 2: // hilbert_sfc
1915  getMesh().partitioner().reset(new HilbertSFCPartitioner);
1916  break;
1917  case 3: // morton_sfc
1918  getMesh().partitioner().reset(new MortonSFCPartitioner);
1919  break;
1920  }
1921  }
1922 
1924  {
1925  // Some partitioners are not idempotent. Some recovery data
1926  // files require partitioning to match mesh partitioning. This
1927  // means that, when recovering, we can't safely repartition.
1928  const bool skip_partitioning_later = getMesh().skip_partitioning();
1929  getMesh().skip_partitioning(true);
1930  const bool allow_renumbering_later = getMesh().allow_renumbering();
1931  getMesh().allow_renumbering(false);
1932 
1933  // For now, only read the recovery mesh on the Ultimate Master..
1934  // sub-apps need to just build their mesh like normal
1935  getMesh().read(_app.getRecoverFileBase() + "_mesh." + _app.getRecoverFileSuffix());
1936 
1937  getMesh().allow_renumbering(allow_renumbering_later);
1938  getMesh().skip_partitioning(skip_partitioning_later);
1939  }
1940  else // Normally just build the mesh
1941  buildMesh();
1942 }
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:608
bool _custom_partitioner_requested
Definition: MooseMesh.h:833
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:828
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:1088
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:820
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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:832
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 2447 of file MooseMesh.C.

2448 {
2449  bool found_elem = false;
2450  for (const auto & it : _bnd_elem_ids)
2451  {
2452  if (it.second.find(elem_id) != it.second.end())
2453  {
2454  found_elem = true;
2455  break;
2456  }
2457  }
2458  return found_elem;
2459 }
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:932
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 2462 of file MooseMesh.C.

2463 {
2464  bool found_elem = false;
2465  std::map<boundary_id_type, std::set<dof_id_type>>::const_iterator it = _bnd_elem_ids.find(bnd_id);
2466  if (it != _bnd_elem_ids.end())
2467  if (it->second.find(elem_id) != it->second.end())
2468  found_elem = true;
2469  return found_elem;
2470 }
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:932
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 2421 of file MooseMesh.C.

Referenced by NodalNormalsPreprocessor::execute().

2422 {
2423  bool found_node = false;
2424  for (const auto & it : _bnd_node_ids)
2425  {
2426  if (it.second.find(node_id) != it.second.end())
2427  {
2428  found_node = true;
2429  break;
2430  }
2431  }
2432  return found_node;
2433 }
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:925
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 2436 of file MooseMesh.C.

2437 {
2438  bool found_node = false;
2439  std::map<boundary_id_type, std::set<dof_id_type>>::const_iterator it = _bnd_node_ids.find(bnd_id);
2440  if (it != _bnd_node_ids.end())
2441  if (it->second.find(node_id) != it->second.end())
2442  found_node = true;
2443  return found_node;
2444 }
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:925
bool MooseMesh::isCustomPartitionerRequested ( ) const
inherited

Setter and getter for _custom_partitioner_requested.

Definition at line 2512 of file MooseMesh.C.

2513 {
2515 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:833
bool MooseMesh::isDistributedMesh ( ) const
inlineinherited

Returns the final Mesh distribution type.

Definition at line 737 of file MooseMesh.h.

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

737 { return _use_distributed_mesh; }
bool _use_distributed_mesh
False by default.
Definition: MooseMesh.h:820
bool MooseMesh::isParallelTypeForced ( ) const
inlineinherited

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

Definition at line 742 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

742 { return _parallel_type_overridden; }
bool _parallel_type_overridden
Definition: MooseMesh.h:822
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 752 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

752 { return _partitioner_overridden; }
bool _partitioner_overridden
Definition: MooseMesh.h:829
bool MooseMesh::isRegularOrthogonal ( )
inlineinherited

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

Definition at line 799 of file MooseMesh.h.

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

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

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

Referenced by MooseMesh::minPeriodicVector().

1410 {
1411  mooseAssert(_regular_orthogonal_mesh, "The current mesh is not a regular orthogonal mesh");
1412  mooseAssert(component < dimension(), "Requested dimension out of bounds");
1413 
1414  if (_periodic_dim.find(nonlinear_var_num) != _periodic_dim.end())
1415  return _periodic_dim.at(nonlinear_var_num)[component];
1416  else
1417  return false;
1418 }
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:1945
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:984
bool _regular_orthogonal_mesh
Boolean indicating whether this mesh was detected to be regular and orthogonal.
Definition: MooseMesh.h:961
MeshBase::const_node_iterator MooseMesh::localNodesBegin ( )
inherited

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

Definition at line 2000 of file MooseMesh.C.

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

2001 {
2002  return getMesh().local_nodes_begin();
2003 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
MeshBase::const_node_iterator MooseMesh::localNodesEnd ( )
inherited

Definition at line 2006 of file MooseMesh.C.

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

2007 {
2008  return getMesh().local_nodes_end();
2009 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
dof_id_type MooseMesh::maxElemId ( ) const
virtualinherited

Definition at line 2042 of file MooseMesh.C.

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

2043 {
2044  return getMesh().max_elem_id();
2045 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 2036 of file MooseMesh.C.

2037 {
2038  return getMesh().max_node_id();
2039 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 2110 of file MooseMesh.C.

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

2111 {
2112  return _mesh_boundary_ids;
2113 }
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:912
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 452 of file MooseMesh.C.

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

453 {
454  update();
455 
456  // Delete all of the cached ranges
457  _active_local_elem_range.reset();
458  _active_node_range.reset();
460  _local_node_range.reset();
461  _bnd_node_range.reset();
462  _bnd_elem_range.reset();
463 
464  // Rebuild the ranges
470 
471  // Call the callback function onMeshChanged
472  onMeshChanged();
473 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:685
virtual void onMeshChanged()
Declares a callback function that is executed at the conclusion of meshChanged(). ...
Definition: MooseMesh.C:476
ConstNodeRange * getLocalNodeRange()
Definition: MooseMesh.C:714
std::unique_ptr< NodeRange > _active_node_range
Definition: MooseMesh.h:886
std::unique_ptr< StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > > _bnd_elem_range
Definition: MooseMesh.h:890
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:367
std::unique_ptr< StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > > _bnd_node_range
Definition: MooseMesh.h:888
NodeRange * getActiveNodeRange()
Definition: MooseMesh.C:695
std::unique_ptr< ConstElemRange > _active_local_elem_range
A range for use with threading.
Definition: MooseMesh.h:883
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:734
StoredRange< MooseMesh::const_bnd_node_iterator, const BndNode * > * getBoundaryNodeRange()
Definition: MooseMesh.C:724
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:885
std::unique_ptr< ConstNodeRange > _local_node_range
Definition: MooseMesh.h:887
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 2122 of file MooseMesh.C.

Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().

2123 {
2124  return _mesh_nodeset_ids;
2125 }
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:914
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 2116 of file MooseMesh.C.

Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().

2117 {
2118  return _mesh_sideset_ids;
2119 }
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:913
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 2104 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().

2105 {
2106  return _mesh_subdomains;
2107 }
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:904
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 1446 of file MooseMesh.C.

1447 {
1448  return minPeriodicVector(nonlinear_var_num, p, q).norm();
1449 }
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:1421
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 1421 of file MooseMesh.C.

Referenced by MooseMesh::minPeriodicDistance().

1422 {
1423  for (unsigned int i = 0; i < dimension(); ++i)
1424  {
1425  // check to see if we're closer in real or periodic space in x, y, and z
1426  if (isTranslatedPeriodic(nonlinear_var_num, i))
1427  {
1428  // Need to test order before differencing
1429  if (p(i) > q(i))
1430  {
1431  if (p(i) - q(i) > _half_range(i))
1432  p(i) -= _half_range(i) * 2;
1433  }
1434  else
1435  {
1436  if (q(i) - p(i) > _half_range(i))
1437  p(i) += _half_range(i) * 2;
1438  }
1439  }
1440  }
1441 
1442  return q - p;
1443 }
RealVectorValue _half_range
A convenience vector used to hold values in each dimension representing half of the range...
Definition: MooseMesh.h:989
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimsension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh m...
Definition: MooseMesh.C:1945
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:1409
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(), 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(), getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMaxShapeFunctions(), GeneratedMesh::getMinInDimension(), 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 2098 of file MooseMesh.C.

Referenced by ElementDeleterBase::modify().

2099 {
2100  _needs_prepare_for_use = true;
2101 }
bool _needs_prepare_for_use
True if prepare_for_use should be called when Mesh is prepared.
Definition: MooseMesh.h:861
dof_id_type MooseMesh::nElem ( ) const
virtualinherited

Definition at line 2030 of file MooseMesh.C.

Referenced by NumElems::getValue().

2031 {
2032  return getMesh().n_elem();
2033 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
dof_id_type MooseMesh::nNodes ( ) const
virtualinherited

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

Definition at line 2024 of file MooseMesh.C.

Referenced by NumNodes::getValue().

2025 {
2026  return getMesh().n_nodes();
2027 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 384 of file MooseMesh.C.

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

385 {
386  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
387  return nodeRef(i);
388 }
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:398
Node & MooseMesh::node ( const dof_id_type  i)
virtualinherited

Definition at line 391 of file MooseMesh.C.

392 {
393  mooseDeprecated("MooseMesh::node() is deprecated, please use MooseMesh::nodeRef() instead");
394  return nodeRef(i);
395 }
void mooseDeprecated(Args &&...args) const
Definition: MooseObject.h:95
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:398
const Node * MooseMesh::nodePtr ( const dof_id_type  i) const
virtualinherited

Definition at line 416 of file MooseMesh.C.

Referenced by dataLoad().

417 {
418  if (i > getMesh().max_node_id())
419  return (*_quadrature_nodes.find(i)).second;
420 
421  return getMesh().node_ptr(i);
422 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:934
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
Node * MooseMesh::nodePtr ( const dof_id_type  i)
virtualinherited

Definition at line 425 of file MooseMesh.C.

426 {
427  if (i > getMesh().max_node_id())
428  return _quadrature_nodes[i];
429 
430  return getMesh().node_ptr(i);
431 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:934
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
const Node & MooseMesh::nodeRef ( const dof_id_type  i) const
virtualinherited
Node & MooseMesh::nodeRef ( const dof_id_type  i)
virtualinherited

Definition at line 407 of file MooseMesh.C.

408 {
409  if (i > getMesh().max_node_id())
410  return *_quadrature_nodes[i];
411 
412  return getMesh().node_ref(i);
413 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:934
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 661 of file MooseMesh.C.

662 {
663  if (!_node_to_active_semilocal_elem_map_built) // Guard the creation with a double checked lock
664  {
665  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
667  {
668  MeshBase::const_element_iterator el = getMesh().semilocal_elements_begin();
669  const MeshBase::const_element_iterator end = getMesh().semilocal_elements_end();
670 
671  for (; el != end; ++el)
672  if ((*el)->active())
673  for (unsigned int n = 0; n < (*el)->n_nodes(); n++)
674  _node_to_active_semilocal_elem_map[(*el)->node(n)].push_back((*el)->id());
675 
677  true; // MUST be set at the end for double-checked locking to work!
678  }
679  }
680 
682 }
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:898
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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:897
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 642 of file MooseMesh.C.

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

643 {
644  if (!_node_to_elem_map_built) // Guard the creation with a double checked lock
645  {
646  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
648  {
649  for (const auto & elem : getMesh().active_element_ptr_range())
650  for (unsigned int n = 0; n < elem->n_nodes(); n++)
651  _node_to_elem_map[elem->node(n)].push_back(elem->id());
652 
653  _node_to_elem_map_built = true; // MUST be set at the end for double-checked locking to work!
654  }
655  }
656 
657  return _node_to_elem_map;
658 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:894
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:893
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
PetscInt n
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
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 476 of file MooseMesh.C.

Referenced by MooseMesh::meshChanged().

477 {
478 }
MooseMesh::operator const libMesh::MeshBase & ( ) const
inherited

Definition at line 2352 of file MooseMesh.C.

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

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

Definition at line 2350 of file MooseMesh.C.

2350 { return getMesh(); }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
AnnularMesh& AnnularMesh::operator= ( const AnnularMesh other_mesh)
delete
const InputParameters& MooseObject::parameters ( ) const
inlineinherited
const MooseEnum& MooseMesh::partitionerName ( ) const
inlineinherited

Definition at line 747 of file MooseMesh.h.

Referenced by ConsoleUtils::outputMeshInformation().

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

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

312 {
313  if (dynamic_cast<DistributedMesh *>(&getMesh()) && !_is_nemesis)
314  {
315  // Call prepare_for_use() and don't mess with the renumbering
316  // setting
317  if (force || _needs_prepare_for_use)
318  getMesh().prepare_for_use();
319  }
320  else
321  {
322  // Call prepare_for_use() and DO NOT allow renumbering
323  getMesh().allow_renumbering(false);
324  if (force || _needs_prepare_for_use)
325  getMesh().prepare_for_use();
326  }
327 
328  // Collect (local) subdomain IDs
329  _mesh_subdomains.clear();
330  for (const auto & elem : getMesh().element_ptr_range())
331  _mesh_subdomains.insert(elem->subdomain_id());
332 
333  // Make sure nodesets have been generated
335 
336  // Collect (local) boundary IDs
337  const std::set<BoundaryID> & local_bids = getMesh().get_boundary_info().get_boundary_ids();
338  _mesh_boundary_ids.insert(local_bids.begin(), local_bids.end());
339 
340  const std::set<BoundaryID> & local_node_bids =
341  getMesh().get_boundary_info().get_node_boundary_ids();
342  _mesh_nodeset_ids.insert(local_node_bids.begin(), local_node_bids.end());
343 
344  const std::set<BoundaryID> & local_side_bids =
345  getMesh().get_boundary_info().get_side_boundary_ids();
346  _mesh_sideset_ids.insert(local_side_bids.begin(), local_side_bids.end());
347 
348  // Communicate subdomain and boundary IDs if this is a parallel mesh
349  if (!getMesh().is_serial())
350  {
351  _communicator.set_union(_mesh_subdomains);
352  _communicator.set_union(_mesh_boundary_ids);
353  _communicator.set_union(_mesh_nodeset_ids);
354  _communicator.set_union(_mesh_sideset_ids);
355  }
356 
358 
359  update();
360 
361  // Prepared has been called
362  _is_prepared = true;
363  _needs_prepare_for_use = false;
364 }
bool _is_nemesis
True if a Nemesis Mesh was read in.
Definition: MooseMesh.h:855
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:858
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:1979
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
void update()
Calls buildNodeListFromSideList(), buildNodeList(), and buildBndElemList().
Definition: MooseMesh.C:367
std::set< BoundaryID > _mesh_nodeset_ids
Definition: MooseMesh.h:914
std::set< BoundaryID > _mesh_boundary_ids
A set of boundary IDs currently present in the mesh.
Definition: MooseMesh.h:912
std::set< BoundaryID > _mesh_sideset_ids
Definition: MooseMesh.h:913
bool detectOrthogonalDimRanges(Real tol=1e-6)
This routine determines whether the Mesh is a regular orthogonal mesh (i.e.
Definition: MooseMesh.C:1182
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
std::set< SubdomainID > _mesh_subdomains
A set of subdomain IDs currently present in the mesh.
Definition: MooseMesh.h:904
bool _needs_prepare_for_use
True if prepare_for_use should be called when Mesh is prepared.
Definition: MooseMesh.h:861
bool MooseMesh::prepared ( ) const
inherited

Setter/getter for the _is_prepared flag.

Definition at line 2086 of file MooseMesh.C.

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

2087 {
2088  return _is_prepared;
2089 }
bool _is_prepared
True if prepare has been called on the mesh.
Definition: MooseMesh.h:858
void MooseMesh::prepared ( bool  state)
inherited

Definition at line 2092 of file MooseMesh.C.

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

Calls print_info() on the underlying Mesh.

Definition at line 2376 of file MooseMesh.C.

Referenced by Adaptivity::adaptMesh().

2377 {
2378  getMesh().print_info(os);
2379 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
Elem * MooseMesh::queryElemPtr ( const dof_id_type  i)
virtualinherited

Definition at line 2074 of file MooseMesh.C.

Referenced by EqualValueBoundaryConstraint::updateConstrainedNodes().

2075 {
2076  return getMesh().query_elem_ptr(i);
2077 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
const Elem * MooseMesh::queryElemPtr ( const dof_id_type  i) const
virtualinherited

Definition at line 2080 of file MooseMesh.C.

2081 {
2082  return getMesh().query_elem_ptr(i);
2083 }
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
const Node * MooseMesh::queryNodePtr ( const dof_id_type  i) const
virtualinherited

Definition at line 434 of file MooseMesh.C.

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

435 {
436  if (i > getMesh().max_node_id())
437  return (*_quadrature_nodes.find(i)).second;
438 
439  return getMesh().query_node_ptr(i);
440 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:934
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
Node * MooseMesh::queryNodePtr ( const dof_id_type  i)
virtualinherited

Definition at line 443 of file MooseMesh.C.

444 {
445  if (i > getMesh().max_node_id())
446  return _quadrature_nodes[i];
447 
448  return getMesh().query_node_ptr(i);
449 }
std::map< dof_id_type, Node * > _quadrature_nodes
Definition: MooseMesh.h:934
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
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 497 of file MooseMesh.C.

Referenced by FEProblemBase::meshChanged().

498 {
499  return _refined_elements.get();
500 }
std::unique_ptr< ConstElemPointerRange > _refined_elements
The elements that were just refined.
Definition: MooseMesh.h:864
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 1052 of file MooseMesh.C.

Referenced by SetupMeshAction::setupMesh().

1053 {
1054  BoundaryInfo & boundary_info = getMesh().get_boundary_info();
1055 
1056  std::vector<BoundaryID> side_boundaries;
1057  boundary_info.build_side_boundary_ids(side_boundaries);
1058 
1059  // We need to figure out if this boundary is a sideset or nodeset
1060  if (std::find(side_boundaries.begin(), side_boundaries.end(), boundary_id) !=
1061  side_boundaries.end())
1062  boundary_info.sideset_name(boundary_id) = name;
1063  else
1064  boundary_info.nodeset_name(boundary_id) = name;
1065 }
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:2355
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 2134 of file MooseMesh.C.

Referenced by AddAllSideSetsByNormals::modify().

2136 {
2137  _boundary_to_normal_map = std::move(boundary_map);
2138 }
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:918
void MooseMesh::setBoundaryToNormalMap ( std::map< BoundaryID, RealVectorValue > *  boundary_map)
inherited

Definition at line 2141 of file MooseMesh.C.

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

Setter for custom partitioner.

Definition at line 2506 of file MooseMesh.C.

2507 {
2508  _custom_partitioner = partitioner->clone();
2509 }
std::unique_ptr< Partitioner > _custom_partitioner
The custom partitioner.
Definition: MooseMesh.h:832
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 2167 of file MooseMesh.C.

Referenced by SetupMeshAction::setupMesh().

2168 {
2169  _ghosted_boundaries_inflation = inflation;
2170 }
std::vector< Real > _ghosted_boundaries_inflation
Definition: MooseMesh.h:946
void MooseMesh::setIsCustomPartitionerRequested ( bool  cpr)
inherited

Definition at line 2534 of file MooseMesh.C.

2535 {
2537 }
bool _custom_partitioner_requested
Definition: MooseMesh.h:833
void MooseMesh::setMeshBoundaryIDs ( std::set< BoundaryID boundary_IDs)
inherited

Sets the set of BoundaryIDs Is called by AddAllSideSetsByNormals.

Definition at line 2128 of file MooseMesh.C.

Referenced by AddAllSideSetsByNormals::modify().

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

Set the patch size update strategy.

Definition at line 2320 of file MooseMesh.C.

2321 {
2322  _patch_update_strategy = patch_update_strategy;
2323 }
MooseEnum _patch_update_strategy
The patch update strategy.
Definition: MooseMesh.h:952
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 1040 of file MooseMesh.C.

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

1041 {
1042  getMesh().subdomain_name(subdomain_id) = name;
1043 }
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:2355
void MooseMesh::setUniformRefineLevel ( unsigned int  level)
inherited

Set uniform refinement level.

Definition at line 2155 of file MooseMesh.C.

Referenced by SetupMeshAction::setupMesh().

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

Calls BoundaryInfo::side_with_boundary_id().

Definition at line 1994 of file MooseMesh.C.

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

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

Definition at line 2149 of file MooseMesh.C.

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

2150 {
2151  return _uniform_refine_level;
2152 }
unsigned int _uniform_refine_level
The level of uniform refinement requested (set to zero if AMR is disabled)
Definition: MooseMesh.h:849
void MooseMesh::update ( )
inherited

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

Definition at line 367 of file MooseMesh.C.

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

368 {
369  // Rebuild the boundary conditions
371 
372  // Update the node to elem map
373  _node_to_elem_map.clear();
374  _node_to_elem_map_built = false;
377 
378  buildNodeList();
380  cacheInfo();
381 }
bool _node_to_elem_map_built
Definition: MooseMesh.h:894
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:893
bool _node_to_active_semilocal_elem_map_built
Definition: MooseMesh.h:898
void cacheInfo()
Definition: MooseMesh.C:744
void buildNodeListFromSideList()
Calls BoundaryInfo::build_node_list_from_side_list().
Definition: MooseMesh.C:1979
void buildBndElemList()
Definition: MooseMesh.C:622
void buildNodeList()
Calls BoundaryInfo::build_node_list()/build_side_list() and makes separate copies of Nodes/Elems in t...
Definition: MooseMesh.C:589
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:897
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 517 of file MooseMesh.C.

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

518 {
519  _semilocal_node_list.clear();
520 
521  // First add the nodes connected to local elems
522  ConstElemRange * active_local_elems = getActiveLocalElementRange();
523  for (const auto & elem : *active_local_elems)
524  {
525  for (unsigned int n = 0; n < elem->n_nodes(); ++n)
526  {
527  // Since elem is const here but we require a non-const Node * to
528  // store in the _semilocal_node_list (otherwise things like
529  // UpdateDisplacedMeshThread don't work), we are using a
530  // const_cast. A more long-term fix would be to have
531  // getActiveLocalElementRange return a non-const ElemRange.
532  Node * node = const_cast<Node *>(elem->node_ptr(n));
533 
534  _semilocal_node_list.insert(node);
535  }
536  }
537 
538  // Now add the nodes connected to ghosted_elems
539  for (const auto & ghost_elem_id : ghosted_elems)
540  {
541  Elem * elem = getMesh().elem_ptr(ghost_elem_id);
542  for (unsigned int n = 0; n < elem->n_nodes(); n++)
543  {
544  Node * node = elem->node_ptr(n);
545 
546  _semilocal_node_list.insert(node);
547  }
548  }
549 
550  // Now create the actual range
551  _active_semilocal_node_range = libmesh_make_unique<SemiLocalNodeRange>(
553 }
std::set< Node * > _semilocal_node_list
Used for generating the semilocal node range.
Definition: MooseMesh.h:877
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:685
virtual const Node & node(const dof_id_type i) const
Various accessors (pointers/references) for Node "i".
Definition: MooseMesh.C:384
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2355
PetscInt n
virtual Elem * elem(const dof_id_type i)
Various accessors (pointers/references) for Elem "i".
Definition: MooseMesh.C:2048
std::unique_ptr< SemiLocalNodeRange > _active_semilocal_node_range
Definition: MooseMesh.h:885

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

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

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

Definition at line 886 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(), FileMesh::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 940 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 932 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 890 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 928 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 925 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 918 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 964 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 874 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 867 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 832 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 821 of file MooseMesh.h.

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::vector<BndNode> MooseMesh::_extra_bnd_nodes
protectedinherited
std::string MooseMesh::_file_name
protectedinherited

file_name iff this mesh was read from a file

Definition at line 955 of file MooseMesh.h.

const bool AnnularMesh::_full_annulus
protected

Whether a full annulus (as opposed to a sector) will needs to generate.

Definition at line 68 of file AnnularMesh.h.

Referenced by buildMesh().

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

Referenced by MooseMesh::MooseMesh().

const Real AnnularMesh::_growth_r
protected

Bias on radial meshing.

Definition at line 62 of file AnnularMesh.h.

Referenced by buildMesh().

bool MooseMesh::_is_changed
protectedinherited

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

Definition at line 852 of file MooseMesh.h.

bool MooseMesh::_is_nemesis
protectedinherited

True if a Nemesis Mesh was read in.

Definition at line 855 of file MooseMesh.h.

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

bool MooseMesh::_is_prepared
protectedinherited

True if prepare has been called on the mesh.

Definition at line 858 of file MooseMesh.h.

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

const Real AnnularMesh::_len
protected

rmax = rmin + len + len*g + len*g^2 + len*g^3 + ... + len*g^(nr-1) = rmin + len*(1 - g^nr)/(1 - g)

Definition at line 65 of file AnnularMesh.h.

Referenced by buildMesh().

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

Definition at line 887 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 825 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 912 of file MooseMesh.h.

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

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

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

Referenced by MooseMesh::MooseMesh().

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

Definition at line 913 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 904 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 971 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 973 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 970 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 861 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 958 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 943 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 897 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 898 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 893 of file MooseMesh.h.

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

bool MooseMesh::_node_to_elem_map_built
protectedinherited

Definition at line 894 of file MooseMesh.h.

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

const unsigned AnnularMesh::_nr
protected

Number of elements in radial direction.

Definition at line 44 of file AnnularMesh.h.

Referenced by buildMesh().

const unsigned AnnularMesh::_nt
protected

Number of elements in angular direction.

Definition at line 47 of file AnnularMesh.h.

Referenced by AnnularMesh(), and buildMesh().

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

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

Definition at line 967 of file MooseMesh.h.

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

bool MooseMesh::_parallel_type_overridden
protectedinherited

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

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

bool MooseMesh::_partitioner_overridden
protectedinherited

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

Referenced by MooseMesh::getPatchSize().

MooseEnum MooseMesh::_patch_update_strategy
protectedinherited

The patch update strategy.

Definition at line 952 of file MooseMesh.h.

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

const SubdomainID AnnularMesh::_quad_subdomain_id
protected

Subdomain ID of created quad elements.

Definition at line 71 of file AnnularMesh.h.

Referenced by AnnularMesh(), and buildMesh().

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

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

bool MooseMesh::_regular_orthogonal_mesh
protectedinherited
const Real AnnularMesh::_rmax
protected

Maximum radius.

Definition at line 53 of file AnnularMesh.h.

Referenced by AnnularMesh(), buildMesh(), getMaxInDimension(), and getMinInDimension().

const Real AnnularMesh::_rmin
protected

Minimum radius.

Definition at line 50 of file AnnularMesh.h.

Referenced by AnnularMesh(), and buildMesh().

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

Used for generating the semilocal node range.

Definition at line 877 of file MooseMesh.h.

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

const Real AnnularMesh::_tmax
protected

Maximum angle.

Definition at line 59 of file AnnularMesh.h.

Referenced by AnnularMesh(), and buildMesh().

const Real AnnularMesh::_tmin
protected

Minimum angle.

Definition at line 56 of file AnnularMesh.h.

Referenced by AnnularMesh(), and buildMesh().

const SubdomainID AnnularMesh::_tri_subdomain_id
protected

Subdomain ID of created tri elements (that only exist if rmin=0)

Definition at line 74 of file AnnularMesh.h.

Referenced by AnnularMesh(), and buildMesh().

unsigned int MooseMesh::_uniform_refine_level
protectedinherited

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

Definition at line 849 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 820 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: