libMesh
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
libMesh::MeshBase Class Referenceabstract

This is the MeshBase class. More...

#include <mesh_base.h>

Inheritance diagram for libMesh::MeshBase:
[legend]

Classes

struct  const_element_iterator
 The definition of the const_element_iterator struct. More...
 
struct  const_node_iterator
 The definition of the const_node_iterator struct. More...
 
struct  element_iterator
 The definition of the element_iterator struct. More...
 
struct  node_iterator
 The definition of the node_iterator struct. More...
 

Public Types

typedef Predicates::multi_predicate Predicate
 We need an empty, generic class to act as a predicate for this and derived mesh classes. More...
 

Public Member Functions

 MeshBase (const Parallel::Communicator &comm_in, unsigned char dim=1)
 Constructor. More...
 
 MeshBase (const MeshBase &other_mesh)
 Copy-constructor. More...
 
 MeshBase (MeshBase &&)
 Move-constructor - this function is defaulted out-of-line (in the C file) to play nicely with our forward declarations. More...
 
MeshBaseoperator= (const MeshBase &)=delete
 Copy and move assignment are not allowed because MeshBase subclasses manually manage memory (Elems and Nodes) and therefore the default versions of these operators would leak memory. More...
 
MeshBaseoperator= (MeshBase &&)=delete
 
virtual std::unique_ptr< MeshBaseclone () const =0
 Virtual "copy constructor". More...
 
virtual ~MeshBase ()
 Destructor. More...
 
virtual std::unique_ptr< Partitioner > & partitioner ()
 A partitioner to use at each prepare_for_use() More...
 
const BoundaryInfoget_boundary_info () const
 The information about boundary ids on the mesh. More...
 
BoundaryInfoget_boundary_info ()
 Writable information about boundary ids on the mesh. More...
 
virtual void clear ()
 Deletes all the element and node data that is currently stored. More...
 
bool is_prepared () const
 
virtual bool is_serial () const
 
virtual bool is_serial_on_zero () const
 
virtual void set_distributed ()
 Asserts that not all elements and nodes of the mesh necessarily exist on the current processor. More...
 
virtual bool is_replicated () const
 
virtual void allgather ()
 Gathers all elements and nodes of the mesh onto every processor. More...
 
virtual void gather_to_zero ()
 Gathers all elements and nodes of the mesh onto processor zero. More...
 
virtual void delete_remote_elements ()
 When supported, deletes all nonlocal elements of the mesh except for "ghosts" which touch a local element, and deletes all nodes which are not part of a local or ghost element. More...
 
unsigned int mesh_dimension () const
 
void set_mesh_dimension (unsigned char d)
 Resets the logical dimension of the mesh. More...
 
const std::set< unsigned char > & elem_dimensions () const
 
void set_elem_dimensions (const std::set< unsigned char > &elem_dims)
 Most of the time you should not need to call this, as the element dimensions will be set automatically by a call to cache_elem_dims(), therefore only call this if you know what you're doing. More...
 
unsigned int spatial_dimension () const
 
void set_spatial_dimension (unsigned char d)
 Sets the "spatial dimension" of the Mesh. More...
 
virtual dof_id_type n_nodes () const =0
 
virtual dof_id_type parallel_n_nodes () const =0
 
dof_id_type n_nodes_on_proc (const processor_id_type proc) const
 
dof_id_type n_local_nodes () const
 
dof_id_type n_unpartitioned_nodes () const
 
virtual dof_id_type max_node_id () const =0
 
unique_id_type next_unique_id ()
 
void set_next_unique_id (unique_id_type id)
 Sets the next unique id to be used. More...
 
virtual void reserve_nodes (const dof_id_type nn)=0
 Reserves space for a known number of nodes. More...
 
virtual dof_id_type n_elem () const =0
 
virtual dof_id_type parallel_n_elem () const =0
 
virtual dof_id_type max_elem_id () const =0
 
virtual unique_id_type parallel_max_unique_id () const =0
 
virtual void reserve_elem (const dof_id_type ne)=0
 Reserves space for a known number of elements. More...
 
virtual void update_parallel_id_counts ()=0
 Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors. More...
 
virtual dof_id_type n_active_elem () const =0
 
dof_id_type n_elem_on_proc (const processor_id_type proc) const
 
dof_id_type n_local_elem () const
 
dof_id_type n_unpartitioned_elem () const
 
dof_id_type n_active_elem_on_proc (const processor_id_type proc) const
 
dof_id_type n_active_local_elem () const
 
dof_id_type n_sub_elem () const
 
dof_id_type n_active_sub_elem () const
 Same as n_sub_elem(), but only counts active elements. More...
 
virtual const Pointpoint (const dof_id_type i) const =0
 
virtual const Nodenode_ref (const dof_id_type i) const
 
virtual Nodenode_ref (const dof_id_type i)
 
virtual const Nodenode (const dof_id_type i) const
 
virtual Nodenode (const dof_id_type i)
 
virtual const Nodenode_ptr (const dof_id_type i) const =0
 
virtual Nodenode_ptr (const dof_id_type i)=0
 
virtual const Nodequery_node_ptr (const dof_id_type i) const =0
 
virtual Nodequery_node_ptr (const dof_id_type i)=0
 
virtual const Elemelem_ref (const dof_id_type i) const
 
virtual Elemelem_ref (const dof_id_type i)
 
virtual const Elemelem_ptr (const dof_id_type i) const =0
 
virtual Elemelem_ptr (const dof_id_type i)=0
 
virtual const Elemelem (const dof_id_type i) const
 
virtual Elemelem (const dof_id_type i)
 
virtual const Elemquery_elem_ptr (const dof_id_type i) const =0
 
virtual Elemquery_elem_ptr (const dof_id_type i)=0
 
virtual const Elemquery_elem (const dof_id_type i) const
 
virtual Elemquery_elem (const dof_id_type i)
 
virtual Nodeadd_point (const Point &p, const dof_id_type id=DofObject::invalid_id, const processor_id_type proc_id=DofObject::invalid_processor_id)=0
 Add a new Node at Point p to the end of the vertex array, with processor_id procid. More...
 
virtual Nodeadd_node (Node *n)=0
 Add Node n to the end of the vertex array. More...
 
virtual Nodeinsert_node (Node *n)=0
 Insert Node n into the Mesh at a location consistent with n->id(), allocating extra storage if necessary. More...
 
virtual void delete_node (Node *n)=0
 Removes the Node n from the mesh. More...
 
virtual void own_node (Node &)
 Takes ownership of node n on this partition of a distributed mesh, by setting n.processor_id() to this->processor_id(), as well as changing n.id() and moving it in the mesh's internal container to give it a new authoritative id. More...
 
virtual void renumber_node (dof_id_type old_id, dof_id_type new_id)=0
 Changes the id of node old_id, both by changing node(old_id)->id() and by moving node(old_id) in the mesh's internal container. More...
 
virtual Elemadd_elem (Elem *e)=0
 Add elem e to the end of the element array. More...
 
virtual Eleminsert_elem (Elem *e)=0
 Insert elem e to the element array, preserving its id and replacing/deleting any existing element with the same id. More...
 
virtual void delete_elem (Elem *e)=0
 Removes element e from the mesh. More...
 
virtual void renumber_elem (dof_id_type old_id, dof_id_type new_id)=0
 Changes the id of element old_id, both by changing elem(old_id)->id() and by moving elem(old_id) in the mesh's internal container. More...
 
ElemMappingType default_mapping_type () const
 Returns the default master space to physical space mapping basis functions to be used on newly added elements. More...
 
void set_default_mapping_type (const ElemMappingType type)
 Set the default master space to physical space mapping basis functions to be used on newly added elements. More...
 
unsigned char default_mapping_data () const
 Returns any default data value used by the master space to physical space mapping. More...
 
void set_default_mapping_data (const unsigned char data)
 Set the default master space to physical space mapping basis functions to be used on newly added elements. More...
 
virtual void find_neighbors (const bool reset_remote_elements=false, const bool reset_current_list=true)=0
 Locate element face (edge in 2D) neighbors. More...
 
virtual void renumber_nodes_and_elements ()=0
 After partitioning a mesh it is useful to renumber the nodes and elements so that they lie in contiguous blocks on the processors. More...
 
virtual void fix_broken_node_and_element_numbering ()=0
 There is no reason for a user to ever call this function. More...
 
