20 #ifndef LIBMESH_MESH_BASE_H 21 #define LIBMESH_MESH_BASE_H 34 #ifdef LIBMESH_FORWARD_DECLARE_ENUMS 53 class GhostingFunctor;
116 virtual std::unique_ptr<MeshBase>
clone()
const = 0;
141 virtual void clear ();
301 #ifdef LIBMESH_ENABLE_UNIQUE_ID 351 #ifdef LIBMESH_ENABLE_UNIQUE_ID 453 #ifdef LIBMESH_ENABLE_DEPRECATED 456 libmesh_deprecated();
467 #ifdef LIBMESH_ENABLE_DEPRECATED 470 libmesh_deprecated();
536 #ifdef LIBMESH_ENABLE_DEPRECATED 539 libmesh_deprecated();
551 #ifdef LIBMESH_ENABLE_DEPRECATED 554 libmesh_deprecated();
577 #ifdef LIBMESH_ENABLE_DEPRECATED 580 libmesh_deprecated();
591 #ifdef LIBMESH_ENABLE_DEPRECATED 594 libmesh_deprecated();
699 virtual void find_neighbors (
const bool reset_remote_elements =
false,
700 const bool reset_current_list =
true) = 0;
718 #ifdef LIBMESH_ENABLE_AMR 742 void prepare_for_use (
const bool skip_renumber_nodes_and_elements=
false,
const bool skip_find_neighbors=
false);
747 virtual void partition (
const unsigned int n_parts);
856 void subdomain_ids (std::set<subdomain_id_type> & ids)
const;
900 virtual void read (
const std::string &
name,
901 void * mesh_data=
nullptr,
902 bool skip_renumber_nodes_and_elements=
false,
903 bool skip_find_neighbors=
false) = 0;
904 virtual void write (
const std::string &
name) = 0;
970 #ifdef LIBMESH_ENABLE_DEPRECATED 1032 virtual const_element_iterator
elements_end ()
const = 0;
1122 virtual element_iterator
1126 virtual element_iterator
1130 virtual const_element_iterator
1134 virtual const_element_iterator
1138 #ifdef LIBMESH_ENABLE_AMR 1264 virtual const_node_iterator
nodes_begin ()
const = 0;
1265 virtual const_node_iterator
nodes_end ()
const = 0;
1316 virtual node_iterator
1320 virtual node_iterator
1324 virtual const_node_iterator
1328 virtual const_node_iterator
1414 #ifdef LIBMESH_ENABLE_UNIQUE_ID 1513 template <
typename PredType,
typename IterType>
1516 const PredType & p ) :
1536 template <
typename PredType,
typename IterType>
1539 const PredType & p ) :
1567 template <
typename PredType,
typename IterType>
1570 const PredType & p ) :
1590 template <
typename PredType,
typename IterType>
1593 const PredType & p ) :
1609 #endif // LIBMESH_MESH_BASE_H std::string name(const ElemQuality q)
virtual element_iterator evaluable_elements_begin(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
virtual node_iterator active_nodes_end()=0
virtual element_iterator ancestor_elements_begin()=0
virtual void redistribute()
virtual element_iterator facelocal_elements_end()=0
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false)=0
virtual void reserve_nodes(const dof_id_type nn)=0
virtual element_iterator not_ancestor_elements_begin()=0
bool _skip_renumber_nodes_and_elements
virtual const Elem * elem(const dof_id_type i) const
virtual dof_id_type n_active_elem() const =0
A geometric point in (x,y,z) space associated with a DOF.
virtual void renumber_node(dof_id_type old_id, dof_id_type new_id)=0
virtual element_iterator not_level_elements_begin(unsigned int level)=0
variant_filter_iterator(const IterType &d, const IterType &e, const PredType &p)
dof_id_type n_elem_on_proc(const processor_id_type proc) const
virtual unique_id_type parallel_max_unique_id() const =0
virtual element_iterator active_subdomain_set_elements_end(std::set< subdomain_id_type > ss)=0
dof_id_type n_unpartitioned_nodes() const
const unsigned int invalid_uint
virtual element_iterator not_local_elements_end()=0
virtual SimpleRange< node_iterator > local_node_ptr_range()=0
virtual node_iterator pid_nodes_end(processor_id_type proc_id)=0
std::unique_ptr< PointLocatorBase > sub_point_locator() const
virtual element_iterator level_elements_begin(unsigned int level)=0
BoundaryInfo & get_boundary_info()
virtual node_iterator evaluable_nodes_end(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
void allow_renumbering(bool allow)
void detect_interior_parents()
virtual element_iterator local_level_elements_end(unsigned int level)=0
void skip_partitioning(bool skip)
dof_id_type n_active_elem_on_proc(const processor_id_type proc) const
virtual element_iterator active_semilocal_elements_end()=0
virtual element_iterator active_subdomain_elements_end(subdomain_id_type subdomain_id)=0
virtual element_iterator not_ancestor_elements_end()=0
virtual node_iterator bid_nodes_end(boundary_id_type bndry_id)=0
virtual element_iterator local_elements_begin()=0
Predicates::multi_predicate Predicate
virtual element_iterator unpartitioned_elements_begin()=0
void set_spatial_dimension(unsigned char d)
virtual element_iterator not_subactive_elements_begin()=0
bool get_count_lower_dim_elems_in_point_locator() const
void remove_ghosting_functor(GhostingFunctor &ghosting_functor)
The base class for all geometric element types.
virtual element_iterator ancestor_elements_end()=0
uint8_t processor_id_type
dof_id_type n_local_nodes() const
virtual std::unique_ptr< Partitioner > & partitioner()
virtual element_iterator flagged_elements_end(unsigned char rflag)=0
virtual void gather_to_zero()
std::string get_info() const
virtual Elem & elem_ref(const dof_id_type i)
const_element_iterator(const IterType &d, const IterType &e, const PredType &p)
virtual node_iterator bid_nodes_begin(boundary_id_type bndry_id)=0
virtual void fix_broken_node_and_element_numbering()=0
virtual SimpleRange< element_iterator > active_element_ptr_range()=0
unsigned char _spatial_dimension
virtual void own_node(Node &)
virtual element_iterator flagged_pid_elements_end(unsigned char rflag, processor_id_type pid)=0
std::unique_ptr< BoundaryInfo > boundary_info
virtual element_iterator subactive_elements_end()=0
const PointLocatorBase & point_locator() const
virtual Elem * elem(const dof_id_type i)
bool _allow_remote_element_removal
virtual void all_first_order()=0
virtual Elem * query_elem(const dof_id_type i)
virtual element_iterator not_active_elements_end()=0
const BoundaryInfo & get_boundary_info() const
dof_id_type n_unpartitioned_elem() const
virtual element_iterator active_local_subdomain_elements_end(subdomain_id_type subdomain_id)=0
virtual std::unique_ptr< MeshBase > clone() const =0
virtual Node & node_ref(const dof_id_type i)
virtual element_iterator active_semilocal_elements_begin()=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
dof_id_type n_local_elem() const
virtual element_iterator local_level_elements_begin(unsigned int level)=0
Base class for all concrete Partitioner instantiations.
virtual bool is_serial_on_zero() const
virtual void set_distributed()
void subdomain_ids(std::set< subdomain_id_type > &ids) const
node_iterator(const IterType &d, const IterType &e, const PredType &p)
virtual node_iterator nodes_begin()=0
virtual element_iterator elements_begin()=0
virtual SimpleRange< element_iterator > active_local_element_ptr_range()=0
Manages the degrees of freedom (DOFs) in a simulation.
virtual element_iterator level_elements_end(unsigned int level)=0
std::set< GhostingFunctor * > _ghosting_functors
unique_id_type _next_unique_id
virtual const Elem * query_elem(const dof_id_type i) const
virtual element_iterator facelocal_elements_begin()=0
virtual element_iterator ghost_elements_end()=0
virtual element_iterator active_subdomain_elements_begin(subdomain_id_type subdomain_id)=0
virtual element_iterator active_subdomain_set_elements_begin(std::set< subdomain_id_type > ss)=0
virtual node_iterator evaluable_nodes_begin(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
dof_id_type n_active_local_elem() const
void allow_remote_element_removal(bool allow)
processor_id_type n_processors() const
virtual bool is_serial() const
virtual element_iterator active_local_subdomain_elements_begin(subdomain_id_type subdomain_id)=0
virtual void find_neighbors(const bool reset_remote_elements=false, const bool reset_current_list=true)=0
virtual element_iterator not_subactive_elements_end()=0
virtual node_iterator active_nodes_begin()=0
virtual void delete_elem(Elem *e)=0
virtual SimpleRange< element_iterator > element_ptr_range()=0
virtual element_iterator semilocal_elements_begin()=0
const std::map< subdomain_id_type, std::string > & get_subdomain_name_map() const
virtual node_iterator local_nodes_end()=0
virtual void all_second_order(const bool full_ordered=true)=0
static const processor_id_type invalid_processor_id
virtual element_iterator active_local_elements_begin()=0
dof_id_type n_sub_elem() const
virtual element_iterator active_pid_elements_begin(processor_id_type proc_id)=0
virtual Elem * add_elem(Elem *e)=0
virtual element_iterator type_elements_end(ElemType type)=0
virtual void update_parallel_id_counts()=0
virtual element_iterator flagged_elements_begin(unsigned char rflag)=0
virtual element_iterator elements_end()=0
std::unique_ptr< Partitioner > _partitioner
virtual const Node * query_node_ptr(const dof_id_type i) const =0
virtual element_iterator not_active_elements_begin()=0
virtual SimpleRange< node_iterator > node_ptr_range()=0
virtual dof_id_type max_elem_id() const =0
void clear_point_locator()
virtual Node * insert_node(Node *n)=0
Used by the Mesh to keep track of boundary nodes and elements.
virtual element_iterator local_elements_end()=0
virtual element_iterator active_unpartitioned_elements_end()=0
static const dof_id_type invalid_id
virtual void delete_node(Node *n)=0
std::set< unsigned char > _elem_dims
void prepare_for_use(const bool skip_renumber_nodes_and_elements=false, const bool skip_find_neighbors=false)
std::string & subdomain_name(subdomain_id_type id)
const std::set< unsigned char > & elem_dimensions() const
virtual void write(const std::string &name)=0
void set_mesh_dimension(unsigned char d)
dof_id_type n_nodes_on_proc(const processor_id_type proc) const
virtual dof_id_type parallel_n_nodes() const =0
std::map< subdomain_id_type, std::string > & set_subdomain_name_map()
bool allow_remote_element_removal() const
virtual element_iterator not_level_elements_end(unsigned int level)=0
An object whose state is distributed along a set of processors.
virtual dof_id_type parallel_n_elem() const =0
virtual node_iterator bnd_nodes_end()=0
friend std::ostream & operator<<(std::ostream &os, const MeshBase &m)
virtual element_iterator active_elements_begin()=0
virtual element_iterator flagged_pid_elements_begin(unsigned char rflag, processor_id_type pid)=0
bool skip_partitioning() const
virtual const Node & node(const dof_id_type i) const
unsigned int n_partitions() const
virtual Node * add_node(Node *n)=0
virtual element_iterator pid_elements_begin(processor_id_type proc_id)=0
virtual element_iterator active_elements_end()=0
virtual const Elem * elem_ptr(const dof_id_type i) const =0
const_node_iterator(const IterType &d, const IterType &e, const PredType &p)
virtual Elem * insert_elem(Elem *e)=0
virtual node_iterator local_nodes_begin()=0
virtual element_iterator active_not_local_elements_end()=0
unsigned int recalculate_n_partitions()
std::set< GhostingFunctor * >::const_iterator ghosting_functors_begin() const
subdomain_id_type n_subdomains() const
virtual node_iterator nodes_end()=0
virtual element_iterator active_pid_elements_end(processor_id_type proc_id)=0
virtual bool contract()=0
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
virtual element_iterator active_unpartitioned_elements_begin()=0
virtual void renumber_elem(dof_id_type old_id, dof_id_type new_id)=0
virtual element_iterator type_elements_begin(ElemType type)=0
unsigned int spatial_dimension() const
element_iterator(const IterType &d, const IterType &e, const PredType &p)
virtual node_iterator bnd_nodes_begin()=0
virtual element_iterator evaluable_elements_end(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint)=0
virtual element_iterator semilocal_elements_end()=0
virtual bool is_replicated() const
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)
MeshBase(const Parallel::Communicator &comm_in, unsigned char dim=1)
dof_id_type n_active_sub_elem() const
unsigned int mesh_dimension() const
std::unique_ptr< GhostingFunctor > _default_ghosting
virtual element_iterator unpartitioned_elements_end()=0
unique_id_type next_unique_id()
virtual element_iterator active_not_local_elements_begin()=0
virtual void libmesh_assert_valid_parallel_ids() const
virtual const Node & node_ref(const dof_id_type i) const
virtual const Point & point(const dof_id_type i) const =0
virtual Node & node(const dof_id_type i)
const_node_iterator(const MeshBase::node_iterator &rhs)
bool allow_renumbering() const
void set_next_unique_id(unique_id_type id)
virtual element_iterator not_local_elements_begin()=0
virtual void delete_remote_elements()
void print_info(std::ostream &os=libMesh::out) const
const_element_iterator(const MeshBase::element_iterator &rhs)
virtual void update_post_partitioning()
virtual dof_id_type max_node_id() const =0
virtual dof_id_type n_elem() const =0
virtual const Node * node_ptr(const dof_id_type i) const =0
virtual element_iterator active_type_elements_end(ElemType type)=0
processor_id_type processor_id() const
std::unique_ptr< PointLocatorBase > _point_locator
virtual element_iterator local_not_level_elements_end(unsigned int level)=0
OStreamProxy out(std::cout)
virtual node_iterator pid_nodes_begin(processor_id_type proc_id)=0
virtual element_iterator active_local_elements_end()=0
bool _count_lower_dim_elems_in_point_locator
GhostingFunctor & default_ghosting()
A geometric point in (x,y,z) space.
virtual void reserve_elem(const dof_id_type ne)=0
virtual element_iterator ghost_elements_begin()=0
std::map< subdomain_id_type, std::string > _block_id_to_name
unsigned int & set_n_partitions()
virtual element_iterator subactive_elements_begin()=0
virtual void renumber_nodes_and_elements()=0
virtual dof_id_type n_nodes() const =0
virtual element_iterator active_type_elements_begin(ElemType type)=0
subdomain_id_type get_id_by_name(const std::string &name) const
std::set< GhostingFunctor * >::const_iterator ghosting_functors_end() const
void add_ghosting_functor(GhostingFunctor &ghosting_functor)
MeshBase & operator=(const MeshBase &)=delete
virtual element_iterator local_not_level_elements_begin(unsigned int level)=0
virtual element_iterator pid_elements_end(processor_id_type proc_id)=0