20 #ifndef LIBMESH_MESH_BASE_H 21 #define LIBMESH_MESH_BASE_H 24 #include "libmesh/dof_object.h" 25 #include "libmesh/int_range.h" 26 #include "libmesh/libmesh_common.h" 27 #include "libmesh/multi_predicates.h" 28 #include "libmesh/point_locator_base.h" 29 #include "libmesh/variant_filter_iterator.h" 30 #include "libmesh/parallel_object.h" 31 #include "libmesh/simple_range.h" 43 class GhostingFunctor;
130 return !(*
this == other_mesh);
144 virtual std::unique_ptr<MeshBase>
clone()
const = 0;
173 virtual void clear ();
436 #ifdef LIBMESH_ENABLE_UNIQUE_ID 492 #ifdef LIBMESH_ENABLE_UNIQUE_ID 688 #ifdef LIBMESH_ENABLE_DEPRECATED 835 virtual void find_neighbors (
const bool reset_remote_elements =
false,
836 const bool reset_current_list =
true) = 0;
860 #ifdef LIBMESH_ENABLE_AMR 887 bool allocate_data =
true,
904 std::vector<unsigned int>
add_elem_integers(
const std::vector<std::string> & names,
905 bool allocate_data =
true,
906 const std::vector<dof_id_type> * default_values =
nullptr);
961 template <
typename T>
963 bool allocate_data =
true,
964 const T * default_value =
nullptr);
986 template <
typename T>
987 std::vector<unsigned int>
add_elem_data(
const std::vector<std::string> & names,
988 bool allocate_data =
true,
989 const std::vector<T> * default_values =
nullptr);
1009 bool allocate_data =
true,
1026 std::vector<unsigned int>
add_node_integers(
const std::vector<std::string> & names,
1027 bool allocate_data =
true,
1028 const std::vector<dof_id_type> * default_values =
nullptr);
1083 template <
typename T>
1085 bool allocate_data =
true,
1086 const T * default_value =
nullptr);
1108 template <
typename T>
1110 bool allocate_data =
true,
1111 const std::vector<T> * default_values =
nullptr);
1130 void prepare_for_use (
const bool skip_renumber_nodes_and_elements,
const bool skip_find_neighbors);
1137 virtual void partition (
const unsigned int n_parts);
1294 void subdomain_ids (std::set<subdomain_id_type> & ids,
const bool global =
true)
const;
1341 std::string
get_info (
const unsigned int verbosity = 0,
const bool global =
true)
const;
1349 void print_info (std::ostream & os=
libMesh::out,
const unsigned int verbosity = 0,
const bool global =
true)
const;
1362 virtual void read (
const std::string &
name,
1363 void * mesh_data=
nullptr,
1364 bool skip_renumber_nodes_and_elements=
false,
1365 bool skip_find_neighbors=
false) = 0;
1366 virtual void write (
const std::string &
name) = 0;
1414 const bool full_ordered =
true) = 0;
1513 #define ABSTRACT_ELEM_ITERATORS(TYPE, ARGDECL) \ 1514 virtual element_iterator TYPE##elements_begin(ARGDECL) = 0; \ 1515 virtual element_iterator TYPE##elements_end(ARGDECL) = 0; \ 1516 virtual const_element_iterator TYPE##elements_begin(ARGDECL) const = 0; \ 1517 virtual const_element_iterator TYPE##elements_end(ARGDECL) const = 0; \ 1518 virtual SimpleRange<element_iterator> TYPE##element_ptr_range(ARGDECL) = 0; \ 1519 virtual SimpleRange<const_element_iterator> TYPE##element_ptr_range(ARGDECL) const = 0; 1521 #define DECLARE_ELEM_ITERATORS(TYPE, ARGDECL, ARGS) \ 1522 virtual element_iterator TYPE##elements_begin(ARGDECL) override final; \ 1523 virtual element_iterator TYPE##elements_end(ARGDECL) override final; \ 1524 virtual const_element_iterator TYPE##elements_begin(ARGDECL) const override final; \ 1525 virtual const_element_iterator TYPE##elements_end(ARGDECL) const override final; \ 1526 virtual SimpleRange<element_iterator> TYPE##element_ptr_range(ARGDECL) override final { return {TYPE##elements_begin(ARGS), TYPE##elements_end(ARGS)}; } \ 1527 virtual SimpleRange<const_element_iterator> TYPE##element_ptr_range(ARGDECL) const override final { return {TYPE##elements_begin(ARGS), TYPE##elements_end(ARGS)}; } 1529 #define ABSTRACT_NODE_ITERATORS(TYPE, ARGDECL) \ 1530 virtual node_iterator TYPE##nodes_begin(ARGDECL) = 0; \ 1531 virtual node_iterator TYPE##nodes_end(ARGDECL) = 0; \ 1532 virtual const_node_iterator TYPE##nodes_begin(ARGDECL) const = 0; \ 1533 virtual const_node_iterator TYPE##nodes_end(ARGDECL) const = 0; \ 1534 virtual SimpleRange<node_iterator> TYPE##node_ptr_range(ARGDECL) = 0; \ 1535 virtual SimpleRange<const_node_iterator> TYPE##node_ptr_range(ARGDECL) const = 0; 1537 #define DECLARE_NODE_ITERATORS(TYPE, ARGDECL, ARGS) \ 1538 virtual node_iterator TYPE##nodes_begin(ARGDECL) override final; \ 1539 virtual node_iterator TYPE##nodes_end(ARGDECL) override final; \ 1540 virtual const_node_iterator TYPE##nodes_begin(ARGDECL) const override final; \ 1541 virtual const_node_iterator TYPE##nodes_end(ARGDECL) const override final; \ 1542 virtual SimpleRange<node_iterator> TYPE##node_ptr_range(ARGDECL) override final { return {TYPE##nodes_begin(ARGS), TYPE##nodes_end(ARGS)}; } \ 1543 virtual SimpleRange<const_node_iterator> TYPE##node_ptr_range(ARGDECL) const override final { return {TYPE##nodes_begin(ARGS), TYPE##nodes_end(ARGS)}; } 1545 #define LIBMESH_COMMA , 1626 #ifdef LIBMESH_ENABLE_AMR 1652 ABSTRACT_NODE_ITERATORS(,)
1653 ABSTRACT_NODE_ITERATORS(active_,)
1654 ABSTRACT_NODE_ITERATORS(local_,)
1655 ABSTRACT_NODE_ITERATORS(bnd_,)
1664 ABSTRACT_NODE_ITERATORS(multi_evaluable_,
std::vector<const
DofMap *> dof_maps)
1711 template <
typename T>
1757 #ifndef LIBMESH_ENABLE_DEPRECATED 1845 #ifdef LIBMESH_ENABLE_UNIQUE_ID 1974 std::pair<std::vector<unsigned int>, std::vector<unsigned int>>
2046 #ifdef LIBMESH_ENABLE_DEPRECATED 2066 const Elem *
const &,
2071 const Elem *
const &,
2079 const Node *
const &,
2084 const Node *
const &,
2086 #endif // LIBMESH_ENABLE_DEPRECATED 2107 template <
typename PredType,
typename IterType>
2110 const PredType & p ) :
2127 template <
typename PredType,
typename IterType>
2130 const PredType & p ) :
2158 template <
typename PredType,
typename IterType>
2161 const PredType & p ) :
2178 template <
typename PredType,
typename IterType>
2181 const PredType & p ) :
2195 template <
typename T>
2199 const T * default_value)
2203 unsigned int n_more_integers = (
sizeof(T)-1)/
sizeof(
dof_id_type);
2206 std::memcpy(int_data.data(), default_value,
sizeof(T));
2209 for (
unsigned int i=0; i != n_more_integers; ++i)
2219 template <
typename T>
2223 const std::vector<T> * default_values)
2225 libmesh_assert(!default_values || default_values->size() == names.size());
2227 std::vector<unsigned int> returnval(names.size());
2233 this->add_elem_datum<T>(names[i],
false,
2235 (*default_values)[i] :
nullptr);
2244 template <
typename T>
2248 const T * default_value)
2252 unsigned int n_more_integers = (
sizeof(T)-1)/
sizeof(
dof_id_type);
2255 std::memcpy(int_data.data(), default_value,
sizeof(T));
2258 for (
unsigned int i=0; i != n_more_integers; ++i)
2268 template <
typename T>
2272 const std::vector<T> * default_values)
2274 libmesh_assert(!default_values || default_values->size() == names.size());
2276 std::vector<unsigned int> returnval(names.size());
2282 this->add_node_datum<T>(names[i],
false,
2284 (*default_values)[i] :
nullptr);
2296 #endif // LIBMESH_MESH_BASE_H std::string name(const ElemQuality q)
This function returns a string containing some name for q.
The definition of the element_iterator struct.
bool operator==(const MeshBase &other_mesh) const
This tests for exactly-equal data in all the senses that a mathematician would care about (element co...
variant_filter_iterator< MeshBase::Predicate, Elem * > elem_filter_iter
The original iterator classes weren't properly const-safe; relying on their const-incorrectness is no...
std::set< subdomain_id_type > _mesh_subdomains
We cache the subdomain ids of the elements present in the mesh.
bool has_node_integer(std::string_view name) const
std::vector< unsigned int > add_elem_integers(const std::vector< std::string > &names, bool allocate_data=true, const std::vector< dof_id_type > *default_values=nullptr)
Register integer data (of type dof_id_type) to be added to each element in the mesh, one string name for each new integer.
ElemType
Defines an enum for geometric element types.
The SimpleRange templated class is intended to make it easy to construct ranges from pairs of iterato...
bool operator!=(const MeshBase &other_mesh) const
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.
virtual void reserve_nodes(const dof_id_type nn)=0
Reserves space for a known number of nodes.
ABSTRACT_ELEM_ITERATORS(,) ABSTRACT_ELEM_ITERATORS(active_
virtual bool subclass_locally_equals(const MeshBase &other_mesh) const =0
Shim to allow operator == (&) to behave like a virtual function without having to be one...
bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
constraint_rows_type & get_constraint_rows()
virtual dof_id_type n_active_elem() const =0
A Node is like a Point, but with more information.
This abstract base class defines the interface by which library code and user code can report associa...
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 ...
Real get_point_locator_close_to_point_tol() const
dof_id_type n_elem_on_proc(const processor_id_type proc) const
virtual unique_id_type parallel_max_unique_id() const =0
dof_id_type n_unpartitioned_nodes() const
variant_filter_iterator< MeshBase::Predicate, Node * > node_filter_iter
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
std::vector< std::string > _elem_integer_names
The array of names for integer data associated with each element in the mesh.
std::unique_ptr< PointLocatorBase > sub_point_locator() const
unsigned int n_node_integers() const
void remove_orphaned_nodes()
Removes any orphaned nodes, nodes not connected to any elements.
Original Authors: Corwin Joy * Michael Gradman cjoy@houston.rr.com * Michael.Gradman@caminus.com Caminus, Suite 1150, Two Allen Center, 1200 Smith Street, Houston, TX 77002 This class is an extension of variant_bidirectional_iterator to a filter_iterator similar to boost's.
std::vector< dof_id_type > get_elemset_codes() const
Return a vector of all elemset codes defined on the mesh.
BoundaryInfo & get_boundary_info()
Writable information about boundary ids on the mesh.
virtual void all_second_order_range(const SimpleRange< element_iterator > &range, const bool full_ordered=true)=0
Converts a set of this Mesh's elements defined by range from FIRST order to SECOND order...
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use...
void add_ghosting_functor(std::shared_ptr< GhostingFunctor > ghosting_functor)
Adds a functor which can specify ghosting requirements for use on distributed meshes.
void detect_interior_parents()
Search the mesh for elements that have a neighboring element of dim+1 and set that element as the int...
void skip_partitioning(bool skip)
If true is passed in then nothing on this mesh will be (re)partitioned.
dof_id_type n_active_elem_on_proc(const processor_id_type proc) const
The definition of the const_element_iterator struct.
std::vector< std::pair< std::pair< const Elem *, unsigned int >, Real > > constraint_rows_mapped_type
subdomain_id_type n_local_subdomains() const
variant_filter_iterator< MeshBase::Predicate, const Elem *const, const Elem *const &, const Elem *const * > const_elem_filter_iter
Predicates::multi_predicate Predicate
We need an empty, generic class to act as a predicate for this and derived mesh classes.
virtual void allgather()
Gathers all elements and nodes of the mesh onto every processor.
void set_spatial_dimension(unsigned char d)
Sets the "spatial dimension" of the Mesh.
void set_isnt_prepared()
Tells this we have done some operation where we should no longer consider ourself prepared...
std::map< dof_id_type, const MeshBase::elemset_type * > _elemset_codes
Map from "element set code" to list of set ids to which that element belongs (and vice-versa)...
bool skip_noncritical_partitioning() const
unsigned int add_elem_integer(std::string name, bool allocate_data=true, dof_id_type default_value=DofObject::invalid_id)
Register an integer datum (of type dof_id_type) to be added to each element in the mesh...
void add_elemset_code(dof_id_type code, MeshBase::elemset_type id_set)
Tabulate a user-defined "code" for elements which belong to the element sets specified in id_set...
bool has_elem_integer(std::string_view name) const
bool get_count_lower_dim_elems_in_point_locator() const
Get the current value of _count_lower_dim_elems_in_point_locator.
void remove_ghosting_functor(GhostingFunctor &ghosting_functor)
Removes a functor which was previously added to the set of ghosting functors.
unsigned int n_elem_integers() const
This is the base class from which all geometric element types are derived.
dof_id_type n_local_nodes() const
virtual std::unique_ptr< Partitioner > & partitioner()
A partitioner to use at each prepare_for_use()
constraint_rows_type _constraint_rows
virtual void gather_to_zero()
Gathers all elements and nodes of the mesh onto processor zero.
void skip_noncritical_partitioning(bool skip)
If true is passed in then the elements on this mesh will no longer be (re)partitioned, and the nodes on this mesh will only be repartitioned if they are found "orphaned" via coarsening or other removal of the last element responsible for their node/element processor id consistency.
void copy_constraint_rows(const MeshBase &other_mesh)
Copy the constraints from the other mesh to this mesh.
std::vector< unsigned int > add_node_integers(const std::vector< std::string > &names, bool allocate_data=true, const std::vector< dof_id_type > *default_values=nullptr)
Register integer data (of type dof_id_type) to be added to each node in the mesh. ...
virtual Elem & elem_ref(const dof_id_type i)
const_element_iterator(const IterType &d, const IterType &e, const PredType &p)
Templated forwarding ctor – forwards to appropriate variant_filter_iterator ctor.
bool _skip_noncritical_partitioning
If this is true then no partitioning should be done with the possible exception of orphaned nodes...
std::vector< unsigned int > add_node_data(const std::vector< std::string > &name, bool allocate_data=true, const std::vector< T > *default_values=nullptr)
Register data (of type T) to be added to each node in the mesh.
virtual void fix_broken_node_and_element_numbering()=0
There is no reason for a user to ever call this function.
unsigned char _spatial_dimension
The "spatial dimension" of the Mesh.
virtual void own_node(Node &)
Takes ownership of node n on this partition of a distributed mesh, by setting n.processor_id() to thi...
std::unique_ptr< BoundaryInfo > boundary_info
This class holds the boundary information.
virtual void set_next_unique_id(unique_id_type id)=0
Sets the next available unique id to be used.
bool _allow_remote_element_removal
If this is false then even on DistributedMesh remote elements will not be deleted during mesh prepara...
The libMesh namespace provides an interface to certain functionality in the library.
std::map< MeshBase::elemset_type, dof_id_type > _elemset_codes_inverse_map
virtual void all_first_order()=0
Converts a mesh with higher-order elements into a mesh with linear elements.
dof_id_type get_elemset_code(const MeshBase::elemset_type &id_set) const
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
dof_id_type n_unpartitioned_elem() const
std::vector< std::string > _node_integer_names
The array of names for integer data associated with each node in the mesh.
virtual std::unique_ptr< MeshBase > clone() const =0
Virtual "copy constructor".
virtual Node & node_ref(const dof_id_type i)
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.
dof_id_type n_local_elem() const
MeshBase::elemset_type _all_elemset_ids
const std::string & get_elem_integer_name(unsigned int i) const
bool nodes_and_elements_equal(const MeshBase &other_mesh) const
Tests for equality of all elements and nodes in the mesh.
virtual MeshBase & assign(MeshBase &&other_mesh)=0
Shim to allow operator = (&&) to behave like a virtual function without having to be one...
uint8_t processor_id_type
This is the MeshBase class.
The Partitioner class provides a uniform interface for partitioning algorithms.
ElemMappingType default_mapping_type() const
Returns the default master space to physical space mapping basis functions to be used on newly added ...
subdomain_id_type get_id_by_name(std::string_view name) const
void get_elemsets(dof_id_type elemset_code, MeshBase::elemset_type &id_set_to_fill) const
Look up the element sets for a given elemset code and vice-versa.
virtual bool is_serial_on_zero() const
void change_elemset_code(dof_id_type old_code, dof_id_type new_code)
Replace elemset code "old_code" with "new_code".
virtual void all_complete_order_range(const SimpleRange< element_iterator > &range)=0
Converts a set of elements in this (conforming, non-refined) mesh into "complete" order elements...
virtual void set_distributed()
Asserts that not all elements and nodes of the mesh necessarily exist on the current processor...
node_iterator(const IterType &d, const IterType &e, const PredType &p)
Templated forwarding ctor – forwards to appropriate variant_filter_iterator ctor.
This class handles the numbering of degrees of freedom on a mesh.
std::set< GhostingFunctor * > _ghosting_functors
The list of all GhostingFunctor objects to be used when distributing a DistributedMesh.
unique_id_type _next_unique_id
The next available unique id for assigning ids to DOF objects.
unsigned int _n_parts
The number of partitions the mesh has.
dof_id_type n_active_local_elem() const
unsigned int get_elem_integer_index(std::string_view name) 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 ...
processor_id_type n_processors() const
virtual bool is_serial() 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.
unsigned char _default_mapping_data
The default mapping data (unused with Lagrange, used for nodal weight lookup index with rational base...
virtual void delete_elem(Elem *e)=0
Removes element e from the mesh.
This is the MeshCommunication class.
const std::map< subdomain_id_type, std::string > & get_subdomain_name_map() const
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
dof_id_type n_sub_elem() const
unsigned char default_mapping_data() const
Returns any default data value used by the master space to physical space mapping.
virtual Elem * add_elem(Elem *e)=0
Add elem e to the end of the element array.
ElemMappingType _default_mapping_type
The default mapping type (typically Lagrange) between master and physical space to assign to newly ad...
virtual void update_parallel_id_counts()=0
Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors...
void print_info(std::ostream &os=libMesh::out, const unsigned int verbosity=0, const bool global=true) const
Prints relevant information about the mesh.
std::unique_ptr< Partitioner > _partitioner
A partitioner to use at each prepare_for_use().
virtual const Node * query_node_ptr(const dof_id_type i) const =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...
virtual dof_id_type max_elem_id() const =0
void clear_point_locator()
Releases the current PointLocator object.
variant_filter_iterator< MeshBase::Predicate, Elem *const, Elem *const &, Elem *const * > const_elem_filter_iter
void subdomain_ids(std::set< subdomain_id_type > &ids, const bool global=true) const
Constructs a list of all subdomain identifiers in the local mesh if global == false, and in the global mesh if global == true (default).
bool allow_find_neighbors() const
virtual Node * insert_node(Node *n)=0
This method is deprecated.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
bool _skip_find_neighbors
If this is true then we will skip find_neighbors in prepare_for_use.
virtual void delete_node(Node *n)=0
Removes the Node n from the mesh.
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.
unsigned int n_elemsets() const
Returns the number of unique elemset ids which have been added via add_elemset_code(), which is the size of the _all_elemset_ids set.
std::set< unsigned char > _elem_dims
We cache the dimension of the elements present in the mesh.
unsigned int add_elem_datum(const std::string &name, bool allocate_data=true, const T *default_value=nullptr)
Register a datum (of type T) to be added to each element in the mesh.
unsigned int get_node_integer_index(std::string_view name) const
std::string & subdomain_name(subdomain_id_type id)
const std::set< unsigned char > & elem_dimensions() const
void allow_find_neighbors(bool allow)
If false is passed then this mesh will no longer work to find element neighbors when being prepared f...
virtual void write(const std::string &name)=0
void set_mesh_dimension(unsigned char d)
Resets the logical dimension of the mesh.
dof_id_type n_nodes_on_proc(const processor_id_type proc) const
variant_filter_iterator< MeshBase::Predicate, const Node *const, const Node *const &, const Node *const * > const_node_filter_iter
virtual dof_id_type parallel_n_nodes() const =0
bool allow_remote_element_removal() const
void size_node_extra_integers()
Size extra-integer arrays of all nodes in the mesh.
An object whose state is distributed along a set of processors.
virtual dof_id_type parallel_n_elem() const =0
virtual void clear()
Deletes all the element and node data that is currently stored.
variant_filter_iterator< MeshBase::Predicate, Node *const, Node *const &, Node *const * > const_node_filter_iter
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...
unsigned int add_node_datum(const std::string &name, bool allocate_data=true, const T *default_value=nullptr)
Register a datum (of type T) to be added to each node in the mesh.
const DofMap &dof_map LIBMESH_COMMA unsigned int var_num
const std::set< subdomain_id_type > & get_mesh_subdomains() const
bool skip_partitioning() const
std::map< GhostingFunctor *, std::shared_ptr< GhostingFunctor > > _shared_functors
Hang on to references to any GhostingFunctor objects we were passed in shared_ptr form...
unsigned int n_partitions() const
virtual Node * add_node(Node *n)=0
Add Node n to the end of the vertex array.
virtual void clear_elems()=0
Deletes all the element data that is currently stored.
virtual const Elem * elem_ptr(const dof_id_type i) const =0
The definition of the node_iterator struct.
ElemMappingType
Enumeration of possible element master->physical mapping types.
const_node_iterator(const IterType &d, const IterType &e, const PredType &p)
Templated forwarding ctor – forwards to appropriate variant_filter_iterator ctor.
virtual Elem * insert_elem(Elem *e)=0
Insert elem e to the element array, preserving its id and replacing/deleting any existing element wit...
std::vector< dof_id_type > _node_integer_default_values
The array of default initialization values for integer data associated with each node in the mesh...
std::vector< unsigned int > add_elem_data(const std::vector< std::string > &names, bool allocate_data=true, const std::vector< T > *default_values=nullptr)
Register data (of type T) to be added to each element in the mesh.
unsigned int recalculate_n_partitions()
In a few (very rare) cases, the user may have manually tagged the elements with specific processor ID...
std::set< GhostingFunctor * >::const_iterator ghosting_functors_begin() const
Beginning of range of ghosting functors.
std::set< elemset_id_type > elemset_type
Typedef for the "set" container used to store elemset ids.
std::vector< dof_id_type > _elem_integer_default_values
The array of default initialization values for integer data associated with each element in the mesh...
subdomain_id_type n_subdomains() const
std::string get_info(const unsigned int verbosity=0, const bool global=true) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool contract()=0
Delete subactive (i.e.
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
virtual SimpleRange< element_iterator > active_local_subdomain_elements_ptr_range(subdomain_id_type sid)=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...
void post_dofobject_moves(MeshBase &&other_mesh)
Moves any superclass data (e.g.
virtual void all_complete_order()
Calls the range-based version of this function with a range consisting of all elements in the mesh...
unsigned int spatial_dimension() const
element_iterator(const IterType &d, const IterType &e, const PredType &p)
std::map< const Node *, constraint_rows_mapped_type > constraint_rows_type
virtual bool is_replicated() const
bool _is_prepared
Flag indicating if the mesh has been prepared for use.
virtual const Elem & elem_ref(const dof_id_type i) const
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...
The definition of the const_node_iterator struct.
MeshBase(const Parallel::Communicator &comm_in, unsigned char dim=1)
Constructor.
void all_second_order(const bool full_ordered=true)
Calls the range-based version of this function with a range consisting of all elements in the mesh...
dof_id_type n_active_sub_elem() const
Same as n_sub_elem(), but only counts active elements.
virtual ~MeshBase()
Destructor.
void set_elem_dimensions(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...
unsigned int mesh_dimension() const
unsigned int level ElemType type std::set< subdomain_id_type > ss processor_id_type pid unsigned int level std::set< subdomain_id_type > virtual ss SimpleRange< element_iterator > active_subdomain_elements_ptr_range(subdomain_id_type sid)=0
std::unique_ptr< GhostingFunctor > _default_ghosting
The default geometric GhostingFunctor, used to implement standard libMesh element ghosting behavior...
void change_elemset_id(elemset_id_type old_id, elemset_id_type new_id)
Replace elemset id "old_id" with "new_id".
unsigned int add_node_integer(std::string name, bool allocate_data=true, dof_id_type default_value=DofObject::invalid_id)
Register an integer datum (of type dof_id_type) to be added to each node in the mesh.
variant_filter_iterator< MeshBase::Predicate, Elem *const, Elem *const &, Elem *const *, const Elem *const, const Elem *const &, const Elem *const * > elem_filter_iter
virtual SimpleRange< element_iterator > active_subdomain_set_elements_ptr_range(std::set< subdomain_id_type > ss)=0
unique_id_type next_unique_id()
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...
const std::string & get_node_integer_name(unsigned int i) const
virtual void libmesh_assert_valid_parallel_ids() const
Verify id and processor_id consistency of our elements and nodes containers.
virtual const Node & node_ref(const dof_id_type i) const
virtual const Point & point(const dof_id_type i) const =0
bool _skip_all_partitioning
If this is true then no partitioning should be done.
const_node_iterator(const MeshBase::node_iterator &rhs)
The conversion-to-const ctor.
bool allow_renumbering() const
const constraint_rows_type & get_constraint_rows() const
virtual void delete_remote_elements()
When supported, deletes all nonlocal elements of the mesh except for "ghosts" which touch a local ele...
const_element_iterator(const MeshBase::element_iterator &rhs)
The conversion-to-const ctor.
virtual void update_post_partitioning()
Recalculate any cached data after elements and nodes have been repartitioned.
virtual dof_id_type max_node_id() const =0
void reinit_ghosting_functors()
Loops over ghosting functors and calls mesh_reinit()
virtual dof_id_type n_elem() const =0
virtual const Node * node_ptr(const dof_id_type i) const =0
processor_id_type processor_id() const
std::unique_ptr< PointLocatorBase > _point_locator
A PointLocator class for this mesh.
const DofMap &dof_map LIBMESH_COMMA unsigned int std::string & set_subdomain_name_map()
virtual void redistribute()
Redistribute elements between processors.
Real _point_locator_close_to_point_tol
If nonzero, we will call PointLocatorBase::set_close_to_point_tol() on any PointLocators that we crea...
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...
GhostingFunctor & default_ghosting()
Default ghosting functor.
A Point defines a location in LIBMESH_DIM dimensional Real space.
virtual void reserve_elem(const dof_id_type ne)=0
Reserves space for a known number of elements.
bool locally_equals(const MeshBase &other_mesh) const
This behaves the same as operator==, but only for the local and ghosted aspects of the mesh; i...
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...
unsigned int & set_n_partitions()
void ErrorVector unsigned int
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
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
variant_filter_iterator< MeshBase::Predicate, Node *const, Node *const &, Node *const *, const Node *const, const Node *const &, const Node *const * > node_filter_iter
void size_elem_extra_integers()
Size extra-integer arrays of all elements in the mesh.
std::set< GhostingFunctor * >::const_iterator ghosting_functors_end() const
End of range of ghosting functors.
void add_ghosting_functor(GhostingFunctor &ghosting_functor)
Adds a functor which can specify ghosting requirements for use on distributed meshes.
MeshBase & operator=(const MeshBase &)=delete
Copy and move assignment are not allowed because MeshBase subclasses manually manage memory (Elems an...
void set_point_locator_close_to_point_tol(Real val)
Set value used by PointLocatorBase::close_to_point_tol().