virtual bool contract ()=0
 Delete subactive (i.e. More...
 
unsigned int add_elem_integer (const std::string &name, bool allocate_data=true)
 Register an integer datum (of type dof_id_type) to be added to each element in the mesh. More...
 
std::vector< unsigned intadd_elem_integers (const std::vector< std::string > &names, bool allocate_data=true)
 Register integer data (of type dof_id_type) to be added to each element in the mesh, one string name for each new integer. More...
 
unsigned int get_elem_integer_index (const std::string &name) const
 
bool has_elem_integer (const std::string &name) const
 
const std::string & get_elem_integer_name (unsigned int i) const
 
unsigned int n_elem_integers () const
 
template<typename T >
unsigned int add_elem_datum (const std::string &name, bool allocate_data=true)
 Register a datum (of type T) to be added to each element in the mesh. More...
 
template<typename T >
std::vector< unsigned intadd_elem_data (const std::vector< std::string > &names, bool allocate_data=true)
 Register data (of type T) to be added to each element in the mesh. More...
 
unsigned int add_node_integer (const std::string &name, bool allocate_data=true)
 Register an integer datum (of type dof_id_type) to be added to each node in the mesh. More...
 
std::vector< unsigned intadd_node_integers (const std::vector< std::string > &names, bool allocate_data=true)
 Register integer data (of type dof_id_type) to be added to each node in the mesh. More...
 
unsigned int get_node_integer_index (const std::string &name) const
 
bool has_node_integer (const std::string &name) const
 
const std::string & get_node_integer_name (unsigned int i) const
 
unsigned int n_node_integers () const
 
template<typename T >
unsigned int add_node_datum (const std::string &name, bool allocate_data=true)
 Register a datum (of type T) to be added to each node in the mesh. More...
 
template<typename T >
std::vector< unsigned intadd_node_data (const std::vector< std::string > &name, bool allocate_data=true)
 Register data (of type T) to be added to each node in the mesh. More...
 
void prepare_for_use (const bool skip_renumber_nodes_and_elements=false, const bool skip_find_neighbors=false)
 Prepare a newly ecreated (or read) mesh for use. More...
 
virtual void partition (const unsigned int n_parts)
 Call the default partitioner (currently metis_partition()). More...
 
void partition ()
 
virtual void redistribute ()
 Redistribute elements between processors. More...
 
virtual void update_post_partitioning ()
 Recalculate any cached data after elements and nodes have been repartitioned. More...
 
void allow_renumbering (bool allow)
 If false is passed in then this mesh will no longer be renumbered when being prepared for use. More...
 
bool allow_renumbering () const
 
void allow_remote_element_removal (bool allow)
 If false is passed in then this mesh will no longer have remote elements deleted when being prepared for use; i.e. More...
 
bool allow_remote_element_removal () const
 
void skip_noncritical_partitioning (bool skip)
 If true is passed in then the elements on this mesh will no longer be (re)partitioned, and the nodes on this mesh will only be repartitioned if they are found "orphaned" via coarsening or other removal of the last element responsible for their node/element processor id consistency. More...
 
bool skip_noncritical_partitioning () const
 
void skip_partitioning (bool skip)
 If true is passed in then nothing on this mesh will be (re)partitioned. More...
 
bool skip_partitioning () const
 
void add_ghosting_functor (GhostingFunctor &ghosting_functor)
 Adds a functor which can specify ghosting requirements for use on distributed meshes. More...
 
void add_ghosting_functor (std::shared_ptr< GhostingFunctor > ghosting_functor)
 Adds a functor which can specify ghosting requirements for use on distributed meshes. More...
 
void remove_ghosting_functor (GhostingFunctor &ghosting_functor)
 Removes a functor which was previously added to the set of ghosting functors. More...
 
std::set< GhostingFunctor * >::const_iterator ghosting_functors_begin () const
 Beginning of range of ghosting functors. More...
 
std::set< GhostingFunctor * >::const_iterator ghosting_functors_end () const
 End of range of ghosting functors. More...
 
GhostingFunctordefault_ghosting ()
 Default ghosting functor. More...
 
void subdomain_ids (std::set< subdomain_id_type > &ids) const
 Constructs a list of all subdomain identifiers in the global mesh. More...
 
subdomain_id_type n_subdomains () const
 
unsigned int n_partitions () const
 
std::string get_info () const
 
void print_info (std::ostream &os=libMesh::out) const
 Prints relevant information about the mesh. More...
 
virtual void read (const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false)=0
 Interfaces for reading/writing a mesh to/from a file. More...
 
virtual void write (const std::string &name)=0
 
virtual void all_first_order ()=0
 Converts a mesh with higher-order elements into a mesh with linear elements. More...
 
virtual void all_second_order (const bool full_ordered=true)=0
 Converts a (conforming, non-refined) mesh with linear elements into a mesh with second-order elements. More...
 
unsigned int recalculate_n_partitions ()
 In a few (very rare) cases, the user may have manually tagged the elements with specific processor IDs by hand, without using a partitioner. More...
 
const PointLocatorBasepoint_locator () const
 
std::unique_ptr< PointLocatorBasesub_point_locator () const
 
void set_point_locator_close_to_point_tol (Real val)
 Set value used by PointLocatorBase::close_to_point_tol(). More...
 
Real get_point_locator_close_to_point_tol () const
 
void clear_point_locator ()
 Releases the current PointLocator object. More...
 
void set_count_lower_dim_elems_in_point_locator (bool count_lower_dim_elems)
 In the point locator, do we count lower dimensional elements when we refine point locator regions? This is relevant in tree-based point locators, for example. More...
 
bool get_count_lower_dim_elems_in_point_locator () const
 Get the current value of _count_lower_dim_elems_in_point_locator. More...
 
virtual void libmesh_assert_valid_parallel_ids () const
 Verify id and processor_id consistency of our elements and nodes containers. More...
 
std::string & subdomain_name (subdomain_id_type id)
 
const std::string & subdomain_name (subdomain_id_type id) const
 
subdomain_id_type get_id_by_name (const std::string &name) const
 
virtual element_iterator elements_begin ()=0
 Iterate over all the elements in the Mesh. More...
 
virtual element_iterator elements_end ()=0
 
virtual const_element_iterator elements_begin () const =0
 
virtual const_element_iterator elements_end () const =0
 
virtual SimpleRange< element_iteratorelement_ptr_range ()=0
 
virtual SimpleRange< const_element_iteratorelement_ptr_range () const =0
 
virtual element_iterator ancestor_elements_begin ()=0
 Iterate over elements for which elem->ancestor() is true. More...
 
virtual element_iterator ancestor_elements_end ()=0
 
virtual const_element_iterator ancestor_elements_begin () const =0
 
virtual const_element_iterator ancestor_elements_end () const =0
 
virtual element_iterator subactive_elements_begin ()=0
 Iterate over elements for which elem->subactive() is true. More...
 
virtual element_iterator subactive_elements_end ()=0
 
virtual const_element_iterator subactive_elements_begin () const =0
 
virtual const_element_iterator subactive_elements_end () const =0
 
virtual element_iterator semilocal_elements_begin ()=0
 Iterate over elements for which elem->is_semilocal() is true for the current processor. More...
 
virtual element_iterator semilocal_elements_end ()=0
 
virtual const_element_iterator semilocal_elements_begin () const =0
 
virtual const_element_iterator semilocal_elements_end () const =0
 
virtual element_iterator facelocal_elements_begin ()=0
 Iterate over elements which are on or have a neighbor on the current processor. More...
 
virtual element_iterator facelocal_elements_end ()=0
 
virtual const_element_iterator facelocal_elements_begin () const =0
 
virtual const_element_iterator facelocal_elements_end () const =0
 
virtual element_iterator level_elements_begin (unsigned int level)=0
 Iterate over elements of a given level. More...
 
virtual element_iterator level_elements_end (unsigned int level)=0
 
virtual const_element_iterator level_elements_begin (unsigned int level) const =0
 
virtual const_element_iterator level_elements_end (unsigned int level) const =0
 
virtual element_iterator pid_elements_begin (processor_id_type proc_id)=0
 Iterate over all elements with a specified processor id. More...
 
virtual element_iterator pid_elements_end (processor_id_type proc_id)=0
 
virtual const_element_iterator pid_elements_begin (processor_id_type proc_id) const =0
 
virtual const_element_iterator pid_elements_end (processor_id_type proc_id) const =0
 
virtual element_iterator type_elements_begin (ElemType type)=0
 Iterate over all elements with a specified geometric type. More...
 
virtual element_iterator type_elements_end (ElemType type)=0
 
virtual const_element_iterator type_elements_begin (ElemType type) const =0
 
virtual const_element_iterator type_elements_end (ElemType type) const =0
 
virtual element_iterator unpartitioned_elements_begin ()=0
 Iterate over unpartitioned elements in the Mesh. More...
 
virtual element_iterator unpartitioned_elements_end ()=0
 
virtual const_element_iterator unpartitioned_elements_begin () const =0
 
virtual const_element_iterator unpartitioned_elements_end () const =0
 
virtual element_iterator active_unpartitioned_elements_begin ()=0
 Iterate over active unpartitioned elements in the Mesh. More...
 
virtual element_iterator active_unpartitioned_elements_end ()=0
 
virtual const_element_iterator active_unpartitioned_elements_begin () const =0
 
virtual const_element_iterator active_unpartitioned_elements_end () const =0
 
virtual element_iterator ghost_elements_begin ()=0
 Iterate over "ghost" elements in the Mesh. More...
 
virtual element_iterator ghost_elements_end ()=0
 
virtual const_element_iterator ghost_elements_begin () const =0
 
virtual const_element_iterator ghost_elements_end () const =0
 
virtual element_iterator evaluable_elements_begin (const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
 Iterate over elements in the Mesh where the solution (as distributed by the given DofMap) can be evaluated, for the given variable var_num, or for all variables by default. More...
 
virtual element_iterator evaluable_elements_end (const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
 
virtual const_element_iterator evaluable_elements_begin (const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) const =0
 
virtual const_element_iterator evaluable_elements_end (const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) const =0
 
virtual element_iterator flagged_elements_begin (unsigned char rflag)=0
 Iterate over all elements with a specified refinement flag. More...
 
virtual element_iterator flagged_elements_end (unsigned char rflag)=0
 
virtual const_element_iterator flagged_elements_begin (unsigned char rflag) const =0
 
virtual const_element_iterator flagged_elements_end (unsigned char rflag) const =0
 
virtual element_iterator flagged_pid_elements_begin (unsigned char rflag, processor_id_type pid)=0
 Iterate over all elements with a specified refinement flag on a specified processor. More...
 
virtual element_iterator flagged_pid_elements_end (unsigned char rflag, processor_id_type pid)=0
 
virtual const_element_iterator flagged_pid_elements_begin (unsigned char rflag, processor_id_type pid) const =0
 
virtual const_element_iterator flagged_pid_elements_end (unsigned char rflag, processor_id_type pid) const =0
 
virtual element_iterator active_elements_begin ()=0
 Active, local, and negation forms of the element iterators described above. More...
 
virtual element_iterator active_elements_end ()=0
 
virtual const_element_iterator active_elements_begin () const =0
 
virtual const_element_iterator active_elements_end () const =0
 
virtual SimpleRange< element_iteratoractive_element_ptr_range ()=0
 
virtual SimpleRange< const_element_iteratoractive_element_ptr_range () const =0
 
virtual element_iterator local_elements_begin ()=0
 
virtual element_iterator local_elements_end ()=0
 
virtual const_element_iterator local_elements_begin () const =0
 
virtual const_element_iterator local_elements_end () const =0
 
virtual element_iterator active_semilocal_elements_begin ()=0
 
virtual element_iterator active_semilocal_elements_end ()=0
 
virtual const_element_iterator active_semilocal_elements_begin () const =0
 
virtual const_element_iterator active_semilocal_elements_end () const =0
 
virtual element_iterator active_type_elements_begin (ElemType type)=0
 
virtual element_iterator active_type_elements_end (ElemType type)=0
 
virtual const_element_iterator active_type_elements_begin (ElemType type) const =0
 
virtual const_element_iterator active_type_elements_end (ElemType type) const =0
 
virtual element_iterator active_pid_elements_begin (processor_id_type proc_id)=0
 
virtual element_iterator active_pid_elements_end (processor_id_type proc_id)=0
 
virtual const_element_iterator active_pid_elements_begin (processor_id_type proc_id) const =0
 
virtual const_element_iterator active_pid_elements_end (processor_id_type proc_id) const =0
 
virtual element_iterator active_subdomain_elements_begin (subdomain_id_type subdomain_id)=0
 
virtual element_iterator active_subdomain_elements_end (subdomain_id_type subdomain_id)=0
 
virtual const_element_iterator active_subdomain_elements_begin (subdomain_id_type subdomain_id) const =0
 
virtual const_element_iterator active_subdomain_elements_end (subdomain_id_type subdomain_id) const =0
 
virtual SimpleRange< element_iteratoractive_subdomain_elements_ptr_range (subdomain_id_type subdomain_id)=0
 
virtual SimpleRange< const_element_iteratoractive_subdomain_elements_ptr_range (subdomain_id_type subdomain_id) const =0
 
virtual element_iterator active_subdomain_set_elements_begin (std::set< subdomain_id_type > ss)=0
 
virtual element_iterator active_subdomain_set_elements_end (std::set< subdomain_id_type > ss)=0
 
virtual const_element_iterator active_subdomain_set_elements_begin (std::set< subdomain_id_type > ss) const =0
 
virtual const_element_iterator active_subdomain_set_elements_end (std::set< subdomain_id_type > ss) const =0
 
virtual SimpleRange< element_iteratoractive_subdomain_set_elements_ptr_range (std::set< subdomain_id_type > ss)=0
 
virtual SimpleRange< const_element_iteratoractive_subdomain_set_elements_ptr_range (std::set< subdomain_id_type > ss) const =0
 
virtual element_iterator active_local_subdomain_elements_begin (subdomain_id_type subdomain_id)=0
 
virtual element_iterator active_local_subdomain_elements_end (subdomain_id_type subdomain_id)=0
 
virtual const_element_iterator active_local_subdomain_elements_begin (subdomain_id_type subdomain_id) const =0
 
virtual const_element_iterator active_local_subdomain_elements_end (subdomain_id_type subdomain_id) const =0
 
virtual SimpleRange< element_iteratoractive_local_subdomain_elements_ptr_range (subdomain_id_type subdomain_id)=0
 
virtual SimpleRange< const_element_iteratoractive_local_subdomain_elements_ptr_range (subdomain_id_type subdomain_id) const =0
 
virtual element_iterator local_level_elements_begin (unsigned int level)=0
 
virtual element_iterator local_level_elements_end (unsigned int level)=0
 
virtual const_element_iterator local_level_elements_begin (unsigned int level) const =0
 
virtual const_element_iterator local_level_elements_end (unsigned int level) const =0
 
virtual element_iterator local_not_level_elements_begin (unsigned int level)=0
 
virtual element_iterator local_not_level_elements_end (unsigned int level)=0
 
virtual const_element_iterator local_not_level_elements_begin (unsigned int level) const =0
 
virtual const_element_iterator local_not_level_elements_end (unsigned int level) const =0
 
virtual element_iterator not_level_elements_begin (unsigned int level)=0
 
virtual element_iterator not_level_elements_end (unsigned int level)=0
 
virtual const_element_iterator not_level_elements_begin (unsigned int level) const =0
 
virtual const_element_iterator not_level_elements_end (unsigned int level) const =0
 
virtual element_iterator active_local_elements_begin ()=0
 
virtual element_iterator active_local_elements_end ()=0
 
virtual const_element_iterator active_local_elements_begin () const =0
 
virtual const_element_iterator active_local_elements_end () const =0
 
virtual SimpleRange< element_iteratoractive_local_element_ptr_range ()=0
 
virtual SimpleRange< const_element_iteratoractive_local_element_ptr_range () const =0
 
virtual element_iterator active_not_local_elements_begin ()=0
 
virtual element_iterator active_not_local_elements_end ()=0
 
virtual const_element_iterator active_not_local_elements_begin () const =0
 
virtual const_element_iterator active_not_local_elements_end () const =0
 
virtual element_iterator not_local_elements_begin ()=0
 
virtual element_iterator not_local_elements_end ()=0
 
virtual const_element_iterator not_local_elements_begin () const =0
 
virtual const_element_iterator not_local_elements_end () const =0
 
virtual element_iterator not_subactive_elements_begin ()=0
 
virtual element_iterator not_subactive_elements_end ()=0
 
virtual const_element_iterator not_subactive_elements_begin () const =0
 
virtual const_element_iterator not_subactive_elements_end () const =0
 
virtual element_iterator not_active_elements_begin ()=0
 
virtual element_iterator not_active_elements_end ()=0
 
virtual const_element_iterator not_active_elements_begin () const =0
 
virtual const_element_iterator not_active_elements_end () const =0
 
virtual element_iterator not_ancestor_elements_begin ()=0
 
virtual element_iterator not_ancestor_elements_end ()=0
 
virtual const_element_iterator not_ancestor_elements_begin () const =0
 
virtual const_element_iterator not_ancestor_elements_end () const =0
 
virtual node_iterator nodes_begin ()=0
 Iterate over all the nodes in the Mesh. More...
 
virtual node_iterator nodes_end ()=0
 
virtual const_node_iterator nodes_begin () const =0
 
virtual const_node_iterator nodes_end () const =0
 
virtual SimpleRange< node_iteratornode_ptr_range ()=0
 
virtual SimpleRange< const_node_iteratornode_ptr_range () const =0
 
virtual node_iterator active_nodes_begin ()=0
 Iterate over only the active nodes in the Mesh. More...
 
virtual node_iterator active_nodes_end ()=0
 
virtual const_node_iterator active_nodes_begin () const =0
 
virtual const_node_iterator active_nodes_end () const =0
 
virtual node_iterator local_nodes_begin ()=0
 Iterate over local nodes (nodes whose processor_id() matches the current processor). More...
 
virtual node_iterator local_nodes_end ()=0
 
virtual const_node_iterator local_nodes_begin () const =0
 
virtual const_node_iterator local_nodes_end () const =0
 
virtual SimpleRange< node_iteratorlocal_node_ptr_range ()=0
 
virtual SimpleRange< const_node_iteratorlocal_node_ptr_range () const =0
 
virtual node_iterator pid_nodes_begin (processor_id_type proc_id)=0
 Iterate over nodes with processor_id() == proc_id. More...
 
virtual node_iterator pid_nodes_end (processor_id_type proc_id)=0
 
virtual const_node_iterator pid_nodes_begin (processor_id_type proc_id) const =0
 
virtual const_node_iterator pid_nodes_end (processor_id_type proc_id) const =0
 
virtual node_iterator bid_nodes_begin (boundary_id_type bndry_id)=0
 Iterate over nodes for which BoundaryInfo::has_boundary_id(node, bndry_id) is true. More...
 
virtual node_iterator bid_nodes_end (boundary_id_type bndry_id)=0
 
virtual const_node_iterator bid_nodes_begin (boundary_id_type bndry_id) const =0
 
virtual const_node_iterator bid_nodes_end (boundary_id_type bndry_id) const =0
 
virtual node_iterator bnd_nodes_begin ()=0
 Iterate over nodes for which BoundaryInfo::n_boundary_ids(node) > 0. More...
 
virtual node_iterator bnd_nodes_end ()=0
 
virtual const_node_iterator bnd_nodes_begin () const =0
 
virtual const_node_iterator bnd_nodes_end () const =0
 
virtual node_iterator evaluable_nodes_begin (const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
 Iterate over nodes in the Mesh where the solution (as distributed by the given DofMap) can be evaluated, for the given variable var_num, or for all variables by default. More...
 
virtual node_iterator evaluable_nodes_end (const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
 
virtual const_node_iterator evaluable_nodes_begin (const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) const =0
 
virtual const_node_iterator evaluable_nodes_end (const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) const =0
 
std::map< subdomain_id_type, std::string > & set_subdomain_name_map ()
 
const std::map< subdomain_id_type, std::string > & get_subdomain_name_map () const
 
void cache_elem_dims ()
 Search the mesh and cache the different dimensions of the elements present in the mesh. More...
 
void detect_interior_parents ()
 Search the mesh for elements that have a neighboring element of dim+1 and set that element as the interior parent. More...
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Public Attributes

std::unique_ptr< BoundaryInfoboundary_info
 This class holds the boundary information. More...
 

Protected Member Functions

unsigned intset_n_partitions ()
 
void size_elem_extra_integers ()
 Size extra-integer arrays of all elements in the mesh. More...
 
void size_node_extra_integers ()
 Size extra-integer arrays of all nodes in the mesh. More...
 
std::pair< std::vector< unsigned int >, std::vector< unsigned int > > merge_extra_integer_names (const MeshBase &other)
 Merge extra-integer arrays from an other mesh. More...
 

Protected Attributes

unsigned int _n_parts
 The number of partitions the mesh has. More...
 
ElemMappingType _default_mapping_type
 The default mapping type (typically Lagrange) between master and physical space to assign to newly added elements. More...
 
unsigned char _default_mapping_data
 The default mapping data (unused with Lagrange, used for nodal weight lookup index with rational bases) to assign to newly added elements. More...
 
bool _is_prepared
 Flag indicating if the mesh has been prepared for use. More...
 
std::unique_ptr< PointLocatorBase_point_locator
 A PointLocator class for this mesh. More...
 
bool _count_lower_dim_elems_in_point_locator
 Do we count lower dimensional elements in point locator refinement? This is relevant in tree-based point locators, for example. More...
 
std::unique_ptr< Partitioner_partitioner
 A partitioner to use at each prepare_for_use(). More...
 
unique_id_type _next_unique_id
 The next available unique id for assigning ids to DOF objects. More...
 
bool _skip_noncritical_partitioning
 If this is true then no partitioning should be done with the possible exception of orphaned nodes. More...
 
bool _skip_all_partitioning
 If this is true then no partitioning should be done. More...
 
bool _skip_renumber_nodes_and_elements
 If this is true then renumbering will be kept to a minimum. More...
 
bool _allow_remote_element_removal
 If this is false then even on DistributedMesh remote elements will not be deleted during mesh preparation. More...
 
std::map< subdomain_id_type, std::string > _block_id_to_name
 This structure maintains the mapping of named blocks for file formats that support named blocks. More...
 
std::set< unsigned char > _elem_dims
 We cache the dimension of the elements present in the mesh. More...
 
unsigned char _spatial_dimension
 The "spatial dimension" of the Mesh. More...
 
std::vector< std::string > _elem_integer_names
 The array of names for integer data associated with each element in the mesh. More...
 
std::vector< std::string > _node_integer_names
 The array of names for integer data associated with each node in the mesh. More...
 
std::unique_ptr< GhostingFunctor_default_ghosting
 The default geometric GhostingFunctor, used to implement standard libMesh element ghosting behavior. More...
 
std::set< GhostingFunctor * > _ghosting_functors
 The list of all GhostingFunctor objects to be used when distributing a DistributedMesh. More...
 
std::map< GhostingFunctor *, std::shared_ptr< GhostingFunctor > > _shared_functors
 Hang on to references to any GhostingFunctor objects we were passed in shared_ptr form. More...
 
Real _point_locator_close_to_point_tol
 If nonzero, we will call PointLocatorBase::set_close_to_point_tol() on any PointLocators that we create. More...
 
const Parallel::Communicator & _communicator
 

Friends

class Partitioner
 The partitioner class is a friend so that it can set the number of partitions. More...
 
class MeshInput< MeshBase >
 The MeshInput classes are friends so that they can set the number of partitions. More...
 
class BoundaryInfo
 Make the BoundaryInfo class a friend so that it can create and interact with BoundaryMesh. More...
 
class MeshCommunication
 Make the MeshCommunication class a friend so that it can directly broadcast *_integer_names. More...
 
std::ostream & operator<< (std::ostream &os, const MeshBase &m)
 Equivalent to calling print_info() above, but now you can write: Mesh mesh; libMesh::out << mesh << std::endl;. More...
 

Detailed Description

This is the MeshBase class.

This class provides all the data necessary to describe a geometric entity. It allows for the description of a dim dimensional object that lives in LIBMESH_DIM-dimensional space.

A mesh is made of nodes and elements, and this class provides data structures to store and access both. A mesh may be partitioned into a number of subdomains, and this class provides that functionality. Furthermore, this class provides functions for reading and writing a mesh to disk in various formats.
Author
Benjamin S. Kirk
Date
2002

Base class for Mesh.

Definition at line 78 of file mesh_base.h.

Member Typedef Documentation

◆ Predicate

We need an empty, generic class to act as a predicate for this and derived mesh classes.

Definition at line 1209 of file mesh_base.h.

Constructor & Destructor Documentation

◆ MeshBase() [1/3]

libMesh::MeshBase::MeshBase ( const Parallel::Communicator &  comm_in,
unsigned char  dim = 1 
)

Constructor.

Takes dim, the dimension of the mesh. The mesh dimension can be changed (and may automatically be changed by mesh generation/loading) later.

Definition at line 52 of file mesh_base.C.

53  :
54  ParallelObject (comm_in),
55  boundary_info (new BoundaryInfo(*this)),
56  _n_parts (1),
59  _is_prepared (false),
60  _point_locator (),
62  _partitioner (),
63 #ifdef LIBMESH_ENABLE_UNIQUE_ID
65 #endif
67  _skip_all_partitioning(libMesh::on_command_line("--skip-partitioning")),
71  _default_ghosting(libmesh_make_unique<GhostPointNeighbors>(*this)),
73 {
74  _elem_dims.insert(d);
76  libmesh_assert_less_equal (LIBMESH_DIM, 3);
77  libmesh_assert_greater_equal (LIBMESH_DIM, d);
79 }

References _default_ghosting, _elem_dims, _ghosting_functors, libMesh::initialized(), and libMesh::libmesh_assert().

◆ MeshBase() [2/3]

libMesh::MeshBase::MeshBase ( const MeshBase other_mesh)

Copy-constructor.

Definition at line 83 of file mesh_base.C.

83  :
84  ParallelObject (other_mesh),
85  boundary_info (new BoundaryInfo(*this)),
86  _n_parts (other_mesh._n_parts),
87  _default_mapping_type(other_mesh._default_mapping_type),
88  _default_mapping_data(other_mesh._default_mapping_data),
89  _is_prepared (other_mesh._is_prepared),
90  _point_locator (),
91  _count_lower_dim_elems_in_point_locator(other_mesh._count_lower_dim_elems_in_point_locator),
92  _partitioner (),
93 #ifdef LIBMESH_ENABLE_UNIQUE_ID
94  _next_unique_id(other_mesh._next_unique_id),
95 #endif
97  _skip_all_partitioning(libMesh::on_command_line("--skip-partitioning")),
100  _elem_dims(other_mesh._elem_dims),
101  _spatial_dimension(other_mesh._spatial_dimension),
102  _default_ghosting(libmesh_make_unique<GhostPointNeighbors>(*this)),
103  _ghosting_functors(other_mesh._ghosting_functors),
104  _point_locator_close_to_point_tol(other_mesh._point_locator_close_to_point_tol)
105 {
106  // Make sure we don't accidentally delete the other mesh's default
107  // ghosting functor; we'll use our own if that's needed.
108  if (other_mesh._ghosting_functors.count(other_mesh._default_ghosting.get()))
109  {
110  _ghosting_functors.erase(other_mesh._default_ghosting.get());
112  }
113 
114  if (other_mesh._partitioner.get())
115  {
116  _partitioner = other_mesh._partitioner->clone();
117  }
118 }

References _default_ghosting, _ghosting_functors, and _partitioner.

◆ MeshBase() [3/3]

libMesh::MeshBase::MeshBase ( MeshBase &&  )
default

Move-constructor - this function is defaulted out-of-line (in the C file) to play nicely with our forward declarations.

◆ ~MeshBase()

libMesh::MeshBase::~MeshBase ( )
virtual

Destructor.

Definition at line 126 of file mesh_base.C.

127 {
128  this->clear();
129 
130  libmesh_exceptionless_assert (!libMesh::closed());
131 }

References clear(), and libMesh::closed().

Member Function Documentation

◆ active_element_ptr_range() [1/2]

virtual SimpleRange<const_element_iterator> libMesh::MeshBase::active_element_ptr_range ( ) const
pure virtual

◆ active_element_ptr_range() [2/2]

virtual SimpleRange<element_iterator> libMesh::MeshBase::active_element_ptr_range ( )
pure virtual

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by OverlappingTestPartitioner::_do_partition(), libMesh::MeshRefinement::_refine_elements(), libMesh::AbaqusIO::assign_sideset_ids(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_side_list_from_node_list(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::MeshTools::Modification::distort(), DMlibMeshSetSystem_libMesh(), libMesh::TecplotIO::elem_dimension(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::LocationMap< T >::fill(), libMesh::MeshTools::find_block_boundary_nodes(), libMesh::MeshTools::find_boundary_nodes(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_error_tolerance(), libMesh::MeshRefinement::flag_elements_by_mean_stddev(), libMesh::MeshTools::Modification::flatten(), libMesh::BoundaryInfo::get_side_and_node_maps(), libMesh::UNVIO::groups_in(), LinearElasticityWithContact::initialize_contact_load_paths(), libMesh::MeshTools::libmesh_assert_canonical_node_procids(), libMesh::MeshTools::libmesh_assert_valid_elem_ids(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::limit_overrefined_boundary(), libMesh::MeshRefinement::limit_underrefined_boundary(), main(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshRefinement::make_refinement_compatible(), AugmentSparsityOnInterface::mesh_reinit(), LinearElasticityWithContact::move_mesh(), libMesh::PointLocatorTree::perform_fuzzy_linear_search(), libMesh::PointLocatorTree::perform_linear_search(), libMesh::GmshIO::read_mesh(), libMesh::VariationalMeshSmoother::readgr(), libMesh::LaplaceMeshSmoother::smooth(), MeshFunctionTest::test_p_level(), MeshInputTest::testDynaReadPatch(), MeshInputTest::testExodusWriteElementDataFromDiscontinuousNodalData(), libMesh::Tree< N >::Tree(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::MeshRefinement::uniformly_p_coarsen(), libMesh::MeshRefinement::uniformly_p_refine(), libMesh::MeshRefinement::uniformly_refine(), libMesh::FroIO::write(), libMesh::PostscriptIO::write(), libMesh::TetGenIO::write(), libMesh::MEDITIO::write_ascii(), libMesh::TecplotIO::write_ascii(), libMesh::GMVIO::write_ascii_new_impl(), libMesh::GMVIO::write_ascii_old_impl(), libMesh::TecplotIO::write_binary(), libMesh::GMVIO::write_binary(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::ExodusII_IO::write_element_data_from_discontinuous_nodal_data(), libMesh::GmshIO::write_mesh(), libMesh::ExodusII_IO::write_nodal_data_discontinuous(), libMesh::GmshIO::write_post(), and libMesh::GnuPlotIO::write_solution().

◆ active_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_elements_begin ( ) const
pure virtual

◆ active_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_elements_begin ( )
pure virtual

Active, local, and negation forms of the element iterators described above.

An "active" element is an element without children (i.e. has not been refined). A "local" element is one whose processor_id() matches the current processor.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by OverlappingTestPartitioner::_do_partition(), main(), and libMesh::MeshCommunication::make_elems_parallel_consistent().

◆ active_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_elements_end ( ) const
pure virtual

◆ active_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_elements_end ( )
pure virtual

◆ active_local_element_ptr_range() [1/2]

virtual SimpleRange<const_element_iterator> libMesh::MeshBase::active_local_element_ptr_range ( ) const
pure virtual

◆ active_local_element_ptr_range() [2/2]

virtual SimpleRange<element_iterator> libMesh::MeshBase::active_local_element_ptr_range ( )
pure virtual

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshRefinement::_refine_elements(), assemble(), LinearElasticity::assemble(), assemble_1D(), AssembleOptimization::assemble_A_and_F(), assemble_biharmonic(), assemble_cd(), assemble_elasticity(), assemble_ellipticdg(), assemble_helmholtz(), assemble_laplace(), assemble_mass(), assemble_matrices(), assemble_poisson(), assemble_SchroedingerEquation(), assemble_shell(), assemble_stokes(), assemble_wave(), assembly_with_dg_fem_context(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::VTKIO::cells_to_vtk(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), compute_jacobian(), libMesh::Nemesis_IO_Helper::compute_num_global_elem_blocks(), compute_residual(), LinearElasticityWithContact::compute_stresses(), LinearElasticity::compute_stresses(), compute_stresses(), LargeDeformationElasticity::compute_stresses(), libMesh::MeshRefinement::create_parent_error_vector(), libMesh::MeshTools::find_hanging_nodes_and_parents(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::LaplaceMeshSmoother::init(), integrate_function(), LaplaceYoung::jacobian(), LargeDeformationElasticity::jacobian(), libMesh::DofMap::max_constraint_error(), libMesh::FEMSystem::mesh_position_get(), libMesh::FEMSystem::mesh_position_set(), libMesh::MeshTools::n_active_local_levels(), libMesh::PointLocatorTree::perform_fuzzy_linear_search(), libMesh::PointLocatorTree::perform_linear_search(), LaplaceYoung::residual(), LargeDeformationElasticity::residual(), LinearElasticityWithContact::residual_and_jacobian(), libMesh::MeshRefinement::test_level_one(), libMesh::MeshRefinement::test_unflagged(), DefaultCouplingTest::testCoupling(), PointNeighborCouplingTest::testCoupling(), libMesh::BoundaryVolumeSolutionTransfer::transfer_boundary_volume(), libMesh::BoundaryVolumeSolutionTransfer::transfer_volume_boundary(), libMesh::Tree< N >::Tree(), libMesh::EnsightIO::write_geometry_ascii(), libMesh::EnsightIO::write_scalar_ascii(), and libMesh::EnsightIO::write_vector_ascii().

◆ active_local_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_local_elements_begin ( ) const
pure virtual

◆ active_local_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_local_elements_begin ( )
pure virtual

◆ active_local_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_local_elements_end ( ) const
pure virtual

◆ active_local_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_local_elements_end ( )
pure virtual

◆ active_local_subdomain_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_local_subdomain_elements_begin ( subdomain_id_type  subdomain_id) const
pure virtual

◆ active_local_subdomain_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_local_subdomain_elements_begin ( subdomain_id_type  subdomain_id)
pure virtual

◆ active_local_subdomain_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_local_subdomain_elements_end ( subdomain_id_type  subdomain_id) const
pure virtual

◆ active_local_subdomain_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_local_subdomain_elements_end ( subdomain_id_type  subdomain_id)
pure virtual

◆ active_local_subdomain_elements_ptr_range() [1/2]

virtual SimpleRange<const_element_iterator> libMesh::MeshBase::active_local_subdomain_elements_ptr_range ( subdomain_id_type  subdomain_id) const
pure virtual

◆ active_local_subdomain_elements_ptr_range() [2/2]

virtual SimpleRange<element_iterator> libMesh::MeshBase::active_local_subdomain_elements_ptr_range ( subdomain_id_type  subdomain_id)
pure virtual

◆ active_nodes_begin() [1/2]

virtual const_node_iterator libMesh::MeshBase::active_nodes_begin ( ) const
pure virtual

◆ active_nodes_begin() [2/2]

virtual node_iterator libMesh::MeshBase::active_nodes_begin ( )
pure virtual

Iterate over only the active nodes in the Mesh.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ active_nodes_end() [1/2]

virtual const_node_iterator libMesh::MeshBase::active_nodes_end ( ) const
pure virtual

◆ active_nodes_end() [2/2]

virtual node_iterator libMesh::MeshBase::active_nodes_end ( )
pure virtual

◆ active_not_local_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_not_local_elements_begin ( ) const
pure virtual

◆ active_not_local_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_not_local_elements_begin ( )
pure virtual

◆ active_not_local_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_not_local_elements_end ( ) const
pure virtual

◆ active_not_local_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_not_local_elements_end ( )
pure virtual

◆ active_pid_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_pid_elements_begin ( processor_id_type  proc_id) const
pure virtual

◆ active_pid_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_pid_elements_begin ( processor_id_type  proc_id)
pure virtual

◆ active_pid_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_pid_elements_end ( processor_id_type  proc_id) const
pure virtual

◆ active_pid_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_pid_elements_end ( processor_id_type  proc_id)
pure virtual

◆ active_semilocal_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_semilocal_elements_begin ( ) const
pure virtual

◆ active_semilocal_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_semilocal_elements_begin ( )
pure virtual

◆ active_semilocal_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_semilocal_elements_end ( ) const
pure virtual

◆ active_semilocal_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_semilocal_elements_end ( )
pure virtual

◆ active_subdomain_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_subdomain_elements_begin ( subdomain_id_type  subdomain_id) const
pure virtual

◆ active_subdomain_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_subdomain_elements_begin ( subdomain_id_type  subdomain_id)
pure virtual

◆ active_subdomain_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_subdomain_elements_end ( subdomain_id_type  subdomain_id) const
pure virtual

◆ active_subdomain_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_subdomain_elements_end ( subdomain_id_type  subdomain_id)
pure virtual

◆ active_subdomain_elements_ptr_range() [1/2]

virtual SimpleRange<const_element_iterator> libMesh::MeshBase::active_subdomain_elements_ptr_range ( subdomain_id_type  subdomain_id) const
pure virtual

◆ active_subdomain_elements_ptr_range() [2/2]

virtual SimpleRange<element_iterator> libMesh::MeshBase::active_subdomain_elements_ptr_range ( subdomain_id_type  subdomain_id)
pure virtual

◆ active_subdomain_set_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_subdomain_set_elements_begin ( std::set< subdomain_id_type ss) const
pure virtual

◆ active_subdomain_set_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_subdomain_set_elements_begin ( std::set< subdomain_id_type ss)
pure virtual

◆ active_subdomain_set_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_subdomain_set_elements_end ( std::set< subdomain_id_type ss) const
pure virtual

◆ active_subdomain_set_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_subdomain_set_elements_end ( std::set< subdomain_id_type ss)
pure virtual

◆ active_subdomain_set_elements_ptr_range() [1/2]

virtual SimpleRange<const_element_iterator> libMesh::MeshBase::active_subdomain_set_elements_ptr_range ( std::set< subdomain_id_type ss) const
pure virtual

◆ active_subdomain_set_elements_ptr_range() [2/2]

virtual SimpleRange<element_iterator> libMesh::MeshBase::active_subdomain_set_elements_ptr_range ( std::set< subdomain_id_type ss)
pure virtual

◆ active_type_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_type_elements_begin ( ElemType  type) const
pure virtual

◆ active_type_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_type_elements_begin ( ElemType  type)
pure virtual

◆ active_type_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_type_elements_end ( ElemType  type) const
pure virtual

◆ active_type_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_type_elements_end ( ElemType  type)
pure virtual

◆ active_unpartitioned_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_unpartitioned_elements_begin ( ) const
pure virtual

◆ active_unpartitioned_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::active_unpartitioned_elements_begin ( )
pure virtual

Iterate over active unpartitioned elements in the Mesh.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ active_unpartitioned_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::active_unpartitioned_elements_end ( ) const
pure virtual

◆ active_unpartitioned_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::active_unpartitioned_elements_end ( )
pure virtual

◆ add_elem()

virtual Elem* libMesh::MeshBase::add_elem ( Elem e)
pure virtual

Add elem e to the end of the element array.

To add an element locally, set e->processor_id() before adding it. To ensure a specific element id, call e->set_id() before adding it; only do this in parallel if you are manually keeping ids consistent.

Users should call MeshBase::prepare_for_use() after elements are added to and/or deleted from the mesh.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::GMVIO::_read_one_cell(), libMesh::MeshTools::Subdivision::add_boundary_ghosts(), LinearElasticityWithContact::add_contact_edge_elements(), add_cube_convex_hull_to_mesh(), libMesh::MeshRefinement::add_elem(), libMesh::BoundaryInfo::add_elements(), libMesh::MeshTools::Modification::all_tri(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::TriangleWrapper::copy_tri_to_mesh(), libMesh::UnstructuredMesh::create_submesh(), libMesh::TetGenIO::element_in(), libMesh::UNVIO::elements_in(), libMesh::MeshTools::Modification::flatten(), libMesh::mesh_inserter_iterator< T >::operator=(), libMesh::TetGenMeshInterface::pointset_convexhull(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::VTKIO::read(), libMesh::CheckpointIO::read_connectivity(), libMesh::AbaqusIO::read_elements(), libMesh::UCDIO::read_implementation(), libMesh::DynaIO::read_mesh(), libMesh::GmshIO::read_mesh(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::OFFIO::read_stream(), libMesh::MatlabIO::read_stream(), SystemsTest::testDofCouplingWithVarGroups(), EquationSystemsTest::testPostInitAddElem(), SystemsTest::testProjectMatrix3D(), EquationSystemsTest::testReinitWithNodeElem(), BoundaryInfoTest::testShellFaceConstraints(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and libMesh::TetGenMeshInterface::triangulate_pointset().

◆ add_elem_data()

template<typename T >
std::vector< unsigned int > libMesh::MeshBase::add_elem_data ( const std::vector< std::string > &  names,
bool  allocate_data = true 
)
inline

Register data (of type T) to be added to each element in the mesh.

If the mesh already has elements, data is allocated in each.

Returns
The starting index number for the new data, or for the existing data if one by the same name has already been added.

If type T is larger than dof_id_type, each datum will end up spanning multiple index values, but will be queried with the starting index number.

No type checking is done with this function! If you add data of type T, don't try to access it with a call specifying type U.

Definition at line 1992 of file mesh_base.h.

1994 {
1995  std::vector<unsigned int> returnval(names.size());
1996 
1997  const std::size_t old_size = _elem_integer_names.size();
1998 
1999  for (auto i : index_range(names))
2000  returnval[i] = this->add_elem_datum<T>(names[i], false);
2001 
2002  if (allocate_data && old_size != _elem_integer_names.size())
2003  this->size_elem_extra_integers();
2004 
2005  return returnval;
2006 }

References _elem_integer_names, libMesh::index_range(), and size_elem_extra_integers().

◆ add_elem_datum()

template<typename T >
unsigned int libMesh::MeshBase::add_elem_datum ( const std::string &  name,
bool  allocate_data = true 
)
inline

Register a datum (of type T) to be added to each element in the mesh.

If the mesh already has elements, data by default is allocated in each of them. This may be expensive to do repeatedly; use add_elem_data instead.

Returns
The index numbers for the new data, and/or for existing data if data by some of the same names has already been added.

If type T is larger than dof_id_type, its data will end up spanning multiple index values, but will be queried with the starting index number.

No type checking is done with this function! If you add data of type T, don't try to access it with a call specifying type U.

Definition at line 1973 of file mesh_base.h.

1975 {
1976  const std::size_t old_size = _elem_integer_names.size();
1977 
1978  unsigned int start_idx = this->add_elem_integer(name, false);
1979  unsigned int n_more_integers = (sizeof(T)-1)/sizeof(dof_id_type);
1980  for (unsigned int i=0; i != n_more_integers; ++i)
1981  this->add_elem_integer(name+"__"+std::to_string(i));
1982 
1983  if (allocate_data && old_size != _elem_integer_names.size())
1984  this->size_elem_extra_integers();
1985 
1986  return start_idx;
1987 }

References _elem_integer_names, add_elem_integer(), and size_elem_extra_integers().

Referenced by ExtraIntegersTest::build_mesh().

◆ add_elem_integer()

unsigned int libMesh::MeshBase::add_elem_integer ( const std::string &  name,
bool  allocate_data = true 
)

Register an integer datum (of type dof_id_type) to be added to each element in the mesh.

If the mesh already has elements, data by default is allocated in each of them. This may be expensive to do repeatedly; use add_elem_integers instead.

Returns
The index number for the new datum, or for the existing datum if one by the same name has already been added.

Definition at line 176 of file mesh_base.C.

178 {
179  for (auto i : index_range(_elem_integer_names))
180  if (_elem_integer_names[i] == name)
181  return i;
182 
183  _elem_integer_names.push_back(name);
184  if (allocate_data)
185  this->size_elem_extra_integers();
186  return _elem_integer_names.size()-1;
187 }

References _elem_integer_names, libMesh::index_range(), libMesh::Quality::name(), and size_elem_extra_integers().

Referenced by add_elem_datum(), ExtraIntegersTest::build_mesh(), ExtraIntegersTest::checkpoint_helper(), libMesh::CheckpointIO::read_header(), and ExtraIntegersTest::test_helper().

◆ add_elem_integers()

std::vector< unsigned int > libMesh::MeshBase::add_elem_integers ( const std::vector< std::string > &  names,
bool  allocate_data = true 
)

Register integer data (of type dof_id_type) to be added to each element in the mesh, one string name for each new integer.

If the mesh already has elements, data by default is allocated in each of them.

Returns
The index numbers for the new data, and/or for existing data if data by some of the same names has already been added.

Definition at line 191 of file mesh_base.C.

193 {
194  std::unordered_map<std::string, std::size_t> name_indices;
195  for (auto i : index_range(_elem_integer_names))
196  name_indices[_elem_integer_names[i]] = i;
197 
198  std::vector<unsigned int> returnval(names.size());
199 
200  bool added_an_integer = false;
201  for (auto i : index_range(names))
202  {
203  const std::string & name = names[i];
204  auto it = name_indices.find(name);
205  if (it != name_indices.end())
206  returnval[i] = it->second;
207  else
208  {
209  returnval[i] = _elem_integer_names.size();
210  name_indices[name] = returnval[i];
211  _elem_integer_names.push_back(name);
212  added_an_integer = true;
213  }
214  }
215 
216  if (allocate_data && added_an_integer)
217  this->size_elem_extra_integers();
218 
219  return returnval;
220 }

References _elem_integer_names, libMesh::index_range(), and libMesh::Quality::name().

Referenced by MeshStitchTest::testMeshStitch().

◆ add_ghosting_functor() [1/2]

void libMesh::MeshBase::add_ghosting_functor ( GhostingFunctor ghosting_functor)
inline

Adds a functor which can specify ghosting requirements for use on distributed meshes.

Multiple ghosting functors can be added; any element which is required by any functor will be ghosted.

GhostingFunctor memory must be managed by the code which calls this function; the GhostingFunctor lifetime is expected to extend until either the functor is removed or the Mesh is destructed.

Definition at line 1089 of file mesh_base.h.

1090  { _ghosting_functors.insert(&ghosting_functor); }

References _ghosting_functors.

Referenced by libMesh::DofMap::add_algebraic_ghosting_functor(), libMesh::DofMap::add_coupling_functor(), add_ghosting_functor(), main(), and EquationSystemsTest::testDisableDefaultGhosting().

◆ add_ghosting_functor() [2/2]

void libMesh::MeshBase::add_ghosting_functor ( std::shared_ptr< GhostingFunctor ghosting_functor)
inline

Adds a functor which can specify ghosting requirements for use on distributed meshes.

Multiple ghosting functors can be added; any element which is required by any functor will be ghosted.

GhostingFunctor memory when using this method is managed by the shared_ptr mechanism.

Definition at line 1100 of file mesh_base.h.

1101  { _shared_functors[ghosting_functor.get()] = ghosting_functor;
1102  this->add_ghosting_functor(*ghosting_functor); }

References _shared_functors, and add_ghosting_functor().

◆ add_node()

virtual Node* libMesh::MeshBase::add_node ( Node n)
pure virtual

Add Node n to the end of the vertex array.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ add_node_data()

template<typename T >
std::vector< unsigned int > libMesh::MeshBase::add_node_data ( const std::vector< std::string > &  name,
bool  allocate_data = true 
)
inline

Register data (of type T) to be added to each node in the mesh.

If the mesh already has nodes, data by default is allocated in each.

Returns
The starting index number for the new data, or for the existing data if one by the same name has already been added.

If type T is larger than dof_id_type, its data will end up spanning multiple index values, but will be queried with the starting index number.

No type checking is done with this function! If you add data of type T, don't try to access it with a call specifying type U.

Definition at line 2030 of file mesh_base.h.

2032 {
2033  std::vector<unsigned int> returnval(names.size());
2034 
2035  const std::size_t old_size = _node_integer_names.size();
2036 
2037  for (auto i : index_range(names))
2038  returnval[i] = this->add_node_datum<T>(names[i], false);
2039 
2040  if (allocate_data && old_size != _node_integer_names.size())
2041  this->size_node_extra_integers();
2042 
2043  return returnval;
2044 }

References _node_integer_names, libMesh::index_range(), and size_node_extra_integers().

◆ add_node_datum()

template<typename T >
unsigned int libMesh::MeshBase::add_node_datum ( const std::string &  name,
bool  allocate_data = true 
)
inline

Register a datum (of type T) to be added to each node in the mesh.

If the mesh already has nodes, data by default is allocated in each of them. This may be expensive to do repeatedly; use add_node_data instead.

Returns
The starting index number for the new datum, or for the existing datum if one by the same name has already been added.

If type T is larger than dof_id_type, its data will end up spanning multiple index values, but will be queried with the starting index number.

No type checking is done with this function! If you add data of type T, don't try to access it with a call specifying type U.

Definition at line 2011 of file mesh_base.h.

2013 {
2014  const std::size_t old_size = _node_integer_names.size();
2015 
2016  unsigned int start_idx = this->add_node_integer(name, false);
2017  unsigned int n_more_integers = (sizeof(T)-1)/sizeof(dof_id_type);
2018  for (unsigned int i=0; i != n_more_integers; ++i)
2019  this->add_node_integer(name+"__"+std::to_string(i), false);
2020 
2021  if (allocate_data && old_size != _node_integer_names.size())
2022  this->size_node_extra_integers();
2023 
2024  return start_idx;
2025 }

References _node_integer_names, add_node_integer(), and size_node_extra_integers().

Referenced by ExtraIntegersTest::build_mesh(), libMesh::DynaIO::read_mesh(), RationalMapTest< elem_type >::setUp(), and FETest< order, family, elem_type >::setUp().

◆ add_node_integer()

unsigned int libMesh::MeshBase::add_node_integer ( const std::string &  name,
bool  allocate_data = true 
)

Register an integer datum (of type dof_id_type) to be added to each node in the mesh.

If the mesh already has nodes, data by default is allocated in each of them. This may be expensive to do repeatedly; use add_node_integers instead.

Returns
The index number for the new datum, or for the existing datum if one by the same name has already been added.

Definition at line 247 of file mesh_base.C.

249 {
250  for (auto i : index_range(_node_integer_names))
251  if (_node_integer_names[i] == name)
252  return i;
253 
254  _node_integer_names.push_back(name);
255  if (allocate_data)
256  this->size_node_extra_integers();
257  return _node_integer_names.size()-1;
258 }

References libMesh::index_range(), and libMesh::Quality::name().

Referenced by add_node_datum(), ExtraIntegersTest::build_mesh(), ExtraIntegersTest::checkpoint_helper(), libMesh::CheckpointIO::read_header(), RationalMapTest< elem_type >::setUp(), FETest< order, family, elem_type >::setUp(), and ExtraIntegersTest::test_helper().

◆ add_node_integers()

std::vector< unsigned int > libMesh::MeshBase::add_node_integers ( const std::vector< std::string > &  names,
bool  allocate_data = true 
)

Register integer data (of type dof_id_type) to be added to each node in the mesh.

If the mesh already has nodes, data by default is allocated in each.

Returns
The index numbers for the new data, and/or for existing data if data by some of the same names has already been added.

Definition at line 262 of file mesh_base.C.

264 {
265  std::unordered_map<std::string, std::size_t> name_indices;
266  for (auto i : index_range(_node_integer_names))
267  name_indices[_node_integer_names[i]] = i;
268 
269  std::vector<unsigned int> returnval(names.size());
270 
271  bool added_an_integer = false;
272  for (auto i : index_range(names))
273  {
274  const std::string & name = names[i];
275  auto it = name_indices.find(name);
276  if (it != name_indices.end())
277  returnval[i] = it->second;
278  else
279  {
280  returnval[i] = _node_integer_names.size();
281  name_indices[name] = returnval[i];
282  _node_integer_names.push_back(name);
283  added_an_integer = true;
284  }
285  }
286 
287  if (allocate_data && added_an_integer)
288  this->size_node_extra_integers();
289 
290  return returnval;
291 }

References libMesh::index_range(), and libMesh::Quality::name().

Referenced by MeshStitchTest::testMeshStitch().

◆ add_point()

virtual Node* libMesh::MeshBase::add_point ( const Point p,
const dof_id_type  id = DofObject::invalid_id,
const processor_id_type  proc_id = DofObject::invalid_processor_id 
)
pure virtual

Add a new Node at Point p to the end of the vertex array, with processor_id procid.

Use DofObject::invalid_processor_id (default) to add a node to all processors, or this->processor_id() to add a node to the local processor only. If adding a node locally, passing an id other than DofObject::invalid_id will set that specific node id. Only do this in parallel if you are manually keeping ids consistent.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshTools::Subdivision::add_boundary_ghosts(), add_cube_convex_hull_to_mesh(), libMesh::MeshRefinement::add_node(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::TriangleWrapper::copy_tri_to_mesh(), libMesh::UnstructuredMesh::create_submesh(), libMesh::TetGenIO::node_in(), libMesh::UNVIO::nodes_in(), libMesh::mesh_inserter_iterator< T >::operator=(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::VTKIO::read(), libMesh::UCDIO::read_implementation(), libMesh::DynaIO::read_mesh(), libMesh::GmshIO::read_mesh(), libMesh::AbaqusIO::read_nodes(), libMesh::CheckpointIO::read_nodes(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::OFFIO::read_stream(), libMesh::MatlabIO::read_stream(), libMesh::BoundaryInfo::sync(), SystemsTest::testDofCouplingWithVarGroups(), SystemsTest::testProjectMatrix3D(), BoundaryInfoTest::testShellFaceConstraints(), libMesh::TriangleInterface::triangulate(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and triangulate_domain().

◆ all_first_order()

virtual void libMesh::MeshBase::all_first_order ( )
pure virtual

Converts a mesh with higher-order elements into a mesh with linear elements.

For example, a mesh consisting of Tet10 will be converted to a mesh with Tet4 etc.

Implemented in libMesh::UnstructuredMesh.

Referenced by main().

◆ all_second_order()

virtual void libMesh::MeshBase::all_second_order ( const bool  full_ordered = true)
pure virtual

Converts a (conforming, non-refined) mesh with linear elements into a mesh with second-order elements.

For example, a mesh consisting of Tet4 will be converted to a mesh with Tet10 etc.

Note
For some elements like Hex8 there exist two higher order equivalents, Hex20 and Hex27. When full_ordered is true (default), then Hex27 is built. Otherwise, Hex20 is built. The same holds obviously for Quad4, Prism6, etc.

Implemented in libMesh::UnstructuredMesh.

Referenced by AllSecondOrderTest::allSecondOrder(), build_domain(), and main().

◆ allgather()

virtual void libMesh::MeshBase::allgather ( )
inlinevirtual

Gathers all elements and nodes of the mesh onto every processor.

Reimplemented in libMesh::DistributedMesh.

Definition at line 188 of file mesh_base.h.

188 {}

Referenced by libMesh::EquationSystems::allgather(), libMesh::MeshSerializer::MeshSerializer(), and PartitionerTest< PartitionerSubclass, MeshClass >::testPartition().

◆ allow_remote_element_removal() [1/2]

bool libMesh::MeshBase::allow_remote_element_removal ( ) const
inline

◆ allow_remote_element_removal() [2/2]

void libMesh::MeshBase::allow_remote_element_removal ( bool  allow)
inline

If false is passed in then this mesh will no longer have remote elements deleted when being prepared for use; i.e.

even a DistributedMesh will remain (if it is already) serialized. This may adversely affect performance and memory use.

Definition at line 1034 of file mesh_base.h.

1034 { _allow_remote_element_removal = allow; }

References _allow_remote_element_removal.

Referenced by libMesh::DynaIO::add_spline_constraints(), AllSecondOrderTest::allSecondOrder(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), main(), MeshInputTest::testDynaReadElem(), and MeshInputTest::testDynaReadPatch().

◆ allow_renumbering() [1/2]

bool libMesh::MeshBase::allow_renumbering ( ) const
inline

◆ allow_renumbering() [2/2]

void libMesh::MeshBase::allow_renumbering ( bool  allow)
inline

If false is passed in then this mesh will no longer be renumbered when being prepared for use.

This may slightly adversely affect performance during subsequent element access, particularly when using a distributed mesh.

Important! When allow_renumbering(false) is set, ReplicatedMesh::n_elem() and ReplicatedMesh::n_nodes() will return wrong values whenever adaptive refinement is followed by adaptive coarsening. (Uniform refinement followed by uniform coarsening is OK.) This is due to the fact that n_elem() and n_nodes() are currently O(1) functions that just return the size of the respective underlying vectors, and this size is wrong when the numbering includes "gaps" from nodes and elements that have been deleted. We plan to implement a caching mechanism in the near future that will fix this incorrect behavior.

Definition at line 1025 of file mesh_base.h.

References _skip_renumber_nodes_and_elements.

Referenced by libMesh::DynaIO::add_spline_constraints(), GetBoundaryPointsTest::build_mesh(), SlitMeshTest::build_mesh(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), main(), libMesh::RBEIMEvaluation::RBEIMEvaluation(), libMesh::NameBasedIO::read(), libMesh::GMVIO::read(), MeshInputTest::testDynaReadElem(), MeshInputTest::testDynaReadPatch(), SystemsTest::testProjectMatrix1D(), SystemsTest::testProjectMatrix2D(), SystemsTest::testProjectMatrix3D(), EquationSystemsTest::testRefineThenReinitPreserveFlags(), EquationSystemsTest::testRepartitionThenReinit(), WriteSidesetData::testWrite(), and WriteVecAndScalar::testWrite().

◆ ancestor_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::ancestor_elements_begin ( ) const
pure virtual

◆ ancestor_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::ancestor_elements_begin ( )
pure virtual

Iterate over elements for which elem->ancestor() is true.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshRefinement::make_coarsening_compatible(), and libMesh::MeshRefinement::uniformly_coarsen().

◆ ancestor_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::ancestor_elements_end ( ) const
pure virtual

◆ ancestor_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::ancestor_elements_end ( )
pure virtual

◆ bid_nodes_begin() [1/2]

virtual const_node_iterator libMesh::MeshBase::bid_nodes_begin ( boundary_id_type  bndry_id) const
pure virtual

◆ bid_nodes_begin() [2/2]

virtual node_iterator libMesh::MeshBase::bid_nodes_begin ( boundary_id_type  bndry_id)
pure virtual

Iterate over nodes for which BoundaryInfo::has_boundary_id(node, bndry_id) is true.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ bid_nodes_end() [1/2]

virtual const_node_iterator libMesh::MeshBase::bid_nodes_end ( boundary_id_type  bndry_id) const
pure virtual

◆ bid_nodes_end() [2/2]

virtual node_iterator libMesh::MeshBase::bid_nodes_end ( boundary_id_type  bndry_id)
pure virtual

◆ bnd_nodes_begin() [1/2]

virtual const_node_iterator libMesh::MeshBase::bnd_nodes_begin ( ) const
pure virtual

◆ bnd_nodes_begin() [2/2]

virtual node_iterator libMesh::MeshBase::bnd_nodes_begin ( )
pure virtual

Iterate over nodes for which BoundaryInfo::n_boundary_ids(node) > 0.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ bnd_nodes_end() [1/2]

virtual const_node_iterator libMesh::MeshBase::bnd_nodes_end ( ) const
pure virtual

◆ bnd_nodes_end() [2/2]

virtual node_iterator libMesh::MeshBase::bnd_nodes_end ( )
pure virtual

◆ cache_elem_dims()

void libMesh::MeshBase::cache_elem_dims ( )

Search the mesh and cache the different dimensions of the elements present in the mesh.

This is done in prepare_for_use(), but can be done manually by other classes after major mesh modifications.

Definition at line 753 of file mesh_base.C.

754 {
755  // This requires an inspection on every processor
756  parallel_object_only();
757 
758  // Need to clear _elem_dims first in case all elements of a
759  // particular dimension have been deleted.
760  _elem_dims.clear();
761 
762  for (const auto & elem : this->active_element_ptr_range())
763  _elem_dims.insert(cast_int<unsigned char>(elem->dim()));
764 
765  // Some different dimension elements may only live on other processors
766  this->comm().set_union(_elem_dims);
767 
768  // If the largest element dimension found is larger than the current
769  // _spatial_dimension, increase _spatial_dimension.
770  unsigned int max_dim = this->mesh_dimension();
771  if (max_dim > _spatial_dimension)
772  _spatial_dimension = cast_int<unsigned char>(max_dim);
773 
774  // _spatial_dimension may need to increase from 1->2 or 2->3 if the
775  // mesh is full of 1D elements but they are not x-aligned, or the
776  // mesh is full of 2D elements but they are not in the x-y plane.
777  // If the mesh is x-aligned or x-y planar, we will end up checking
778  // every node's coordinates and not breaking out of the loop
779  // early...
780 #if LIBMESH_DIM > 1
781  if (_spatial_dimension < 3)
782  {
783  for (const auto & node : this->node_ptr_range())
784  {
785  // Note: the exact floating point comparison is intentional,
786  // we don't want to get tripped up by tolerances.
787  if ((*node)(1) != 0.)
788  {
789  _spatial_dimension = 2;
790 #if LIBMESH_DIM == 2
791  // If libmesh is compiled in 2D mode, this is the
792  // largest spatial dimension possible so we can break
793  // out.
794  break;
795 #endif
796  }
797 
798 #if LIBMESH_DIM > 2
799  if ((*node)(2) != 0.)
800  {
801  // Spatial dimension can't get any higher than this, so
802  // we can break out.
803  _spatial_dimension = 3;
804  break;
805  }
806 #endif
807  }
808  }
809 #endif // LIBMESH_DIM > 1
810 }

Referenced by set_elem_dimensions().

◆ clear()

void libMesh::MeshBase::clear ( )
virtual

Deletes all the element and node data that is currently stored.

elem and node extra_integer data is nevertheless retained here, for better compatibility between that feature and older code's use of MeshBase::clear()

Reimplemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Definition at line 429 of file mesh_base.C.

430 {
431  // Reset the number of partitions
432  _n_parts = 1;
433 
434  // Reset the _is_prepared flag
435  _is_prepared = false;
436 
437  // Clear boundary information
438  if (boundary_info)
439  boundary_info->clear();
440 
441  // Clear element dimensions
442  _elem_dims.clear();
443 
444  // Clear our point locator.
445  this->clear_point_locator();
446 }

Referenced by libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::ReplicatedMesh::clear(), libMesh::DistributedMesh::clear(), libMesh::TriangleWrapper::copy_tri_to_mesh(), libMesh::UnstructuredMesh::create_submesh(), libMesh::AbaqusIO::read(), libMesh::ExodusII_IO::read(), libMesh::GMVIO::read(), libMesh::VTKIO::read(), libMesh::DynaIO::read_mesh(), libMesh::GmshIO::read_mesh(), libMesh::OFFIO::read_stream(), libMesh::MatlabIO::read_stream(), libMesh::BoundaryInfo::sync(), libMesh::TriangleInterface::triangulate(), and ~MeshBase().

◆ clear_point_locator()

void libMesh::MeshBase::clear_point_locator ( )

Releases the current PointLocator object.

Definition at line 696 of file mesh_base.C.

697 {
698  _point_locator.reset(nullptr);
699 }

Referenced by libMesh::UnstructuredMesh::contract(), and libMesh::MeshCommunication::delete_remote_elements().

◆ clone()

virtual std::unique_ptr<MeshBase> libMesh::MeshBase::clone ( ) const
pure virtual

◆ comm()

const Parallel::Communicator& libMesh::ParallelObject::comm ( ) const
inlineinherited
Returns
A reference to the Parallel::Communicator object used by this mesh.

Definition at line 94 of file parallel_object.h.

95  { return _communicator; }

References libMesh::ParallelObject::_communicator.

Referenced by libMesh::__libmesh_petsc_diff_solver_jacobian(), libMesh::__libmesh_petsc_diff_solver_monitor(), libMesh::__libmesh_petsc_diff_solver_residual(), libMesh::__libmesh_tao_equality_constraints(), libMesh::__libmesh_tao_equality_constraints_jacobian(), libMesh::__libmesh_tao_gradient(), libMesh::__libmesh_tao_hessian(), libMesh::__libmesh_tao_inequality_constraints(), libMesh::__libmesh_tao_inequality_constraints_jacobian(), libMesh::__libmesh_tao_objective(), libMesh::MeshRefinement::_coarsen_elements(), libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::BoundaryInfo::_find_id_maps(), libMesh::PetscLinearSolver< Number >::_petsc_shell_matrix_get_diagonal(), libMesh::SlepcEigenSolver< libMesh::Number >::_petsc_shell_matrix_get_diagonal(), libMesh::PetscLinearSolver< Number >::_petsc_shell_matrix_mult(), libMesh::SlepcEigenSolver< libMesh::Number >::_petsc_shell_matrix_mult(), libMesh::PetscLinearSolver< Number >::_petsc_shell_matrix_mult_add(), libMesh::EquationSystems::_read_impl(), libMesh::MeshRefinement::_refine_elements(), libMesh::MeshRefinement::_smooth_flags(), libMesh::DofMap::add_constraints_to_send_list(), add_cube_convex_hull_to_mesh(), libMesh::PetscDMWrapper::add_dofs_helper(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::TransientRBConstruction::add_IC_to_RB_space(), libMesh::ImplicitSystem::add_matrix(), libMesh::RBConstruction::add_scaled_matrix_and_vector(), libMesh::DynaIO::add_spline_constraints(), libMesh::System::add_vector(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::LaplaceMeshSmoother::allgather_graph(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::TransientRBConstruction::allocate_data_structures(), libMesh::RBConstruction::allocate_data_structures(), libMesh::TransientRBConstruction::assemble_affine_expansion(), libMesh::FEMSystem::assemble_qoi(), libMesh::MeshCommunication::assign_global_indices(), libMesh::DofMap::attach_matrix(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::PetscDMWrapper::build_section(), libMesh::PetscDMWrapper::build_sf(), libMesh::System::calculate_norm(), libMesh::DofMap::check_dirichlet_bcid_consistency(), libMesh::RBConstruction::compute_Fq_representor_innerprods(), libMesh::RBConstruction::compute_max_error_bound(), libMesh::Nemesis_IO_Helper::compute_num_global_elem_blocks(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::RBConstruction::compute_output_dual_innerprods(), libMesh::RBConstruction::compute_residual_dual_norm_slow(), libMesh::RBSCMConstruction::compute_SCM_bounds_on_training_set(), libMesh::Problem_Interface::computeF(), libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), libMesh::ExodusII_IO::copy_elemental_solution(), libMesh::ExodusII_IO::copy_scalar_solution(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::MeshTools::create_bounding_box(), libMesh::DofMap::create_dof_constraints(), libMesh::MeshTools::create_nodal_bounding_box(), libMesh::MeshRefinement::create_parent_error_vector(), libMesh::MeshTools::create_processor_bounding_box(), libMesh::MeshTools::create_subdomain_bounding_box(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::DofMap::distribute_dofs(), DMlibMeshFunction(), DMlibMeshJacobian(), DMlibMeshSetSystem_libMesh(), DMVariableBounds_libMesh(), libMesh::DTKSolutionTransfer::DTKSolutionTransfer(), libMesh::MeshRefinement::eliminate_unrefined_patches(), libMesh::RBEIMConstruction::enrich_RB_space(), libMesh::TransientRBConstruction::enrich_RB_space(), libMesh::RBConstruction::enrich_RB_space(), libMesh::EpetraVector< T >::EpetraVector(), AssembleOptimization::equality_constraints(), libMesh::WeightedPatchRecoveryErrorEstimator::estimate_error(), libMesh::PatchRecoveryErrorEstimator::estimate_error(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::RBEIMConstruction::evaluate_mesh_function(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_error_fraction(), libMesh::MeshRefinement::flag_elements_by_error_tolerance(), libMesh::MeshRefinement::flag_elements_by_mean_stddev(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::DofMap::gather_constraints(), libMesh::MeshfreeInterpolation::gather_remote_data(), libMesh::CondensedEigenSystem::get_eigenpair(), libMesh::DofMap::get_info(), libMesh::ImplicitSystem::get_linear_solver(), AssembleOptimization::inequality_constraints(), AssembleOptimization::inequality_constraints_jacobian(), libMesh::LocationMap< T >::init(), libMesh::TimeSolver::init(), libMesh::SystemSubsetBySubdomain::init(), libMesh::PetscDMWrapper::init_and_attach_petscdm(), libMesh::EigenSystem::init_matrices(), libMesh::OptimizationSystem::initialize_equality_constraints_storage(), libMesh::OptimizationSystem::initialize_inequality_constraints_storage(), libMesh::RBEIMConstruction::initialize_rb_construction(), integrate_function(), libMesh::MeshTools::libmesh_assert_consistent_distributed(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_new_node_procids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_topology_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), libMesh::MeshTools::libmesh_assert_valid_dof_ids(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_flags(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_object_ids(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_p_levels(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::MeshTools::libmesh_assert_valid_unique_ids(), libMesh::libmesh_petsc_preconditioner_apply(), libMesh::libmesh_petsc_snes_fd_residual(), libMesh::libmesh_petsc_snes_jacobian(), libMesh::libmesh_petsc_snes_mffd_residual(), libMesh::libmesh_petsc_snes_postcheck(), libMesh::libmesh_petsc_snes_residual(), libMesh::libmesh_petsc_snes_residual_helper(), libMesh::MeshRefinement::limit_level_mismatch_at_edge(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), libMesh::MeshRefinement::limit_overrefined_boundary(), libMesh::MeshRefinement::limit_underrefined_boundary(), main(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshCommunication::make_elems_parallel_consistent(), libMesh::MeshRefinement::make_flags_parallel_consistent(), libMesh::MeshCommunication::make_new_node_proc_ids_parallel_consistent(), libMesh::MeshCommunication::make_new_nodes_parallel_consistent(), libMesh::MeshCommunication::make_node_ids_parallel_consistent(), libMesh::MeshCommunication::make_node_proc_ids_parallel_consistent(), libMesh::MeshCommunication::make_node_unique_ids_parallel_consistent(), libMesh::MeshCommunication::make_nodes_parallel_consistent(), libMesh::MeshCommunication::make_p_levels_parallel_consistent(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::TransientRBConstruction::mass_matrix_scaled_matvec(), libMesh::FEMSystem::mesh_position_set(), LinearElasticityWithContact::move_mesh(), libMesh::DistributedMesh::n_active_elem(), libMesh::MeshTools::n_active_levels(), libMesh::BoundaryInfo::n_boundary_conds(), libMesh::DofMap::n_constrained_dofs(), libMesh::BoundaryInfo::n_edge_conds(), libMesh::CondensedEigenSystem::n_global_non_condensed_dofs(), libMesh::MeshTools::n_levels(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::MeshTools::n_p_levels(), libMesh::BoundaryInfo::n_shellface_conds(), libMesh::DistributedMesh::parallel_max_elem_id(), libMesh::DistributedMesh::parallel_max_node_id(), libMesh::ReplicatedMesh::parallel_max_unique_id(), libMesh::DistributedMesh::parallel_max_unique_id(), libMesh::DistributedMesh::parallel_n_elem(), libMesh::DistributedMesh::parallel_n_nodes(), libMesh::SparsityPattern::Build::parallel_sync(), libMesh::MeshTools::paranoid_n_levels(), libMesh::petsc_auto_fieldsplit(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::DofMap::print_dof_constraints(), FEMParameters::read(), libMesh::Nemesis_IO::read(), libMesh::XdrIO::read(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::System::read_header(), libMesh::RBEvaluation::read_in_vectors_from_multiple_files(), libMesh::System::read_legacy_data(), libMesh::TransientRBConstruction::read_riesz_representors_from_files(), libMesh::RBConstruction::read_riesz_representors_from_files(), libMesh::System::read_SCALAR_dofs(), libMesh::XdrIO::read_serialized_bc_names(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::XdrIO::read_serialized_subdomain_names(), libMesh::System::read_serialized_vector(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::DistributedMesh::renumber_dof_objects(), LinearElasticityWithContact::residual_and_jacobian(), OverlappingAlgebraicGhostingTest::run_ghosting_test(), OverlappingCouplingGhostingTest::run_sparsity_pattern_test(), libMesh::DofMap::scatter_constraints(), libMesh::CheckpointIO::select_split_config(), libMesh::TransientRBConstruction::set_error_temporal_data(), libMesh::RBEIMConstruction::set_explicit_sys_subvector(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::PetscDiffSolver::setup_petsc_data(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::split_mesh(), libMesh::BoundaryInfo::sync(), libMesh::MeshRefinement::test_level_one(), MeshfunctionDFEM::test_mesh_function_dfem(), MeshfunctionDFEM::test_mesh_function_dfem_grad(), MeshFunctionTest::test_p_level(), libMesh::MeshRefinement::test_unflagged(), SystemsTest::testBlockRestrictedVarNDofs(), PointLocatorTest::testLocator(), BoundaryInfoTest::testMesh(), SystemsTest::testProjectCubeWithMeshFunction(), CheckpointIOTest::testSplitter(), libMesh::MeshTools::total_weight(), libMesh::MeshFunctionSolutionTransfer::transfer(), libMesh::MeshfreeSolutionTransfer::transfer(), libMesh::TransientRBConstruction::truth_assembly(), libMesh::RBConstruction::truth_assembly(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::TransientRBConstruction::update_RB_initial_condition_all_N(), libMesh::RBEIMConstruction::update_RB_system_matrices(), libMesh::TransientRBConstruction::update_RB_system_matrices(), libMesh::RBConstruction::update_RB_system_matrices(), libMesh::TransientRBConstruction::update_residual_terms(), libMesh::RBConstruction::update_residual_terms(), libMesh::NameBasedIO::write(), libMesh::XdrIO::write(), libMesh::VTKIO::write_nodal_data(), libMesh::RBEvaluation::write_out_vectors(), libMesh::TransientRBConstruction::write_riesz_representors_to_files(), libMesh::RBConstruction::write_riesz_representors_to_files(), libMesh::System::write_SCALAR_dofs(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::XdrIO::write_serialized_nodes(), libMesh::XdrIO::write_serialized_nodesets(), libMesh::RBDataSerialization::RBEvaluationSerialization::write_to_file(), libMesh::RBDataSerialization::TransientRBEvaluationSerialization::write_to_file(), libMesh::RBDataSerialization::RBEIMEvaluationSerialization::write_to_file(), and libMesh::RBDataSerialization::RBSCMEvaluationSerialization::write_to_file().

◆ contract()

virtual bool libMesh::MeshBase::contract ( )
pure virtual

Delete subactive (i.e.

children of coarsened) elements. This removes all elements descended from currently active elements in the mesh.

Implemented in libMesh::UnstructuredMesh.

Referenced by libMesh::EquationSystems::reinit_solutions().

◆ default_ghosting()

GhostingFunctor& libMesh::MeshBase::default_ghosting ( )
inline

Default ghosting functor.

Definition at line 1125 of file mesh_base.h.

1125 { return *_default_ghosting; }

References _default_ghosting.

◆ default_mapping_data()

unsigned char libMesh::MeshBase::default_mapping_data ( ) const
inline

Returns any default data value used by the master space to physical space mapping.

Definition at line 724 of file mesh_base.h.

724  {
725  return _default_mapping_data;
726  }

References _default_mapping_data.

Referenced by libMesh::ReplicatedMesh::add_elem(), libMesh::DistributedMesh::add_elem(), libMesh::ReplicatedMesh::insert_elem(), libMesh::DistributedMesh::insert_elem(), MeshInputTest::testDynaReadElem(), and MeshInputTest::testDynaReadPatch().

◆ default_mapping_type()

ElemMappingType libMesh::MeshBase::default_mapping_type ( ) const
inline

Returns the default master space to physical space mapping basis functions to be used on newly added elements.

Definition at line 708 of file mesh_base.h.

708  {
709  return _default_mapping_type;
710  }

References _default_mapping_type.

Referenced by libMesh::ReplicatedMesh::add_elem(), libMesh::DistributedMesh::add_elem(), libMesh::ReplicatedMesh::insert_elem(), libMesh::DistributedMesh::insert_elem(), MeshInputTest::testDynaReadElem(), and MeshInputTest::testDynaReadPatch().

◆ delete_elem()

virtual void libMesh::MeshBase::delete_elem ( Elem e)
pure virtual

Removes element e from the mesh.

This method must be implemented in derived classes in such a way that it does not invalidate element iterators. Users should call MeshBase::prepare_for_use() after elements are added to and/or deleted from the mesh.

Note
Calling this method may produce isolated nodes, i.e. nodes not connected to any element.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshTools::Modification::all_tri(), libMesh::UnstructuredMesh::contract(), libMesh::TetGenMeshInterface::delete_2D_hull_elements(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::MeshTools::Modification::flatten(), libMesh::TetGenMeshInterface::pointset_convexhull(), libMesh::AbaqusIO::read(), libMesh::UNVIO::read_implementation(), and libMesh::GmshIO::read_mesh().

◆ delete_node()

virtual void libMesh::MeshBase::delete_node ( Node n)
pure virtual

◆ delete_remote_elements()

virtual void libMesh::MeshBase::delete_remote_elements ( )
inlinevirtual

When supported, deletes all nonlocal elements of the mesh except for "ghosts" which touch a local element, and deletes all nodes which are not part of a local or ghost element.

Reimplemented in libMesh::DistributedMesh.

Definition at line 201 of file mesh_base.h.

201 {}

Referenced by libMesh::MeshTools::Generation::build_extrusion(), libMesh::UnstructuredMesh::create_submesh(), libMesh::Nemesis_IO::read(), libMesh::BoundaryInfo::sync(), and libMesh::MeshSerializer::~MeshSerializer().

◆ detect_interior_parents()

void libMesh::MeshBase::detect_interior_parents ( )

Search the mesh for elements that have a neighboring element of dim+1 and set that element as the interior parent.

Definition at line 812 of file mesh_base.C.

813 {
814  // This requires an inspection on every processor
815  parallel_object_only();
816 
817  // Check if the mesh contains mixed dimensions. If so, then set interior parents, otherwise return.
818  if (this->elem_dimensions().size() == 1)
819  return;
820 
821  //This map will be used to set interior parents
822  std::unordered_map<dof_id_type, std::vector<dof_id_type>> node_to_elem;
823 
824  for (const auto & elem : this->active_element_ptr_range())
825  {
826  // Populating the node_to_elem map, same as MeshTools::build_nodes_to_elem_map
827  for (auto n : IntRange<unsigned int>(0, elem->n_vertices()))
828  {
829  libmesh_assert_less (elem->id(), this->max_elem_id());
830 
831  node_to_elem[elem->node_id(n)].push_back(elem->id());
832  }
833  }
834 
835  // Automatically set interior parents
836  for (const auto & element : this->element_ptr_range())
837  {
838  // Ignore an 3D element or an element that already has an interior parent
839  if (element->dim()>=LIBMESH_DIM || element->interior_parent())
840  continue;
841 
842  // Start by generating a SET of elements that are dim+1 to the current
843  // element at each vertex of the current element, thus ignoring interior nodes.
844  // If one of the SET of elements is empty, then we will not have an interior parent
845  // since an interior parent must be connected to all vertices of the current element
846  std::vector<std::set<dof_id_type>> neighbors( element->n_vertices() );
847 
848  bool found_interior_parents = false;
849 
850  for (auto n : IntRange<unsigned int>(0, element->n_vertices()))
851  {
852  std::vector<dof_id_type> & element_ids = node_to_elem[element->node_id(n)];
853  for (const auto & eid : element_ids)
854  if (this->elem_ref(eid).dim() == element->dim()+1)
855  neighbors[n].insert(eid);
856 
857  if (neighbors[n].size()>0)
858  {
859  found_interior_parents = true;
860  }
861  else
862  {
863  // We have found an empty set, no reason to continue
864  // Ensure we set this flag to false before the break since it could have
865  // been set to true for previous vertex
866  found_interior_parents = false;
867  break;
868  }
869  }
870 
871  // If we have successfully generated a set of elements for each vertex, we will compare
872  // the set for vertex 0 will the sets for the vertices until we find a id that exists in
873  // all sets. If found, this is our an interior parent id. The interior parent id found
874  // will be the lowest element id if there is potential for multiple interior parents.
875  if (found_interior_parents)
876  {
877  std::set<dof_id_type> & neighbors_0 = neighbors[0];
878  for (const auto & interior_parent_id : neighbors_0)
879  {
880  found_interior_parents = false;
881  for (auto n : IntRange<unsigned int>(1, element->n_vertices()))
882  {
883  if (neighbors[n].find(interior_parent_id)!=neighbors[n].end())
884  {
885  found_interior_parents=true;
886  }
887  else
888  {
889  found_interior_parents=false;
890  break;
891  }
892  }
893  if (found_interior_parents)
894  {
895  element->set_interior_parent(this->elem_ptr(interior_parent_id));
896  break;
897  }
898  }
899  }
900  }
901 }

References dim.

◆ elem() [1/2]

virtual Elem* libMesh::MeshBase::elem ( const dof_id_type  i)
inlinevirtual
Returns
A writable pointer to the \( i^{th} \) element, which should be present in this processor's subset of the mesh data structure.

Definition at line 569 of file mesh_base.h.

570  {
571  libmesh_deprecated();
572  return this->elem_ptr(i);
573  }

References elem_ptr().

◆ elem() [2/2]

virtual const Elem* libMesh::MeshBase::elem ( const dof_id_type  i) const
inlinevirtual
Returns
A pointer to the \( i^{th} \) element, which should be present in this processor's subset of the mesh data structure.

Definition at line 554 of file mesh_base.h.

555  {
556  libmesh_deprecated();
557  return this->elem_ptr(i);
558  }

References elem_ptr().

Referenced by libMesh::ReplicatedMesh::clear(), libMesh::DistributedMesh::clear(), libMesh::UnstructuredMesh::contract(), libMesh::DistributedMesh::DistributedMesh(), libMesh::ReplicatedMesh::get_boundary_points(), libMesh::ReplicatedMesh::get_disconnected_subdomains(), libMesh::DistributedMesh::renumber_nodes_and_elements(), and libMesh::ReplicatedMesh::stitching_helper().

◆ elem_dimensions()

const std::set<unsigned char>& libMesh::MeshBase::elem_dimensions ( ) const
inline
Returns
A const reference to a std::set of element dimensions present in the mesh.

Definition at line 225 of file mesh_base.h.

226  { return _elem_dims; }

References _elem_dims.

Referenced by libMesh::System::calculate_norm(), and libMesh::TreeNode< N >::insert().

◆ elem_ptr() [1/2]

virtual const Elem* libMesh::MeshBase::elem_ptr ( const dof_id_type  i) const
pure virtual

◆ elem_ptr() [2/2]

virtual Elem* libMesh::MeshBase::elem_ptr ( const dof_id_type  i)
pure virtual
Returns
A writable pointer to the \( i^{th} \) element, which should be present in this processor's subset of the mesh data structure.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ elem_ref() [1/2]

virtual Elem& libMesh::MeshBase::elem_ref ( const dof_id_type  i)
inlinevirtual
Returns
A writable reference to the \( i^{th} \) element, which should be present in this processor's subset of the mesh data structure.

Definition at line 530 of file mesh_base.h.

530  {
531  return *this->elem_ptr(i);
532  }

References elem_ptr().

◆ elem_ref() [2/2]

virtual const Elem& libMesh::MeshBase::elem_ref ( const dof_id_type  i) const
inlinevirtual

◆ element_ptr_range() [1/2]

virtual SimpleRange<const_element_iterator> libMesh::MeshBase::element_ptr_range ( ) const
pure virtual

◆ element_ptr_range() [2/2]

virtual SimpleRange<element_iterator> libMesh::MeshBase::element_ptr_range ( )
pure virtual

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::EquationSystems::_add_system_to_nodes_and_elems(), libMesh::MeshRefinement::_coarsen_elements(), libMesh::MeshRefinement::_refine_elements(), libMesh::BoundaryInfo::add_elements(), libMesh::MeshRefinement::add_p_to_h_refinement(), libMesh::UnstructuredMesh::all_first_order(), libMesh::MeshTools::Subdivision::all_subdivision(), libMesh::MeshTools::Modification::all_tri(), libMesh::EquationSystems::allgather(), libMesh::MeshCommunication::assign_global_indices(), libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::MeshTools::build_nodes_to_elem_map(), libMesh::MeshTools::Modification::change_subdomain_id(), libMesh::TetGenMeshInterface::check_hull_integrity(), libMesh::MeshRefinement::clean_refinement_flags(), libMesh::MeshRefinement::coarsen_elements(), libMesh::UnstructuredMesh::contract(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::TetGenMeshInterface::delete_2D_hull_elements(), libMesh::MeshTools::elem_types(), libMesh::UNVIO::elements_out(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshTools::Modification::flatten(), libMesh::MeshTools::get_not_subactive_node_ids(), libMesh::EquationSystems::init(), libMesh::MeshTools::libmesh_assert_connected_nodes(), libMesh::MeshTools::libmesh_assert_equal_n_systems(), libMesh::MeshTools::libmesh_assert_no_links_to_elem(), libMesh::MeshTools::libmesh_assert_old_dof_objects(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_topology_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_valid_amr_elem_ids(), libMesh::MeshTools::libmesh_assert_valid_amr_interior_parents(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::MeshTools::libmesh_assert_valid_node_pointers(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::MeshTools::libmesh_assert_valid_refinement_tree(), main(), libMesh::MeshCommunication::make_new_node_proc_ids_parallel_consistent(), libMesh::MeshTools::paranoid_n_levels(), libMesh::TetGenMeshInterface::pointset_convexhull(), libMesh::MeshTools::Subdivision::prepare_subdivision_mesh(), libMesh::AbaqusIO::read(), libMesh::UNVIO::read_implementation(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::MeshRefinement::refine_elements(), libMesh::EquationSystems::reinit_solutions(), libMesh::MeshRefinement::switch_h_to_p_refinement(), libMesh::BoundaryInfo::sync(), libMesh::MeshTools::Subdivision::tag_boundary_ghosts(), ExtraIntegersTest::test_and_set_initial_data(), ExtraIntegersTest::test_final_integers(), SystemsTest::testBoundaryProjectCube(), MeshInputTest::testDynaReadElem(), BoundaryInfoTest::testEdgeBoundaryConditions(), MeshInputTest::testExodusWriteElementDataFromDiscontinuousNodalData(), MappedSubdomainPartitionerTest::testMappedSubdomainPartitioner(), PartitionerTest< PartitionerSubclass, MeshClass >::testPartition(), SystemsTest::testProjectCube(), SystemsTest::testProjectLine(), SystemsTest::testProjectSquare(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), libMesh::CheckpointIO::write(), and libMesh::UCDIO::write_interior_elems().

◆ elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::elements_begin ( ) const
pure virtual

◆ elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::elements_begin ( )
pure virtual

◆ elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::elements_end ( ) const
pure virtual

◆ elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::elements_end ( )
pure virtual

◆ evaluable_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::evaluable_elements_begin ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
) const
pure virtual

◆ evaluable_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::evaluable_elements_begin ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
)
pure virtual

Iterate over elements in the Mesh where the solution (as distributed by the given DofMap) can be evaluated, for the given variable var_num, or for all variables by default.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by DefaultCouplingTest::testCoupling().

◆ evaluable_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::evaluable_elements_end ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
) const
pure virtual

◆ evaluable_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::evaluable_elements_end ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
)
pure virtual

◆ evaluable_nodes_begin() [1/2]

virtual const_node_iterator libMesh::MeshBase::evaluable_nodes_begin ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
) const
pure virtual

◆ evaluable_nodes_begin() [2/2]

virtual node_iterator libMesh::MeshBase::evaluable_nodes_begin ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
)
pure virtual

Iterate over nodes in the Mesh where the solution (as distributed by the given DofMap) can be evaluated, for the given variable var_num, or for all variables by default.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ evaluable_nodes_end() [1/2]

virtual const_node_iterator libMesh::MeshBase::evaluable_nodes_end ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
) const
pure virtual

◆ evaluable_nodes_end() [2/2]

virtual node_iterator libMesh::MeshBase::evaluable_nodes_end ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
)
pure virtual

◆ facelocal_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::facelocal_elements_begin ( ) const
pure virtual

◆ facelocal_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::facelocal_elements_begin ( )
pure virtual

Iterate over elements which are on or have a neighbor on the current processor.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ facelocal_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::facelocal_elements_end ( ) const
pure virtual

◆ facelocal_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::facelocal_elements_end ( )
pure virtual

◆ find_neighbors()

virtual void libMesh::MeshBase::find_neighbors ( const bool  reset_remote_elements = false,
const bool  reset_current_list = true 
)
pure virtual

Locate element face (edge in 2D) neighbors.

This is done with the help of a std::map that functions like a hash table. After this routine is called all the elements with a nullptr neighbor pointer are guaranteed to be on the boundary. Thus this routine is useful for automatically determining the boundaries of the domain. If reset_remote_elements is left to false, remote neighbor links are not reset and searched for in the local mesh. If reset_current_list is left as true, then any existing links will be reset before initiating the algorithm, while honoring the value of the reset_remote_elements flag.

Implemented in libMesh::UnstructuredMesh.

Referenced by libMesh::InfElemBuilder::build_inf_elem(), main(), and tetrahedralize_domain().

◆ fix_broken_node_and_element_numbering()

virtual void libMesh::MeshBase::fix_broken_node_and_element_numbering ( )
pure virtual

There is no reason for a user to ever call this function.

This function restores a previously broken element/node numbering such that mesh.node_ref(n).id() == n.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::EquationSystems::_read_impl(), libMesh::RBEvaluation::read_in_vectors_from_multiple_files(), and libMesh::RBEvaluation::write_out_vectors().

◆ flagged_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::flagged_elements_begin ( unsigned char  rflag) const
pure virtual

◆ flagged_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::flagged_elements_begin ( unsigned char  rflag)
pure virtual

Iterate over all elements with a specified refinement flag.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ flagged_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::flagged_elements_end ( unsigned char  rflag) const
pure virtual

◆ flagged_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::flagged_elements_end ( unsigned char  rflag)
pure virtual

◆ flagged_pid_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::flagged_pid_elements_begin ( unsigned char  rflag,
processor_id_type  pid 
) const
pure virtual

◆ flagged_pid_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::flagged_pid_elements_begin ( unsigned char  rflag,
processor_id_type  pid 
)
pure virtual

Iterate over all elements with a specified refinement flag on a specified processor.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ flagged_pid_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::flagged_pid_elements_end ( unsigned char  rflag,
processor_id_type  pid 
) const
pure virtual

◆ flagged_pid_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::flagged_pid_elements_end ( unsigned char  rflag,
processor_id_type  pid 
)
pure virtual

◆ gather_to_zero()

virtual void libMesh::MeshBase::gather_to_zero ( )
inlinevirtual

Gathers all elements and nodes of the mesh onto processor zero.

Reimplemented in libMesh::DistributedMesh.

Definition at line 194 of file mesh_base.h.

194 {}

Referenced by libMesh::MeshSerializer::MeshSerializer().

◆ get_boundary_info() [1/2]

BoundaryInfo& libMesh::MeshBase::get_boundary_info ( )
inline

Writable information about boundary ids on the mesh.

Definition at line 137 of file mesh_base.h.

137 { return *boundary_info; }

References boundary_info.

◆ get_boundary_info() [2/2]

const BoundaryInfo& libMesh::MeshBase::get_boundary_info ( ) const
inline

The information about boundary ids on the mesh.

Definition at line 132 of file mesh_base.h.

132 { return *boundary_info; }

References boundary_info.

Referenced by libMesh::MeshRefinement::_coarsen_elements(), libMesh::MeshTools::Subdivision::add_boundary_ghosts(), libMesh::RBConstruction::add_scaled_matrix_and_vector(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Subdivision::all_subdivision(), libMesh::MeshTools::Modification::all_tri(), LinearElasticity::assemble(), assemble_elasticity(), assemble_poisson(), assemble_shell(), libMesh::AbaqusIO::assign_boundary_node_ids(), libMesh::AbaqusIO::assign_sideset_ids(), AssemblyA0::boundary_assembly(), AssemblyF0::boundary_assembly(), AssemblyA1::boundary_assembly(), AssemblyF1::boundary_assembly(), AssemblyF2::boundary_assembly(), AssemblyA2::boundary_assembly(), libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::MeshTools::Modification::change_boundary_id(), libMesh::DofMap::check_dirichlet_bcid_consistency(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::TriangleWrapper::copy_tri_to_mesh(), libMesh::UnstructuredMesh::create_submesh(), libMesh::TetGenMeshInterface::delete_2D_hull_elements(), libMesh::ReplicatedMesh::delete_elem(), libMesh::DistributedMesh::delete_elem(), libMesh::ReplicatedMesh::delete_node(), libMesh::DistributedMesh::delete_node(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::DistributedMesh::DistributedMesh(), libMesh::MeshTools::Modification::flatten(), libMesh::UNVIO::groups_in(), LinearElasticityWithContact::initialize_contact_load_paths(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), main(), AugmentSparsityOnInterface::mesh_reinit(), libMesh::Parallel::Packing< const Node * >::pack(), libMesh::Parallel::Packing< const Elem * >::pack(), libMesh::Parallel::Packing< const Node * >::packable_size(), libMesh::Parallel::Packing< const Elem * >::packable_size(), libMesh::TetGenMeshInterface::pointset_convexhull(), libMesh::Nemesis_IO::prepare_to_write_nodal_data(), libMesh::AbaqusIO::read(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::CheckpointIO::read_bcs(), libMesh::CheckpointIO::read_header(), libMesh::GmshIO::read_mesh(), libMesh::CheckpointIO::read_nodesets(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::ReplicatedMesh::renumber_nodes_and_elements(), libMesh::DistributedMesh::renumber_nodes_and_elements(), libMesh::ReplicatedMesh::ReplicatedMesh(), libMesh::ReplicatedMesh::stitching_helper(), libMesh::BoundaryInfo::sync(), AllTriTest::test_helper_2D(), AllTriTest::test_helper_3D(), SystemsTest::testBoundaryProjectCube(), BoundaryInfoTest::testEdgeBoundaryConditions(), BoundaryInfoTest::testMesh(), BoundaryInfoTest::testShellFaceConstraints(), WriteEdgesetData::testWrite(), WriteSidesetData::testWrite(), libMesh::Parallel::Packing< Node * >::unpack(), libMesh::Parallel::Packing< Elem * >::unpack(), libMesh::FroIO::write(), libMesh::Nemesis_IO::write(), libMesh::ExodusII_IO::write(), libMesh::XdrIO::write(), libMesh::CheckpointIO::write(), libMesh::GmshIO::write_mesh(), libMesh::XdrIO::write_serialized_bcs_helper(), and libMesh::XdrIO::write_serialized_nodesets().

◆ get_count_lower_dim_elems_in_point_locator()

bool libMesh::MeshBase::get_count_lower_dim_elems_in_point_locator ( ) const

Get the current value of _count_lower_dim_elems_in_point_locator.

Definition at line 710 of file mesh_base.C.

711 {
713 }

Referenced by libMesh::TreeNode< N >::insert().

◆ get_elem_integer_index()

unsigned int libMesh::MeshBase::get_elem_integer_index ( const std::string &  name) const

Definition at line 224 of file mesh_base.C.

225 {
226  for (auto i : index_range(_elem_integer_names))
227  if (_elem_integer_names[i] == name)
228  return i;
229 
230  libmesh_error_msg("Unknown elem integer " << name);
231  return libMesh::invalid_uint;
232 }

References libMesh::index_range(), libMesh::invalid_uint, and libMesh::Quality::name().

◆ get_elem_integer_name()

const std::string& libMesh::MeshBase::get_elem_integer_name ( unsigned int  i) const
inline

Definition at line 818 of file mesh_base.h.

819  { return _elem_integer_names[i]; }

References _elem_integer_names.

Referenced by libMesh::CheckpointIO::write().

◆ get_id_by_name()

subdomain_id_type libMesh::MeshBase::get_id_by_name ( const std::string &  name) const
Returns
The id of the named subdomain if it exists, Elem::invalid_subdomain_id otherwise.

Definition at line 737 of file mesh_base.C.

738 {
739  // Linear search over the map values.
740  std::map<subdomain_id_type, std::string>::const_iterator
741  iter = _block_id_to_name.begin(),
742  end_iter = _block_id_to_name.end();
743 
744  for ( ; iter != end_iter; ++iter)
745  if (iter->second == name)
746  return iter->first;
747 
748  // If we made it here without returning, we don't have a subdomain
749  // with the requested name, so return Elem::invalid_subdomain_id.
751 }

References libMesh::Quality::name().

◆ get_info()

std::string libMesh::MeshBase::get_info ( ) const
Returns
A string containing relevant information about the mesh.

Definition at line 551 of file mesh_base.C.

552 {
553  std::ostringstream oss;
554 
555  oss << " Mesh Information:" << '\n';
556 
557  if (!_elem_dims.empty())
558  {
559  oss << " elem_dimensions()={";
560  std::copy(_elem_dims.begin(),
561  --_elem_dims.end(), // --end() is valid if the set is non-empty
562  std::ostream_iterator<unsigned int>(oss, ", "));
563  oss << cast_int<unsigned int>(*_elem_dims.rbegin());
564  oss << "}\n";
565  }
566 
567  oss << " spatial_dimension()=" << this->spatial_dimension() << '\n'
568  << " n_nodes()=" << this->n_nodes() << '\n'
569  << " n_local_nodes()=" << this->n_local_nodes() << '\n'
570  << " n_elem()=" << this->n_elem() << '\n'
571  << " n_local_elem()=" << this->n_local_elem() << '\n'
572 #ifdef LIBMESH_ENABLE_AMR
573  << " n_active_elem()=" << this->n_active_elem() << '\n'
574 #endif
575  << " n_subdomains()=" << static_cast<std::size_t>(this->n_subdomains()) << '\n'
576  << " n_partitions()=" << static_cast<std::size_t>(this->n_partitions()) << '\n'
577  << " n_processors()=" << static_cast<std::size_t>(this->n_processors()) << '\n'
578  << " n_threads()=" << static_cast<std::size_t>(libMesh::n_threads()) << '\n'
579  << " processor_id()=" << static_cast<std::size_t>(this->processor_id()) << '\n';
580 
581  return oss.str();
582 }

References libMesh::MeshTools::n_elem(), n_nodes, and libMesh::n_threads().

◆ get_node_integer_index()

unsigned int libMesh::MeshBase::get_node_integer_index ( const std::string &  name) const

Definition at line 295 of file mesh_base.C.

296 {
297  for (auto i : index_range(_node_integer_names))
298  if (_node_integer_names[i] == name)
299  return i;
300 
301  libmesh_error_msg("Unknown node integer " << name);
302  return libMesh::invalid_uint;
303 }

References libMesh::index_range(), libMesh::invalid_uint, and libMesh::Quality::name().

◆ get_node_integer_name()

const std::string& libMesh::MeshBase::get_node_integer_name ( unsigned int  i) const
inline

Definition at line 915 of file mesh_base.h.

916  { return _node_integer_names[i]; }

References _node_integer_names.

Referenced by libMesh::CheckpointIO::write().

◆ get_point_locator_close_to_point_tol()

Real libMesh::MeshBase::get_point_locator_close_to_point_tol ( ) const

Definition at line 919 of file mesh_base.C.

920 {
922 }

◆ get_subdomain_name_map()

const std::map<subdomain_id_type, std::string>& libMesh::MeshBase::get_subdomain_name_map ( ) const
inline

◆ ghost_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::ghost_elements_begin ( ) const
pure virtual

◆ ghost_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::ghost_elements_begin ( )
pure virtual

Iterate over "ghost" elements in the Mesh.

A ghost element is one which is not local, but is semilocal.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ ghost_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::ghost_elements_end ( ) const
pure virtual

◆ ghost_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::ghost_elements_end ( )
pure virtual

◆ ghosting_functors_begin()

std::set<GhostingFunctor *>::const_iterator libMesh::MeshBase::ghosting_functors_begin ( ) const
inline

◆ ghosting_functors_end()

std::set<GhostingFunctor *>::const_iterator libMesh::MeshBase::ghosting_functors_end ( ) const
inline

◆ has_elem_integer()

bool libMesh::MeshBase::has_elem_integer ( const std::string &  name) const

Definition at line 236 of file mesh_base.C.

237 {
238  for (auto & entry : _elem_integer_names)
239  if (entry == name)
240  return true;
241 
242  return false;
243 }

References libMesh::Quality::name().

◆ has_node_integer()

bool libMesh::MeshBase::has_node_integer ( const std::string &  name) const

Definition at line 307 of file mesh_base.C.

308 {
309  for (auto & entry : _node_integer_names)
310  if (entry == name)
311  return true;
312 
313  return false;
314 }

References libMesh::Quality::name().

◆ insert_elem()

virtual Elem* libMesh::MeshBase::insert_elem ( Elem e)
pure virtual

Insert elem e to the element array, preserving its id and replacing/deleting any existing element with the same id.

Users should call MeshBase::prepare_for_use() after elements are added to and/or deleted from the mesh.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), and libMesh::MeshTools::Subdivision::all_subdivision().

◆ insert_node()

virtual Node* libMesh::MeshBase::insert_node ( Node n)
pure virtual

Insert Node n into the Mesh at a location consistent with n->id(), allocating extra storage if necessary.

Will error rather than overwriting an existing Node. Primarily intended for use with the mesh_inserter_iterator, only use if you know what you are doing...

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::mesh_inserter_iterator< T >::operator=().

◆ is_prepared()

bool libMesh::MeshBase::is_prepared ( ) const
inline
Returns
true if the mesh has been prepared via a call to prepare_for_use, false otherwise.

Definition at line 152 of file mesh_base.h.

153  { return _is_prepared; }

References _is_prepared.

Referenced by libMesh::MeshRefinement::_refine_elements(), and libMesh::DofMap::create_dof_constraints().

◆ is_replicated()

virtual bool libMesh::MeshBase::is_replicated ( ) const
inlinevirtual
Returns
true if new elements and nodes can and should be created in synchronization on all processors, false otherwise

Reimplemented in libMesh::DistributedMesh.

Definition at line 181 of file mesh_base.h.

182  { return true; }

Referenced by libMesh::MeshRefinement::_refine_elements(), libMesh::DynaIO::add_spline_constraints(), libMesh::UnstructuredMesh::all_second_order(), main(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::CheckpointIO::read(), and libMesh::MeshRefinement::uniformly_coarsen().

◆ is_serial()

virtual bool libMesh::MeshBase::is_serial ( ) const
inlinevirtual

◆ is_serial_on_zero()

virtual bool libMesh::MeshBase::is_serial_on_zero ( ) const
inlinevirtual
Returns
true if all elements and nodes of the mesh exist on the processor 0, false otherwise

Reimplemented in libMesh::DistributedMesh.

Definition at line 166 of file mesh_base.h.

167  { return true; }

◆ level_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::level_elements_begin ( unsigned int  level) const
pure virtual

◆ level_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::level_elements_begin ( unsigned int  level)
pure virtual

◆ level_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::level_elements_end ( unsigned int  level) const
pure virtual

◆ level_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::level_elements_end ( unsigned int  level)
pure virtual

◆ libmesh_assert_valid_parallel_ids()

virtual void libMesh::MeshBase::libmesh_assert_valid_parallel_ids ( ) const
inlinevirtual

Verify id and processor_id consistency of our elements and nodes containers.

Calls libmesh_assert() on each possible failure. Currently only implemented on DistributedMesh; a serial data structure is much harder to get out of sync.

Reimplemented in libMesh::DistributedMesh.

Definition at line 1297 of file mesh_base.h.

1297 {}

Referenced by libMesh::MeshRefinement::_refine_elements(), libMesh::InfElemBuilder::build_inf_elem(), and libMesh::MeshRefinement::refine_and_coarsen_elements().

◆ local_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::local_elements_begin ( ) const
pure virtual

◆ local_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::local_elements_begin ( )
pure virtual

◆ local_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::local_elements_end ( ) const
pure virtual

◆ local_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::local_elements_end ( )
pure virtual

◆ local_level_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::local_level_elements_begin ( unsigned int  level) const
pure virtual

◆ local_level_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::local_level_elements_begin ( unsigned int  level)
pure virtual

◆ local_level_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::local_level_elements_end ( unsigned int  level) const
pure virtual

◆ local_level_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::local_level_elements_end ( unsigned int  level)
pure virtual

◆ local_node_ptr_range() [1/2]

virtual SimpleRange<const_node_iterator> libMesh::MeshBase::local_node_ptr_range ( ) const
pure virtual

◆ local_node_ptr_range() [2/2]

virtual SimpleRange<node_iterator> libMesh::MeshBase::local_node_ptr_range ( )
pure virtual

◆ local_nodes_begin() [1/2]

virtual const_node_iterator libMesh::MeshBase::local_nodes_begin ( ) const
pure virtual

◆ local_nodes_begin() [2/2]

virtual node_iterator libMesh::MeshBase::local_nodes_begin ( )
pure virtual

◆ local_nodes_end() [1/2]

virtual const_node_iterator libMesh::MeshBase::local_nodes_end ( ) const
pure virtual

◆ local_nodes_end() [2/2]

virtual node_iterator libMesh::MeshBase::local_nodes_end ( )
pure virtual

◆ local_not_level_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::local_not_level_elements_begin ( unsigned int  level) const
pure virtual

◆ local_not_level_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::local_not_level_elements_begin ( unsigned int  level)
pure virtual

◆ local_not_level_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::local_not_level_elements_end ( unsigned int  level) const
pure virtual

◆ local_not_level_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::local_not_level_elements_end ( unsigned int  level)
pure virtual

◆ max_elem_id()

virtual dof_id_type libMesh::MeshBase::max_elem_id ( ) const
pure virtual

◆ max_node_id()

virtual dof_id_type libMesh::MeshBase::max_node_id ( ) const
pure virtual

◆ merge_extra_integer_names()

std::pair< std::vector< unsigned int >, std::vector< unsigned int > > libMesh::MeshBase::merge_extra_integer_names ( const MeshBase other)
protected

Merge extra-integer arrays from an other mesh.

Returns two mappings from index values in other to (possibly newly created) index values with the same string name in this mesh, the first for element integers and the second for node integers.

Definition at line 944 of file mesh_base.C.

945 {
946  std::pair<std::vector<unsigned int>, std::vector<unsigned int>> returnval;
947  returnval.first = this->add_elem_integers(other._elem_integer_names);
948  returnval.second = this->add_node_integers(other._node_integer_names);
949  return returnval;
950 }

References _elem_integer_names, and _node_integer_names.

Referenced by libMesh::UnstructuredMesh::copy_nodes_and_elements(), and libMesh::UnstructuredMesh::create_submesh().

◆ mesh_dimension()

unsigned int libMesh::MeshBase::mesh_dimension ( ) const
Returns
The logical dimension of the mesh; i.e. the manifold dimension of the elements in the mesh. If we ever support multi-dimensional meshes (e.g. hexes and quads in the same mesh) then this will return the largest such dimension.

Definition at line 135 of file mesh_base.C.

136 {
137  if (!_elem_dims.empty())
138  return cast_int<unsigned int>(*_elem_dims.rbegin());
139  return 0;
140 }

References _elem_dims.

Referenced by libMesh::HPCoarsenTest::add_projection(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), assemble(), LinearElasticity::assemble(), assemble_1D(), AssembleOptimization::assemble_A_and_F(), assemble_biharmonic(), assemble_cd(), assemble_elasticity(), assemble_ellipticdg(), assemble_helmholtz(), assemble_laplace(), assemble_mass(), assemble_matrices(), assemble_poisson(), assemble_SchroedingerEquation(), assemble_shell(), assemble_stokes(), assemble_wave(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::EquationSystems::build_variable_names(), compute_jacobian(), compute_residual(), LinearElasticityWithContact::compute_stresses(), LinearElasticity::compute_stresses(), compute_stresses(), LargeDeformationElasticity::compute_stresses(), libMesh::DofMap::create_dof_constraints(), libMesh::MeshTools::Modification::distort(), SolidSystem::element_time_derivative(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::ReplicatedMesh::get_boundary_points(), libMesh::LaplaceMeshSmoother::init(), libMesh::PointLocatorTree::init(), SolidSystem::init_data(), libMesh::ExodusII_IO_Helper::initialize(), libMesh::RBEIMAssembly::initialize_fe(), integrate_function(), LaplaceYoung::jacobian(), LargeDeformationElasticity::jacobian(), main(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::GMVIO::read(), libMesh::VTKIO::read(), libMesh::System::read_header(), libMesh::UCDIO::read_implementation(), libMesh::XdrIO::read_serialized_connectivity(), LaplaceYoung::residual(), LargeDeformationElasticity::residual(), LinearElasticityWithContact::residual_and_jacobian(), SolidSystem::save_initial_mesh(), setup(), libMesh::MeshTools::Modification::smooth(), MeshSpatialDimensionTest::test1D(), MeshSpatialDimensionTest::test2D(), InfFERadialTest::testSingleOrder(), libMesh::BoundaryVolumeSolutionTransfer::transfer(), libMesh::DTKSolutionTransfer::transfer(), libMesh::DofMap::use_coupled_neighbor_dofs(), libMesh::PostscriptIO::write(), libMesh::CheckpointIO::write(), libMesh::TecplotIO::write_binary(), libMesh::GMVIO::write_binary(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::UCDIO::write_implementation(), libMesh::UCDIO::write_nodal_data(), libMesh::EnsightIO::write_scalar_ascii(), libMesh::GnuPlotIO::write_solution(), and libMesh::EnsightIO::write_vector_ascii().

◆ n_active_elem()

virtual dof_id_type libMesh::MeshBase::n_active_elem ( ) const
pure virtual

◆ n_active_elem_on_proc()

dof_id_type libMesh::MeshBase::n_active_elem_on_proc ( const processor_id_type  proc) const
Returns
The number of active elements on processor proc.

Definition at line 518 of file mesh_base.C.

519 {
520  libmesh_assert_less (proc_id, this->n_processors());
521  return static_cast<dof_id_type>(std::distance (this->active_pid_elements_begin(proc_id),
522  this->active_pid_elements_end (proc_id)));
523 }

References distance().

Referenced by n_active_local_elem().

◆ n_active_local_elem()

dof_id_type libMesh::MeshBase::n_active_local_elem ( ) const
inline
Returns
The number of active elements on the local processor.

Definition at line 420 of file mesh_base.h.

421  { return this->n_active_elem_on_proc (this->processor_id()); }

References n_active_elem_on_proc(), and libMesh::ParallelObject::processor_id().

Referenced by libMesh::VTKIO::cells_to_vtk().

◆ n_active_sub_elem()

dof_id_type libMesh::MeshBase::n_active_sub_elem ( ) const

Same as n_sub_elem(), but only counts active elements.

Definition at line 539 of file mesh_base.C.

540 {
541  dof_id_type ne=0;
542 
543  for (const auto & elem : this->active_element_ptr_range())
544  ne += elem->n_sub_elem();
545 
546  return ne;
547 }

Referenced by libMesh::TecplotIO::write_ascii(), libMesh::GMVIO::write_ascii_old_impl(), and libMesh::TecplotIO::write_binary().

◆ n_elem()

virtual dof_id_type libMesh::MeshBase::n_elem ( ) const
pure virtual
Returns
The number of elements in the mesh.

The standard n_elem() function may return a cached value on distributed meshes, and so can be called by any processor at any time.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshTools::Subdivision::add_boundary_ghosts(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Subdivision::all_subdivision(), libMesh::MeshTools::Modification::all_tri(), libMesh::MeshCommunication::assign_global_indices(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::MeshTools::build_nodes_to_elem_map(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::TetGenMeshInterface::check_hull_integrity(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::DofMap::create_dof_constraints(), libMesh::UnstructuredMesh::create_submesh(), libMesh::MeshTools::Modification::distort(), main(), libMesh::Nemesis_IO::read(), libMesh::CheckpointIO::read(), libMesh::System::read_serialized_vector(), libMesh::System::read_serialized_vectors(), libMesh::MeshTools::Modification::redistribute(), AllTriTest::test_helper_2D(), AllTriTest::test_helper_3D(), MeshInputTest::testDynaReadElem(), MeshInputTest::testDynaReadPatch(), InfFERadialTest::testSingleOrder(), CheckpointIOTest::testSplitter(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), libMesh::FroIO::write(), libMesh::TetGenIO::write(), libMesh::XdrIO::write(), libMesh::UCDIO::write_implementation(), libMesh::UCDIO::write_nodal_data(), libMesh::XdrIO::write_serialized_connectivity(), and libMesh::System::write_serialized_vectors().

◆ n_elem_integers()

unsigned int libMesh::MeshBase::n_elem_integers ( ) const
inline

Definition at line 829 of file mesh_base.h.

829 { return _elem_integer_names.size(); }

References _elem_integer_names.

Referenced by libMesh::CheckpointIO::read_connectivity(), and libMesh::CheckpointIO::write().

◆ n_elem_on_proc()

dof_id_type libMesh::MeshBase::n_elem_on_proc ( const processor_id_type  proc) const
Returns
The number of elements on processor proc.

Definition at line 505 of file mesh_base.C.

506 {
507  // We're either counting a processor's elements or unpartitioned
508  // elements
509  libmesh_assert (proc_id < this->n_processors() ||
511 
512  return static_cast<dof_id_type>(std::distance (this->pid_elements_begin(proc_id),
513  this->pid_elements_end (proc_id)));
514 }

References distance(), and libMesh::libmesh_assert().

Referenced by n_local_elem(), and n_unpartitioned_elem().

◆ n_local_elem()

dof_id_type libMesh::MeshBase::n_local_elem ( ) const
inline
Returns
The number of elements on the local processor.

Definition at line 403 of file mesh_base.h.

404  { return this->n_elem_on_proc (this->processor_id()); }

References n_elem_on_proc(), and libMesh::ParallelObject::processor_id().

Referenced by libMesh::DTKAdapter::DTKAdapter(), and libMesh::DistributedMesh::parallel_n_elem().

◆ n_local_nodes()

dof_id_type libMesh::MeshBase::n_local_nodes ( ) const
inline
Returns
The number of nodes on the local processor.

Definition at line 303 of file mesh_base.h.

304  { return this->n_nodes_on_proc (this->processor_id()); }

References n_nodes_on_proc(), and libMesh::ParallelObject::processor_id().

Referenced by libMesh::VTKIO::nodes_to_vtk(), and libMesh::DistributedMesh::parallel_n_nodes().

◆ n_node_integers()

unsigned int libMesh::MeshBase::n_node_integers ( ) const
inline

Definition at line 926 of file mesh_base.h.

926 { return _node_integer_names.size(); }

References _node_integer_names.

Referenced by libMesh::CheckpointIO::read_nodes(), and libMesh::CheckpointIO::write().

◆ n_nodes()

virtual dof_id_type libMesh::MeshBase::n_nodes ( ) const
pure virtual
Returns
The number of nodes in the mesh.

This function and others must be defined in derived classes since the MeshBase class has no specific storage for nodes or elements. The standard n_nodes() function may return a cached value on distributed meshes, and so can be called by any processor at any time.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshCommunication::assign_global_indices(), libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::MeshTools::build_nodes_to_elem_map(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::create_submesh(), libMesh::MeshTools::Modification::distort(), fill_dirichlet_bc(), libMesh::TetGenMeshInterface::fill_pointlist(), libMesh::VTKIO::get_local_node_values(), libMesh::TreeNode< N >::insert(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), main(), libMesh::VariationalMeshSmoother::metr_data_gen(), libMesh::Nemesis_IO::read(), libMesh::UCDIO::read_implementation(), libMesh::AbaqusIO::read_nodes(), libMesh::XdrIO::read_serialized_nodes(), libMesh::System::read_serialized_vector(), libMesh::System::read_serialized_vectors(), libMesh::MeshTools::Modification::redistribute(), libMesh::MeshTools::Modification::smooth(), libMesh::VariationalMeshSmoother::smooth(), SystemsTest::testBoundaryProjectCube(), SystemsTest::testDofCouplingWithVarGroups(), MeshInputTest::testDynaReadElem(), MeshInputTest::testDynaReadPatch(), libMesh::DirectSolutionTransfer::transfer(), libMesh::TreeNode< N >::transform_nodes_to_elements(), libMesh::TriangleInterface::triangulate(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), libMesh::FroIO::write(), libMesh::TetGenIO::write(), libMesh::MEDITIO::write_ascii(), libMesh::TecplotIO::write_ascii(), libMesh::GMVIO::write_ascii_new_impl(), libMesh::GMVIO::write_ascii_old_impl(), libMesh::TecplotIO::write_binary(), libMesh::GMVIO::write_binary(), libMesh::UCDIO::write_header(), libMesh::GmshIO::write_mesh(), libMesh::ExodusII_IO::write_nodal_data(), libMesh::GmshIO::write_post(), libMesh::System::write_serialized_vectors(), libMesh::UCDIO::write_soln(), and libMesh::VariationalMeshSmoother::writegr().

◆ n_nodes_on_proc()

dof_id_type libMesh::MeshBase::n_nodes_on_proc ( const processor_id_type  proc) const
Returns
The number of nodes on processor proc.

Definition at line 492 of file mesh_base.C.

493 {
494  // We're either counting a processor's nodes or unpartitioned
495  // nodes
496  libmesh_assert (proc_id < this->n_processors() ||
498 
499  return static_cast<dof_id_type>(std::distance (this->pid_nodes_begin(proc_id),
500  this->pid_nodes_end (proc_id)));
501 }

References distance(), and libMesh::libmesh_assert().

Referenced by n_local_nodes(), and n_unpartitioned_nodes().

◆ n_partitions()

unsigned int libMesh::MeshBase::n_partitions ( ) const
inline
Returns
The number of partitions which have been defined via a call to either mesh.partition() or by building a Partitioner object and calling partition.
Note
The partitioner object is responsible for setting this value.

Definition at line 1153 of file mesh_base.h.

1154  { return _n_parts; }

References _n_parts.

Referenced by libMesh::BoundaryInfo::sync(), libMesh::NameBasedIO::write(), libMesh::GMVIO::write_ascii_new_impl(), and libMesh::GMVIO::write_ascii_old_impl().

◆ n_processors()

processor_id_type libMesh::ParallelObject::n_processors ( ) const
inlineinherited
Returns
The number of processors in the group.

Definition at line 100 of file parallel_object.h.

101  { return cast_int<processor_id_type>(_communicator.size()); }

References libMesh::ParallelObject::_communicator.

Referenced by libMesh::BoundaryInfo::_find_id_maps(), libMesh::DofMap::add_constraints_to_send_list(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DistributedMesh::add_elem(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::DistributedMesh::add_node(), libMesh::LaplaceMeshSmoother::allgather_graph(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::FEMSystem::assembly(), libMesh::AztecLinearSolver< T >::AztecLinearSolver(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::DistributedMesh::clear(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::construct_nemesis_filename(), libMesh::ExodusII_IO::copy_scalar_solution(), libMesh::UnstructuredMesh::create_pid_mesh(), libMesh::MeshTools::create_processor_bounding_box(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::EnsightIO::EnsightIO(), libMesh::SystemSubsetBySubdomain::init(), libMesh::PetscDMWrapper::init_and_attach_petscdm(), libMesh::Nemesis_IO_Helper::initialize(), libMesh::DistributedMesh::insert_elem(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_new_node_procids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_topology_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), libMesh::MeshTools::libmesh_assert_valid_dof_ids(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::DofMap::local_variable_indices(), libMesh::MeshRefinement::make_coarsening_compatible(), partition(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::DofMap::prepare_send_list(), libMesh::DofMap::print_dof_constraints(), libMesh::NameBasedIO::read(), libMesh::Nemesis_IO::read(), libMesh::CheckpointIO::read(), libMesh::CheckpointIO::read_connectivity(), libMesh::XdrIO::read_header(), libMesh::CheckpointIO::read_nodes(), libMesh::System::read_parallel_data(), libMesh::System::read_SCALAR_dofs(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::System::read_serialized_vector(), libMesh::DistributedMesh::renumber_dof_objects(), OverlappingFunctorTest::run_partitioner_test(), libMesh::DofMap::scatter_constraints(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), CheckpointIOTest::testSplitter(), WriteVecAndScalar::testWrite(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::DistributedMesh::update_parallel_id_counts(), libMesh::GMVIO::write_binary(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::VTKIO::write_nodal_data(), libMesh::System::write_parallel_data(), libMesh::System::write_SCALAR_dofs(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::XdrIO::write_serialized_nodes(), and libMesh::XdrIO::write_serialized_nodesets().

◆ n_sub_elem()

dof_id_type libMesh::MeshBase::n_sub_elem ( ) const
Returns
The number of elements that will be written out in certain I/O formats.

For example, a 9-noded quadrilateral will be broken into 4 linear sub-elements for plotting purposes. Thus, for a mesh of 2 QUAD9 elements n_tecplot_elem() will return 8. Implemented in terms of element_iterators.

Definition at line 527 of file mesh_base.C.

528 {
529  dof_id_type ne=0;
530 
531  for (const auto & elem : this->element_ptr_range())
532  ne += elem->n_sub_elem();
533 
534  return ne;
535 }

◆ n_subdomains()

subdomain_id_type libMesh::MeshBase::n_subdomains ( ) const
Returns
The number of subdomains in the global mesh. Subdomains correspond to separate subsets of the mesh which could correspond e.g. to different materials in a solid mechanics application, or regions where different physical processes are important. The subdomain mapping is independent from the parallel decomposition.

Definition at line 477 of file mesh_base.C.

478 {
479  // This requires an inspection on every processor
480  parallel_object_only();
481 
482  std::set<subdomain_id_type> ids;
483 
484  this->subdomain_ids (ids);
485 
486  return cast_int<subdomain_id_type>(ids.size());
487 }

Referenced by libMesh::XdrIO::write(), and libMesh::NameBasedIO::write_nodal_data().

◆ n_unpartitioned_elem()

dof_id_type libMesh::MeshBase::n_unpartitioned_elem ( ) const
inline
Returns
The number of elements owned by no processor.

Definition at line 409 of file mesh_base.h.

References libMesh::DofObject::invalid_processor_id, and n_elem_on_proc().

Referenced by libMesh::UnstructuredMesh::all_second_order(), and libMesh::DistributedMesh::parallel_n_elem().

◆ n_unpartitioned_nodes()

dof_id_type libMesh::MeshBase::n_unpartitioned_nodes ( ) const
inline
Returns
The number of nodes owned by no processor.

Definition at line 309 of file mesh_base.h.

References libMesh::DofObject::invalid_processor_id, and n_nodes_on_proc().

Referenced by libMesh::DistributedMesh::parallel_n_nodes().

◆ next_unique_id()

unique_id_type libMesh::MeshBase::next_unique_id ( )
inline
Returns
The next unique id to be used.

Definition at line 322 of file mesh_base.h.

322 { return _next_unique_id; }

References _next_unique_id.

◆ node() [1/2]

virtual Node& libMesh::MeshBase::node ( const dof_id_type  i)
inlinevirtual
Returns
A reference to the \( i^{th} \) node, which should be present in this processor's subset of the mesh data structure.

Definition at line 485 of file mesh_base.h.

486  {
487  libmesh_deprecated();
488  return *this->node_ptr(i);
489  }

References node_ptr().

◆ node() [2/2]

virtual const Node& libMesh::MeshBase::node ( const dof_id_type  i) const
inlinevirtual
Returns
A constant reference (for reading only) to the \( i^{th} \) node, which should be present in this processor's subset of the mesh data structure.

Definition at line 471 of file mesh_base.h.

472  {
473  libmesh_deprecated();
474  return *this->node_ptr(i);
475  }

References node_ptr().

Referenced by libMesh::UnstructuredMesh::all_first_order(), libMesh::ReplicatedMesh::clear(), libMesh::DistributedMesh::clear(), libMesh::ReplicatedMesh::get_boundary_points(), libMesh::ReplicatedMesh::renumber_nodes_and_elements(), libMesh::DistributedMesh::renumber_nodes_and_elements(), and libMesh::ReplicatedMesh::stitching_helper().

◆ node_ptr() [1/2]

virtual const Node* libMesh::MeshBase::node_ptr ( const dof_id_type  i) const
pure virtual
Returns
A pointer to the \( i^{th} \) node, which should be present in this processor's subset of the mesh data structure.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::GMVIO::_read_one_cell(), add_cube_convex_hull_to_mesh(), libMesh::MeshRefinement::add_node(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::AbaqusIO::assign_boundary_node_ids(), libMesh::TetGenMeshInterface::assign_nodes_to_elem(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::MeshTools::Modification::change_boundary_id(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::TriangleWrapper::copy_tri_to_mesh(), libMesh::UnstructuredMesh::create_submesh(), libMesh::TetGenIO::element_in(), main(), node(), node_ref(), libMesh::BoundaryInfo::operator=(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::VTKIO::read(), libMesh::CheckpointIO::read_connectivity(), libMesh::AbaqusIO::read_elements(), libMesh::UCDIO::read_implementation(), libMesh::GmshIO::read_mesh(), libMesh::OFFIO::read_stream(), libMesh::MatlabIO::read_stream(), libMesh::DofMap::scatter_constraints(), libMesh::BoundaryInfo::sync(), EquationSystemsTest::testPostInitAddElem(), SystemsTest::testProjectMatrix3D(), EquationSystemsTest::testReinitWithNodeElem(), BoundaryInfoTest::testShellFaceConstraints(), libMesh::Parallel::Packing< Elem * >::unpack(), and libMesh::CheckpointIO::write_nodesets().

◆ node_ptr() [2/2]

virtual Node* libMesh::MeshBase::node_ptr ( const dof_id_type  i)
pure virtual
Returns
A writable pointer to the \( i^{th} \) node, which should be present in this processor's subset of the mesh data structure.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ node_ptr_range() [1/2]

virtual SimpleRange<const_node_iterator> libMesh::MeshBase::node_ptr_range ( ) const
pure virtual

◆ node_ptr_range() [2/2]

virtual SimpleRange<node_iterator> libMesh::MeshBase::node_ptr_range ( )
pure virtual

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::EquationSystems::_add_system_to_nodes_and_elems(), libMesh::UnstructuredMesh::all_first_order(), libMesh::EquationSystems::allgather(), assemble_shell(), libMesh::MeshCommunication::assign_global_indices(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::MeshCommunication::delete_remote_elements(), NodalNeighborsTest::do_test(), libMesh::LocationMap< T >::fill(), libMesh::TetGenMeshInterface::fill_pointlist(), libMesh::LocationMap< T >::init(), libMesh::EquationSystems::init(), libMesh::MeshTools::libmesh_assert_connected_nodes(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_equal_n_systems(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Node >(), libMesh::MeshTools::libmesh_assert_topology_consistent_procids< Node >(), main(), libMesh::UNVIO::nodes_out(), DistortTest::perturb_and_check(), libMesh::MeshTools::Subdivision::prepare_subdivision_mesh(), libMesh::XdrIO::read_serialized_nodes(), libMesh::VariationalMeshSmoother::readgr(), libMesh::MeshTools::Modification::redistribute(), libMesh::EquationSystems::reinit_solutions(), libMesh::MeshTools::Modification::rotate(), libMesh::MeshTools::Modification::scale(), scale_mesh_and_plot(), libMesh::BoundaryInfo::sync(), MeshSpatialDimensionTest::test1D(), MeshSpatialDimensionTest::test2D(), ExtraIntegersTest::test_and_set_initial_data(), PartitionerTest< PartitionerSubclass, MeshClass >::testPartition(), SystemsTest::testProjectMatrix1D(), SystemsTest::testProjectMatrix2D(), SystemsTest::testProjectMatrix3D(), WriteVecAndScalar::testWrite(), transform_mesh_and_plot(), libMesh::MeshTools::Modification::translate(), libMesh::Tree< N >::Tree(), libMesh::TriangleInterface::triangulate(), libMesh::ExodusII_IO::write_nodal_data(), libMesh::UCDIO::write_nodes(), and libMesh::VariationalMeshSmoother::writegr().

◆ node_ref() [1/2]

virtual Node& libMesh::MeshBase::node_ref ( const dof_id_type  i)
inlinevirtual
Returns
A reference to the \( i^{th} \) node, which should be present in this processor's subset of the mesh data structure.

Definition at line 459 of file mesh_base.h.

459  {
460  return *this->node_ptr(i);
461  }

References node_ptr().

◆ node_ref() [2/2]

virtual const Node& libMesh::MeshBase::node_ref ( const dof_id_type  i) const
inlinevirtual

◆ nodes_begin() [1/2]

virtual const_node_iterator libMesh::MeshBase::nodes_begin ( ) const
pure virtual

◆ nodes_begin() [2/2]

virtual node_iterator libMesh::MeshBase::nodes_begin ( )
pure virtual

◆ nodes_end() [1/2]

virtual const_node_iterator libMesh::MeshBase::nodes_end ( ) const
pure virtual

◆ nodes_end() [2/2]

virtual node_iterator libMesh::MeshBase::nodes_end ( )
pure virtual

◆ not_active_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_active_elements_begin ( ) const
pure virtual

◆ not_active_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::not_active_elements_begin ( )
pure virtual

◆ not_active_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_active_elements_end ( ) const
pure virtual

◆ not_active_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::not_active_elements_end ( )
pure virtual

◆ not_ancestor_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_ancestor_elements_begin ( ) const
pure virtual

◆ not_ancestor_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::not_ancestor_elements_begin ( )
pure virtual

◆ not_ancestor_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_ancestor_elements_end ( ) const
pure virtual

◆ not_ancestor_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::not_ancestor_elements_end ( )
pure virtual

◆ not_level_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_level_elements_begin ( unsigned int  level) const
pure virtual

◆ not_level_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::not_level_elements_begin ( unsigned int  level)
pure virtual

◆ not_level_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_level_elements_end ( unsigned int  level) const
pure virtual

◆ not_level_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::not_level_elements_end ( unsigned int  level)
pure virtual

◆ not_local_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_local_elements_begin ( ) const
pure virtual

◆ not_local_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::not_local_elements_begin ( )
pure virtual

◆ not_local_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_local_elements_end ( ) const
pure virtual

◆ not_local_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::not_local_elements_end ( )
pure virtual

◆ not_subactive_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_subactive_elements_begin ( ) const
pure virtual

◆ not_subactive_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::not_subactive_elements_begin ( )
pure virtual

◆ not_subactive_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::not_subactive_elements_end ( ) const
pure virtual

◆ not_subactive_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::not_subactive_elements_end ( )
pure virtual

◆ operator=() [1/2]

MeshBase& libMesh::MeshBase::operator= ( const MeshBase )
delete

Copy and move assignment are not allowed because MeshBase subclasses manually manage memory (Elems and Nodes) and therefore the default versions of these operators would leak memory.

Since we don't want to maintain non-default copy and move assignment operators at this time, the safest and most self-documenting approach is to delete them.

If you need to copy a Mesh, use the clone() method.

◆ operator=() [2/2]

MeshBase& libMesh::MeshBase::operator= ( MeshBase &&  )
delete

◆ own_node()

virtual void libMesh::MeshBase::own_node ( Node )
inlinevirtual

Takes ownership of node n on this partition of a distributed mesh, by setting n.processor_id() to this->processor_id(), as well as changing n.id() and moving it in the mesh's internal container to give it a new authoritative id.

Reimplemented in libMesh::DistributedMesh.

Definition at line 656 of file mesh_base.h.

656 {}

Referenced by libMesh::UnstructuredMesh::all_second_order().

◆ parallel_max_unique_id()

virtual unique_id_type libMesh::MeshBase::parallel_max_unique_id ( ) const
pure virtual

◆ parallel_n_elem()

virtual dof_id_type libMesh::MeshBase::parallel_n_elem ( ) const
pure virtual
Returns
The number of elements in the mesh.

The parallel_n_elem() function computes a parallel-synchronized value on distributed meshes, and so must be called in parallel only.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::Nemesis_IO_Helper::initialize(), and libMesh::Nemesis_IO::read().

◆ parallel_n_nodes()

virtual dof_id_type libMesh::MeshBase::parallel_n_nodes ( ) const
pure virtual
Returns
The number of nodes in the mesh.

This function and others must be overridden in derived classes since the MeshBase class has no specific storage for nodes or elements. The parallel_n_nodes() function computes a parallel-synchronized value on distributed meshes, and so must be called in parallel only.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::Nemesis_IO_Helper::initialize(), and libMesh::Nemesis_IO::read().

◆ partition() [1/2]

void libMesh::MeshBase::partition ( )
inline

Definition at line 992 of file mesh_base.h.

993  { this->partition(this->n_processors()); }

References libMesh::ParallelObject::n_processors().

◆ partition() [2/2]

void libMesh::MeshBase::partition ( const unsigned int  n_parts)
virtual

Call the default partitioner (currently metis_partition()).

Definition at line 599 of file mesh_base.C.

600 {
601  // If we get here and we have unpartitioned elements, we need that
602  // fixed.
603  if (this->n_unpartitioned_elem() > 0)
604  {
606  libmesh_assert (this->is_serial());
607  partitioner()->partition (*this, n_parts);
608  }
609  // A nullptr partitioner or a skip_partitioning(true) call or a
610  // skip_noncritical_partitioning(true) call means don't repartition;
611  // skip_noncritical_partitioning() checks all these.
612  else if (!skip_noncritical_partitioning())
613  {
614  partitioner()->partition (*this, n_parts);
615  }
616  else
617  {
618  // Adaptive coarsening may have "orphaned" nodes on processors
619  // whose elements no longer share them. We need to check for
620  // and possibly fix that.
622 
623  // Make sure locally cached partition count is correct
624  this->recalculate_n_partitions();
625 
626  // Make sure any other locally cached data is correct
627  this->update_post_partitioning();
628  }
629 }

References libMesh::MeshTools::correct_node_proc_ids(), libMesh::ReferenceElem::get(), and libMesh::libmesh_assert().

Referenced by main(), libMesh::split_mesh(), ExtraIntegersTest::test_helper(), MappedSubdomainPartitionerTest::testMappedSubdomainPartitioner(), EquationSystemsTest::testRepartitionThenReinit(), and CheckpointIOTest::testSplitter().

◆ partitioner()

virtual std::unique_ptr<Partitioner>& libMesh::MeshBase::partitioner ( )
inlinevirtual

◆ pid_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::pid_elements_begin ( processor_id_type  proc_id) const
pure virtual

◆ pid_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::pid_elements_begin ( processor_id_type  proc_id)
pure virtual

◆ pid_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::pid_elements_end ( processor_id_type  proc_id) const
pure virtual

◆ pid_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::pid_elements_end ( processor_id_type  proc_id)
pure virtual

◆ pid_nodes_begin() [1/2]

virtual const_node_iterator libMesh::MeshBase::pid_nodes_begin ( processor_id_type  proc_id) const
pure virtual

◆ pid_nodes_begin() [2/2]

virtual node_iterator libMesh::MeshBase::pid_nodes_begin ( processor_id_type  proc_id)
pure virtual

Iterate over nodes with processor_id() == proc_id.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshTools::create_nodal_bounding_box().

◆ pid_nodes_end() [1/2]

virtual const_node_iterator libMesh::MeshBase::pid_nodes_end ( processor_id_type  proc_id) const
pure virtual

◆ pid_nodes_end() [2/2]

virtual node_iterator libMesh::MeshBase::pid_nodes_end ( processor_id_type  proc_id)
pure virtual

◆ point()

virtual const Point& libMesh::MeshBase::point ( const dof_id_type  i) const
pure virtual

◆ point_locator()

const PointLocatorBase & libMesh::MeshBase::point_locator ( ) const
Returns
A pointer to a PointLocatorBase object for this mesh, constructing a master PointLocator first if necessary.

Definition at line 652 of file mesh_base.C.

653 {
654  libmesh_deprecated();
655 
656  if (_point_locator.get() == nullptr)
657  {
658  // PointLocator construction may not be safe within threads
660 
662 
664  _point_locator->set_close_to_point_tol(_point_locator_close_to_point_tol);
665  }
666 
667  return *_point_locator;
668 }

References libMesh::Threads::in_threads, libMesh::libmesh_assert(), and libMesh::TREE_ELEMENTS.

◆ prepare_for_use()

void libMesh::MeshBase::prepare_for_use ( const bool  skip_renumber_nodes_and_elements = false,
const bool  skip_find_neighbors = false 
)

Prepare a newly ecreated (or read) mesh for use.

This involves 4 steps: 1.) call find_neighbors() 2.) call partition() 3.) call renumber_nodes_and_elements() 4.) call cache_elem_dims()

The argument to skip renumbering is now deprecated - to prevent a mesh from being renumbered, set allow_renumbering(false).

If this is a distributed mesh, local copies of remote elements will be deleted here - to keep those elements replicated during preparation, set allow_remote_element_removal(false).

Definition at line 318 of file mesh_base.C.

319 {
320  LOG_SCOPE("prepare_for_use()", "MeshBase");
321 
322  parallel_object_only();
323 
324  libmesh_assert(this->comm().verify(this->is_serial()));
325 
326  // A distributed mesh may have processors with no elements (or
327  // processors with no elements of higher dimension, if we ever
328  // support mixed-dimension meshes), but we want consistent
329  // mesh_dimension anyways.
330  //
331  // cache_elem_dims() should get the elem_dimensions() and
332  // mesh_dimension() correct later, and we don't need it earlier.
333 
334 
335  // Renumber the nodes and elements so that they in contiguous
336  // blocks. By default, _skip_renumber_nodes_and_elements is false.
337  //
338  // We may currently change that by passing
339  // skip_renumber_nodes_and_elements==true to this function, but we
340  // should use the allow_renumbering() accessor instead.
341  //
342  // Instances where you if prepare_for_use() should not renumber the nodes
343  // and elements include reading in e.g. an xda/r or gmv file. In
344  // this case, the ordering of the nodes may depend on an accompanying
345  // solution, and the node ordering cannot be changed.
346 
347  if (skip_renumber_nodes_and_elements)
348  {
349  libmesh_deprecated();
350  this->allow_renumbering(false);
351  }
352 
353  // Mesh modification operations might not leave us with consistent
354  // id counts, but our partitioner might need that consistency.
357  else
359 
360  // Let all the elements find their neighbors
361  if (!skip_find_neighbors)
362  this->find_neighbors();
363 
364  // The user may have set boundary conditions. We require that the
365  // boundary conditions were set consistently. Because we examine
366  // neighbors when evaluating non-raw boundary condition IDs, this
367  // assert is only valid when our neighbor links are in place.
368 #ifdef DEBUG
370 #endif
371 
372  // Search the mesh for all the dimensions of the elements
373  // and cache them.
374  this->cache_elem_dims();
375 
376  // Search the mesh for elements that have a neighboring element
377  // of dim+1 and set that element as the interior parent
378  this->detect_interior_parents();
379 
380  // Fix up node unique ids in case mesh generation code didn't take
381  // exceptional care to do so.
382  // MeshCommunication().make_node_unique_ids_parallel_consistent(*this);
383 
384  // We're going to still require that mesh generation code gets
385  // element unique ids consistent.
386 #if defined(DEBUG) && defined(LIBMESH_ENABLE_UNIQUE_ID)
388 #endif
389 
390  // Reset our PointLocator. Any old locator is invalidated any time
391  // the elements in the underlying elements in the mesh have changed,
392  // so we clear it here.
393  this->clear_point_locator();
394 
395  // Allow our GhostingFunctor objects to reinit if necessary.
396  // Do this before partitioning and redistributing, and before
397  // deleting remote elements.
398  for (auto & gf : _ghosting_functors)
399  {
400  libmesh_assert(gf);
401  gf->mesh_reinit();
402  }
403 
404  // Partition the mesh unless *all* partitioning is to be skipped.
405  // If only noncritical partitioning is to be skipped, the
406  // partition() call will still check for orphaned nodes.
407  if (!skip_partitioning())
408  this->partition();
409 
410  // If we're using DistributedMesh, we'll probably want it
411  // parallelized.
413  this->delete_remote_elements();
414 
417 
418  // The mesh is now prepared for use.
419  _is_prepared = true;
420 
421 #if defined(DEBUG) && defined(LIBMESH_ENABLE_UNIQUE_ID)
424 #endif
425 }

References libMesh::libmesh_assert(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), and libMesh::MeshTools::libmesh_assert_valid_unique_ids().

Referenced by LinearElasticityWithContact::add_contact_edge_elements(), libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Subdivision::all_subdivision(), libMesh::MeshTools::Modification::all_tri(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), GetBoundaryPointsTest::build_mesh(), MixedDimensionMeshTest::build_mesh(), MeshfunctionDFEM::build_mesh(), SlitMeshTest::build_mesh(), MixedDimensionNonUniformRefinement::build_mesh(), MixedDimensionNonUniformRefinementTriangle::build_mesh(), MixedDimensionNonUniformRefinement3D::build_mesh(), libMesh::MeshRefinement::coarsen_elements(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::create_submesh(), libMesh::MeshTools::Modification::flatten(), main(), libMesh::MeshTools::Subdivision::prepare_subdivision_mesh(), libMesh::GMVIO::read(), libMesh::UnstructuredMesh::read(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::MeshRefinement::refine_elements(), libMesh::ReplicatedMesh::stitching_helper(), libMesh::BoundaryInfo::sync(), MeshSpatialDimensionTest::test1D(), MeshSpatialDimensionTest::test2D(), SystemsTest::testBlockRestrictedVarNDofs(), SystemsTest::testDofCouplingWithVarGroups(), MeshInputTest::testDynaReadElem(), MeshInputTest::testDynaReadPatch(), MeshInputTest::testExodusCopyElementSolution(), MeshInputTest::testExodusWriteElementDataFromDiscontinuousNodalData(), EquationSystemsTest::testPostInitAddElem(), SystemsTest::testProjectMatrix3D(), EquationSystemsTest::testReinitWithNodeElem(), BoundaryInfoTest::testShellFaceConstraints(), WriteVecAndScalar::testWrite(), tetrahedralize_domain(), libMesh::TriangleInterface::triangulate(), libMesh::MeshRefinement::uniformly_coarsen(), and libMesh::MeshRefinement::uniformly_refine().

◆ print_info()

void libMesh::MeshBase::print_info ( std::ostream &  os = libMesh::out) const

Prints relevant information about the mesh.

Definition at line 585 of file mesh_base.C.

586 {
587  os << this->get_info()
588  << std::endl;
589 }

Referenced by assemble_and_solve(), libMesh::InfElemBuilder::build_inf_elem(), main(), and libMesh::operator<<().

◆ processor_id()

processor_id_type libMesh::ParallelObject::processor_id ( ) const
inlineinherited
Returns
The rank of this processor in the group.

Definition at line 106 of file parallel_object.h.

107  { return cast_int<processor_id_type>(_communicator.rank()); }

References libMesh::ParallelObject::_communicator.

Referenced by libMesh::BoundaryInfo::_find_id_maps(), libMesh::EquationSystems::_read_impl(), libMesh::PetscDMWrapper::add_dofs_to_section(), libMesh::DistributedMesh::add_elem(), libMesh::BoundaryInfo::add_elements(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::DistributedMesh::add_node(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::FEMSystem::assembly(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::EquationSystems::build_parallel_elemental_solution_vector(), libMesh::DistributedMesh::clear(), libMesh::ExodusII_IO_Helper::close(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::compute_communication_map_parameters(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::RBConstruction::compute_max_error_bound(), libMesh::Nemesis_IO_Helper::compute_node_communication_maps(), libMesh::Nemesis_IO_Helper::compute_num_global_elem_blocks(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::Nemesis_IO_Helper::construct_nemesis_filename(), libMesh::ExodusII_IO::copy_scalar_solution(), libMesh::MeshTools::correct_node_proc_ids(), libMesh::ExodusII_IO_Helper::create(), libMesh::DistributedMesh::delete_elem(), libMesh::DistributedMesh::delete_node(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DistributedMesh::DistributedMesh(), libMesh::DofMap::end_dof(), libMesh::DofMap::end_old_dof(), libMesh::EnsightIO::EnsightIO(), libMesh::RBEIMConstruction::evaluate_mesh_function(), libMesh::MeshFunction::find_element(), libMesh::MeshFunction::find_elements(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::DofMap::first_dof(), libMesh::DofMap::first_old_dof(), libMesh::Nemesis_IO_Helper::get_cmap_params(), libMesh::Nemesis_IO_Helper::get_eb_info_global(), libMesh::Nemesis_IO_Helper::get_elem_cmap(), libMesh::Nemesis_IO_Helper::get_elem_map(), libMesh::DofMap::get_info(), libMesh::Nemesis_IO_Helper::get_init_global(), libMesh::Nemesis_IO_Helper::get_init_info(), libMesh::Nemesis_IO_Helper::get_loadbal_param(), libMesh::DofMap::get_local_constraints(), libMesh::Nemesis_IO_Helper::get_node_cmap(), libMesh::Nemesis_IO_Helper::get_node_map(), libMesh::Nemesis_IO_Helper::get_ns_param_global(), libMesh::Nemesis_IO_Helper::get_ss_param_global(), libMesh::SparsityPattern::Build::handle_vi_vj(), libMesh::SystemSubsetBySubdomain::init(), libMesh::PetscDMWrapper::init_and_attach_petscdm(), HeatSystem::init_data(), libMesh::ExodusII_IO_Helper::initialize(), libMesh::ExodusII_IO_Helper::initialize_element_variables(), libMesh::ExodusII_IO_Helper::initialize_global_variables(), libMesh::ExodusII_IO_Helper::initialize_nodal_variables(), libMesh::DistributedMesh::insert_elem(), libMesh::DofMap::is_evaluable(), libMesh::SparsityPattern::Build::join(), libMesh::DofMap::last_dof(), libMesh::TransientRBEvaluation::legacy_write_offline_data_to_files(), libMesh::RBEIMEvaluation::legacy_write_offline_data_to_files(), libMesh::RBEvaluation::legacy_write_offline_data_to_files(), libMesh::RBSCMEvaluation::legacy_write_offline_data_to_files(), libMesh::RBEIMEvaluation::legacy_write_out_interpolation_points_elem(), libMesh::MeshTools::libmesh_assert_consistent_distributed(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), libMesh::MeshTools::libmesh_assert_contiguous_dof_ids(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_valid_neighbors(), libMesh::DistributedMesh::libmesh_assert_valid_parallel_object_ids(), libMesh::DofMap::local_variable_indices(), main(), libMesh::MeshRefinement::make_coarsening_compatible(), AugmentSparsityOnInterface::mesh_reinit(), n_active_local_elem(), libMesh::BoundaryInfo::n_boundary_conds(), libMesh::BoundaryInfo::n_edge_conds(), libMesh::DofMap::n_local_dofs(), libMesh::System::n_local_dofs(), n_local_elem(), n_local_nodes(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::BoundaryInfo::n_shellface_conds(), libMesh::SparsityPattern::Build::operator()(), libMesh::DistributedMesh::own_node(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::DofMap::print_dof_constraints(), libMesh::Nemesis_IO_Helper::put_cmap_params(), libMesh::Nemesis_IO_Helper::put_elem_cmap(), libMesh::Nemesis_IO_Helper::put_elem_map(), libMesh::Nemesis_IO_Helper::put_loadbal_param(), libMesh::Nemesis_IO_Helper::put_node_cmap(), libMesh::Nemesis_IO_Helper::put_node_map(), libMesh::NameBasedIO::read(), libMesh::Nemesis_IO::read(), libMesh::XdrIO::read(), libMesh::CheckpointIO::read(), libMesh::ExodusII_IO_Helper::read_elem_num_map(), libMesh::ExodusII_IO_Helper::read_global_values(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::System::read_header(), libMesh::RBEvaluation::read_in_vectors_from_multiple_files(), libMesh::System::read_legacy_data(), libMesh::ExodusII_IO_Helper::read_node_num_map(), libMesh::System::read_parallel_data(), libMesh::TransientRBConstruction::read_riesz_representors_from_files(), libMesh::RBConstruction::read_riesz_representors_from_files(), libMesh::System::read_SCALAR_dofs(), libMesh::XdrIO::read_serialized_bc_names(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::System::read_serialized_blocked_dof_objects(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::System::read_serialized_data(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::XdrIO::read_serialized_subdomain_names(), libMesh::System::read_serialized_vector(), libMesh::System::read_serialized_vectors(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::DofMap::scatter_constraints(), libMesh::CheckpointIO::select_split_config(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::PetscDMWrapper::set_point_range_in_section(), libMesh::LaplaceMeshSmoother::smooth(), DefaultCouplingTest::testCoupling(), PointNeighborCouplingTest::testCoupling(), MeshInputTest::testDynaReadElem(), MeshInputTest::testDynaReadPatch(), MeshInputTest::testExodusCopyElementSolution(), MeshInputTest::testExodusWriteElementDataFromDiscontinuousNodalData(), SystemsTest::testProjectMatrix1D(), SystemsTest::testProjectMatrix2D(), SystemsTest::testProjectMatrix3D(), BoundaryInfoTest::testShellFaceConstraints(), CheckpointIOTest::testSplitter(), WriteVecAndScalar::testWrite(), libMesh::MeshTools::total_weight(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::Parallel::Packing< Node * >::unpack(), libMesh::Parallel::Packing< Elem * >::unpack(), libMesh::DistributedMesh::update_parallel_id_counts(), libMesh::DTKAdapter::update_variable_values(), libMesh::NameBasedIO::write(), libMesh::XdrIO::write(), libMesh::CheckpointIO::write(), libMesh::EquationSystems::write(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::ExodusII_IO::write_element_data(), libMesh::ExodusII_IO_Helper::write_element_values(), libMesh::ExodusII_IO_Helper::write_element_values_element_major(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::ExodusII_IO::write_global_data(), libMesh::ExodusII_IO_Helper::write_global_values(), libMesh::System::write_header(), libMesh::ExodusII_IO::write_information_records(), libMesh::ExodusII_IO_Helper::write_information_records(), libMesh::ExodusII_IO_Helper::write_nodal_coordinates(), libMesh::VTKIO::write_nodal_data(), libMesh::UCDIO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data_discontinuous(), libMesh::ExodusII_IO_Helper::write_nodal_values(), libMesh::Nemesis_IO_Helper::write_nodesets(), libMesh::ExodusII_IO_Helper::write_nodesets(), libMesh::RBEvaluation::write_out_vectors(), write_output_solvedata(), libMesh::System::write_parallel_data(), libMesh::RBConstruction::write_riesz_representors_to_files(), libMesh::System::write_SCALAR_dofs(), libMesh::XdrIO::write_serialized_bc_names(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::System::write_serialized_blocked_dof_objects(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::System::write_serialized_data(), libMesh::XdrIO::write_serialized_nodes(), libMesh::XdrIO::write_serialized_nodesets(), libMesh::XdrIO::write_serialized_subdomain_names(), libMesh::System::write_serialized_vector(), libMesh::System::write_serialized_vectors(), libMesh::ExodusII_IO_Helper::write_sideset_data(), libMesh::Nemesis_IO_Helper::write_sidesets(), libMesh::ExodusII_IO_Helper::write_sidesets(), libMesh::ExodusII_IO::write_timestep(), libMesh::ExodusII_IO_Helper::write_timestep(), and libMesh::ExodusII_IO::write_timestep_discontinuous().

◆ query_elem() [1/2]

virtual Elem* libMesh::MeshBase::query_elem ( const dof_id_type  i)
inlinevirtual
Returns
A writable pointer to the \( i^{th} \) element, or nullptr if no such element exists in this processor's mesh data structure.

Definition at line 609 of file mesh_base.h.

610  {
611  libmesh_deprecated();
612  return this->query_elem_ptr(i);
613  }

References query_elem_ptr().

◆ query_elem() [2/2]

virtual const Elem* libMesh::MeshBase::query_elem ( const dof_id_type  i) const
inlinevirtual
Returns
A pointer to the \( i^{th} \) element, or nullptr if no such element exists in this processor's mesh data structure.

Definition at line 595 of file mesh_base.h.

596  {
597  libmesh_deprecated();
598  return this->query_elem_ptr(i);
599  }

References query_elem_ptr().

◆ query_elem_ptr() [1/2]

virtual const Elem* libMesh::MeshBase::query_elem_ptr ( const dof_id_type  i) const
pure virtual

◆ query_elem_ptr() [2/2]

virtual Elem* libMesh::MeshBase::query_elem_ptr ( const dof_id_type  i)
pure virtual
Returns
A writable pointer to the \( i^{th} \) element, or nullptr if no such element exists in this processor's mesh data structure.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ query_node_ptr() [1/2]

virtual const Node* libMesh::MeshBase::query_node_ptr ( const dof_id_type  i) const
pure virtual

◆ query_node_ptr() [2/2]

virtual Node* libMesh::MeshBase::query_node_ptr ( const dof_id_type  i)
pure virtual
Returns
A writable pointer to the \( i^{th} \) node, or nullptr if no such node exists in this processor's mesh data structure.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ read()

virtual void libMesh::MeshBase::read ( const std::string &  name,
void *  mesh_data = nullptr,
bool  skip_renumber_nodes_and_elements = false,
bool  skip_find_neighbors = false 
)
pure virtual

Interfaces for reading/writing a mesh to/from a file.

Must be implemented in derived classes.

Implemented in libMesh::UnstructuredMesh.

Referenced by build_domain(), main(), and BoundaryInfoTest::testEdgeBoundaryConditions().

◆ recalculate_n_partitions()

unsigned int libMesh::MeshBase::recalculate_n_partitions ( )

In a few (very rare) cases, the user may have manually tagged the elements with specific processor IDs by hand, without using a partitioner.

In this case, the Mesh will not know that the total number of partitions, _n_parts, has changed, unless you call this function. This is an O(N active elements) calculation. The return value is the number of partitions, and _n_parts is also set by this function.

Definition at line 631 of file mesh_base.C.

632 {
633  // This requires an inspection on every processor
634  parallel_object_only();
635 
636  unsigned int max_proc_id=0;
637 
638  for (const auto & elem : this->active_local_element_ptr_range())
639  max_proc_id = std::max(max_proc_id, static_cast<unsigned int>(elem->processor_id()));
640 
641  // The number of partitions is one more than the max processor ID.
642  _n_parts = max_proc_id+1;
643 
644  this->comm().max(_n_parts);
645 
646  return _n_parts;
647 }

◆ redistribute()

virtual void libMesh::MeshBase::redistribute ( )
inlinevirtual

Redistribute elements between processors.

This gets called automatically by the Partitioner, and is a no-op in the case of a ReplicatedMesh or serialized DistributedMesh

Reimplemented in libMesh::DistributedMesh.

Definition at line 1000 of file mesh_base.h.

1000 {}

◆ remove_ghosting_functor()

void libMesh::MeshBase::remove_ghosting_functor ( GhostingFunctor ghosting_functor)

Removes a functor which was previously added to the set of ghosting functors.

Definition at line 450 of file mesh_base.C.

451 {
452  _ghosting_functors.erase(&ghosting_functor);
453 
454  auto it = _shared_functors.find(&ghosting_functor);
455  if (it != _shared_functors.end())
456  _shared_functors.erase(it);
457 }

Referenced by libMesh::DofMap::clear(), libMesh::DofMap::remove_algebraic_ghosting_functor(), libMesh::DofMap::remove_coupling_functor(), EquationSystemsTest::testDisableDefaultGhosting(), and libMesh::DofMap::~DofMap().

◆ renumber_elem()

virtual void libMesh::MeshBase::renumber_elem ( dof_id_type  old_id,
dof_id_type  new_id 
)
pure virtual

Changes the id of element old_id, both by changing elem(old_id)->id() and by moving elem(old_id) in the mesh's internal container.

No element with the id new_id should already exist.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshCommunication::make_elems_parallel_consistent().

◆ renumber_node()

virtual void libMesh::MeshBase::renumber_node ( dof_id_type  old_id,
dof_id_type  new_id 
)
pure virtual

Changes the id of node old_id, both by changing node(old_id)->id() and by moving node(old_id) in the mesh's internal container.

No element with the id new_id should already exist.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ renumber_nodes_and_elements()

virtual void libMesh::MeshBase::renumber_nodes_and_elements ( )
pure virtual

After partitioning a mesh it is useful to renumber the nodes and elements so that they lie in contiguous blocks on the processors.

This method does just that.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::UnstructuredMesh::all_first_order(), libMesh::UnstructuredMesh::all_second_order(), libMesh::UnstructuredMesh::contract(), and write_output().

◆ reserve_elem()

virtual void libMesh::MeshBase::reserve_elem ( const dof_id_type  ne)
pure virtual

Reserves space for a known number of elements.

Note
This method may or may not do anything, depending on the actual Mesh implementation. If you know the number of elements you will add and call this method before repeatedly calling add_point() the implementation will be more efficient.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshTools::Generation::build_extrusion(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::ExodusII_IO::read(), libMesh::XdrIO::read_header(), and libMesh::GmshIO::read_mesh().

◆ reserve_nodes()

virtual void libMesh::MeshBase::reserve_nodes ( const dof_id_type  nn)
pure virtual

Reserves space for a known number of nodes.

Note
This method may or may not do anything, depending on the actual Mesh implementation. If you know the number of nodes you will add and call this method before repeatedly calling add_point() the implementation will be more efficient.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::ExodusII_IO::read(), libMesh::XdrIO::read_header(), and libMesh::GmshIO::read_mesh().

◆ semilocal_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::semilocal_elements_begin ( ) const
pure virtual

◆ semilocal_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::semilocal_elements_begin ( )
pure virtual

Iterate over elements for which elem->is_semilocal() is true for the current processor.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ semilocal_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::semilocal_elements_end ( ) const
pure virtual

◆ semilocal_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::semilocal_elements_end ( )
pure virtual

◆ set_count_lower_dim_elems_in_point_locator()

void libMesh::MeshBase::set_count_lower_dim_elems_in_point_locator ( bool  count_lower_dim_elems)

In the point locator, do we count lower dimensional elements when we refine point locator regions? This is relevant in tree-based point locators, for example.

Definition at line 703 of file mesh_base.C.

704 {
705  _count_lower_dim_elems_in_point_locator = count_lower_dim_elems;
706 }

◆ set_default_mapping_data()

void libMesh::MeshBase::set_default_mapping_data ( const unsigned char  data)
inline

Set the default master space to physical space mapping basis functions to be used on newly added elements.

Definition at line 732 of file mesh_base.h.

732  {
734  }

References _default_mapping_data, and data.

Referenced by libMesh::DynaIO::read_mesh(), RationalMapTest< elem_type >::setUp(), and FETest< order, family, elem_type >::setUp().

◆ set_default_mapping_type()

void libMesh::MeshBase::set_default_mapping_type ( const ElemMappingType  type)
inline

Set the default master space to physical space mapping basis functions to be used on newly added elements.

Definition at line 716 of file mesh_base.h.

716  {
717  _default_mapping_type = type;
718  }

References _default_mapping_type.

Referenced by libMesh::DynaIO::read_mesh(), and RationalMapTest< elem_type >::setUp().

◆ set_distributed()

virtual void libMesh::MeshBase::set_distributed ( )
inlinevirtual

Asserts that not all elements and nodes of the mesh necessarily exist on the current processor.

Only valid to call on classes which can be created in a distributed form.

Reimplemented in libMesh::DistributedMesh.

Definition at line 174 of file mesh_base.h.

175  { libmesh_error(); }

Referenced by libMesh::CheckpointIO::read().

◆ set_elem_dimensions()

void libMesh::MeshBase::set_elem_dimensions ( const std::set< unsigned char > &  elem_dims)

Most of the time you should not need to call this, as the element dimensions will be set automatically by a call to cache_elem_dims(), therefore only call this if you know what you're doing.

In some specialized situations, for example when adding a single Elem on all procs, it can be faster to skip calling cache_elem_dims() and simply specify the element dimensions manually, which is why this setter exists.

Definition at line 144 of file mesh_base.C.

145 {
146 #ifdef DEBUG
147  // In debug mode, we call cache_elem_dims() and then make sure
148  // the result actually agrees with what the user specified.
149  parallel_object_only();
150 
151  this->cache_elem_dims();
152  libmesh_assert_msg(_elem_dims == elem_dims, \
153  "Specified element dimensions does not match true element dimensions!");
154 #endif
155 
156  _elem_dims = elem_dims;
157 }

References _elem_dims, and cache_elem_dims().

◆ set_mesh_dimension()

void libMesh::MeshBase::set_mesh_dimension ( unsigned char  d)
inline

◆ set_n_partitions()

unsigned int& libMesh::MeshBase::set_n_partitions ( )
inlineprotected
Returns
A writable reference to the number of partitions.

Definition at line 1667 of file mesh_base.h.

1668  { return _n_parts; }

References _n_parts.

Referenced by libMesh::BoundaryInfo::sync().

◆ set_next_unique_id()

void libMesh::MeshBase::set_next_unique_id ( unique_id_type  id)
inline

Sets the next unique id to be used.

Definition at line 327 of file mesh_base.h.

327 { _next_unique_id = id; }

References _next_unique_id.

◆ set_point_locator_close_to_point_tol()

void libMesh::MeshBase::set_point_locator_close_to_point_tol ( Real  val)

Set value used by PointLocatorBase::close_to_point_tol().

Defaults to 0.0. If nonzero, calls close_to_point_tol() whenever a new PointLocator is built for use by this Mesh. Since the Mesh controls the creation and destruction of the PointLocator, if there are any parameters we need to customize on it, the Mesh will need to know about them.

Definition at line 905 of file mesh_base.C.

906 {
908  if (_point_locator)
909  {
910  if (val > 0.)
911  _point_locator->set_close_to_point_tol(val);
912  else
913  _point_locator->unset_close_to_point_tol();
914  }
915 }

◆ set_spatial_dimension()

void libMesh::MeshBase::set_spatial_dimension ( unsigned char  d)

Sets the "spatial dimension" of the Mesh.

See the documentation for Mesh::spatial_dimension() for more information.

Definition at line 166 of file mesh_base.C.

167 {
168  // The user can set the _spatial_dimension however they wish,
169  // libMesh will only *increase* the spatial dimension, however,
170  // never decrease it.
171  _spatial_dimension = d;
172 }

References _spatial_dimension.

Referenced by MeshSpatialDimensionTest::test2D().

◆ set_subdomain_name_map()

std::map<subdomain_id_type, std::string>& libMesh::MeshBase::set_subdomain_name_map ( )
inline

◆ size_elem_extra_integers()

void libMesh::MeshBase::size_elem_extra_integers ( )
protected

Size extra-integer arrays of all elements in the mesh.

Definition at line 926 of file mesh_base.C.

927 {
928  const std::size_t new_size = _elem_integer_names.size();
929  for (auto elem : this->element_ptr_range())
930  elem->add_extra_integers(new_size);
931 }

Referenced by add_elem_data(), add_elem_datum(), and add_elem_integer().

◆ size_node_extra_integers()

void libMesh::MeshBase::size_node_extra_integers ( )
protected

Size extra-integer arrays of all nodes in the mesh.

Definition at line 935 of file mesh_base.C.

936 {
937  const std::size_t new_size = _node_integer_names.size();
938  for (auto node : this->node_ptr_range())
939  node->add_extra_integers(new_size);
940 }

Referenced by add_node_data(), and add_node_datum().

◆ skip_noncritical_partitioning() [1/2]

bool libMesh::MeshBase::skip_noncritical_partitioning ( ) const
inline

◆ skip_noncritical_partitioning() [2/2]

void libMesh::MeshBase::skip_noncritical_partitioning ( bool  skip)
inline

If true is passed in then the elements on this mesh will no longer be (re)partitioned, and the nodes on this mesh will only be repartitioned if they are found "orphaned" via coarsening or other removal of the last element responsible for their node/element processor id consistency.

Note
It would probably be a bad idea to call this on a DistributedMesh before the first partitioning has happened... because no elements would get assigned to your processor pool.
Skipping partitioning can have adverse effects on your performance when using AMR... i.e. you could get large load imbalances. However you might still want to use this if the communication and computation of the rebalance and repartition is too high for your application.

It is also possible, for backwards-compatibility purposes, to skip noncritical partitioning by resetting the partitioner() pointer for this mesh.

Definition at line 1058 of file mesh_base.h.

1059  { _skip_noncritical_partitioning = skip; }

References _skip_noncritical_partitioning.

Referenced by libMesh::MeshTools::correct_node_proc_ids().

◆ skip_partitioning() [1/2]

bool libMesh::MeshBase::skip_partitioning ( ) const
inline

Definition at line 1078 of file mesh_base.h.

1078 { return _skip_all_partitioning; }

References _skip_all_partitioning.

Referenced by libMesh::UnstructuredMesh::copy_nodes_and_elements().

◆ skip_partitioning() [2/2]

void libMesh::MeshBase::skip_partitioning ( bool  skip)
inline

If true is passed in then nothing on this mesh will be (re)partitioned.

Note
The caveats for skip_noncritical_partitioning() still apply, and removing elements from a mesh with this setting enabled can leave node processor ids in an inconsistent state (not matching any attached element), causing failures in other library code. Do not use this setting along with element deletion or coarsening.

Definition at line 1076 of file mesh_base.h.

1076 { _skip_all_partitioning = skip; }

References _skip_all_partitioning.

◆ spatial_dimension()

unsigned int libMesh::MeshBase::spatial_dimension ( ) const
Returns
The "spatial dimension" of the mesh.

The spatial dimension is defined as:

1 - for an exactly x-aligned mesh of 1D elements 2 - for an exactly x-y planar mesh of 2D elements 3 - otherwise

No tolerance checks are performed to determine whether the Mesh is x-aligned or x-y planar, only strict equality with zero in the higher dimensions is checked. Also, x-z and y-z planar meshes are considered to have spatial dimension == 3.

The spatial dimension is updated during prepare_for_use() based on the dimensions of the various elements present in the Mesh, but is never automatically decreased by this function.

For example, if the user calls set_spatial_dimension(2) and then later inserts 3D elements into the mesh, Mesh::spatial_dimension() will return 3 after the next call to prepare_for_use(). On the other hand, if the user calls set_spatial_dimension(3) and then inserts only x-aligned 1D elements into the Mesh, mesh.spatial_dimension() will remain 3.

Definition at line 159 of file mesh_base.C.

160 {
161  return cast_int<unsigned int>(_spatial_dimension);
162 }

References _spatial_dimension.

Referenced by MeshSpatialDimensionTest::test1D(), and MeshSpatialDimensionTest::test2D().

◆ sub_point_locator()

std::unique_ptr< PointLocatorBase > libMesh::MeshBase::sub_point_locator ( ) const
Returns
A pointer to a subordinate PointLocatorBase object for this mesh, constructing a master PointLocator first if necessary. This should not be used in threaded or non-parallel_only code unless the master has already been constructed.

Definition at line 672 of file mesh_base.C.

673 {
674  // If there's no master point locator, then we need one.
675  if (_point_locator.get() == nullptr)
676  {
677  // PointLocator construction may not be safe within threads
679 
680  // And it may require parallel communication
681  parallel_object_only();
682 
684 
686  _point_locator->set_close_to_point_tol(_point_locator_close_to_point_tol);
687  }
688 
689  // Otherwise there was a master point locator, and we can grab a
690  // sub-locator easily.
692 }

References libMesh::Threads::in_threads, libMesh::libmesh_assert(), and libMesh::TREE_ELEMENTS.

Referenced by MeshfunctionDFEM::build_mesh(), libMesh::DofMap::create_dof_constraints(), libMesh::MeshFunction::init(), libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::DefaultCoupling::mesh_reinit(), libMesh::PointNeighborCoupling::mesh_reinit(), libMesh::MeshRefinement::test_level_one(), PointLocatorTest::testLocator(), MixedDimensionMeshTest::testPointLocatorTree(), SystemsTest::testProjectCube(), SystemsTest::testProjectLine(), and SystemsTest::testProjectSquare().

◆ subactive_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::subactive_elements_begin ( ) const
pure virtual

◆ subactive_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::subactive_elements_begin ( )
pure virtual

Iterate over elements for which elem->subactive() is true.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

◆ subactive_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::subactive_elements_end ( ) const
pure virtual

◆ subactive_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::subactive_elements_end ( )
pure virtual

◆ subdomain_ids()

void libMesh::MeshBase::subdomain_ids ( std::set< subdomain_id_type > &  ids) const

Constructs a list of all subdomain identifiers in the global mesh.

Subdomains correspond to separate subsets of the mesh which could correspond e.g. to different materials in a solid mechanics application, or regions where different physical processes are important. The subdomain mapping is independent from the parallel decomposition.

Definition at line 461 of file mesh_base.C.

462 {
463  // This requires an inspection on every processor
464  parallel_object_only();
465 
466  ids.clear();
467 
468  for (const auto & elem : this->active_local_element_ptr_range())
469  ids.insert(elem->subdomain_id());
470 
471  // Some subdomains may only live on other processors
472  this->comm().set_union(ids);
473 }

Referenced by libMesh::ReplicatedMesh::get_disconnected_subdomains(), and libMesh::TecplotIO::TecplotIO().

◆ subdomain_name() [1/2]

std::string & libMesh::MeshBase::subdomain_name ( subdomain_id_type  id)
Returns
A writable reference for getting/setting an optional name for a subdomain.

Definition at line 717 of file mesh_base.C.

718 {
719  return _block_id_to_name[id];
720 }

Referenced by libMesh::AbaqusIO::assign_subdomain_ids(), DMlibMeshSetSystem_libMesh(), libMesh::UNVIO::groups_in(), libMesh::ExodusII_IO::read(), libMesh::GmshIO::read_mesh(), and libMesh::TecplotIO::write_binary().

◆ subdomain_name() [2/2]

const std::string & libMesh::MeshBase::subdomain_name ( subdomain_id_type  id) const

Definition at line 722 of file mesh_base.C.

723 {
724  // An empty string to return when no matching subdomain name is found
725  static const std::string empty;
726 
727  std::map<subdomain_id_type, std::string>::const_iterator iter = _block_id_to_name.find(id);
728  if (iter == _block_id_to_name.end())
729  return empty;
730  else
731  return iter->second;
732 }

◆ type_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::type_elements_begin ( ElemType  type) const
pure virtual

◆ type_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::type_elements_begin ( ElemType  type)
pure virtual

Iterate over all elements with a specified geometric type.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshTools::n_elem_of_type(), and libMesh::MeshTools::n_non_subactive_elem_of_type_at_level().

◆ type_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::type_elements_end ( ElemType  type) const
pure virtual

◆ type_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::type_elements_end ( ElemType  type)
pure virtual

◆ unpartitioned_elements_begin() [1/2]

virtual const_element_iterator libMesh::MeshBase::unpartitioned_elements_begin ( ) const
pure virtual

◆ unpartitioned_elements_begin() [2/2]

virtual element_iterator libMesh::MeshBase::unpartitioned_elements_begin ( )
pure virtual

◆ unpartitioned_elements_end() [1/2]

virtual const_element_iterator libMesh::MeshBase::unpartitioned_elements_end ( ) const
pure virtual

◆ unpartitioned_elements_end() [2/2]

virtual element_iterator libMesh::MeshBase::unpartitioned_elements_end ( )
pure virtual

◆ update_parallel_id_counts()

virtual void libMesh::MeshBase::update_parallel_id_counts ( )
pure virtual

Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors.

Implemented in libMesh::DistributedMesh, and libMesh::ReplicatedMesh.

Referenced by libMesh::MeshRefinement::_coarsen_elements(), and libMesh::MeshRefinement::_refine_elements().

◆ update_post_partitioning()

virtual void libMesh::MeshBase::update_post_partitioning ( )
inlinevirtual

Recalculate any cached data after elements and nodes have been repartitioned.

Reimplemented in libMesh::DistributedMesh.

Definition at line 1006 of file mesh_base.h.

1006 {}

Referenced by libMesh::Nemesis_IO::read().

◆ write()

virtual void libMesh::MeshBase::write ( const std::string &  name)
pure virtual

Friends And Related Function Documentation

◆ BoundaryInfo

friend class BoundaryInfo
friend

Make the BoundaryInfo class a friend so that it can create and interact with BoundaryMesh.

Definition at line 1851 of file mesh_base.h.

◆ MeshCommunication

friend class MeshCommunication
friend

◆ MeshInput< MeshBase >

friend class MeshInput< MeshBase >
friend

The MeshInput classes are friends so that they can set the number of partitions.

Definition at line 1845 of file mesh_base.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const MeshBase m 
)
friend

Equivalent to calling print_info() above, but now you can write: Mesh mesh; libMesh::out << mesh << std::endl;.

Definition at line 592 of file mesh_base.C.

593 {
594  m.print_info(os);
595  return os;
596 }

◆ Partitioner

friend class Partitioner
friend

The partitioner class is a friend so that it can set the number of partitions.

Definition at line 1839 of file mesh_base.h.

Member Data Documentation

◆ _allow_remote_element_removal

bool libMesh::MeshBase::_allow_remote_element_removal
protected

If this is false then even on DistributedMesh remote elements will not be deleted during mesh preparation.

This is true by default.

Definition at line 1754 of file mesh_base.h.

Referenced by allow_remote_element_removal().

◆ _block_id_to_name

std::map<subdomain_id_type, std::string> libMesh::MeshBase::_block_id_to_name
protected

This structure maintains the mapping of named blocks for file formats that support named blocks.

Currently this is only implemented for ExodusII

Definition at line 1761 of file mesh_base.h.

Referenced by get_subdomain_name_map(), and set_subdomain_name_map().

◆ _communicator

const Parallel::Communicator& libMesh::ParallelObject::_communicator
protectedinherited

◆ _count_lower_dim_elems_in_point_locator

bool libMesh::MeshBase::_count_lower_dim_elems_in_point_locator
protected

Do we count lower dimensional elements in point locator refinement? This is relevant in tree-based point locators, for example.

Definition at line 1713 of file mesh_base.h.

◆ _default_ghosting

std::unique_ptr<GhostingFunctor> libMesh::MeshBase::_default_ghosting
protected

The default geometric GhostingFunctor, used to implement standard libMesh element ghosting behavior.

We use a base class pointer here to avoid dragging in more header dependencies.

Definition at line 1812 of file mesh_base.h.

Referenced by default_ghosting(), and MeshBase().

◆ _default_mapping_data

unsigned char libMesh::MeshBase::_default_mapping_data
protected

The default mapping data (unused with Lagrange, used for nodal weight lookup index with rational bases) to assign to newly added elements.

Definition at line 1693 of file mesh_base.h.

Referenced by default_mapping_data(), and set_default_mapping_data().

◆ _default_mapping_type

ElemMappingType libMesh::MeshBase::_default_mapping_type
protected

The default mapping type (typically Lagrange) between master and physical space to assign to newly added elements.

Definition at line 1686 of file mesh_base.h.

Referenced by default_mapping_type(), and set_default_mapping_type().

◆ _elem_dims

std::set<unsigned char> libMesh::MeshBase::_elem_dims
protected

We cache the dimension of the elements present in the mesh.

So, if we have a mesh with 1D and 2D elements, this structure will contain 1 and 2.

Definition at line 1768 of file mesh_base.h.

Referenced by elem_dimensions(), mesh_dimension(), MeshBase(), set_elem_dimensions(), and set_mesh_dimension().

◆ _elem_integer_names

std::vector<std::string> libMesh::MeshBase::_elem_integer_names
protected

◆ _ghosting_functors

std::set<GhostingFunctor *> libMesh::MeshBase::_ghosting_functors
protected

The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.

Basically unused by ReplicatedMesh for now, but belongs to MeshBase because the cost is trivial.

Definition at line 1821 of file mesh_base.h.

Referenced by add_ghosting_functor(), ghosting_functors_begin(), ghosting_functors_end(), and MeshBase().

◆ _is_prepared

bool libMesh::MeshBase::_is_prepared
protected

◆ _n_parts

unsigned int libMesh::MeshBase::_n_parts
protected

The number of partitions the mesh has.

This is set by the partitioners, and may not be changed directly by the user.

Note
The number of partitions need not equal this->n_processors(), consider for example the case where you simply want to partition a mesh on one processor and view the result in GMV.

Definition at line 1680 of file mesh_base.h.

Referenced by libMesh::UnstructuredMesh::copy_nodes_and_elements(), n_partitions(), and set_n_partitions().

◆ _next_unique_id

unique_id_type libMesh::MeshBase::_next_unique_id
protected

◆ _node_integer_names

std::vector<std::string> libMesh::MeshBase::_node_integer_names
protected

◆ _partitioner

std::unique_ptr<Partitioner> libMesh::MeshBase::_partitioner
protected

A partitioner to use at each prepare_for_use().

This will be built in the constructor of each derived class, but can be replaced by the user through the partitioner() accessor.

Definition at line 1721 of file mesh_base.h.

Referenced by libMesh::DistributedMesh::DistributedMesh(), MeshBase(), partitioner(), libMesh::ReplicatedMesh::ReplicatedMesh(), and skip_noncritical_partitioning().

◆ _point_locator

std::unique_ptr<PointLocatorBase> libMesh::MeshBase::_point_locator
mutableprotected

A PointLocator class for this mesh.

This will not actually be built unless needed. Further, since we want our point_locator() method to be const (yet do the dynamic allocating) this needs to be mutable. Since the PointLocatorBase::build() member is used, and it operates on a constant reference to the mesh, this is OK.

Definition at line 1707 of file mesh_base.h.

◆ _point_locator_close_to_point_tol

Real libMesh::MeshBase::_point_locator_close_to_point_tol
protected

If nonzero, we will call PointLocatorBase::set_close_to_point_tol() on any PointLocators that we create.

Definition at line 1833 of file mesh_base.h.

◆ _shared_functors

std::map<GhostingFunctor *, std::shared_ptr<GhostingFunctor> > libMesh::MeshBase::_shared_functors
protected

Hang on to references to any GhostingFunctor objects we were passed in shared_ptr form.

Definition at line 1827 of file mesh_base.h.

Referenced by add_ghosting_functor().

◆ _skip_all_partitioning

bool libMesh::MeshBase::_skip_all_partitioning
protected

If this is true then no partitioning should be done.

Definition at line 1739 of file mesh_base.h.

Referenced by libMesh::UnstructuredMesh::copy_nodes_and_elements(), skip_noncritical_partitioning(), and skip_partitioning().

◆ _skip_noncritical_partitioning

bool libMesh::MeshBase::_skip_noncritical_partitioning
protected

If this is true then no partitioning should be done with the possible exception of orphaned nodes.

Definition at line 1734 of file mesh_base.h.

Referenced by libMesh::UnstructuredMesh::copy_nodes_and_elements(), and skip_noncritical_partitioning().

◆ _skip_renumber_nodes_and_elements

bool libMesh::MeshBase::_skip_renumber_nodes_and_elements
protected

If this is true then renumbering will be kept to a minimum.

This is set when prepare_for_use() is called.

Definition at line 1746 of file mesh_base.h.

Referenced by allow_renumbering(), libMesh::ReplicatedMesh::renumber_nodes_and_elements(), and libMesh::DistributedMesh::renumber_nodes_and_elements().

◆ _spatial_dimension

unsigned char libMesh::MeshBase::_spatial_dimension
protected

The "spatial dimension" of the Mesh.

See the documentation for Mesh::spatial_dimension() for more information.

Definition at line 1774 of file mesh_base.h.

Referenced by set_spatial_dimension(), and spatial_dimension().

◆ boundary_info

std::unique_ptr<BoundaryInfo> libMesh::MeshBase::boundary_info

This class holds the boundary information.

It can store nodes, edges, and faces with a corresponding id that facilitates setting boundary conditions.

Direct access to this class will be removed in future libMesh versions. Use the get_boundary_info() accessor instead.

Definition at line 1659 of file mesh_base.h.

Referenced by get_boundary_info(), and MeshInputTest::testMeshMoveConstructor().


The documentation for this class was generated from the following files:
libMesh::MeshBase::pid_elements_begin
virtual element_iterator pid_elements_begin(processor_id_type proc_id)=0
Iterate over all elements with a specified processor id.
libMesh::MeshBase::_is_prepared
bool _is_prepared
Flag indicating if the mesh has been prepared for use.
Definition: mesh_base.h:1698
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::MeshBase::update_post_partitioning
virtual void update_post_partitioning()
Recalculate any cached data after elements and nodes have been repartitioned.
Definition: mesh_base.h:1006
libMesh::MeshBase::allow_renumbering
bool allow_renumbering() const
Definition: mesh_base.h:1026
libMesh::invalid_uint
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:249
libMesh::MeshBase::_elem_dims
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
Definition: mesh_base.h:1768
libMesh::MeshBase::active_pid_elements_end
virtual element_iterator active_pid_elements_end(processor_id_type proc_id)=0
libMesh::MeshTools::libmesh_assert_valid_boundary_ids
void libmesh_assert_valid_boundary_ids(const MeshBase &mesh)
A function for verifying that boundary condition ids match across processors.
Definition: mesh_tools.C:1396
libMesh::MeshBase::_default_ghosting
std::unique_ptr< GhostingFunctor > _default_ghosting
The default geometric GhostingFunctor, used to implement standard libMesh element ghosting behavior.
Definition: mesh_base.h:1812
libMesh::MeshBase::is_serial
virtual bool is_serial() const
Definition: mesh_base.h:159
libMesh::MeshBase::recalculate_n_partitions
unsigned int recalculate_n_partitions()
In a few (very rare) cases, the user may have manually tagged the elements with specific processor ID...
Definition: mesh_base.C:631
libMesh::n_threads
unsigned int n_threads()
Definition: libmesh_base.h:96
libMesh::MeshBase::add_elem_integers
std::vector< unsigned int > add_elem_integers(const std::vector< std::string > &names, bool allocate_data=true)
Register integer data (of type dof_id_type) to be added to each element in the mesh,...
Definition: mesh_base.C:191
libMesh::MeshBase::active_local_element_ptr_range
virtual SimpleRange< element_iterator > active_local_element_ptr_range()=0
libMesh::MeshBase::pid_elements_end
virtual element_iterator pid_elements_end(processor_id_type proc_id)=0
libMesh::MeshBase::active_element_ptr_range
virtual SimpleRange< element_iterator > active_element_ptr_range()=0
libMesh::MeshBase::n_elem
virtual dof_id_type n_elem() const =0
libMesh::TREE_ELEMENTS
Definition: enum_point_locator_type.h:37
libMesh::MeshBase::elem_ref
virtual const Elem & elem_ref(const dof_id_type i) const
Definition: mesh_base.h:521
libMesh::index_range
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:106
libMesh::MeshBase::max_elem_id
virtual dof_id_type max_elem_id() const =0
libMesh::Elem::dim
virtual unsigned short dim() const =0
libMesh::MeshBase::detect_interior_parents
void detect_interior_parents()
Search the mesh for elements that have a neighboring element of dim+1 and set that element as the int...
Definition: mesh_base.C:812
libMesh::MeshBase::_skip_all_partitioning
bool _skip_all_partitioning
If this is true then no partitioning should be done.
Definition: mesh_base.h:1739
libMesh::MeshBase::_n_parts
unsigned int _n_parts
The number of partitions the mesh has.
Definition: mesh_base.h:1680
libMesh::DofObject::add_extra_integers
void add_extra_integers(const unsigned int n_integers)
Assigns a set of extra integers to this DofObject.
Definition: dof_object.C:503
libMesh::ParallelObject::comm
const Parallel::Communicator & comm() const
Definition: parallel_object.h:94
libMesh::MeshBase::size_node_extra_integers
void size_node_extra_integers()
Size extra-integer arrays of all nodes in the mesh.
Definition: mesh_base.C:935
libMesh::MeshBase::n_partitions
unsigned int n_partitions() const
Definition: mesh_base.h:1153
libMesh::MeshBase::node_ptr
virtual const Node * node_ptr(const dof_id_type i) const =0
libMesh::MeshBase::mesh_dimension
unsigned int mesh_dimension() const
Definition: mesh_base.C:135
libMesh::MeshBase::_allow_remote_element_removal
bool _allow_remote_element_removal
If this is false then even on DistributedMesh remote elements will not be deleted during mesh prepara...
Definition: mesh_base.h:1754
libMesh::MeshBase::partition
void partition()
Definition: mesh_base.h:992
libMesh::MeshBase::active_pid_elements_begin
virtual element_iterator active_pid_elements_begin(processor_id_type proc_id)=0
libMesh::DofObject::processor_id
processor_id_type processor_id() const
Definition: dof_object.h:829
libMesh::MeshBase::elem_ptr
virtual const Elem * elem_ptr(const dof_id_type i) const =0
libMesh::MeshBase::pid_nodes_begin
virtual node_iterator pid_nodes_begin(processor_id_type proc_id)=0
Iterate over nodes with processor_id() == proc_id.
dim
unsigned int dim
Definition: adaptivity_ex3.C:113
libMesh::MeshBase::_count_lower_dim_elems_in_point_locator
bool _count_lower_dim_elems_in_point_locator
Do we count lower dimensional elements in point locator refinement? This is relevant in tree-based po...
Definition: mesh_base.h:1713
libMesh::MeshBase::query_elem_ptr
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
libMesh::MeshBase::add_node_integers
std::vector< unsigned int > add_node_integers(const std::vector< std::string > &names, bool allocate_data=true)
Register integer data (of type dof_id_type) to be added to each node in the mesh.
Definition: mesh_base.C:262
libMesh::Elem::invalid_subdomain_id
static const subdomain_id_type invalid_subdomain_id
A static integral constant representing an invalid subdomain id.
Definition: elem.h:244
libMesh::MeshBase::element_ptr_range
virtual SimpleRange< element_iterator > element_ptr_range()=0
libMesh::MeshBase::_default_mapping_data
unsigned char _default_mapping_data
The default mapping data (unused with Lagrange, used for nodal weight lookup index with rational base...
Definition: mesh_base.h:1693
libMesh::libmesh_assert
libmesh_assert(ctx)
libMesh::DofObject::invalid_unique_id
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:426
libMesh::MeshBase::n_local_nodes
dof_id_type n_local_nodes() const
Definition: mesh_base.h:303
libMesh::MeshBase::n_subdomains
subdomain_id_type n_subdomains() const
Definition: mesh_base.C:477
libMesh::ParallelObject::ParallelObject
ParallelObject(const Parallel::Communicator &comm_in)
Constructor.
Definition: parallel_object.h:63
libMesh::PointLocatorBase::build
static std::unique_ptr< PointLocatorBase > build(PointLocatorType t, const MeshBase &mesh, const PointLocatorBase *master=nullptr)
Builds an PointLocator for the mesh mesh.
Definition: point_locator_base.C:66
libMesh::MeshTools::libmesh_assert_valid_unique_ids
void libmesh_assert_valid_unique_ids(const MeshBase &mesh)
A function for verifying that unique ids match across processors.
Definition: mesh_tools.C:1634
libMesh::MeshBase::_spatial_dimension
unsigned char _spatial_dimension
The "spatial dimension" of the Mesh.
Definition: mesh_base.h:1774
libMesh::MeshBase::_elem_integer_names
std::vector< std::string > _elem_integer_names
The array of names for integer data associated with each element in the mesh.
Definition: mesh_base.h:1780
libMesh::MeshBase::subdomain_ids
void subdomain_ids(std::set< subdomain_id_type > &ids) const
Constructs a list of all subdomain identifiers in the global mesh.
Definition: mesh_base.C:461
libMesh::MeshBase::BoundaryInfo
friend class BoundaryInfo
Make the BoundaryInfo class a friend so that it can create and interact with BoundaryMesh.
Definition: mesh_base.h:1851
libMesh::ParallelObject::n_processors
processor_id_type n_processors() const
Definition: parallel_object.h:100
libMesh::Threads::in_threads
bool in_threads
A boolean which is true iff we are in a Threads:: function It may be useful to assert(!...
Definition: threads.C:31
libMesh::MeshBase::_next_unique_id
unique_id_type _next_unique_id
The next available unique id for assigning ids to DOF objects.
Definition: mesh_base.h:1727
libMesh::MeshBase::node_ptr_range
virtual SimpleRange< node_iterator > node_ptr_range()=0
libMesh::MeshBase::elem
virtual const Elem * elem(const dof_id_type i) const
Definition: mesh_base.h:554
libMesh::MeshBase::clear_point_locator
void clear_point_locator()
Releases the current PointLocator object.
Definition: mesh_base.C:696
libMesh::ParallelObject::processor_id
processor_id_type processor_id() const
Definition: parallel_object.h:106
libMesh::MeshBase::pid_nodes_end
virtual node_iterator pid_nodes_end(processor_id_type proc_id)=0
libMesh::ParallelObject::_communicator
const Parallel::Communicator & _communicator
Definition: parallel_object.h:112
libMesh::MeshBase::skip_noncritical_partitioning
bool skip_noncritical_partitioning() const
Definition: mesh_base.h:1061
libMesh::MeshBase::add_elem_integer
unsigned int add_elem_integer(const std::string &name, bool allocate_data=true)
Register an integer datum (of type dof_id_type) to be added to each element in the mesh.
Definition: mesh_base.C:176
libMesh::MeshBase::elem_dimensions
const std::set< unsigned char > & elem_dimensions() const
Definition: mesh_base.h:225
libMesh::Elem::n_vertices
virtual unsigned int n_vertices() const =0
libMesh::MeshBase::size_elem_extra_integers
void size_elem_extra_integers()
Size extra-integer arrays of all elements in the mesh.
Definition: mesh_base.C:926
libMesh::MeshBase::_ghosting_functors
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
Definition: mesh_base.h:1821
libMesh::MeshBase::spatial_dimension
unsigned int spatial_dimension() const
Definition: mesh_base.C:159
libMesh::MeshBase::node
virtual const Node & node(const dof_id_type i) const
Definition: mesh_base.h:471
libMesh::MeshBase::_point_locator_close_to_point_tol
Real _point_locator_close_to_point_tol
If nonzero, we will call PointLocatorBase::set_close_to_point_tol() on any PointLocators that we crea...
Definition: mesh_base.h:1833
libMesh::MeshBase::n_local_elem
dof_id_type n_local_elem() const
Definition: mesh_base.h:403
libMesh::MeshBase::add_node_integer
unsigned int add_node_integer(const std::string &name, bool allocate_data=true)
Register an integer datum (of type dof_id_type) to be added to each node in the mesh.
Definition: mesh_base.C:247
libMesh::MeshBase::n_active_elem_on_proc
dof_id_type n_active_elem_on_proc(const processor_id_type proc) const
Definition: mesh_base.C:518
libMesh::MeshBase::_shared_functors
std::map< GhostingFunctor *, std::shared_ptr< GhostingFunctor > > _shared_functors
Hang on to references to any GhostingFunctor objects we were passed in shared_ptr form.
Definition: mesh_base.h:1827
libMesh::MeshBase::_node_integer_names
std::vector< std::string > _node_integer_names
The array of names for integer data associated with each node in the mesh.
Definition: mesh_base.h:1786
libMesh::MeshBase::delete_remote_elements
virtual void delete_remote_elements()
When supported, deletes all nonlocal elements of the mesh except for "ghosts" which touch a local ele...
Definition: mesh_base.h:201
libMesh::MeshBase::cache_elem_dims
void cache_elem_dims()
Search the mesh and cache the different dimensions of the elements present in the mesh.
Definition: mesh_base.C:753
libMesh::MeshBase::_point_locator
std::unique_ptr< PointLocatorBase > _point_locator
A PointLocator class for this mesh.
Definition: mesh_base.h:1707
libMesh::MeshBase::_partitioner
std::unique_ptr< Partitioner > _partitioner
A partitioner to use at each prepare_for_use().
Definition: mesh_base.h:1721
libMesh::MeshBase::renumber_nodes_and_elements
virtual void renumber_nodes_and_elements()=0
After partitioning a mesh it is useful to renumber the nodes and elements so that they lie in contigu...
libMesh::MeshBase::n_nodes
virtual dof_id_type n_nodes() const =0
libMesh::MeshBase::add_ghosting_functor
void add_ghosting_functor(GhostingFunctor &ghosting_functor)
Adds a functor which can specify ghosting requirements for use on distributed meshes.
Definition: mesh_base.h:1089
libMesh::initialized
bool initialized()
Checks that library initialization has been done.
Definition: libmesh.C:265
libMesh::LAGRANGE_MAP
Definition: enum_elem_type.h:83
distance
Real distance(const Point &p)
Definition: subdomains_ex3.C:50
libMesh::MeshBase::boundary_info
std::unique_ptr< BoundaryInfo > boundary_info
This class holds the boundary information.
Definition: mesh_base.h:1659
libMesh::MeshBase::_skip_renumber_nodes_and_elements
bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
Definition: mesh_base.h:1746
libMesh::ReferenceElem::get
const Elem & get(const ElemType type_in)
Definition: reference_elem.C:237
libMesh::MeshBase::_block_id_to_name
std::map< subdomain_id_type, std::string > _block_id_to_name
This structure maintains the mapping of named blocks for file formats that support named blocks.
Definition: mesh_base.h:1761
libMesh::MeshBase::n_unpartitioned_elem
dof_id_type n_unpartitioned_elem() const
Definition: mesh_base.h:409
libMesh::Elem::subdomain_id
subdomain_id_type subdomain_id() const
Definition: elem.h:2069
libMesh::DofObject::id
dof_id_type id() const
Definition: dof_object.h:767
libMesh::MeshBase::n_nodes_on_proc
dof_id_type n_nodes_on_proc(const processor_id_type proc) const
Definition: mesh_base.C:492
libMesh::MeshBase::n_elem_on_proc
dof_id_type n_elem_on_proc(const processor_id_type proc) const
Definition: mesh_base.C:505
libMesh::DofObject::invalid_processor_id
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
Definition: dof_object.h:432
libMesh::on_command_line
bool on_command_line(std::string arg)
Definition: libmesh.C:898
libMesh::MeshBase::_default_mapping_type
ElemMappingType _default_mapping_type
The default mapping type (typically Lagrange) between master and physical space to assign to newly ad...
Definition: mesh_base.h:1686
data
IterBase * data
Ideally this private member data should have protected access.
Definition: variant_filter_iterator.h:337
libMesh::Elem::node_id
dof_id_type node_id(const unsigned int i) const
Definition: elem.h:1977
libMesh::MeshBase::clear
virtual void clear()
Deletes all the element and node data that is currently stored.
Definition: mesh_base.C:429
libMesh::Elem::n_sub_elem
virtual unsigned int n_sub_elem() const =0
libMesh::MeshBase::update_parallel_id_counts
virtual void update_parallel_id_counts()=0
Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors.
libMesh::MeshBase::_skip_noncritical_partitioning
bool _skip_noncritical_partitioning
If this is true then no partitioning should be done with the possible exception of orphaned nodes.
Definition: mesh_base.h:1734
libMesh::MeshBase::get_info
std::string get_info() const
Definition: mesh_base.C:551
libMesh::MeshBase::find_neighbors
virtual void find_neighbors(const bool reset_remote_elements=false, const bool reset_current_list=true)=0
Locate element face (edge in 2D) neighbors.
libMesh::MeshBase::skip_partitioning
bool skip_partitioning() const
Definition: mesh_base.h:1078
libMesh::MeshBase::n_active_elem
virtual dof_id_type n_active_elem() const =0
libMesh::MeshTools::correct_node_proc_ids
void correct_node_proc_ids(MeshBase &)
Changes the processor ids on each node so be the same as the id of the lowest element touching that n...
Definition: mesh_tools.C:2252
libMesh::Quality::name
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
libMesh::closed
bool closed()
Checks that the library has been closed.
Definition: libmesh.C:272
libMesh::MeshBase::partitioner
virtual std::unique_ptr< Partitioner > & partitioner()
A partitioner to use at each prepare_for_use()
Definition: mesh_base.h:127