libMesh
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | 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 (unsigned char dim=1)
 Constructor which takes dim, the dimension of the mesh. More...
 
 MeshBase (const MeshBase &other_mesh)
 Copy-constructor. More...
 
virtual UniquePtr< MeshBaseclone () const =0
 Virtual "copy constructor". More...
 
virtual ~MeshBase ()
 Destructor. More...
 
virtual UniquePtr< 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 data that are 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
 
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 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...
 
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...
 
void prepare_for_use (const bool skip_renumber_nodes_and_elements=false, const bool skip_find_neighbors=false)
 Prepare a newly created (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_partitioning (bool skip)
 If true is passed in then this mesh will no longer 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 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...
 
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=libmesh_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
 
UniquePtr< PointLocatorBasesub_point_locator () 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 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 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 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::Communicatorcomm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Public Attributes

UniquePtr< BoundaryInfoboundary_info
 This class holds the boundary information. More...
 

Protected Member Functions

unsigned intset_n_partitions ()
 

Protected Attributes

unsigned int _n_parts
 The number of partitions the mesh has. More...
 
bool _is_prepared
 Flag indicating if the mesh has been prepared for use. More...
 
UniquePtr< 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...
 
UniquePtr< 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_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...
 
UniquePtr< 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...
 
const Parallel::Communicator_communicator
 

Private Member Functions

MeshBaseoperator= (const MeshBase &other)
 The default shallow assignment operator is a very bad idea, so we'll make it a compile-time error to try and do it from other classes and a link-time error to try and do it from this class. More...
 

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...
 
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 68 of file mesh_base.h.

Member Typedef Documentation

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

Definition at line 889 of file mesh_base.h.

Constructor & Destructor Documentation

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 49 of file mesh_base.C.

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

50  :
51  ParallelObject (comm_in),
52  boundary_info (new BoundaryInfo(*this)),
53  _n_parts (1),
54  _is_prepared (false),
55  _point_locator (),
57  _partitioner (),
58 #ifdef LIBMESH_ENABLE_UNIQUE_ID
60 #endif
61  _skip_partitioning(libMesh::on_command_line("--skip-partitioning")),
65  _default_ghosting(new GhostPointNeighbors(*this))
66 {
67  _elem_dims.insert(d);
69  libmesh_assert_less_equal (LIBMESH_DIM, 3);
70  libmesh_assert_greater_equal (LIBMESH_DIM, d);
72 }
ParallelObject(const Parallel::Communicator &comm_in)
Constructor.
bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
Definition: mesh_base.h:1389
UniquePtr< PointLocatorBase > _point_locator
A PointLocator class for this mesh.
Definition: mesh_base.h:1356
UniquePtr< BoundaryInfo > boundary_info
This class holds the boundary information.
Definition: mesh_base.h:1321
bool _skip_partitioning
If this is true then no partitioning should be done.
Definition: mesh_base.h:1382
UniquePtr< Partitioner > _partitioner
A partitioner to use at each prepare_for_use().
Definition: mesh_base.h:1370
unsigned char _spatial_dimension
The "spatial dimension" of the Mesh.
Definition: mesh_base.h:1417
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:1397
friend class BoundaryInfo
Make the BoundaryInfo class a friend so that it can create and interact with BoundaryMesh.
Definition: mesh_base.h:1451
libmesh_assert(j)
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
Definition: mesh_base.h:1433
unique_id_type _next_unique_id
The next available unique id for assigning ids to DOF objects.
Definition: mesh_base.h:1376
unsigned int _n_parts
The number of partitions the mesh has.
Definition: mesh_base.h:1342
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:329
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
Definition: mesh_base.h:1411
UniquePtr< GhostingFunctor > _default_ghosting
The default geometric GhostingFunctor, used to implement standard libMesh element ghosting behavior...
Definition: mesh_base.h:1424
bool on_command_line(const std::string &arg)
Definition: libmesh.C:921
bool _is_prepared
Flag indicating if the mesh has been prepared for use.
Definition: mesh_base.h:1347
bool initialized()
Checks that library initialization has been done.
Definition: libmesh.C:274
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:1362
libMesh::MeshBase::MeshBase ( unsigned char  dim = 1)

Constructor which takes dim, the dimension of the mesh.

The mesh dimension can be changed (and may automatically be changed by mesh generation/loading) later.

Deprecated:
LIBMESH_DISABLE_COMMWORLD is now the default, use the constructor that takes a Parallel::Communicator instead.

Definition at line 77 of file mesh_base.C.

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

77  :
79  boundary_info (new BoundaryInfo(*this)),
80  _n_parts (1),
81  _is_prepared (false),
82  _point_locator (),
83  _partitioner (),
84 #ifdef LIBMESH_ENABLE_UNIQUE_ID
86 #endif
87  _skip_partitioning(libMesh::on_command_line("--skip-partitioning")),
91  _default_ghosting(new GhostPointNeighbors(*this))
92 {
93  libmesh_deprecated();
94  _elem_dims.insert(d);
96  libmesh_assert_less_equal (LIBMESH_DIM, 3);
97  libmesh_assert_greater_equal (LIBMESH_DIM, d);
99 }
ParallelObject(const Parallel::Communicator &comm_in)
Constructor.
bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
Definition: mesh_base.h:1389
UniquePtr< PointLocatorBase > _point_locator
A PointLocator class for this mesh.
Definition: mesh_base.h:1356
UniquePtr< BoundaryInfo > boundary_info
This class holds the boundary information.
Definition: mesh_base.h:1321
bool _skip_partitioning
If this is true then no partitioning should be done.
Definition: mesh_base.h:1382
UniquePtr< Partitioner > _partitioner
A partitioner to use at each prepare_for_use().
Definition: mesh_base.h:1370
unsigned char _spatial_dimension
The "spatial dimension" of the Mesh.
Definition: mesh_base.h:1417
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:1397
friend class BoundaryInfo
Make the BoundaryInfo class a friend so that it can create and interact with BoundaryMesh.
Definition: mesh_base.h:1451
libmesh_assert(j)
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
Definition: mesh_base.h:1433
unique_id_type _next_unique_id
The next available unique id for assigning ids to DOF objects.
Definition: mesh_base.h:1376
unsigned int _n_parts
The number of partitions the mesh has.
Definition: mesh_base.h:1342
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:329
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
Definition: mesh_base.h:1411
UniquePtr< GhostingFunctor > _default_ghosting
The default geometric GhostingFunctor, used to implement standard libMesh element ghosting behavior...
Definition: mesh_base.h:1424
Parallel::FakeCommunicator CommWorld
The default libMesh communicator.
Definition: parallel.h:1433
bool on_command_line(const std::string &arg)
Definition: libmesh.C:921
bool _is_prepared
Flag indicating if the mesh has been prepared for use.
Definition: mesh_base.h:1347
bool initialized()
Checks that library initialization has been done.
Definition: libmesh.C:274
libMesh::MeshBase::MeshBase ( const MeshBase other_mesh)

Copy-constructor.

Definition at line 105 of file mesh_base.C.

References _default_ghosting, _ghosting_functors, and _partitioner.

105  :
106  ParallelObject (other_mesh),
107  boundary_info (new BoundaryInfo(*this)),
108  _n_parts (other_mesh._n_parts),
109  _is_prepared (other_mesh._is_prepared),
110  _point_locator (),
111  _partitioner (),
112 #ifdef LIBMESH_ENABLE_UNIQUE_ID
113  _next_unique_id(other_mesh._next_unique_id),
114 #endif
115  _skip_partitioning(libMesh::on_command_line("--skip-partitioning")),
118  _elem_dims(other_mesh._elem_dims),
119  _spatial_dimension(other_mesh._spatial_dimension),
120  _default_ghosting(new GhostPointNeighbors(*this)),
121  _ghosting_functors(other_mesh._ghosting_functors)
122 {
123  // Make sure we don't accidentally delete the other mesh's default
124  // ghosting functor; we'll use our own if that's needed.
125  if (other_mesh._ghosting_functors.count(other_mesh._default_ghosting.get()))
126  {
127  _ghosting_functors.erase(other_mesh._default_ghosting.get());
129  }
130 
131  if (other_mesh._partitioner.get())
132  {
133  _partitioner = other_mesh._partitioner->clone();
134  }
135 }
ParallelObject(const Parallel::Communicator &comm_in)
Constructor.
bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
Definition: mesh_base.h:1389
UniquePtr< PointLocatorBase > _point_locator
A PointLocator class for this mesh.
Definition: mesh_base.h:1356
UniquePtr< BoundaryInfo > boundary_info
This class holds the boundary information.
Definition: mesh_base.h:1321
bool _skip_partitioning
If this is true then no partitioning should be done.
Definition: mesh_base.h:1382
UniquePtr< Partitioner > _partitioner
A partitioner to use at each prepare_for_use().
Definition: mesh_base.h:1370
unsigned char _spatial_dimension
The "spatial dimension" of the Mesh.
Definition: mesh_base.h:1417
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:1397
friend class BoundaryInfo
Make the BoundaryInfo class a friend so that it can create and interact with BoundaryMesh.
Definition: mesh_base.h:1451
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
Definition: mesh_base.h:1433
unique_id_type _next_unique_id
The next available unique id for assigning ids to DOF objects.
Definition: mesh_base.h:1376
unsigned int _n_parts
The number of partitions the mesh has.
Definition: mesh_base.h:1342
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
Definition: mesh_base.h:1411
UniquePtr< GhostingFunctor > _default_ghosting
The default geometric GhostingFunctor, used to implement standard libMesh element ghosting behavior...
Definition: mesh_base.h:1424
bool on_command_line(const std::string &arg)
Definition: libmesh.C:921
bool _is_prepared
Flag indicating if the mesh has been prepared for use.
Definition: mesh_base.h:1347
libMesh::MeshBase::~MeshBase ( )
virtual

Destructor.

Definition at line 139 of file mesh_base.C.

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

140 {
141  this->clear();
142 
143  libmesh_exceptionless_assert (!libMesh::closed());
144 }
bool closed()
Checks that the library has been closed.
Definition: libmesh.C:281
virtual void clear()
Deletes all the data that are currently stored.
Definition: mesh_base.C:285

Member Function Documentation

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

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

Referenced by libMesh::MeshRefinement::_refine_elements(), libMesh::ParmetisPartitioner::assign_partitioning(), libMesh::AbaqusIO::assign_sideset_ids(), libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::ParmetisPartitioner::build_graph(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_side_list_from_node_list(), libMesh::MeshTools::Generation::build_sphere(), 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_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(), libMesh::ExodusII_IO_Helper::initialize(), LinearElasticityWithContact::initialize_contact_load_paths(), libMesh::DofMap::invalidate_dofs(), libMesh::MeshTools::libmesh_assert_valid_elem_ids(), libmesh_assert_valid_parallel_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(), 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::VariationalMeshSmoother::readgr(), libMesh::DofMap::reinit(), libMesh::HPSingularity::select_refinement(), libMesh::Partitioner::set_node_processor_ids(), libMesh::Partitioner::set_parent_processor_ids(), libMesh::LaplaceMeshSmoother::smooth(), 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_Helper::write_element_values(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_nodal_coordinates(), libMesh::ExodusII_IO::write_nodal_data_discontinuous(), libMesh::GmshIO::write_post(), and libMesh::GnuPlotIO::write_solution().

virtual SimpleRange<const_element_iterator> libMesh::MeshBase::active_element_ptr_range ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_elements_end ( ) const
pure virtual
virtual SimpleRange<element_iterator> libMesh::MeshBase::active_local_element_ptr_range ( )
pure virtual

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

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::MeshRefinement::_refine_elements(), libMesh::RBConstruction::add_scaled_matrix_and_vector(), 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_shell(), assemble_stokes(), assemble_wave(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::ParmetisPartitioner::build_graph(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::VTKIO::cells_to_vtk(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::Nemesis_IO_Helper::compute_num_global_elem_blocks(), compute_stresses(), LinearElasticity::compute_stresses(), libMesh::MeshRefinement::create_parent_error_vector(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::RBEIMConstruction::enrich_RB_space(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), 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::EquationSystems::get_solution(), libMesh::LaplaceMeshSmoother::init(), libMesh::SystemSubsetBySubdomain::init(), libMesh::ParmetisPartitioner::initialize(), integrate_function(), LaplaceYoung::jacobian(), libmesh_assert_valid_parallel_ids(), libMesh::DofMap::local_variable_indices(), 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(), libMesh::ErrorVector::plot_error(), LaplaceYoung::residual(), libMesh::HPCoarsenTest::select_refinement(), libMesh::MeshRefinement::test_level_one(), libMesh::MeshRefinement::test_unflagged(), libMesh::BoundaryVolumeSolutionTransfer::transfer_boundary_volume(), libMesh::BoundaryVolumeSolutionTransfer::transfer_volume_boundary(), libMesh::Tree< N >::Tree(), libMesh::RBEIMConstruction::truth_solve(), libMesh::EnsightIO::write_geometry_ascii(), libMesh::EnsightIO::write_scalar_ascii(), libMesh::EnsightIO::write_vector_ascii(), and libMesh::System::zero_variable().

virtual SimpleRange<const_element_iterator> libMesh::MeshBase::active_local_element_ptr_range ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_local_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_local_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_local_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_local_elements_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_local_subdomain_elements_begin ( subdomain_id_type  subdomain_id)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_local_subdomain_elements_begin ( subdomain_id_type  subdomain_id) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_local_subdomain_elements_end ( subdomain_id_type  subdomain_id)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_local_subdomain_elements_end ( subdomain_id_type  subdomain_id) const
pure virtual
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.

Referenced by libmesh_assert_valid_parallel_ids().

virtual const_node_iterator libMesh::MeshBase::active_nodes_begin ( ) const
pure virtual
virtual node_iterator libMesh::MeshBase::active_nodes_end ( )
pure virtual
virtual const_node_iterator libMesh::MeshBase::active_nodes_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_not_local_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_not_local_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_not_local_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_not_local_elements_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_pid_elements_begin ( processor_id_type  proc_id)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_pid_elements_begin ( processor_id_type  proc_id) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_pid_elements_end ( processor_id_type  proc_id)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_pid_elements_end ( processor_id_type  proc_id) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_semilocal_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_semilocal_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_semilocal_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_semilocal_elements_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_subdomain_elements_begin ( subdomain_id_type  subdomain_id)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_subdomain_elements_begin ( subdomain_id_type  subdomain_id) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_subdomain_elements_end ( subdomain_id_type  subdomain_id)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_subdomain_elements_end ( subdomain_id_type  subdomain_id) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_subdomain_set_elements_begin ( std::set< subdomain_id_type ss)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_subdomain_set_elements_begin ( std::set< subdomain_id_type ss) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_subdomain_set_elements_end ( std::set< subdomain_id_type ss)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_subdomain_set_elements_end ( std::set< subdomain_id_type ss) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_type_elements_begin ( ElemType  type)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_type_elements_begin ( ElemType  type) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_type_elements_end ( ElemType  type)
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_type_elements_end ( ElemType  type) const
pure virtual
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.

Referenced by libmesh_assert_valid_parallel_ids().

virtual const_element_iterator libMesh::MeshBase::active_unpartitioned_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::active_unpartitioned_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::active_unpartitioned_elements_end ( ) const
pure virtual
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_cube(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::MeshTools::Generation::build_sphere(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::TriangleWrapper::copy_tri_to_mesh(), libMesh::UnstructuredMesh::create_submesh(), libMesh::UNVIO::elements_in(), libMesh::MeshTools::Modification::flatten(), libMesh::mesh_inserter_iterator< T >::operator=(), libMesh::TetGenMeshInterface::pointset_convexhull(), query_elem(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::VTKIO::read(), libMesh::CheckpointIO::read_connectivity(), libMesh::AbaqusIO::read_elements(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::OFFIO::read_stream(), libMesh::MatlabIO::read_stream(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and libMesh::TetGenMeshInterface::triangulate_pointset().

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

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 786 of file mesh_base.h.

References _ghosting_functors, and remove_ghosting_functor().

Referenced by libMesh::DofMap::add_algebraic_ghosting_functor(), and libMesh::DofMap::add_coupling_functor().

787  { _ghosting_functors.insert(&ghosting_functor); }
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
Definition: mesh_base.h:1433
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.

Referenced by query_elem().

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_cube(), libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::MeshTools::Generation::build_sphere(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::TriangleWrapper::copy_tri_to_mesh(), libMesh::UnstructuredMesh::create_submesh(), libMesh::UNVIO::nodes_in(), libMesh::mesh_inserter_iterator< T >::operator=(), query_elem(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::VTKIO::read(), libMesh::AbaqusIO::read_nodes(), libMesh::CheckpointIO::read_nodes(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::OFFIO::read_stream(), libMesh::MatlabIO::read_stream(), libMesh::BoundaryInfo::sync(), libMesh::TriangleInterface::triangulate(), and libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().

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 n_partitions(), and libMesh::ErrorVector::plot_error().

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 build_domain(), main(), and n_partitions().

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

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

Reimplemented in libMesh::DistributedMesh.

Definition at line 169 of file mesh_base.h.

Referenced by libMesh::ParmetisPartitioner::_do_repartition(), libMesh::EquationSystems::allgather(), and libMesh::MeshSerializer::MeshSerializer().

169 {}
void libMesh::MeshBase::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.

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

Definition at line 758 of file mesh_base.h.

References _allow_remote_element_removal.

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

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:1397
bool libMesh::MeshBase::allow_remote_element_removal ( ) const

Definition at line 759 of file mesh_base.h.

References _allow_remote_element_removal.

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

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:1397
void libMesh::MeshBase::allow_renumbering ( bool  allow)

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.

Definition at line 749 of file mesh_base.h.

References _skip_renumber_nodes_and_elements.

Referenced by SlitMeshTest::build_mesh(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::AdjointRefinementEstimator::estimate_error(), libMesh::ErrorVector::plot_error(), libMesh::RBEIMEvaluation::RBEIMEvaluation(), libMesh::NameBasedIO::read(), libMesh::GMVIO::read(), EquationSystemsTest::testRefineThenReinitPreserveFlags(), and WriteVecAndScalar::testWrite().

bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
Definition: mesh_base.h:1389
bool libMesh::MeshBase::allow_renumbering ( ) const

Definition at line 750 of file mesh_base.h.

References _skip_renumber_nodes_and_elements.

Referenced by libMesh::UnstructuredMesh::copy_nodes_and_elements(), prepare_for_use(), and libMesh::UnstructuredMesh::read().

bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
Definition: mesh_base.h:1389
virtual element_iterator libMesh::MeshBase::ancestor_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::ancestor_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::ancestor_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::ancestor_elements_end ( ) const
pure virtual
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.

Referenced by libmesh_assert_valid_parallel_ids().

virtual const_node_iterator libMesh::MeshBase::bid_nodes_begin ( boundary_id_type  bndry_id) const
pure virtual
virtual node_iterator libMesh::MeshBase::bid_nodes_end ( boundary_id_type  bndry_id)
pure virtual
virtual const_node_iterator libMesh::MeshBase::bid_nodes_end ( boundary_id_type  bndry_id) const
pure virtual
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.

Referenced by libmesh_assert_valid_parallel_ids().

virtual const_node_iterator libMesh::MeshBase::bnd_nodes_begin ( ) const
pure virtual
virtual node_iterator libMesh::MeshBase::bnd_nodes_end ( )
pure virtual
virtual const_node_iterator libMesh::MeshBase::bnd_nodes_end ( ) const
pure virtual
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 612 of file mesh_base.C.

References _elem_dims, _spatial_dimension, active_elements_begin(), active_elements_end(), libMesh::ParallelObject::comm(), end, mesh_dimension(), node(), nodes_begin(), nodes_end(), and libMesh::Parallel::Communicator::set_union().

Referenced by libMesh::MeshCommunication::broadcast(), get_subdomain_name_map(), and prepare_for_use().

613 {
614  // This requires an inspection on every processor
615  parallel_object_only();
616 
617  // Need to clear _elem_dims first in case all elements of a
618  // particular dimension have been deleted.
619  _elem_dims.clear();
620 
621  const_element_iterator el = this->active_elements_begin();
622  const_element_iterator end = this->active_elements_end();
623 
624  for (; el!=end; ++el)
625  _elem_dims.insert((*el)->dim());
626 
627  // Some different dimension elements may only live on other processors
628  this->comm().set_union(_elem_dims);
629 
630  // If the largest element dimension found is larger than the current
631  // _spatial_dimension, increase _spatial_dimension.
632  unsigned int max_dim = this->mesh_dimension();
633  if (max_dim > _spatial_dimension)
634  _spatial_dimension = cast_int<unsigned char>(max_dim);
635 
636  // _spatial_dimension may need to increase from 1->2 or 2->3 if the
637  // mesh is full of 1D elements but they are not x-aligned, or the
638  // mesh is full of 2D elements but they are not in the x-y plane.
639  // If the mesh is x-aligned or x-y planar, we will end up checking
640  // every node's coordinates and not breaking out of the loop
641  // early...
642  if (_spatial_dimension < 3)
643  {
644  const_node_iterator node_it = this->nodes_begin();
645  const_node_iterator node_end = this->nodes_end();
646  for (; node_it != node_end; ++node_it)
647  {
648  Node & node = **node_it;
649 
650 #if LIBMESH_DIM > 1
651  // Note: the exact floating point comparison is intentional,
652  // we don't want to get tripped up by tolerances.
653  if (node(1) != 0.)
654  {
655  _spatial_dimension = 2;
656 #if LIBMESH_DIM == 2
657  // If libmesh is compiled in 2D mode, this is the
658  // largest spatial dimension possible so we can break
659  // out.
660  break;
661 #endif
662  }
663 #endif
664 
665 #if LIBMESH_DIM > 2
666  if (node(2) != 0.)
667  {
668  // Spatial dimension can't get any higher than this, so
669  // we can break out.
670  _spatial_dimension = 3;
671  break;
672  }
673 #endif
674  }
675  }
676 }
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end...
unsigned char _spatial_dimension
The "spatial dimension" of the Mesh.
Definition: mesh_base.h:1417
virtual node_iterator nodes_begin()=0
Iterate over all the nodes in the Mesh.
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
Definition: mesh_base.h:1411
virtual element_iterator active_elements_begin()=0
Active, local, and negation forms of the element iterators described above.
virtual element_iterator active_elements_end()=0
virtual node_iterator nodes_end()=0
const Parallel::Communicator & comm() const
unsigned int mesh_dimension() const
Definition: mesh_base.C:148
virtual const Node & node(const dof_id_type i) const
Definition: mesh_base.h:440
void set_union(T &data, const unsigned int root_id) const
Take a container of local variables on each processor, and collect their union over all processors...
void libMesh::MeshBase::clear ( )
virtual

Deletes all the data that are currently stored.

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

Definition at line 285 of file mesh_base.C.

References _elem_dims, _is_prepared, _n_parts, libMesh::BoundaryInfo::clear(), clear_point_locator(), and get_boundary_info().

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

286 {
287  // Reset the number of partitions
288  _n_parts = 1;
289 
290  // Reset the _is_prepared flag
291  _is_prepared = false;
292 
293  // Clear boundary information
294  this->get_boundary_info().clear();
295 
296  // Clear element dimensions
297  _elem_dims.clear();
298 
299  // Clear our point locator.
300  this->clear_point_locator();
301 }
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
Definition: mesh_base.h:117
unsigned int _n_parts
The number of partitions the mesh has.
Definition: mesh_base.h:1342
void clear_point_locator()
Releases the current PointLocator object.
Definition: mesh_base.C:555
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
Definition: mesh_base.h:1411
void clear()
Clears the underlying data structures and restores the object to a pristine state with no data stored...
bool _is_prepared
Flag indicating if the mesh has been prepared for use.
Definition: mesh_base.h:1347
void libMesh::MeshBase::clear_point_locator ( )

Releases the current PointLocator object.

Definition at line 555 of file mesh_base.C.

References _point_locator, and libmesh_nullptr.

Referenced by libMesh::MeshCommunication::broadcast(), clear(), libMesh::UnstructuredMesh::contract(), libMesh::MeshCommunication::delete_remote_elements(), libMesh::MeshCommunication::gather(), libMesh::MeshCommunication::gather_neighboring_elements(), prepare_for_use(), and libMesh::MeshCommunication::redistribute().

556 {
558 }
UniquePtr< PointLocatorBase > _point_locator
A PointLocator class for this mesh.
Definition: mesh_base.h:1356
const class libmesh_nullptr_t libmesh_nullptr
virtual UniquePtr<MeshBase> libMesh::MeshBase::clone ( ) const
pure virtual
const Parallel::Communicator& libMesh::ParallelObject::comm ( ) const
inherited
Returns
A reference to the Parallel::Communicator object used by this mesh.

Definition at line 87 of file parallel_object.h.

References libMesh::ParallelObject::_communicator.

Referenced by libMesh::__libmesh_petsc_diff_solver_monitor(), libMesh::__libmesh_petsc_diff_solver_residual(), libMesh::__libmesh_petsc_preconditioner_apply(), libMesh::__libmesh_petsc_snes_jacobian(), libMesh::__libmesh_petsc_snes_postcheck(), libMesh::__libmesh_petsc_snes_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::ParmetisPartitioner::_do_repartition(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::BoundaryInfo::_find_id_maps(), libMesh::PetscLinearSolver< T >::_petsc_shell_matrix_get_diagonal(), libMesh::SlepcEigenSolver< T >::_petsc_shell_matrix_get_diagonal(), libMesh::PetscLinearSolver< T >::_petsc_shell_matrix_mult(), libMesh::SlepcEigenSolver< T >::_petsc_shell_matrix_mult(), libMesh::PetscLinearSolver< T >::_petsc_shell_matrix_mult_add(), libMesh::EquationSystems::_read_impl(), libMesh::MeshRefinement::_refine_elements(), libMesh::MeshRefinement::_smooth_flags(), add_cube_convex_hull_to_mesh(), libMesh::TransientRBConstruction::add_IC_to_RB_space(), libMesh::ImplicitSystem::add_matrix(), libMesh::RBConstruction::add_scaled_matrix_and_vector(), libMesh::System::add_vector(), libMesh::EigenSparseLinearSolver< T >::adjoint_solve(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::LaplaceMeshSmoother::allgather_graph(), 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::ParmetisPartitioner::assign_partitioning(), libMesh::DofMap::attach_matrix(), libMesh::Parallel::BinSorter< KeyType, IdxType >::binsort(), libMesh::Parallel::Sort< KeyType, IdxType >::binsort(), libMesh::MeshCommunication::broadcast(), libMesh::SparseMatrix< T >::build(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::Parallel::Histogram< KeyType, IdxType >::build_histogram(), libMesh::PetscNonlinearSolver< T >::build_mat_null_space(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::EquationSystems::build_parallel_solution_vector(), cache_elem_dims(), libMesh::System::calculate_norm(), libMesh::DofMap::check_dirichlet_bcid_consistency(), libMesh::Parallel::Sort< KeyType, IdxType >::communicate_bins(), 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::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::MeshTools::correct_node_proc_ids(), libMesh::MeshTools::create_bounding_box(), 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::MeshRefinement::eliminate_unrefined_patches(), libMesh::RBEIMConstruction::enrich_RB_space(), libMesh::TransientRBConstruction::enrich_RB_space(), libMesh::RBConstruction::enrich_RB_space(), AssembleOptimization::equality_constraints(), libMesh::WeightedPatchRecoveryErrorEstimator::estimate_error(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::PatchRecoveryErrorEstimator::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_nelem_target(), libMesh::MeshCommunication::gather(), libMesh::MeshCommunication::gather_neighboring_elements(), libMesh::MeshfreeInterpolation::gather_remote_data(), libMesh::CondensedEigenSystem::get_eigenpair(), libMesh::DofMap::get_info(), libMesh::ImplicitSystem::get_linear_solver(), libMesh::EquationSystems::get_solution(), AssembleOptimization::inequality_constraints(), AssembleOptimization::inequality_constraints_jacobian(), libMesh::LocationMap< T >::init(), libMesh::TopologyMap::init(), libMesh::PetscDiffSolver::init(), libMesh::TimeSolver::init(), libMesh::TaoOptimizationSolver< T >::init(), libMesh::PetscNonlinearSolver< T >::init(), libMesh::SystemSubsetBySubdomain::init(), libMesh::EigenSystem::init_data(), libMesh::EigenSystem::init_matrices(), libMesh::ParmetisPartitioner::initialize(), libMesh::OptimizationSystem::initialize_equality_constraints_storage(), libMesh::OptimizationSystem::initialize_inequality_constraints_storage(), libMesh::RBEIMConstruction::initialize_rb_construction(), integrate_function(), 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::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(), libMesh::MeshSerializer::MeshSerializer(), LinearElasticityWithContact::move_mesh(), libMesh::DistributedMesh::n_active_elem(), libMesh::MeshTools::n_active_levels(), libMesh::BoundaryInfo::n_boundary_conds(), 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(), new_function_base(), 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::Partitioner::partition(), libMesh::MetisPartitioner::partition_range(), libMesh::Partitioner::partition_unpartitioned_elements(), libMesh::petsc_auto_fieldsplit(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), prepare_for_use(), libMesh::SparseMatrix< T >::print(), FEMParameters::read(), libMesh::Nemesis_IO::read(), libMesh::CheckpointIO::read(), libMesh::XdrIO::read(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::RBEvaluation::read_in_vectors_from_multiple_files(), libMesh::TransientRBConstruction::read_riesz_representors_from_files(), libMesh::RBConstruction::read_riesz_representors_from_files(), libMesh::XdrIO::read_serialized_bc_names(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::XdrIO::read_serialized_subdomain_names(), recalculate_n_partitions(), libMesh::MeshCommunication::redistribute(), libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::DistributedMesh::renumber_dof_objects(), LinearElasticityWithContact::residual_and_jacobian(), libMesh::MeshCommunication::send_coarse_ghosts(), libMesh::TransientRBConstruction::set_error_temporal_data(), libMesh::RBEIMConstruction::set_explicit_sys_subvector(), libMesh::Partitioner::set_node_processor_ids(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::Partitioner::set_parent_processor_ids(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::Parallel::Sort< KeyType, IdxType >::sort(), subdomain_ids(), libMesh::BoundaryInfo::sync(), libMesh::Parallel::sync_element_data_by_parent_id(), libMesh::Parallel::sync_node_data_by_element_id(), libMesh::MeshRefinement::test_level_one(), MeshfunctionDFEM::test_mesh_function_dfem(), MeshfunctionDFEM::test_mesh_function_dfem_grad(), libMesh::MeshRefinement::test_unflagged(), PointLocatorTest::testLocator(), BoundaryInfoTest::testMesh(), SystemsTest::testProjectCubeWithMeshFunction(), 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::RBEvaluation::write_out_vectors(), libMesh::TransientRBConstruction::write_riesz_representors_to_files(), libMesh::RBConstruction::write_riesz_representors_to_files(), libMesh::XdrIO::write_serialized_bcs_helper(), 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().

88  { return _communicator; }
const Parallel::Communicator & _communicator
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 query_elem(), and libMesh::EquationSystems::reinit().

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::MeshTools::Generation::build_cube(), libMesh::UnstructuredMesh::contract(), libMesh::TetGenMeshInterface::delete_2D_hull_elements(), libMesh::MeshTools::Modification::flatten(), libMesh::TetGenMeshInterface::pointset_convexhull(), query_elem(), libMesh::AbaqusIO::read(), and libMesh::UNVIO::read_implementation().

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

Removes the Node n from the mesh.

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

Referenced by libMesh::UnstructuredMesh::all_first_order(), and query_elem().

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

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 182 of file mesh_base.h.

References mesh_dimension().

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

182 {}
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 678 of file mesh_base.C.

References active_elements_begin(), active_elements_end(), libMesh::Elem::dim(), elem(), elem_dimensions(), elem_ptr(), elem_ref(), elements_begin(), end, libMesh::DofObject::id(), libMesh::Elem::interior_parent(), max_elem_id(), libMesh::Elem::n_vertices(), libMesh::Elem::node_id(), and libMesh::Elem::set_interior_parent().

Referenced by get_subdomain_name_map(), and prepare_for_use().

679 {
680  // This requires an inspection on every processor
681  parallel_object_only();
682 
683  // Check if the mesh contains mixed dimensions. If so, then set interior parents, otherwise return.
684  if (this->elem_dimensions().size() == 1)
685  return;
686 
687  //This map will be used to set interior parents
688  std::unordered_map<dof_id_type, std::vector<dof_id_type>> node_to_elem;
689 
690  const_element_iterator el = this->active_elements_begin();
691  const_element_iterator end = this->active_elements_end();
692 
693  for (; el!=end; ++el)
694  {
695  const Elem * elem = *el;
696 
697  // Populating the node_to_elem map, same as MeshTools::build_nodes_to_elem_map
698  for (unsigned int n=0; n<elem->n_vertices(); n++)
699  {
700  libmesh_assert_less (elem->id(), this->max_elem_id());
701 
702  node_to_elem[elem->node_id(n)].push_back(elem->id());
703  }
704  }
705 
706  // Automatically set interior parents
707  el = this->elements_begin();
708  for (; el!=end; ++el)
709  {
710  Elem * element = *el;
711 
712  // Ignore an 3D element or an element that already has an interior parent
713  if (element->dim()>=LIBMESH_DIM || element->interior_parent())
714  continue;
715 
716  // Start by generating a SET of elements that are dim+1 to the current
717  // element at each vertex of the current element, thus ignoring interior nodes.
718  // If one of the SET of elements is empty, then we will not have an interior parent
719  // since an interior parent must be connected to all vertices of the current element
720  std::vector<std::set<dof_id_type>> neighbors( element->n_vertices() );
721 
722  bool found_interior_parents = false;
723 
724  for (dof_id_type n=0; n < element->n_vertices(); n++)
725  {
726  std::vector<dof_id_type> & element_ids = node_to_elem[element->node_id(n)];
727  for (std::vector<dof_id_type>::iterator e_it = element_ids.begin();
728  e_it != element_ids.end(); e_it++)
729  {
730  dof_id_type eid = *e_it;
731  if (this->elem_ref(eid).dim() == element->dim()+1)
732  neighbors[n].insert(eid);
733  }
734  if (neighbors[n].size()>0)
735  {
736  found_interior_parents = true;
737  }
738  else
739  {
740  // We have found an empty set, no reason to continue
741  // Ensure we set this flag to false before the break since it could have
742  // been set to true for previous vertex
743  found_interior_parents = false;
744  break;
745  }
746  }
747 
748  // If we have successfully generated a set of elements for each vertex, we will compare
749  // the set for vertex 0 will the sets for the vertices until we find a id that exists in
750  // all sets. If found, this is our an interior parent id. The interior parent id found
751  // will be the lowest element id if there is potential for multiple interior parents.
752  if (found_interior_parents)
753  {
754  std::set<dof_id_type> & neighbors_0 = neighbors[0];
755  for (std::set<dof_id_type>::iterator e_it = neighbors_0.begin();
756  e_it != neighbors_0.end(); e_it++)
757  {
758  found_interior_parents=false;
759  dof_id_type interior_parent_id = *e_it;
760  for (dof_id_type n=1; n < element->n_vertices(); n++)
761  {
762  if (neighbors[n].find(interior_parent_id)!=neighbors[n].end())
763  {
764  found_interior_parents=true;
765  }
766  else
767  {
768  found_interior_parents=false;
769  break;
770  }
771  }
772  if (found_interior_parents)
773  {
774  element->set_interior_parent(this->elem_ptr(interior_parent_id));
775  break;
776  }
777  }
778  }
779  }
780 }
virtual const Elem * elem(const dof_id_type i) const
Definition: mesh_base.h:523
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end...
virtual element_iterator elements_begin()=0
Iterate over all the elements in the Mesh.
virtual dof_id_type max_elem_id() const =0
const std::set< unsigned char > & elem_dimensions() const
Definition: mesh_base.h:206
virtual element_iterator active_elements_begin()=0
Active, local, and negation forms of the element iterators described above.
virtual element_iterator active_elements_end()=0
virtual const Elem & elem_ref(const dof_id_type i) const
Definition: mesh_base.h:490
virtual unsigned int dim() const =0
virtual const Elem * elem_ptr(const dof_id_type i) const =0
uint8_t dof_id_type
Definition: id_types.h:64
virtual const Elem* libMesh::MeshBase::elem ( const dof_id_type  i) const
virtual
Returns
A pointer to the $ i^{th} $ element, which should be present in this processor's subset of the mesh data structure.
Deprecated:
Use the less confusingly-named elem_ptr() instead.

Definition at line 523 of file mesh_base.h.

References elem_ptr().

Referenced by detect_interior_parents(), and libMesh::DTKAdapter::DTKAdapter().

524  {
525  libmesh_deprecated();
526  return this->elem_ptr(i);
527  }
virtual const Elem * elem_ptr(const dof_id_type i) const =0
virtual Elem* libMesh::MeshBase::elem ( const dof_id_type  i)
virtual
Returns
A writable pointer to the $ i^{th} $ element, which should be present in this processor's subset of the mesh data structure.
Deprecated:
Use the less confusingly-named elem_ptr() instead.

Definition at line 538 of file mesh_base.h.

References elem_ptr(), and query_elem_ptr().

539  {
540  libmesh_deprecated();
541  return this->elem_ptr(i);
542  }
virtual const Elem * elem_ptr(const dof_id_type i) const =0
const std::set<unsigned char>& libMesh::MeshBase::elem_dimensions ( ) const
Returns
A const reference to a std::set of element dimensions present in the mesh.

Definition at line 206 of file mesh_base.h.

References _elem_dims, n_nodes(), n_nodes_on_proc(), parallel_n_nodes(), set_spatial_dimension(), and spatial_dimension().

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

207  { return _elem_dims; }
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
Definition: mesh_base.h:1411
virtual const Elem* libMesh::MeshBase::elem_ptr ( const dof_id_type  i) const
pure virtual
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.

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

Definition at line 490 of file mesh_base.h.

References elem_ptr().

Referenced by libMesh::SyncRefinementFlags::act_on_data(), libMesh::AbaqusIO::assign_sideset_ids(), libMesh::AbaqusIO::assign_subdomain_ids(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::InfElemBuilder::build_inf_elem(), MixedDimensionNonUniformRefinement::build_mesh(), MixedDimensionNonUniformRefinementTriangle::build_mesh(), MixedDimensionNonUniformRefinement3D::build_mesh(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), detect_interior_parents(), libMesh::SyncRefinementFlags::gather_data(), main(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::ExodusII_IO::read(), libMesh::CheckpointIO::read_remote_elem(), libMesh::Parallel::sync_element_data_by_parent_id(), libMesh::Parallel::sync_node_data_by_element_id(), MeshExtruderTest::testExtruder(), MixedDimensionMeshTest::testMesh(), SlitMeshTest::testMesh(), MixedDimensionNonUniformRefinement::testMesh(), MixedDimensionNonUniformRefinementTriangle::testMesh(), MixedDimensionNonUniformRefinement3D::testMesh(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::FroIO::write(), libMesh::Nemesis_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::Nemesis_IO_Helper::write_sidesets(), and libMesh::ExodusII_IO_Helper::write_sidesets().

490  {
491  return *this->elem_ptr(i);
492  }
virtual const Elem * elem_ptr(const dof_id_type i) const =0
virtual Elem& libMesh::MeshBase::elem_ref ( const dof_id_type  i)
virtual
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 499 of file mesh_base.h.

References elem_ptr().

499  {
500  return *this->elem_ptr(i);
501  }
virtual const Elem * elem_ptr(const dof_id_type i) const =0
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::MeshTools::Subdivision::all_subdivision(), libMesh::MeshTools::Modification::all_tri(), libMesh::EquationSystems::allgather(), libMesh::MeshCommunication::assign_global_indices(), libMesh::MeshTools::Generation::build_cube(), 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::copy_nodes_and_elements(), libMesh::TetGenMeshInterface::delete_2D_hull_elements(), libMesh::DofMap::distribute_dofs(), libMesh::MeshTools::elem_types(), libMesh::UNVIO::elements_out(), libMesh::TopologyMap::fill(), 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_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_assert_valid_parallel_ids(), libMesh::MeshTools::libmesh_assert_valid_refinement_flags(), libMesh::MeshTools::libmesh_assert_valid_refinement_tree(), main(), libMesh::MeshTools::paranoid_n_levels(), libMesh::ErrorVector::plot_error(), 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(), libMesh::DofMap::reinit(), libMesh::MeshRefinement::switch_h_to_p_refinement(), libMesh::BoundaryInfo::sync(), libMesh::MeshTools::Subdivision::tag_boundary_ghosts(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and libMesh::UCDIO::write_interior_elems().

virtual SimpleRange<const_element_iterator> libMesh::MeshBase::element_ptr_range ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::elements_end ( ) const
pure virtual
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 libmesh_assert_valid_parallel_ids().

virtual const_element_iterator libMesh::MeshBase::evaluable_elements_begin ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
) const
pure virtual
virtual element_iterator libMesh::MeshBase::evaluable_elements_end ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
)
pure virtual
virtual const_element_iterator libMesh::MeshBase::evaluable_elements_end ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
) const
pure virtual
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.

Referenced by libmesh_assert_valid_parallel_ids().

virtual const_node_iterator libMesh::MeshBase::evaluable_nodes_begin ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
) const
pure virtual
virtual node_iterator libMesh::MeshBase::evaluable_nodes_end ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
)
pure virtual
virtual const_node_iterator libMesh::MeshBase::evaluable_nodes_end ( const DofMap dof_map,
unsigned int  var_num = libMesh::invalid_uint 
) const
pure virtual
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.

Referenced by libmesh_assert_valid_parallel_ids().

virtual const_element_iterator libMesh::MeshBase::facelocal_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::facelocal_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::facelocal_elements_end ( ) const
pure virtual
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 NULL 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(), prepare_for_use(), and query_elem().

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(), query_elem(), libMesh::RBEvaluation::read_in_vectors_from_multiple_files(), and libMesh::RBEvaluation::write_out_vectors().

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.

Referenced by libmesh_assert_valid_parallel_ids().

virtual const_element_iterator libMesh::MeshBase::flagged_elements_begin ( unsigned char  rflag) const
pure virtual
virtual element_iterator libMesh::MeshBase::flagged_elements_end ( unsigned char  rflag)
pure virtual
virtual const_element_iterator libMesh::MeshBase::flagged_elements_end ( unsigned char  rflag) const
pure virtual
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.

Referenced by libmesh_assert_valid_parallel_ids(), libMesh::query_ghosting_functors(), and libMesh::MeshCommunication::send_coarse_ghosts().

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

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

Reimplemented in libMesh::DistributedMesh.

Definition at line 175 of file mesh_base.h.

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

175 {}
const BoundaryInfo& libMesh::MeshBase::get_boundary_info ( ) const

The information about boundary ids on the mesh.

Definition at line 117 of file mesh_base.h.

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::MeshCommunication::broadcast(), libMesh::MeshTools::Generation::build_cube(), libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::MeshTools::Generation::build_sphere(), libMesh::MeshTools::Modification::change_boundary_id(), libMesh::DofMap::check_dirichlet_bcid_consistency(), clear(), libMesh::Nemesis_IO_Helper::compute_num_global_nodesets(), libMesh::Nemesis_IO_Helper::compute_num_global_sidesets(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), 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(), libMesh::ExodusII_IO_Helper::initialize(), LinearElasticityWithContact::initialize_contact_load_paths(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), main(), AugmentSparsityOnInterface::mesh_reinit(), libMesh::BoundaryProjectSolution::operator()(), 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::CheckpointIO::read_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(), BoundaryInfoTest::testEdgeBoundaryConditions(), BoundaryInfoTest::testMesh(), BoundaryInfoTest::testShellFaceConstraints(), libMesh::Elem::topological_neighbor(), libMesh::Parallel::Packing< Node * >::unpack(), libMesh::Parallel::Packing< Elem * >::unpack(), libMesh::FroIO::write(), libMesh::Nemesis_IO::write(), libMesh::ExodusII_IO::write(), libMesh::CheckpointIO::write(), libMesh::XdrIO::write(), libMesh::ExodusII_IO::write_nodal_data_common(), libMesh::Nemesis_IO_Helper::write_nodesets(), libMesh::ExodusII_IO_Helper::write_nodesets(), libMesh::Nemesis_IO_Helper::write_sidesets(), and libMesh::ExodusII_IO_Helper::write_sidesets().

117 { return *boundary_info; }
UniquePtr< BoundaryInfo > boundary_info
This class holds the boundary information.
Definition: mesh_base.h:1321
BoundaryInfo& libMesh::MeshBase::get_boundary_info ( )

Writable information about boundary ids on the mesh.

Definition at line 122 of file mesh_base.h.

References boundary_info, and clear().

122 { return *boundary_info; }
UniquePtr< BoundaryInfo > boundary_info
This class holds the boundary information.
Definition: mesh_base.h:1321
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 569 of file mesh_base.C.

References _count_lower_dim_elems_in_point_locator.

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

570 {
572 }
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:1362
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 596 of file mesh_base.C.

References _block_id_to_name, and libMesh::Elem::invalid_subdomain_id.

Referenced by libmesh_assert_valid_parallel_ids().

597 {
598  // Linear search over the map values.
599  std::map<subdomain_id_type, std::string>::const_iterator
600  iter = _block_id_to_name.begin(),
601  end_iter = _block_id_to_name.end();
602 
603  for ( ; iter != end_iter; ++iter)
604  if (iter->second == name)
605  return iter->first;
606 
607  // If we made it here without returning, we don't have a subdomain
608  // with the requested name, so return Elem::invalid_subdomain_id.
610 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:39
static const subdomain_id_type invalid_subdomain_id
A static integral constant representing an invalid subdomain id.
Definition: elem.h:237
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:1404
std::string libMesh::MeshBase::get_info ( ) const
Returns
A string containing relevant information about the mesh.

Definition at line 414 of file mesh_base.C.

References _elem_dims, n_active_elem(), n_elem(), n_local_elem(), n_local_nodes(), n_nodes(), n_partitions(), libMesh::ParallelObject::n_processors(), n_subdomains(), libMesh::n_threads(), libMesh::ParallelObject::processor_id(), and spatial_dimension().

Referenced by n_partitions(), and print_info().

415 {
416  std::ostringstream oss;
417 
418  oss << " Mesh Information:" << '\n';
419 
420  if (!_elem_dims.empty())
421  {
422  oss << " elem_dimensions()={";
423  std::copy(_elem_dims.begin(),
424  --_elem_dims.end(), // --end() is valid if the set is non-empty
425  std::ostream_iterator<unsigned int>(oss, ", "));
426  oss << cast_int<unsigned int>(*_elem_dims.rbegin());
427  oss << "}\n";
428  }
429 
430  oss << " spatial_dimension()=" << this->spatial_dimension() << '\n'
431  << " n_nodes()=" << this->n_nodes() << '\n'
432  << " n_local_nodes()=" << this->n_local_nodes() << '\n'
433  << " n_elem()=" << this->n_elem() << '\n'
434  << " n_local_elem()=" << this->n_local_elem() << '\n'
435 #ifdef LIBMESH_ENABLE_AMR
436  << " n_active_elem()=" << this->n_active_elem() << '\n'
437 #endif
438  << " n_subdomains()=" << static_cast<std::size_t>(this->n_subdomains()) << '\n'
439  << " n_partitions()=" << static_cast<std::size_t>(this->n_partitions()) << '\n'
440  << " n_processors()=" << static_cast<std::size_t>(this->n_processors()) << '\n'
441  << " n_threads()=" << static_cast<std::size_t>(libMesh::n_threads()) << '\n'
442  << " processor_id()=" << static_cast<std::size_t>(this->processor_id()) << '\n';
443 
444  return oss.str();
445 }
virtual dof_id_type n_active_elem() const =0
unsigned int n_threads()
Definition: libmesh_base.h:125
dof_id_type n_local_nodes() const
Definition: mesh_base.h:272
unsigned int n_partitions() const
Definition: mesh_base.h:833
processor_id_type n_processors() const
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
Definition: mesh_base.h:1411
unsigned int spatial_dimension() const
Definition: mesh_base.C:157
dof_id_type n_local_elem() const
Definition: mesh_base.h:372
subdomain_id_type n_subdomains() const
Definition: mesh_base.C:334
virtual dof_id_type n_nodes() const =0
virtual dof_id_type n_elem() const =0
processor_id_type processor_id() const
const std::map<subdomain_id_type, std::string>& libMesh::MeshBase::get_subdomain_name_map ( ) const

Definition at line 1295 of file mesh_base.h.

References _block_id_to_name, cache_elem_dims(), and detect_interior_parents().

Referenced by libMesh::XdrIO::write_serialized_subdomain_names(), and libMesh::CheckpointIO::write_subdomain_names().

1296  { return _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:1404
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.

Referenced by libmesh_assert_valid_parallel_ids().

virtual const_element_iterator libMesh::MeshBase::ghost_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::ghost_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::ghost_elements_end ( ) const
pure virtual
std::set<GhostingFunctor *>::const_iterator libMesh::MeshBase::ghosting_functors_begin ( ) const

Beginning of range of ghosting functors.

Definition at line 798 of file mesh_base.h.

References _ghosting_functors.

Referenced by libMesh::UnstructuredMesh::contract(), libMesh::MeshCommunication::delete_remote_elements(), prepare_for_use(), libMesh::query_ghosting_functors(), libMesh::MeshCommunication::redistribute(), and libMesh::MeshCommunication::send_coarse_ghosts().

799  { return _ghosting_functors.begin(); }
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
Definition: mesh_base.h:1433
std::set<GhostingFunctor *>::const_iterator libMesh::MeshBase::ghosting_functors_end ( ) const

End of range of ghosting functors.

Definition at line 804 of file mesh_base.h.

References _ghosting_functors, n_subdomains(), and subdomain_ids().

Referenced by libMesh::UnstructuredMesh::contract(), libMesh::MeshCommunication::delete_remote_elements(), prepare_for_use(), libMesh::query_ghosting_functors(), libMesh::MeshCommunication::redistribute(), and libMesh::MeshCommunication::send_coarse_ghosts().

805  { return _ghosting_functors.end(); }
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
Definition: mesh_base.h:1433
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(), libMesh::MeshTools::Subdivision::all_subdivision(), and query_elem().

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=(), and query_elem().

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

Definition at line 133 of file mesh_base.h.

References _is_prepared.

Referenced by libMesh::DofMap::build_sparsity(), libMesh::DofMap::create_dof_constraints(), libMesh::DofMap::distribute_dofs(), and libMesh::DofMap::reinit().

134  { return _is_prepared; }
bool _is_prepared
Flag indicating if the mesh has been prepared for use.
Definition: mesh_base.h:1347
virtual bool libMesh::MeshBase::is_replicated ( ) const
virtual
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 162 of file mesh_base.h.

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

163  { return true; }
virtual bool libMesh::MeshBase::is_serial ( ) const
virtual
Returns
true if all elements and nodes of the mesh exist on the current processor, false otherwise

Reimplemented in libMesh::DistributedMesh.

Definition at line 140 of file mesh_base.h.

Referenced by libMesh::MeshRefinement::_coarsen_elements(), libMesh::MeshRefinement::_smooth_flags(), libMesh::BoundaryInfo::add_elements(), libMesh::UnstructuredMesh::all_second_order(), libMesh::MeshTools::Modification::all_tri(), libMesh::EquationSystems::allgather(), libMesh::DofMap::allgather_recursive_constraints(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::DofMap::create_dof_constraints(), libMesh::UnstructuredMesh::create_submesh(), libMesh::LocationMap< T >::init(), libMesh::TopologyMap::init(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshSerializer::MeshSerializer(), libMesh::BoundaryInfo::n_boundary_conds(), libMesh::BoundaryInfo::n_edge_conds(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::BoundaryInfo::n_shellface_conds(), partition(), libMesh::MetisPartitioner::partition_range(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), prepare_for_use(), libMesh::Nemesis_IO::read(), libMesh::DofMap::scatter_constraints(), libMesh::MeshCommunication::send_coarse_ghosts(), libMesh::Partitioner::set_parent_processor_ids(), libMesh::BoundaryInfo::sync(), libMesh::MeshTools::total_weight(), libMesh::MeshFunctionSolutionTransfer::transfer(), libMesh::CheckpointIO::write(), and libMesh::XdrIO::write_parallel().

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

Reimplemented in libMesh::DistributedMesh.

Definition at line 147 of file mesh_base.h.

148  { return true; }
virtual element_iterator libMesh::MeshBase::level_elements_begin ( unsigned int  level)
pure virtual
virtual const_element_iterator libMesh::MeshBase::level_elements_begin ( unsigned int  level) const
pure virtual
virtual element_iterator libMesh::MeshBase::level_elements_end ( unsigned int  level)
pure virtual
virtual const_element_iterator libMesh::MeshBase::level_elements_end ( unsigned int  level) const
pure virtual
virtual void libMesh::MeshBase::libmesh_assert_valid_parallel_ids ( ) const
virtual

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 965 of file mesh_base.h.

References active_element_ptr_range(), active_elements_begin(), active_elements_end(), active_local_element_ptr_range(), active_local_elements_begin(), active_local_elements_end(), active_local_subdomain_elements_begin(), active_local_subdomain_elements_end(), active_nodes_begin(), active_nodes_end(), active_not_local_elements_begin(), active_not_local_elements_end(), active_pid_elements_begin(), active_pid_elements_end(), active_semilocal_elements_begin(), active_semilocal_elements_end(), active_subdomain_elements_begin(), active_subdomain_elements_end(), active_subdomain_set_elements_begin(), active_subdomain_set_elements_end(), active_type_elements_begin(), active_type_elements_end(), active_unpartitioned_elements_begin(), active_unpartitioned_elements_end(), ancestor_elements_begin(), ancestor_elements_end(), bid_nodes_begin(), bid_nodes_end(), bnd_nodes_begin(), bnd_nodes_end(), element_ptr_range(), elements_begin(), elements_end(), evaluable_elements_begin(), evaluable_elements_end(), evaluable_nodes_begin(), evaluable_nodes_end(), facelocal_elements_begin(), facelocal_elements_end(), flagged_elements_begin(), flagged_elements_end(), flagged_pid_elements_begin(), flagged_pid_elements_end(), get_id_by_name(), ghost_elements_begin(), ghost_elements_end(), libMesh::invalid_uint, level_elements_begin(), level_elements_end(), local_elements_begin(), local_elements_end(), local_level_elements_begin(), local_level_elements_end(), local_node_ptr_range(), local_nodes_begin(), local_nodes_end(), local_not_level_elements_begin(), local_not_level_elements_end(), node_ptr_range(), nodes_begin(), nodes_end(), not_active_elements_begin(), not_active_elements_end(), not_ancestor_elements_begin(), not_ancestor_elements_end(), not_level_elements_begin(), not_level_elements_end(), not_local_elements_begin(), not_local_elements_end(), not_subactive_elements_begin(), not_subactive_elements_end(), pid_elements_begin(), pid_elements_end(), pid_nodes_begin(), pid_nodes_end(), semilocal_elements_begin(), semilocal_elements_end(), subactive_elements_begin(), subactive_elements_end(), subdomain_name(), type_elements_begin(), type_elements_end(), unpartitioned_elements_begin(), and unpartitioned_elements_end().

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

965 {}
virtual element_iterator libMesh::MeshBase::local_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::local_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::local_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::local_elements_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::local_level_elements_begin ( unsigned int  level)
pure virtual
virtual const_element_iterator libMesh::MeshBase::local_level_elements_begin ( unsigned int  level) const
pure virtual
virtual element_iterator libMesh::MeshBase::local_level_elements_end ( unsigned int  level)
pure virtual
virtual const_element_iterator libMesh::MeshBase::local_level_elements_end ( unsigned int  level) const
pure virtual
virtual SimpleRange<node_iterator> libMesh::MeshBase::local_node_ptr_range ( )
pure virtual
virtual SimpleRange<const_node_iterator> libMesh::MeshBase::local_node_ptr_range ( ) const
pure virtual
virtual node_iterator libMesh::MeshBase::local_nodes_begin ( )
pure virtual
virtual const_node_iterator libMesh::MeshBase::local_nodes_begin ( ) const
pure virtual
virtual node_iterator libMesh::MeshBase::local_nodes_end ( )
pure virtual
virtual const_node_iterator libMesh::MeshBase::local_nodes_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::local_not_level_elements_begin ( unsigned int  level)
pure virtual
virtual const_element_iterator libMesh::MeshBase::local_not_level_elements_begin ( unsigned int  level) const
pure virtual
virtual element_iterator libMesh::MeshBase::local_not_level_elements_end ( unsigned int  level)
pure virtual
virtual const_element_iterator libMesh::MeshBase::local_not_level_elements_end ( unsigned int  level) const
pure virtual
virtual dof_id_type libMesh::MeshBase::max_elem_id ( ) const
pure virtual
virtual dof_id_type libMesh::MeshBase::max_node_id ( ) const
pure virtual
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 148 of file mesh_base.C.

References _elem_dims.

Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), 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_shell(), assemble_stokes(), assemble_wave(), libMesh::MeshTools::Generation::build_cube(), libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::MeshTools::Generation::build_sphere(), libMesh::EquationSystems::build_variable_names(), cache_elem_dims(), compute_stresses(), LinearElasticity::compute_stresses(), libMesh::DofMap::create_dof_constraints(), delete_remote_elements(), libMesh::MeshTools::Modification::distort(), SolidSystem::element_time_derivative(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::MeshRefinement::flag_elements_by_elem_fraction(), libMesh::MeshRefinement::flag_elements_by_nelem_target(), libMesh::LaplaceMeshSmoother::init(), libMesh::PointLocatorTree::init(), SolidSystem::init_data(), libMesh::ExodusII_IO_Helper::initialize(), libMesh::RBEIMAssembly::initialize_fe(), integrate_function(), LaplaceYoung::jacobian(), main(), libMesh::FEInterface::n_vec_dim(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::BoundaryProjectSolution::operator()(), libMesh::GMVIO::read(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::VTKIO::read(), libMesh::XdrIO::read_serialized_connectivity(), LaplaceYoung::residual(), SolidSystem::save_initial_mesh(), libMesh::HPCoarsenTest::select_refinement(), setup(), libMesh::MeshTools::Modification::smooth(), MeshSpatialDimensionTest::test1D(), MeshSpatialDimensionTest::test2D(), 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_nodal_data(), libMesh::EnsightIO::write_scalar_ascii(), libMesh::GnuPlotIO::write_solution(), and libMesh::EnsightIO::write_vector_ascii().

149 {
150  if (!_elem_dims.empty())
151  return cast_int<unsigned int>(*_elem_dims.rbegin());
152  return 0;
153 }
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
Definition: mesh_base.h:1411
virtual dof_id_type libMesh::MeshBase::n_active_elem ( ) const
pure virtual
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 375 of file mesh_base.C.

References active_pid_elements_begin(), active_pid_elements_end(), distance(), and libMesh::ParallelObject::n_processors().

Referenced by n_active_local_elem(), and n_unpartitioned_elem().

376 {
377  libmesh_assert_less (proc_id, this->n_processors());
378  return static_cast<dof_id_type>(std::distance (this->active_pid_elements_begin(proc_id),
379  this->active_pid_elements_end (proc_id)));
380 }
processor_id_type n_processors() const
Real distance(const Point &p)
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
uint8_t dof_id_type
Definition: id_types.h:64
dof_id_type libMesh::MeshBase::n_active_local_elem ( ) const
Returns
The number of active elements on the local processor.

Definition at line 389 of file mesh_base.h.

References n_active_elem_on_proc(), n_active_sub_elem(), n_sub_elem(), point(), and libMesh::ParallelObject::processor_id().

Referenced by libMesh::ParmetisPartitioner::assign_partitioning(), libMesh::ParmetisPartitioner::build_graph(), libMesh::VTKIO::cells_to_vtk(), and libMesh::ParmetisPartitioner::initialize().

390  { return this->n_active_elem_on_proc (this->processor_id()); }
dof_id_type n_active_elem_on_proc(const processor_id_type proc) const
Definition: mesh_base.C:375
processor_id_type processor_id() const
dof_id_type libMesh::MeshBase::n_active_sub_elem ( ) const

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

Definition at line 399 of file mesh_base.C.

References active_elements_begin(), active_elements_end(), and end.

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

400 {
401  dof_id_type ne=0;
402 
403  const_element_iterator el = this->active_elements_begin();
404  const const_element_iterator end = this->active_elements_end();
405 
406  for (; el!=end; ++el)
407  ne += (*el)->n_sub_elem();
408 
409  return ne;
410 }
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end...
virtual element_iterator active_elements_begin()=0
Active, local, and negation forms of the element iterators described above.
virtual element_iterator active_elements_end()=0
uint8_t dof_id_type
Definition: id_types.h:64
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::UniformRefinementEstimator::_estimate_error(), 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::MeshCommunication::broadcast(), libMesh::MeshTools::Generation::build_cube(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::MeshTools::build_nodes_to_elem_map(), libMesh::TetGenMeshInterface::check_hull_integrity(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::DofMap::create_dof_constraints(), libMesh::UnstructuredMesh::create_submesh(), libMesh::MeshTools::Modification::distort(), get_info(), libMesh::EquationSystems::get_solution(), libMesh::ExodusII_IO_Helper::initialize(), main(), libMesh::SFCPartitioner::partition_range(), libMesh::ErrorVector::plot_error(), libMesh::Nemesis_IO::read(), libMesh::CheckpointIO::read(), libMesh::MeshTools::Modification::redistribute(), set_next_unique_id(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), libMesh::RBEIMConstruction::truth_solve(), libMesh::FroIO::write(), libMesh::TetGenIO::write(), libMesh::XdrIO::write(), libMesh::ExodusII_IO_Helper::write_element_values(), libMesh::UCDIO::write_nodal_data(), and libMesh::XdrIO::write_serialized_connectivity().

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 362 of file mesh_base.C.

References distance(), libMesh::DofObject::invalid_processor_id, libMesh::libmesh_assert(), libMesh::ParallelObject::n_processors(), pid_elements_begin(), and pid_elements_end().

Referenced by n_local_elem(), n_unpartitioned_elem(), and set_next_unique_id().

363 {
364  // We're either counting a processor's elements or unpartitioned
365  // elements
366  libmesh_assert (proc_id < this->n_processors() ||
368 
369  return static_cast<dof_id_type>(std::distance (this->pid_elements_begin(proc_id),
370  this->pid_elements_end (proc_id)));
371 }
processor_id_type n_processors() const
Real distance(const Point &p)
libmesh_assert(j)
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:335
virtual element_iterator pid_elements_begin(processor_id_type proc_id)=0
Iterate over all elements with a specified processor id.
uint8_t dof_id_type
Definition: id_types.h:64
virtual element_iterator pid_elements_end(processor_id_type proc_id)=0
dof_id_type libMesh::MeshBase::n_local_elem ( ) const
Returns
The number of elements on the local processor.

Definition at line 372 of file mesh_base.h.

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

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

373  { return this->n_elem_on_proc (this->processor_id()); }
dof_id_type n_elem_on_proc(const processor_id_type proc) const
Definition: mesh_base.C:362
processor_id_type processor_id() const
dof_id_type libMesh::MeshBase::n_local_nodes ( ) const
Returns
The number of nodes on the local processor.

Definition at line 272 of file mesh_base.h.

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

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

273  { return this->n_nodes_on_proc (this->processor_id()); }
dof_id_type n_nodes_on_proc(const processor_id_type proc) const
Definition: mesh_base.C:349
processor_id_type processor_id() const
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::MeshCommunication::broadcast(), libMesh::MeshTools::Generation::build_cube(), libMesh::MeshTools::Generation::build_delaunay_square(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::MeshTools::build_nodes_to_elem_map(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::UnstructuredMesh::create_submesh(), libMesh::MeshTools::Modification::distort(), elem_dimensions(), fill_dirichlet_bc(), libMesh::TetGenMeshInterface::fill_pointlist(), get_info(), libMesh::TreeNode< N >::insert(), libMesh::MeshRefinement::limit_level_mismatch_at_node(), main(), libMesh::VariationalMeshSmoother::metr_data_gen(), libMesh::ErrorVector::plot_error(), libMesh::Nemesis_IO::read(), libMesh::AbaqusIO::read_nodes(), libMesh::MeshTools::Modification::redistribute(), libMesh::MeshTools::Modification::smooth(), libMesh::VariationalMeshSmoother::smooth(), 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::XdrIO::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::VTKIO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data(), libMesh::GmshIO::write_post(), libMesh::XdrIO::write_serialized_nodes(), libMesh::UCDIO::write_soln(), and libMesh::VariationalMeshSmoother::writegr().

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 349 of file mesh_base.C.

References distance(), libMesh::DofObject::invalid_processor_id, libMesh::libmesh_assert(), libMesh::ParallelObject::n_processors(), pid_nodes_begin(), and pid_nodes_end().

Referenced by elem_dimensions(), n_local_nodes(), and n_unpartitioned_nodes().

350 {
351  // We're either counting a processor's nodes or unpartitioned
352  // nodes
353  libmesh_assert (proc_id < this->n_processors() ||
355 
356  return static_cast<dof_id_type>(std::distance (this->pid_nodes_begin(proc_id),
357  this->pid_nodes_end (proc_id)));
358 }
virtual node_iterator pid_nodes_end(processor_id_type proc_id)=0
processor_id_type n_processors() const
Real distance(const Point &p)
libmesh_assert(j)
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:335
virtual node_iterator pid_nodes_begin(processor_id_type proc_id)=0
Iterate over nodes with processor_id() == proc_id.
uint8_t dof_id_type
Definition: id_types.h:64
unsigned int libMesh::MeshBase::n_partitions ( ) const
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 833 of file mesh_base.h.

References _n_parts, all_first_order(), all_second_order(), get_info(), libmesh_nullptr, libMesh::Quality::name(), operator<<, libMesh::out, print_info(), read(), and write().

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

834  { return _n_parts; }
unsigned int _n_parts
The number of partitions the mesh has.
Definition: mesh_base.h:1342
processor_id_type libMesh::ParallelObject::n_processors ( ) const
inherited
Returns
The number of processors in the group.

Definition at line 93 of file parallel_object.h.

References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::size().

Referenced by libMesh::ParmetisPartitioner::_do_repartition(), libMesh::BoundaryInfo::_find_id_maps(), libMesh::DistributedMesh::add_elem(), libMesh::DistributedMesh::add_node(), libMesh::LaplaceMeshSmoother::allgather_graph(), libMesh::FEMSystem::assembly(), libMesh::ParmetisPartitioner::assign_partitioning(), libMesh::AztecLinearSolver< T >::AztecLinearSolver(), libMesh::MeshCommunication::broadcast(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::DistributedMesh::clear(), libMesh::Nemesis_IO_Helper::compute_border_node_ids(), libMesh::Nemesis_IO_Helper::construct_nemesis_filename(), libMesh::MeshTools::correct_node_proc_ids(), 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::DistributedMesh::DistributedMesh(), libMesh::EnsightIO::EnsightIO(), libMesh::MeshCommunication::gather(), libMesh::MeshCommunication::gather_neighboring_elements(), get_info(), libMesh::EquationSystems::get_solution(), libMesh::SystemSubsetBySubdomain::init(), libMesh::ParmetisPartitioner::initialize(), libMesh::Nemesis_IO_Helper::initialize(), libMesh::DistributedMesh::insert_elem(), 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(), n_active_elem_on_proc(), n_elem_on_proc(), n_nodes_on_proc(), libMesh::SparsityPattern::Build::parallel_sync(), libMesh::Partitioner::partition(), partition(), libMesh::Partitioner::partition_unpartitioned_elements(), libMesh::PetscLinearSolver< T >::PetscLinearSolver(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::SparseMatrix< T >::print(), libMesh::NameBasedIO::read(), libMesh::Nemesis_IO::read(), libMesh::CheckpointIO::read(), libMesh::CheckpointIO::read_connectivity(), libMesh::XdrIO::read_header(), libMesh::CheckpointIO::read_nodes(), libMesh::MeshCommunication::redistribute(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::Partitioner::repartition(), libMesh::MeshCommunication::send_coarse_ghosts(), libMesh::Partitioner::set_node_processor_ids(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::Parallel::Sort< KeyType, IdxType >::sort(), WriteVecAndScalar::testWrite(), libMesh::MeshRefinement::uniformly_coarsen(), libMesh::DistributedMesh::update_parallel_id_counts(), libMesh::GMVIO::write_binary(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::XdrIO::write_serialized_nodes(), and libMesh::XdrIO::write_serialized_nodesets().

94  { return cast_int<processor_id_type>(_communicator.size()); }
unsigned int size() const
Definition: parallel.h:726
const Parallel::Communicator & _communicator
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 384 of file mesh_base.C.

References elements_begin(), elements_end(), and end.

Referenced by n_active_local_elem().

385 {
386  dof_id_type ne=0;
387 
388  const_element_iterator el = this->elements_begin();
389  const const_element_iterator end = this->elements_end();
390 
391  for (; el!=end; ++el)
392  ne += (*el)->n_sub_elem();
393 
394  return ne;
395 }
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end...
virtual element_iterator elements_begin()=0
Iterate over all the elements in the Mesh.
virtual element_iterator elements_end()=0
uint8_t dof_id_type
Definition: id_types.h:64
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 334 of file mesh_base.C.

References subdomain_ids().

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

335 {
336  // This requires an inspection on every processor
337  parallel_object_only();
338 
339  std::set<subdomain_id_type> ids;
340 
341  this->subdomain_ids (ids);
342 
343  return cast_int<subdomain_id_type>(ids.size());
344 }
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:315
dof_id_type libMesh::MeshBase::n_unpartitioned_elem ( ) const
Returns
The number of elements owned by no processor.

Definition at line 378 of file mesh_base.h.

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

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

dof_id_type n_elem_on_proc(const processor_id_type proc) const
Definition: mesh_base.C:362
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:335
dof_id_type libMesh::MeshBase::n_unpartitioned_nodes ( ) const
Returns
The number of nodes owned by no processor.

Definition at line 278 of file mesh_base.h.

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

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

dof_id_type n_nodes_on_proc(const processor_id_type proc) const
Definition: mesh_base.C:349
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:335
unique_id_type libMesh::MeshBase::next_unique_id ( )
Returns
The next unique id to be used.

Definition at line 291 of file mesh_base.h.

References _next_unique_id.

291 { return _next_unique_id; }
unique_id_type _next_unique_id
The next available unique id for assigning ids to DOF objects.
Definition: mesh_base.h:1376
virtual const Node& libMesh::MeshBase::node ( const dof_id_type  i) const
virtual
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.
Deprecated:
Use the less confusingly-named node_ref() instead.

Definition at line 440 of file mesh_base.h.

References node_ptr().

Referenced by cache_elem_dims(), and libMesh::MeshTools::Modification::change_boundary_id().

441  {
442  libmesh_deprecated();
443  return *this->node_ptr(i);
444  }
virtual const Node * node_ptr(const dof_id_type i) const =0
virtual Node& libMesh::MeshBase::node ( const dof_id_type  i)
virtual
Returns
A reference to the $ i^{th} $ node, which should be present in this processor's subset of the mesh data structure.
Deprecated:
Use the less confusingly-named node_ref() instead.

Definition at line 454 of file mesh_base.h.

References node_ptr(), and query_node_ptr().

455  {
456  libmesh_deprecated();
457  return *this->node_ptr(i);
458  }
virtual const Node * node_ptr(const dof_id_type i) const =0
virtual const Node* libMesh::MeshBase::node_ptr ( const dof_id_type  i) const
pure virtual
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.

virtual SimpleRange<node_iterator> libMesh::MeshBase::node_ptr_range ( )
pure virtual
virtual SimpleRange<const_node_iterator> libMesh::MeshBase::node_ptr_range ( ) const
pure virtual
virtual const Node& libMesh::MeshBase::node_ref ( const dof_id_type  i) const
virtual
virtual Node& libMesh::MeshBase::node_ref ( const dof_id_type  i)
virtual
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 428 of file mesh_base.h.

References node_ptr().

428  {
429  return *this->node_ptr(i);
430  }
virtual const Node * node_ptr(const dof_id_type i) const =0
virtual node_iterator libMesh::MeshBase::nodes_begin ( )
pure virtual
virtual const_node_iterator libMesh::MeshBase::nodes_begin ( ) const
pure virtual
virtual node_iterator libMesh::MeshBase::nodes_end ( )
pure virtual
virtual const_node_iterator libMesh::MeshBase::nodes_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_active_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_active_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_active_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_active_elements_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_ancestor_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_ancestor_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_ancestor_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_ancestor_elements_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_level_elements_begin ( unsigned int  level)
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_level_elements_begin ( unsigned int  level) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_level_elements_end ( unsigned int  level)
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_level_elements_end ( unsigned int  level) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_local_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_local_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_local_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_local_elements_end ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_subactive_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_subactive_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::not_subactive_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::not_subactive_elements_end ( ) const
pure virtual
MeshBase& libMesh::MeshBase::operator= ( const MeshBase other)
private

The default shallow assignment operator is a very bad idea, so we'll make it a compile-time error to try and do it from other classes and a link-time error to try and do it from this class.

Use clone() if necessary.

virtual unique_id_type libMesh::MeshBase::parallel_max_unique_id ( ) const
pure virtual
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(), libMesh::Nemesis_IO::read(), and set_next_unique_id().

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 elem_dimensions(), libMesh::Nemesis_IO_Helper::initialize(), and libMesh::Nemesis_IO::read().

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

Call the default partitioner (currently metis_partition()).

Definition at line 462 of file mesh_base.C.

References is_serial(), libMesh::libmesh_assert(), n_unpartitioned_elem(), partitioner(), recalculate_n_partitions(), libMesh::Partitioner::set_node_processor_ids(), skip_partitioning(), and update_post_partitioning().

Referenced by main(), and MappedSubdomainPartitionerTest::testMappedSubdomainPartitioner().

463 {
464  // If we get here and we have unpartitioned elements, we need that
465  // fixed.
466  if (this->n_unpartitioned_elem() > 0)
467  {
468  libmesh_assert (partitioner().get());
469  libmesh_assert (this->is_serial());
470  partitioner()->partition (*this, n_parts);
471  }
472  // NULL partitioner means don't repartition
473  // Non-serial meshes may not be ready for repartitioning here.
474  else if (!skip_partitioning() && partitioner().get())
475  {
476  partitioner()->partition (*this, n_parts);
477  }
478  else
479  {
480  // Adaptive coarsening may have "orphaned" nodes on processors
481  // whose elements no longer share them. We need to check for
482  // and possibly fix that.
484 
485  // Make sure locally cached partition count
486  this->recalculate_n_partitions();
487 
488  // Make sure any other locally cached data is correct
489  this->update_post_partitioning();
490  }
491 }
virtual bool is_serial() const
Definition: mesh_base.h:140
bool skip_partitioning() const
Definition: mesh_base.h:775
static void set_node_processor_ids(MeshBase &mesh)
This function is called after partitioning to set the processor IDs for the nodes.
Definition: partitioner.C:416
dof_id_type n_unpartitioned_elem() const
Definition: mesh_base.h:378
libmesh_assert(j)
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:493
virtual UniquePtr< Partitioner > & partitioner()
A partitioner to use at each prepare_for_use()
Definition: mesh_base.h:112
virtual void update_post_partitioning()
Recalculate any cached data after elements and nodes have been repartitioned.
Definition: mesh_base.h:741
void libMesh::MeshBase::partition ( )

Definition at line 727 of file mesh_base.h.

References libMesh::ParallelObject::n_processors().

Referenced by prepare_for_use(), and query_elem().

728  { this->partition(this->n_processors()); }
processor_id_type n_processors() const
virtual UniquePtr<Partitioner>& libMesh::MeshBase::partitioner ( )
virtual

A partitioner to use at each prepare_for_use()

Definition at line 112 of file mesh_base.h.

References _partitioner.

Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::AdjointRefinementEstimator::estimate_error(), partition(), libMesh::BoundaryInfo::sync(), and MappedSubdomainPartitionerTest::testMappedSubdomainPartitioner().

112 { return _partitioner; }
UniquePtr< Partitioner > _partitioner
A partitioner to use at each prepare_for_use().
Definition: mesh_base.h:1370
virtual element_iterator libMesh::MeshBase::pid_elements_begin ( processor_id_type  proc_id)
pure virtual
virtual const_element_iterator libMesh::MeshBase::pid_elements_begin ( processor_id_type  proc_id) const
pure virtual
virtual element_iterator libMesh::MeshBase::pid_elements_end ( processor_id_type  proc_id)
pure virtual
virtual const_element_iterator libMesh::MeshBase::pid_elements_end ( processor_id_type  proc_id) const
pure virtual
virtual node_iterator libMesh::MeshBase::pid_nodes_begin ( processor_id_type  proc_id)
pure virtual
virtual const_node_iterator libMesh::MeshBase::pid_nodes_begin ( processor_id_type  proc_id) const
pure virtual
virtual node_iterator libMesh::MeshBase::pid_nodes_end ( processor_id_type  proc_id)
pure virtual
virtual const_node_iterator libMesh::MeshBase::pid_nodes_end ( processor_id_type  proc_id) const
pure virtual
virtual const Point& libMesh::MeshBase::point ( const dof_id_type  i) const
pure virtual
const PointLocatorBase & libMesh::MeshBase::point_locator ( ) const
Returns
A pointer to a PointLocatorBase object for this mesh, constructing a master PointLocator first if necessary.
Deprecated:
This should never be used in threaded or non-parallel_only code.

Definition at line 517 of file mesh_base.C.

References _point_locator, libMesh::PointLocatorBase::build(), libMesh::Threads::in_threads, libMesh::libmesh_assert(), libmesh_nullptr, and libMesh::TREE_ELEMENTS.

518 {
519  libmesh_deprecated();
520 
521  if (_point_locator.get() == libmesh_nullptr)
522  {
523  // PointLocator construction may not be safe within threads
525 
526  _point_locator.reset (PointLocatorBase::build(TREE_ELEMENTS, *this).release());
527  }
528 
529  return *_point_locator;
530 }
UniquePtr< PointLocatorBase > _point_locator
A PointLocator class for this mesh.
Definition: mesh_base.h:1356
const class libmesh_nullptr_t libmesh_nullptr
bool in_threads
A boolean which is true iff we are in a Threads:: function It may be useful to assert(!Threadsin_thre...
Definition: threads.C:31
libmesh_assert(j)
static UniquePtr< PointLocatorBase > build(PointLocatorType t, const MeshBase &mesh, const PointLocatorBase *master=libmesh_nullptr)
Builds an PointLocator for the mesh mesh.
void libMesh::MeshBase::prepare_for_use ( const bool  skip_renumber_nodes_and_elements = false,
const bool  skip_find_neighbors = false 
)

Prepare a newly created (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 174 of file mesh_base.C.

References _allow_remote_element_removal, _is_prepared, _skip_renumber_nodes_and_elements, allow_renumbering(), cache_elem_dims(), clear_point_locator(), libMesh::ParallelObject::comm(), delete_remote_elements(), detect_interior_parents(), find_neighbors(), ghosting_functors_begin(), ghosting_functors_end(), is_serial(), libMesh::libmesh_assert(), libMesh::MeshTools::libmesh_assert_valid_boundary_ids(), libMesh::MeshTools::libmesh_assert_valid_unique_ids(), libMesh::GhostingFunctor::mesh_reinit(), partition(), renumber_nodes_and_elements(), update_parallel_id_counts(), and libMesh::Parallel::verify().

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_cube(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::InfElemBuilder::build_inf_elem(), MixedDimensionMeshTest::build_mesh(), MeshfunctionDFEM::build_mesh(), SlitMeshTest::build_mesh(), MixedDimensionNonUniformRefinement::build_mesh(), MixedDimensionNonUniformRefinementTriangle::build_mesh(), MixedDimensionNonUniformRefinement3D::build_mesh(), libMesh::MeshTools::Generation::build_sphere(), 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(), query_elem(), 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(), EquationSystemsTest::testPostInitAddElem(), BoundaryInfoTest::testShellFaceConstraints(), WriteVecAndScalar::testWrite(), tetrahedralize_domain(), libMesh::TriangleInterface::triangulate(), libMesh::MeshRefinement::uniformly_coarsen(), and libMesh::MeshRefinement::uniformly_refine().

175 {
176  LOG_SCOPE("prepare_for_use()", "MeshBase");
177 
178  parallel_object_only();
179 
180  libmesh_assert(this->comm().verify(this->is_serial()));
181 
182  // A distributed mesh may have processors with no elements (or
183  // processors with no elements of higher dimension, if we ever
184  // support mixed-dimension meshes), but we want consistent
185  // mesh_dimension anyways.
186  //
187  // cache_elem_dims() should get the elem_dimensions() and
188  // mesh_dimension() correct later, and we don't need it earlier.
189 
190 
191  // Renumber the nodes and elements so that they in contiguous
192  // blocks. By default, _skip_renumber_nodes_and_elements is false.
193  //
194  // We may currently change that by passing
195  // skip_renumber_nodes_and_elements==true to this function, but we
196  // should use the allow_renumbering() accessor instead.
197  //
198  // Instances where you if prepare_for_use() should not renumber the nodes
199  // and elements include reading in e.g. an xda/r or gmv file. In
200  // this case, the ordering of the nodes may depend on an accompanying
201  // solution, and the node ordering cannot be changed.
202 
203  if (skip_renumber_nodes_and_elements)
204  {
205  libmesh_deprecated();
206  this->allow_renumbering(false);
207  }
208 
209  // Mesh modification operations might not leave us with consistent
210  // id counts, but our partitioner might need that consistency.
213  else
215 
216  // Let all the elements find their neighbors
217  if (!skip_find_neighbors)
218  this->find_neighbors();
219 
220  // The user may have set boundary conditions. We require that the
221  // boundary conditions were set consistently. Because we examine
222  // neighbors when evaluating non-raw boundary condition IDs, this
223  // assert is only valid when our neighbor links are in place.
224 #ifdef DEBUG
226 #endif
227 
228  // Search the mesh for all the dimensions of the elements
229  // and cache them.
230  this->cache_elem_dims();
231 
232  // Search the mesh for elements that have a neighboring element
233  // of dim+1 and set that element as the interior parent
234  this->detect_interior_parents();
235 
236  // Fix up node unique ids in case mesh generation code didn't take
237  // exceptional care to do so.
238  // MeshCommunication().make_node_unique_ids_parallel_consistent(*this);
239 
240  // We're going to still require that mesh generation code gets
241  // element unique ids consistent.
242 #if defined(DEBUG) && defined(LIBMESH_ENABLE_UNIQUE_ID)
244 #endif
245 
246  // Reset our PointLocator. Any old locator is invalidated any time
247  // the elements in the underlying elements in the mesh have changed,
248  // so we clear it here.
249  this->clear_point_locator();
250 
251  // Allow our GhostingFunctor objects to reinit if necessary.
252  // Do this before partitioning and redistributing, and before
253  // deleting remote elements.
254  std::set<GhostingFunctor *>::iterator gf_it = this->ghosting_functors_begin();
255  const std::set<GhostingFunctor *>::iterator gf_end = this->ghosting_functors_end();
256  for (; gf_it != gf_end; ++gf_it)
257  {
258  GhostingFunctor * gf = *gf_it;
259  libmesh_assert(gf);
260  gf->mesh_reinit();
261  }
262 
263  // Partition the mesh.
264  this->partition();
265 
266  // If we're using DistributedMesh, we'll probably want it
267  // parallelized.
269  this->delete_remote_elements();
270 
273 
274  // The mesh is now prepared for use.
275  _is_prepared = true;
276 
277 #if defined(DEBUG) && defined(LIBMESH_ENABLE_UNIQUE_ID)
280 #endif
281 }
bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
Definition: mesh_base.h:1389
virtual bool is_serial() const
Definition: mesh_base.h:140
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:678
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:1397
libmesh_assert(j)
std::set< GhostingFunctor * >::const_iterator ghosting_functors_end() const
End of range of ghosting functors.
Definition: mesh_base.h:804
virtual void find_neighbors(const bool reset_remote_elements=false, const bool reset_current_list=true)=0
Locate element face (edge in 2D) neighbors.
virtual void update_parallel_id_counts()=0
Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors...
void clear_point_locator()
Releases the current PointLocator object.
Definition: mesh_base.C:555
void libmesh_assert_valid_boundary_ids(const MeshBase &mesh)
A function for verifying that boundary condition ids match across processors.
Definition: mesh_tools.C:1194
std::set< GhostingFunctor * >::const_iterator ghosting_functors_begin() const
Beginning of range of ghosting functors.
Definition: mesh_base.h:798
bool verify(const T &r, const Communicator &comm=Communicator_World)
const Parallel::Communicator & comm() const
bool allow_renumbering() const
Definition: mesh_base.h:750
bool _is_prepared
Flag indicating if the mesh has been prepared for use.
Definition: mesh_base.h:1347
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:182
void cache_elem_dims()
Search the mesh and cache the different dimensions of the elements present in the mesh...
Definition: mesh_base.C:612
void libmesh_assert_valid_unique_ids(const MeshBase &mesh)
A function for verifying that unique ids match across processors.
Definition: mesh_tools.C:1397
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...
void libMesh::MeshBase::print_info ( std::ostream &  os = libMesh::out) const

Prints relevant information about the mesh.

Definition at line 448 of file mesh_base.C.

References get_info().

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

449 {
450  os << this->get_info()
451  << std::endl;
452 }
std::string get_info() const
Definition: mesh_base.C:414
processor_id_type libMesh::ParallelObject::processor_id ( ) const
inherited
Returns
The rank of this processor in the group.

Definition at line 99 of file parallel_object.h.

References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::rank().

Referenced by libMesh::BoundaryInfo::_find_id_maps(), libMesh::EquationSystems::_read_impl(), libMesh::DistributedMesh::add_elem(), libMesh::BoundaryInfo::add_elements(), libMesh::DofMap::add_neighbors_to_send_list(), libMesh::DistributedMesh::add_node(), libMesh::MeshRefinement::add_node(), libMesh::MeshTools::Modification::all_tri(), libMesh::FEMSystem::assembly(), libMesh::ParmetisPartitioner::assign_partitioning(), libMesh::MeshCommunication::broadcast(), libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::ParmetisPartitioner::build_graph(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::BoundaryInfo::build_node_list_from_side_list(), libMesh::DofMap::build_sparsity(), 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::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::EnsightIO::EnsightIO(), libMesh::RBEIMConstruction::evaluate_mesh_function(), libMesh::MeshFunction::find_element(), libMesh::MeshFunction::find_elements(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshCommunication::gather(), libMesh::MeshCommunication::gather_neighboring_elements(), 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(), get_info(), 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::Nemesis_IO_Helper::get_node_cmap(), libMesh::Nemesis_IO_Helper::get_node_map(), libMesh::Nemesis_IO_Helper::get_ns_param_global(), libMesh::EquationSystems::get_solution(), libMesh::Nemesis_IO_Helper::get_ss_param_global(), libMesh::SparsityPattern::Build::handle_vi_vj(), libMesh::SystemSubsetBySubdomain::init(), HeatSystem::init_data(), libMesh::ParmetisPartitioner::initialize(), 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::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_parallel_consistent_procids< Elem >(), libMesh::MeshTools::libmesh_assert_parallel_consistent_procids< Node >(), 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::System::n_local_dofs(), n_local_elem(), n_local_nodes(), libMesh::BoundaryInfo::n_nodeset_conds(), libMesh::BoundaryInfo::n_shellface_conds(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::SparsityPattern::Build::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::SparsityPattern::Build::parallel_sync(), libMesh::MetisPartitioner::partition_range(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::SparseMatrix< T >::print(), libMesh::NumericVector< T >::print_global(), 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::CheckpointIO::read(), libMesh::XdrIO::read(), libMesh::ExodusII_IO_Helper::read_elem_num_map(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::RBEvaluation::read_in_vectors_from_multiple_files(), libMesh::ExodusII_IO_Helper::read_node_num_map(), libMesh::TransientRBConstruction::read_riesz_representors_from_files(), libMesh::RBConstruction::read_riesz_representors_from_files(), libMesh::XdrIO::read_serialized_bc_names(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::XdrIO::read_serialized_subdomain_names(), libMesh::MeshCommunication::redistribute(), libMesh::DistributedMesh::renumber_dof_objects(), libMesh::MeshCommunication::send_coarse_ghosts(), libMesh::Partitioner::set_node_processor_ids(), libMesh::DofMap::set_nonlocal_dof_objects(), libMesh::LaplaceMeshSmoother::smooth(), DefaultCouplingTest::testCoupling(), PointNeighborCouplingTest::testCoupling(), BoundaryInfoTest::testShellFaceConstraints(), 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::MeshTools::weight(), libMesh::NameBasedIO::write(), libMesh::CheckpointIO::write(), libMesh::XdrIO::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_elements(), libMesh::ExodusII_IO::write_global_data(), libMesh::ExodusII_IO_Helper::write_global_values(), libMesh::ExodusII_IO::write_information_records(), libMesh::ExodusII_IO_Helper::write_information_records(), libMesh::ExodusII_IO_Helper::write_nodal_coordinates(), 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::RBConstruction::write_riesz_representors_to_files(), libMesh::XdrIO::write_serialized_bc_names(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::XdrIO::write_serialized_nodes(), libMesh::XdrIO::write_serialized_nodesets(), libMesh::XdrIO::write_serialized_subdomain_names(), libMesh::Nemesis_IO_Helper::write_sidesets(), libMesh::ExodusII_IO_Helper::write_sidesets(), libMesh::ExodusII_IO::write_timestep(), and libMesh::ExodusII_IO_Helper::write_timestep().

100  { return cast_int<processor_id_type>(_communicator.rank()); }
const Parallel::Communicator & _communicator
unsigned int rank() const
Definition: parallel.h:724
virtual const Elem* libMesh::MeshBase::query_elem ( const dof_id_type  i) const
virtual
Returns
A pointer to the $ i^{th} $ element, or NULL if no such element exists in this processor's mesh data structure.
Deprecated:
Use the less confusingly-named query_elem_ptr() instead.

Definition at line 564 of file mesh_base.h.

References query_elem_ptr().

565  {
566  libmesh_deprecated();
567  return this->query_elem_ptr(i);
568  }
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
virtual Elem* libMesh::MeshBase::query_elem ( const dof_id_type  i)
virtual
Returns
A writable pointer to the $ i^{th} $ element, or NULL if no such element exists in this processor's mesh data structure.
Deprecated:
Use the less confusingly-named query_elem_ptr() instead.

Definition at line 578 of file mesh_base.h.

References add_elem(), add_node(), add_point(), contract(), delete_elem(), delete_node(), find_neighbors(), fix_broken_node_and_element_numbering(), insert_elem(), insert_node(), libMesh::DofObject::invalid_id, libMesh::DofObject::invalid_processor_id, partition(), prepare_for_use(), query_elem_ptr(), renumber_elem(), renumber_node(), and renumber_nodes_and_elements().

579  {
580  libmesh_deprecated();
581  return this->query_elem_ptr(i);
582  }
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
virtual const Elem* libMesh::MeshBase::query_elem_ptr ( const dof_id_type  i) const
pure virtual
virtual Elem* libMesh::MeshBase::query_elem_ptr ( const dof_id_type  i)
pure virtual
Returns
A writable pointer to the $ i^{th} $ element, or NULL if no such element exists in this processor's mesh data structure.

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

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

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

virtual void libMesh::MeshBase::read ( const std::string &  name,
void *  mesh_data = libmesh_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 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 493 of file mesh_base.C.

References _n_parts, active_local_elements_begin(), active_local_elements_end(), libMesh::ParallelObject::comm(), end, std::max(), and libMesh::Parallel::Communicator::max().

Referenced by partition().

494 {
495  // This requires an inspection on every processor
496  parallel_object_only();
497 
498  const_element_iterator el = this->active_local_elements_begin();
499  const_element_iterator end = this->active_local_elements_end();
500 
501  unsigned int max_proc_id=0;
502 
503  for (; el!=end; ++el)
504  max_proc_id = std::max(max_proc_id, static_cast<unsigned int>((*el)->processor_id()));
505 
506  // The number of partitions is one more than the max processor ID.
507  _n_parts = max_proc_id+1;
508 
509  this->comm().max(_n_parts);
510 
511  return _n_parts;
512 }
void max(T &r) const
Take a local variable and replace it with the maximum of it&#39;s values on all processors.
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end...
long double max(long double a, double b)
unsigned int _n_parts
The number of partitions the mesh has.
Definition: mesh_base.h:1342
virtual element_iterator active_local_elements_begin()=0
const Parallel::Communicator & comm() const
virtual element_iterator active_local_elements_end()=0
virtual void libMesh::MeshBase::redistribute ( )
virtual

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 735 of file mesh_base.h.

Referenced by libMesh::Partitioner::partition().

735 {}
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 305 of file mesh_base.C.

References _ghosting_functors, and libMesh::libmesh_assert().

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

306 {
307  // We should only be trying to remove ghosting functors we actually
308  // have
309  libmesh_assert(_ghosting_functors.count(&ghosting_functor));
310  _ghosting_functors.erase(&ghosting_functor);
311 }
libmesh_assert(j)
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
Definition: mesh_base.h:1433
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(), and query_elem().

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.

Referenced by query_elem().

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(), libMesh::ErrorVector::plot_error(), prepare_for_use(), query_elem(), and write_output().

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_cube(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::ExodusII_IO::read(), libMesh::XdrIO::read_header(), and set_next_unique_id().

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_cube(), libMesh::MeshTools::Generation::build_extrusion(), libMesh::UnstructuredMesh::copy_nodes_and_elements(), libMesh::ExodusII_IO::read(), libMesh::XdrIO::read_header(), and set_next_unique_id().

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.

Referenced by libmesh_assert_valid_parallel_ids().

virtual const_element_iterator libMesh::MeshBase::semilocal_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::semilocal_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::semilocal_elements_end ( ) const
pure virtual
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 562 of file mesh_base.C.

References _count_lower_dim_elems_in_point_locator.

563 {
564  _count_lower_dim_elems_in_point_locator = count_lower_dim_elems;
565 }
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:1362
virtual void libMesh::MeshBase::set_distributed ( )
virtual

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 155 of file mesh_base.h.

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

156  { libmesh_error(); }
void libMesh::MeshBase::set_mesh_dimension ( unsigned char  d)
unsigned int& libMesh::MeshBase::set_n_partitions ( )
protected
Returns
A writable reference to the number of partitions.

Definition at line 1329 of file mesh_base.h.

References _n_parts.

Referenced by libMesh::Partitioner::partition(), libMesh::Partitioner::repartition(), and libMesh::BoundaryInfo::sync().

1330  { return _n_parts; }
unsigned int _n_parts
The number of partitions the mesh has.
Definition: mesh_base.h:1342
void libMesh::MeshBase::set_next_unique_id ( unique_id_type  id)

Sets the next unique id to be used.

Definition at line 296 of file mesh_base.h.

References _next_unique_id, max_elem_id(), n_active_elem(), n_elem(), n_elem_on_proc(), parallel_max_unique_id(), parallel_n_elem(), reserve_elem(), reserve_nodes(), and update_parallel_id_counts().

296 { _next_unique_id = id; }
unique_id_type _next_unique_id
The next available unique id for assigning ids to DOF objects.
Definition: mesh_base.h:1376
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 164 of file mesh_base.C.

References _spatial_dimension.

Referenced by libMesh::MeshTools::Generation::build_cube(), elem_dimensions(), and MeshSpatialDimensionTest::test2D().

165 {
166  // The user can set the _spatial_dimension however they wish,
167  // libMesh will only *increase* the spatial dimension, however,
168  // never decrease it.
169  _spatial_dimension = d;
170 }
unsigned char _spatial_dimension
The "spatial dimension" of the Mesh.
Definition: mesh_base.h:1417
std::map<subdomain_id_type, std::string>& libMesh::MeshBase::set_subdomain_name_map ( )
Returns
A writable reference to the whole subdomain name map

Definition at line 1293 of file mesh_base.h.

References _block_id_to_name.

Referenced by libMesh::MeshCommunication::broadcast(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_serialized_subdomain_names(), and libMesh::CheckpointIO::read_subdomain_names().

1294  { return _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:1404
void libMesh::MeshBase::skip_partitioning ( bool  skip)

If true is passed in then this mesh will no longer be (re)partitioned.

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.

Note
Turning on skip_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.

Definition at line 774 of file mesh_base.h.

References _skip_partitioning.

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

774 { _skip_partitioning = skip; }
bool _skip_partitioning
If this is true then no partitioning should be done.
Definition: mesh_base.h:1382
bool libMesh::MeshBase::skip_partitioning ( ) const

Definition at line 775 of file mesh_base.h.

References _skip_partitioning.

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

775 { return _skip_partitioning; }
bool _skip_partitioning
If this is true then no partitioning should be done.
Definition: mesh_base.h:1382
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 157 of file mesh_base.C.

References _spatial_dimension.

Referenced by elem_dimensions(), get_info(), libMesh::ExodusII_IO_Helper::initialize(), MeshSpatialDimensionTest::test1D(), and MeshSpatialDimensionTest::test2D().

158 {
159  return cast_int<unsigned int>(_spatial_dimension);
160 }
unsigned char _spatial_dimension
The "spatial dimension" of the Mesh.
Definition: mesh_base.h:1417
UniquePtr< 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 534 of file mesh_base.C.

References _point_locator, libMesh::PointLocatorBase::build(), libMesh::Threads::in_threads, libMesh::libmesh_assert(), libmesh_nullptr, and libMesh::TREE_ELEMENTS.

Referenced by MeshfunctionDFEM::build_mesh(), libMesh::DofMap::create_dof_constraints(), libMesh::MeshFunction::init(), libMesh::MeshRefinement::make_coarsening_compatible(), libMesh::MeshRefinement::make_refinement_compatible(), libMesh::DefaultCoupling::mesh_reinit(), libMesh::PointNeighborCoupling::mesh_reinit(), libMesh::DefaultCoupling::operator()(), libMesh::PointNeighborCoupling::operator()(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::MeshRefinement::test_level_one(), PointLocatorTest::testLocator(), and MixedDimensionMeshTest::testPointLocatorTree().

535 {
536  // If there's no master point locator, then we need one.
537  if (_point_locator.get() == libmesh_nullptr)
538  {
539  // PointLocator construction may not be safe within threads
541 
542  // And it may require parallel communication
543  parallel_object_only();
544 
545  _point_locator.reset (PointLocatorBase::build(TREE_ELEMENTS, *this).release());
546  }
547 
548  // Otherwise there was a master point locator, and we can grab a
549  // sub-locator easily.
551 }
UniquePtr< PointLocatorBase > _point_locator
A PointLocator class for this mesh.
Definition: mesh_base.h:1356
const class libmesh_nullptr_t libmesh_nullptr
bool in_threads
A boolean which is true iff we are in a Threads:: function It may be useful to assert(!Threadsin_thre...
Definition: threads.C:31
libmesh_assert(j)
static UniquePtr< PointLocatorBase > build(PointLocatorType t, const MeshBase &mesh, const PointLocatorBase *master=libmesh_nullptr)
Builds an PointLocator for the mesh mesh.
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.

Referenced by libmesh_assert_valid_parallel_ids(), and libMesh::Partitioner::set_node_processor_ids().

virtual const_element_iterator libMesh::MeshBase::subactive_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::subactive_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::subactive_elements_end ( ) const
pure virtual
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 315 of file mesh_base.C.

References active_local_elements_begin(), active_local_elements_end(), libMesh::ParallelObject::comm(), end, and libMesh::Parallel::Communicator::set_union().

Referenced by ghosting_functors_end(), n_subdomains(), and libMesh::TecplotIO::TecplotIO().

316 {
317  // This requires an inspection on every processor
318  parallel_object_only();
319 
320  ids.clear();
321 
322  const_element_iterator el = this->active_local_elements_begin();
323  const_element_iterator end = this->active_local_elements_end();
324 
325  for (; el!=end; ++el)
326  ids.insert((*el)->subdomain_id());
327 
328  // Some subdomains may only live on other processors
329  this->comm().set_union(ids);
330 }
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end...
virtual element_iterator active_local_elements_begin()=0
const Parallel::Communicator & comm() const
virtual element_iterator active_local_elements_end()=0
void set_union(T &data, const unsigned int root_id) const
Take a container of local variables on each processor, and collect their union over all processors...
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 576 of file mesh_base.C.

References _block_id_to_name.

Referenced by libMesh::AbaqusIO::assign_subdomain_ids(), DMlibMeshSetSystem_libMesh(), libMesh::UNVIO::groups_in(), libmesh_assert_valid_parallel_ids(), libMesh::ExodusII_IO::read(), libMesh::TecplotIO::write_binary(), libMesh::Nemesis_IO_Helper::write_elements(), and libMesh::ExodusII_IO_Helper::write_elements().

577 {
578  return _block_id_to_name[id];
579 }
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:1404
const std::string & libMesh::MeshBase::subdomain_name ( subdomain_id_type  id) const

Definition at line 581 of file mesh_base.C.

References _block_id_to_name.

582 {
583  // An empty string to return when no matching subdomain name is found
584  static const std::string empty;
585 
586  std::map<subdomain_id_type, std::string>::const_iterator iter = _block_id_to_name.find(id);
587  if (iter == _block_id_to_name.end())
588  return empty;
589  else
590  return iter->second;
591 }
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:1404
virtual element_iterator libMesh::MeshBase::type_elements_begin ( ElemType  type)
pure virtual
virtual const_element_iterator libMesh::MeshBase::type_elements_begin ( ElemType  type) const
pure virtual
virtual element_iterator libMesh::MeshBase::type_elements_end ( ElemType  type)
pure virtual
virtual const_element_iterator libMesh::MeshBase::type_elements_end ( ElemType  type) const
pure virtual
virtual element_iterator libMesh::MeshBase::unpartitioned_elements_begin ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::unpartitioned_elements_begin ( ) const
pure virtual
virtual element_iterator libMesh::MeshBase::unpartitioned_elements_end ( )
pure virtual
virtual const_element_iterator libMesh::MeshBase::unpartitioned_elements_end ( ) const
pure virtual
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(), libMesh::MeshRefinement::_refine_elements(), prepare_for_use(), and set_next_unique_id().

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

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

Reimplemented in libMesh::DistributedMesh.

Definition at line 741 of file mesh_base.h.

Referenced by libMesh::Partitioner::partition(), partition(), and libMesh::Nemesis_IO::read().

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

Implemented in libMesh::UnstructuredMesh.

Referenced by main(), n_partitions(), and write_output().

Friends And Related Function Documentation

friend class BoundaryInfo
friend

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

Definition at line 1451 of file mesh_base.h.

friend class MeshInput< MeshBase >
friend

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

Definition at line 1445 of file mesh_base.h.

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 455 of file mesh_base.C.

Referenced by n_partitions().

456 {
457  m.print_info(os);
458  return os;
459 }
friend class Partitioner
friend

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

Definition at line 1439 of file mesh_base.h.

Member Data Documentation

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 1397 of file mesh_base.h.

Referenced by allow_remote_element_removal(), and prepare_for_use().

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 1404 of file mesh_base.h.

Referenced by get_id_by_name(), get_subdomain_name_map(), set_subdomain_name_map(), and subdomain_name().

const Parallel::Communicator& libMesh::ParallelObject::_communicator
protectedinherited
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 1362 of file mesh_base.h.

Referenced by get_count_lower_dim_elems_in_point_locator(), and set_count_lower_dim_elems_in_point_locator().

UniquePtr<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 1424 of file mesh_base.h.

Referenced by MeshBase().

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 1411 of file mesh_base.h.

Referenced by cache_elem_dims(), clear(), elem_dimensions(), get_info(), mesh_dimension(), MeshBase(), and set_mesh_dimension().

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 1433 of file mesh_base.h.

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

bool libMesh::MeshBase::_is_prepared
protected
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 1342 of file mesh_base.h.

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

unique_id_type libMesh::MeshBase::_next_unique_id
protected
UniquePtr<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 1370 of file mesh_base.h.

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

UniquePtr<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 1356 of file mesh_base.h.

Referenced by clear_point_locator(), point_locator(), and sub_point_locator().

bool libMesh::MeshBase::_skip_partitioning
protected

If this is true then no partitioning should be done.

Definition at line 1382 of file mesh_base.h.

Referenced by skip_partitioning().

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 1389 of file mesh_base.h.

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

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 1417 of file mesh_base.h.

Referenced by cache_elem_dims(), set_spatial_dimension(), and spatial_dimension().

UniquePtr<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 1321 of file mesh_base.h.

Referenced by get_boundary_info().


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