Go to the documentation of this file.
20 #ifndef LIBMESH_MESH_BASE_H
21 #define LIBMESH_MESH_BASE_H
24 #include "libmesh/boundary_info.h"
25 #include "libmesh/dof_object.h"
26 #include "libmesh/int_range.h"
27 #include "libmesh/libmesh_common.h"
28 #include "libmesh/multi_predicates.h"
29 #include "libmesh/point_locator_base.h"
30 #include "libmesh/variant_filter_iterator.h"
31 #include "libmesh/parallel_object.h"
32 #include "libmesh/simple_range.h"
34 #ifdef LIBMESH_FORWARD_DECLARE_ENUMS
41 #include "libmesh/enum_elem_type.h"
54 class GhostingFunctor;
87 MeshBase (
const Parallel::Communicator & comm_in,
117 virtual std::unique_ptr<MeshBase>
clone()
const = 0;
146 virtual void clear ();
318 #ifdef LIBMESH_ENABLE_UNIQUE_ID
368 #ifdef LIBMESH_ENABLE_UNIQUE_ID
470 #ifdef LIBMESH_ENABLE_DEPRECATED
473 libmesh_deprecated();
484 #ifdef LIBMESH_ENABLE_DEPRECATED
487 libmesh_deprecated();
553 #ifdef LIBMESH_ENABLE_DEPRECATED
556 libmesh_deprecated();
568 #ifdef LIBMESH_ENABLE_DEPRECATED
571 libmesh_deprecated();
594 #ifdef LIBMESH_ENABLE_DEPRECATED
597 libmesh_deprecated();
608 #ifdef LIBMESH_ENABLE_DEPRECATED
611 libmesh_deprecated();
748 virtual void find_neighbors (
const bool reset_remote_elements =
false,
749 const bool reset_current_list =
true) = 0;
767 #ifdef LIBMESH_ENABLE_AMR
788 bool allocate_data =
true);
800 std::vector<unsigned int>
add_elem_integers(
const std::vector<std::string> & names,
801 bool allocate_data =
true);
849 template <
typename T>
851 bool allocate_data =
true);
869 template <
typename T>
870 std::vector<unsigned int>
add_elem_data(
const std::vector<std::string> & names,
871 bool allocate_data =
true);
885 bool allocate_data =
true);
897 std::vector<unsigned int>
add_node_integers(
const std::vector<std::string> & names,
898 bool allocate_data =
true);
946 template <
typename T>
948 bool allocate_data =
true);
966 template <
typename T>
968 bool allocate_data =
true);
985 void prepare_for_use (
const bool skip_renumber_nodes_and_elements=
false,
const bool skip_find_neighbors=
false);
990 virtual void partition (
const unsigned int n_parts);
1134 void subdomain_ids (std::set<subdomain_id_type> & ids)
const;
1178 virtual void read (
const std::string &
name,
1179 void * mesh_data=
nullptr,
1180 bool skip_renumber_nodes_and_elements=
false,
1181 bool skip_find_neighbors=
false) = 0;
1182 virtual void write (
const std::string &
name) = 0;
1248 #ifdef LIBMESH_ENABLE_DEPRECATED
1322 virtual const_element_iterator
elements_end ()
const = 0;
1412 virtual element_iterator
1416 virtual element_iterator
1420 virtual const_element_iterator
1424 virtual const_element_iterator
1428 #ifdef LIBMESH_ENABLE_AMR
1560 virtual const_node_iterator
nodes_begin ()
const = 0;
1561 virtual const_node_iterator
nodes_end ()
const = 0;
1612 virtual node_iterator
1616 virtual node_iterator
1620 virtual const_node_iterator
1624 virtual const_node_iterator
1723 #ifdef LIBMESH_ENABLE_UNIQUE_ID
1804 std::pair<std::vector<unsigned int>, std::vector<unsigned int>>
1877 template <
typename PredType,
typename IterType>
1880 const PredType & p ) :
1900 template <
typename PredType,
typename IterType>
1903 const PredType & p ) :
1931 template <
typename PredType,
typename IterType>
1934 const PredType & p ) :
1954 template <
typename PredType,
typename IterType>
1957 const PredType & p ) :
1971 template <
typename T>
1979 unsigned int n_more_integers = (
sizeof(T)-1)/
sizeof(
dof_id_type);
1980 for (
unsigned int i=0; i != n_more_integers; ++i)
1990 template <
typename T>
1995 std::vector<unsigned int> returnval(names.size());
2000 returnval[i] = this->add_elem_datum<T>(names[i],
false);
2009 template <
typename T>
2017 unsigned int n_more_integers = (
sizeof(T)-1)/
sizeof(
dof_id_type);
2018 for (
unsigned int i=0; i != n_more_integers; ++i)
2028 template <
typename T>
2033 std::vector<unsigned int> returnval(names.size());
2038 returnval[i] = this->add_node_datum<T>(names[i],
false);
2050 #endif // LIBMESH_MESH_BASE_H
virtual element_iterator active_subdomain_elements_begin(subdomain_id_type subdomain_id)=0
virtual Node * add_node(Node *n)=0
Add Node n to the end of the vertex array.
virtual element_iterator pid_elements_begin(processor_id_type proc_id)=0
Iterate over all elements with a specified processor id.
virtual element_iterator active_local_subdomain_elements_end(subdomain_id_type subdomain_id)=0
virtual element_iterator flagged_elements_begin(unsigned char rflag)=0
Iterate over all elements with a specified refinement flag.
virtual element_iterator active_semilocal_elements_end()=0
bool _is_prepared
Flag indicating if the mesh has been prepared for use.
virtual Elem * query_elem(const dof_id_type i)
std::set< GhostingFunctor * >::const_iterator ghosting_functors_begin() const
Beginning of range of ghosting functors.
virtual void update_post_partitioning()
Recalculate any cached data after elements and nodes have been repartitioned.
virtual element_iterator ghost_elements_end()=0
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
std::set< GhostingFunctor * >::const_iterator ghosting_functors_end() const
End of range of ghosting functors.
bool allow_renumbering() const
The definition of the element_iterator struct.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
unsigned int & set_n_partitions()
virtual void delete_node(Node *n)=0
Removes the Node n from the mesh.
virtual void reserve_nodes(const dof_id_type nn)=0
Reserves space for a known number of nodes.
ElemMappingType default_mapping_type() const
Returns the default master space to physical space mapping basis functions to be used on newly added ...
std::pair< std::vector< unsigned int >, std::vector< unsigned int > > merge_extra_integer_names(const MeshBase &other)
Merge extra-integer arrays from an other mesh.
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false)=0
Interfaces for reading/writing a mesh to/from a file.
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
virtual element_iterator flagged_pid_elements_end(unsigned char rflag, processor_id_type pid)=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.
virtual element_iterator active_pid_elements_end(processor_id_type proc_id)=0
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
std::vector< unsigned int > add_node_data(const std::vector< std::string > &name, bool allocate_data=true)
Register data (of type T) to be added to each node in the mesh.
The SimpleRange templated class is intended to make it easy to construct ranges from pairs of iterato...
std::unique_ptr< GhostingFunctor > _default_ghosting
The default geometric GhostingFunctor, used to implement standard libMesh element ghosting behavior.
virtual bool is_serial() const
virtual void libmesh_assert_valid_parallel_ids() const
Verify id and processor_id consistency of our elements and nodes containers.
unsigned int recalculate_n_partitions()
In a few (very rare) cases, the user may have manually tagged the elements with specific processor ID...
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...
virtual const Point & point(const dof_id_type i) const =0
std::vector< unsigned int > add_elem_integers(const std::vector< std::string > &names, bool allocate_data=true)
Register integer data (of type dof_id_type) to be added to each element in the mesh,...
variant_filter_iterator(const IterType &d, const IterType &e, const PredType &p)
Templated Constructor.
virtual void delete_elem(Elem *e)=0
Removes element e from the mesh.
virtual SimpleRange< element_iterator > active_local_element_ptr_range()=0
virtual element_iterator active_local_elements_begin()=0
void set_elem_dimensions(const std::set< unsigned char > &elem_dims)
Most of the time you should not need to call this, as the element dimensions will be set automaticall...
virtual element_iterator pid_elements_end(processor_id_type proc_id)=0
virtual void write(const std::string &name)=0
void skip_partitioning(bool skip)
If true is passed in then nothing on this mesh will be (re)partitioned.
virtual node_iterator local_nodes_begin()=0
Iterate over local nodes (nodes whose processor_id() matches the current processor).
virtual SimpleRange< element_iterator > active_element_ptr_range()=0
virtual dof_id_type n_elem() const =0
const_element_iterator(const IterType &d, const IterType &e, const PredType &p)
Templated forwarding ctor – forwards to appropriate variant_filter_iterator ctor.
virtual const Elem & elem_ref(const dof_id_type i) const
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
virtual dof_id_type max_elem_id() const =0
The libMesh namespace provides an interface to certain functionality in the library.
void detect_interior_parents()
Search the mesh for elements that have a neighboring element of dim+1 and set that element as the int...
BoundaryInfo & get_boundary_info()
Writable information about boundary ids on the mesh.
virtual bool is_serial_on_zero() const
bool _skip_all_partitioning
If this is true then no partitioning should be done.
virtual element_iterator not_subactive_elements_end()=0
void set_default_mapping_data(const unsigned char data)
Set the default master space to physical space mapping basis functions to be used on newly added elem...
virtual element_iterator type_elements_end(ElemType type)=0
unsigned int _n_parts
The number of partitions the mesh has.
Predicates::multi_predicate Predicate
We need an empty, generic class to act as a predicate for this and derived mesh classes.
const PointLocatorBase & point_locator() const
std::map< subdomain_id_type, std::string > & set_subdomain_name_map()
The Partitioner class provides a uniform interface for partitioning algorithms.
void size_node_extra_integers()
Size extra-integer arrays of all nodes in the mesh.
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?...
virtual element_iterator subactive_elements_begin()=0
Iterate over elements for which elem->subactive() is true.
virtual void set_distributed()
Asserts that not all elements and nodes of the mesh necessarily exist on the current processor.
virtual element_iterator local_level_elements_end(unsigned int level)=0
virtual node_iterator bnd_nodes_end()=0
unsigned int n_partitions() const
virtual node_iterator evaluable_nodes_end(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
virtual const Node * node_ptr(const dof_id_type i) const =0
unsigned int mesh_dimension() const
virtual element_iterator not_local_elements_begin()=0
bool _allow_remote_element_removal
If this is false then even on DistributedMesh remote elements will not be deleted during mesh prepara...
virtual dof_id_type parallel_n_elem() const =0
virtual dof_id_type max_node_id() const =0
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 t...
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 eval...
unsigned int add_elem_datum(const std::string &name, bool allocate_data=true)
Register a datum (of type T) to be added to each element in the mesh.
virtual element_iterator active_pid_elements_begin(processor_id_type proc_id)=0
MeshBase & operator=(const MeshBase &)=delete
Copy and move assignment are not allowed because MeshBase subclasses manually manage memory (Elems an...
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.
bool has_elem_integer(const std::string &name) const
virtual const Elem * elem_ptr(const dof_id_type i) const =0
virtual element_iterator elements_begin()=0
Iterate over all the elements in the Mesh.
virtual element_iterator local_level_elements_begin(unsigned int level)=0
virtual node_iterator pid_nodes_begin(processor_id_type proc_id)=0
Iterate over nodes with processor_id() == proc_id.
virtual element_iterator type_elements_begin(ElemType type)=0
Iterate over all elements with a specified geometric type.
virtual element_iterator local_elements_begin()=0
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...
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
virtual element_iterator not_active_elements_begin()=0
virtual element_iterator evaluable_elements_end(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
virtual element_iterator not_level_elements_end(unsigned int level)=0
std::vector< unsigned int > add_node_integers(const std::vector< std::string > &names, bool allocate_data=true)
Register integer data (of type dof_id_type) to be added to each node in the mesh.
virtual element_iterator semilocal_elements_begin()=0
Iterate over elements for which elem->is_semilocal() is true for the current processor.
dof_id_type n_active_sub_elem() const
Same as n_sub_elem(), but only counts active elements.
GhostingFunctor & default_ghosting()
Default ghosting functor.
const_element_iterator(const MeshBase::element_iterator &rhs)
The conversion-to-const ctor.
MeshBase(const Parallel::Communicator &comm_in, unsigned char dim=1)
Constructor.
virtual element_iterator facelocal_elements_end()=0
virtual element_iterator not_subactive_elements_begin()=0
dof_id_type n_sub_elem() const
virtual SimpleRange< element_iterator > element_ptr_range()=0
unsigned char _default_mapping_data
The default mapping data (unused with Lagrange, used for nodal weight lookup index with rational base...
virtual void own_node(Node &)
Takes ownership of node n on this partition of a distributed mesh, by setting n.processor_id() to thi...
dof_id_type n_local_nodes() const
subdomain_id_type n_subdomains() const
std::vector< unsigned int > add_elem_data(const std::vector< std::string > &names, bool allocate_data=true)
Register data (of type T) to be added to each element in the mesh.
This is the MeshBase class.
void remove_ghosting_functor(GhostingFunctor &ghosting_functor)
Removes a functor which was previously added to the set of ghosting functors.
virtual element_iterator active_elements_begin()=0
Active, local, and negation forms of the element iterators described above.
node_iterator(const IterType &d, const IterType &e, const PredType &p)
Templated forwarding ctor – forwards to appropriate variant_filter_iterator ctor.
unsigned char _spatial_dimension
The "spatial dimension" of the Mesh.
virtual element_iterator level_elements_begin(unsigned int level)=0
Iterate over elements of a given level.
virtual element_iterator active_type_elements_end(ElemType type)=0
bool has_node_integer(const std::string &name) const
std::vector< std::string > _elem_integer_names
The array of names for integer data associated with each element in the mesh.
void subdomain_ids(std::set< subdomain_id_type > &ids) const
Constructs a list of all subdomain identifiers in the global mesh.
processor_id_type n_processors() const
unique_id_type next_unique_id()
bool get_count_lower_dim_elems_in_point_locator() const
Get the current value of _count_lower_dim_elems_in_point_locator.
unique_id_type _next_unique_id
The next available unique id for assigning ids to DOF objects.
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 evaluat...
virtual SimpleRange< node_iterator > node_ptr_range()=0
The definition of the const_node_iterator struct.
virtual const Elem * elem(const dof_id_type i) const
This abstract base class defines the interface by which library code and user code can report associa...
void clear_point_locator()
Releases the current PointLocator object.
processor_id_type processor_id() const
virtual element_iterator active_subdomain_elements_end(subdomain_id_type subdomain_id)=0
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
virtual SimpleRange< node_iterator > local_node_ptr_range()=0
virtual node_iterator pid_nodes_end(processor_id_type proc_id)=0
A Point defines a location in LIBMESH_DIM dimensional Real space.
void add_ghosting_functor(std::shared_ptr< GhostingFunctor > ghosting_functor)
Adds a functor which can specify ghosting requirements for use on distributed meshes.
uint8_t processor_id_type
virtual element_iterator ancestor_elements_end()=0
virtual element_iterator active_local_elements_end()=0
virtual SimpleRange< element_iterator > active_subdomain_elements_ptr_range(subdomain_id_type subdomain_id)=0
bool skip_noncritical_partitioning() const
virtual Elem * insert_elem(Elem *e)=0
Insert elem e to the element array, preserving its id and replacing/deleting any existing element wit...
unsigned int add_elem_integer(const std::string &name, bool allocate_data=true)
Register an integer datum (of type dof_id_type) to be added to each element in the mesh.
virtual Node & node(const dof_id_type i)
const std::set< unsigned char > & elem_dimensions() const
A Node is like a Point, but with more information.
void size_elem_extra_integers()
Size extra-integer arrays of all elements in the mesh.
virtual dof_id_type parallel_n_nodes() const =0
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
unsigned int spatial_dimension() const
virtual element_iterator not_level_elements_begin(unsigned int level)=0
virtual std::unique_ptr< MeshBase > clone() const =0
Virtual "copy constructor".
virtual const Node & node(const dof_id_type i) const
virtual element_iterator active_subdomain_set_elements_end(std::set< subdomain_id_type > ss)=0
Real _point_locator_close_to_point_tol
If nonzero, we will call PointLocatorBase::set_close_to_point_tol() on any PointLocators that we crea...
dof_id_type n_local_elem() const
unsigned int add_node_integer(const std::string &name, bool allocate_data=true)
Register an integer datum (of type dof_id_type) to be added to each node in the mesh.
const std::string & get_node_integer_name(unsigned int i) const
dof_id_type n_active_elem_on_proc(const processor_id_type proc) const
virtual Node * insert_node(Node *n)=0
Insert Node n into the Mesh at a location consistent with n->id(), allocating extra storage if necess...
std::map< GhostingFunctor *, std::shared_ptr< GhostingFunctor > > _shared_functors
Hang on to references to any GhostingFunctor objects we were passed in shared_ptr form.
The definition of the const_element_iterator struct.
friend 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 << s...
virtual void all_first_order()=0
Converts a mesh with higher-order elements into a mesh with linear elements.
virtual void redistribute()
Redistribute elements between processors.
const std::map< subdomain_id_type, std::string > & get_subdomain_name_map() const
unsigned int n_elem_integers() const
Real get_point_locator_close_to_point_tol() const
std::vector< std::string > _node_integer_names
The array of names for integer data associated with each node in the mesh.
virtual void delete_remote_elements()
When supported, deletes all nonlocal elements of the mesh except for "ghosts" which touch a local ele...
void cache_elem_dims()
Search the mesh and cache the different dimensions of the elements present in the mesh.
virtual node_iterator nodes_end()=0
void skip_noncritical_partitioning(bool skip)
If true is passed in then the elements on this mesh will no longer be (re)partitioned,...
virtual void allgather()
Gathers all elements and nodes of the mesh onto every processor.
virtual node_iterator active_nodes_begin()=0
Iterate over only the active nodes in the Mesh.
subdomain_id_type get_id_by_name(const std::string &name) const
std::unique_ptr< PointLocatorBase > _point_locator
A PointLocator class for this mesh.
virtual const Node & node_ref(const dof_id_type i) const
unsigned int get_node_integer_index(const std::string &name) const
virtual Node & node_ref(const dof_id_type i)
std::unique_ptr< Partitioner > _partitioner
A partitioner to use at each prepare_for_use().
unsigned int n_node_integers() const
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...
virtual dof_id_type n_nodes() const =0
void add_ghosting_functor(GhostingFunctor &ghosting_functor)
Adds a functor which can specify ghosting requirements for use on distributed meshes.
virtual element_iterator active_unpartitioned_elements_end()=0
std::unique_ptr< BoundaryInfo > boundary_info
This class holds the boundary information.
The definition of the node_iterator struct.
virtual const Elem * query_elem(const dof_id_type i) const
std::unique_ptr< PointLocatorBase > sub_point_locator() const
bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
const_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Templated forwarding ctor – forwards to appropriate variant_filter_iterator ctor.
virtual element_iterator not_ancestor_elements_begin()=0
virtual void fix_broken_node_and_element_numbering()=0
There is no reason for a user to ever call this function.
virtual element_iterator semilocal_elements_end()=0
virtual node_iterator nodes_begin()=0
Iterate over all the nodes in the Mesh.
virtual element_iterator active_type_elements_begin(ElemType type)=0
virtual node_iterator bid_nodes_end(boundary_id_type bndry_id)=0
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.
virtual element_iterator local_elements_end()=0
virtual Elem * add_elem(Elem *e)=0
Add elem e to the end of the element array.
This class handles the numbering of degrees of freedom on a mesh.
ElemMappingType
Enumeration of possible element master->physical mapping types.
virtual element_iterator not_active_elements_end()=0
dof_id_type n_unpartitioned_elem() const
virtual Elem & elem_ref(const dof_id_type i)
virtual element_iterator ancestor_elements_begin()=0
Iterate over elements for which elem->ancestor() is true.
void print_info(std::ostream &os=libMesh::out) const
Prints relevant information about the mesh.
virtual element_iterator active_semilocal_elements_begin()=0
virtual element_iterator elements_end()=0
void set_default_mapping_type(const ElemMappingType type)
Set the default master space to physical space mapping basis functions to be used on newly added elem...
dof_id_type n_nodes_on_proc(const processor_id_type proc) const
dof_id_type n_elem_on_proc(const processor_id_type proc) const
const_node_iterator(const MeshBase::node_iterator &rhs)
The conversion-to-const ctor.
dof_id_type n_active_local_elem() const
std::string & subdomain_name(subdomain_id_type id)
dof_id_type n_unpartitioned_nodes() const
virtual Elem * elem(const dof_id_type i)
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
unsigned int add_node_datum(const std::string &name, bool allocate_data=true)
Register a datum (of type T) to be added to each node in the mesh.
void set_point_locator_close_to_point_tol(Real val)
Set value used by PointLocatorBase::close_to_point_tol().
virtual element_iterator ghost_elements_begin()=0
Iterate over "ghost" elements in the Mesh.
This is the base class from which all geometric element types are derived.
virtual node_iterator bnd_nodes_begin()=0
Iterate over nodes for which BoundaryInfo::n_boundary_ids(node) > 0.
virtual SimpleRange< element_iterator > active_local_subdomain_elements_ptr_range(subdomain_id_type subdomain_id)=0
element_iterator(const IterType &d, const IterType &e, const PredType &p)
ElemMappingType _default_mapping_type
The default mapping type (typically Lagrange) between master and physical space to assign to newly ad...
IterBase * data
Ideally this private member data should have protected access.
virtual void gather_to_zero()
Gathers all elements and nodes of the mesh onto processor zero.
bool allow_remote_element_removal() const
virtual element_iterator active_unpartitioned_elements_begin()=0
Iterate over active unpartitioned elements in the Mesh.
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 ...
virtual element_iterator active_not_local_elements_end()=0
virtual element_iterator active_subdomain_set_elements_begin(std::set< subdomain_id_type > ss)=0
virtual Node * add_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.
virtual element_iterator local_not_level_elements_begin(unsigned int level)=0
virtual element_iterator level_elements_end(unsigned int level)=0
virtual unique_id_type parallel_max_unique_id() const =0
unsigned char default_mapping_data() const
Returns any default data value used by the master space to physical space mapping.
virtual node_iterator active_nodes_end()=0
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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 ...
void prepare_for_use(const bool skip_renumber_nodes_and_elements=false, const bool skip_find_neighbors=false)
Prepare a newly ecreated (or read) mesh for use.
virtual element_iterator facelocal_elements_begin()=0
Iterate over elements which are on or have a neighbor on the current processor.
An object whose state is distributed along a set of processors.
This is the MeshCommunication class.
virtual element_iterator not_ancestor_elements_end()=0
virtual void clear()
Deletes all the element and node data that is currently stored.
virtual element_iterator not_local_elements_end()=0
void set_mesh_dimension(unsigned char d)
Resets the logical dimension of the mesh.
unsigned int get_elem_integer_index(const std::string &name) const
virtual element_iterator subactive_elements_end()=0
virtual const Node * query_node_ptr(const dof_id_type i) const =0
virtual void update_parallel_id_counts()=0
Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors.
virtual SimpleRange< element_iterator > active_subdomain_set_elements_ptr_range(std::set< subdomain_id_type > ss)=0
void set_next_unique_id(unique_id_type id)
Sets the next unique id to be used.
virtual element_iterator active_elements_end()=0
virtual ~MeshBase()
Destructor.
virtual node_iterator local_nodes_end()=0
This is the base class for point locators.
bool _skip_noncritical_partitioning
If this is true then no partitioning should be done with the possible exception of orphaned nodes.
std::string get_info() const
virtual void find_neighbors(const bool reset_remote_elements=false, const bool reset_current_list=true)=0
Locate element face (edge in 2D) neighbors.
bool skip_partitioning() const
virtual element_iterator flagged_elements_end(unsigned char rflag)=0
virtual void reserve_elem(const dof_id_type ne)=0
Reserves space for a known number of elements.
virtual dof_id_type n_active_elem() const =0
void ErrorVector unsigned int
virtual bool contract()=0
Delete subactive (i.e.
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
void set_spatial_dimension(unsigned char d)
Sets the "spatial dimension" of the Mesh.
virtual bool is_replicated() const
virtual element_iterator active_not_local_elements_begin()=0
virtual element_iterator unpartitioned_elements_end()=0
const std::string & get_elem_integer_name(unsigned int i) const
virtual element_iterator unpartitioned_elements_begin()=0
Iterate over unpartitioned elements in the Mesh.
virtual element_iterator active_local_subdomain_elements_begin(subdomain_id_type subdomain_id)=0
ElemType
Defines an enum for geometric element types.
virtual element_iterator local_not_level_elements_end(unsigned int level)=0
virtual std::unique_ptr< Partitioner > & partitioner()
A partitioner to use at each prepare_for_use()