Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 // Local Includes
24 #include "libmesh/mapvector.h"
25 #include "libmesh/unstructured_mesh.h"
27 // C++ Includes
28 #include <cstddef>
29 #include <set>
31 namespace libMesh
32 {
34 // Forward declarations
35 class Elem;
36 class Node;
50 {
51 public:
58  explicit
59  DistributedMesh (const Parallel::Communicator & comm_in,
60  unsigned char dim=1);
72  explicit
73  DistributedMesh (unsigned char dim=1);
74 #endif
75 #endif
82  DistributedMesh (const UnstructuredMesh & other_mesh);
88  DistributedMesh (const DistributedMesh & other_mesh);
93  virtual UniquePtr<MeshBase> clone () const libmesh_override
94  { return UniquePtr<MeshBase>(new DistributedMesh(*this)); }
99  virtual ~DistributedMesh();
104  virtual void clear() libmesh_override;
111  virtual void redistribute () libmesh_override;
117  virtual void update_post_partitioning () libmesh_override;
123  virtual bool is_serial () const libmesh_override
124  { return _is_serial; }
130  virtual bool is_serial_on_zero () const libmesh_override
131  { return _is_serial || _is_serial_on_proc_0; }
137  virtual void set_distributed () libmesh_override
138  { _is_serial = false;
139  _is_serial_on_proc_0 = false; }
145  virtual bool is_replicated () const libmesh_override
146  { return false; }
153  template <typename T>
161  virtual void libmesh_assert_valid_parallel_ids() const libmesh_override;
181  template <typename T>
187  virtual void renumber_nodes_and_elements () libmesh_override;
193  virtual void allgather() libmesh_override;
199  virtual void gather_to_zero() libmesh_override;
206  virtual void delete_remote_elements() libmesh_override;
215  virtual void add_extra_ghost_elem(Elem * e);
220  virtual void clear_extra_ghost_elems() { _extra_ghost_elems.clear(); }
222  // Cached methods that can be called in serial
223  virtual dof_id_type n_nodes () const libmesh_override { return _n_nodes; }
224  virtual dof_id_type max_node_id () const libmesh_override { return _max_node_id; }
225  virtual void reserve_nodes (const dof_id_type) libmesh_override {}
226  virtual dof_id_type n_elem () const libmesh_override { return _n_elem; }
227  virtual dof_id_type n_active_elem () const libmesh_override;
228  virtual dof_id_type max_elem_id () const libmesh_override { return _max_elem_id; }
229  virtual void reserve_elem (const dof_id_type) libmesh_override {}
231  // Parallel only method to update the caches
232  virtual void update_parallel_id_counts () libmesh_override;
234  // And more parallel only methods to test non-cached values
235  virtual dof_id_type parallel_n_nodes () const libmesh_override;
237  virtual dof_id_type parallel_n_elem () const libmesh_override;
241  virtual unique_id_type parallel_max_unique_id () const libmesh_override;
242 #endif
244  virtual const Point & point (const dof_id_type i) const libmesh_override;
246  virtual const Node * node_ptr (const dof_id_type i) const libmesh_override;
247  virtual Node * node_ptr (const dof_id_type i) libmesh_override;
249  virtual const Node * query_node_ptr (const dof_id_type i) const libmesh_override;
250  virtual Node * query_node_ptr (const dof_id_type i) libmesh_override;
252  virtual const Elem * elem_ptr (const dof_id_type i) const libmesh_override;
253  virtual Elem * elem_ptr (const dof_id_type i) libmesh_override;
255  virtual const Elem * query_elem_ptr (const dof_id_type i) const libmesh_override;
256  virtual Elem * query_elem_ptr (const dof_id_type i) libmesh_override;
261  virtual Node * add_point (const Point & p,
263  const processor_id_type proc_id = DofObject::invalid_processor_id) libmesh_override;
264  virtual Node * add_node (Node * n) libmesh_override;
269  virtual Node * insert_node(Node * n) libmesh_override;
271  virtual void delete_node (Node * n) libmesh_override;
272  virtual void renumber_node (dof_id_type old_id, dof_id_type new_id) libmesh_override;
273  virtual Elem * add_elem (Elem * e) libmesh_override;
274  virtual Elem * insert_elem (Elem * e) libmesh_override;
275  virtual void delete_elem (Elem * e) libmesh_override;
276  virtual void renumber_elem (dof_id_type old_id, dof_id_type new_id) libmesh_override;
284  virtual void fix_broken_node_and_element_numbering () libmesh_override;
286 public:
290  virtual element_iterator elements_begin () libmesh_override;
291  virtual element_iterator elements_end () libmesh_override;
292  virtual const_element_iterator elements_begin() const libmesh_override;
293  virtual const_element_iterator elements_end() const libmesh_override;
294  virtual SimpleRange<element_iterator> element_ptr_range() libmesh_override { return {elements_begin(), elements_end()}; }
295  virtual SimpleRange<const_element_iterator> element_ptr_range() const libmesh_override { return {elements_begin(), elements_end()}; }
297  virtual element_iterator active_elements_begin () libmesh_override;
298  virtual element_iterator active_elements_end () libmesh_override;
299  virtual const_element_iterator active_elements_begin() const libmesh_override;
300  virtual const_element_iterator active_elements_end() const libmesh_override;
304  virtual element_iterator ancestor_elements_begin () libmesh_override;
305  virtual element_iterator ancestor_elements_end () libmesh_override;
306  virtual const_element_iterator ancestor_elements_begin() const libmesh_override;
307  virtual const_element_iterator ancestor_elements_end() const libmesh_override;
309  virtual element_iterator subactive_elements_begin () libmesh_override;
310  virtual element_iterator subactive_elements_end () libmesh_override;
311  virtual const_element_iterator subactive_elements_begin() const libmesh_override;
312  virtual const_element_iterator subactive_elements_end() const libmesh_override;
314  virtual element_iterator not_active_elements_begin () libmesh_override;
315  virtual element_iterator not_active_elements_end () libmesh_override;
316  virtual const_element_iterator not_active_elements_begin() const libmesh_override;
317  virtual const_element_iterator not_active_elements_end() const libmesh_override;
319  virtual element_iterator not_ancestor_elements_begin () libmesh_override;
320  virtual element_iterator not_ancestor_elements_end () libmesh_override;
321  virtual const_element_iterator not_ancestor_elements_begin() const libmesh_override;
322  virtual const_element_iterator not_ancestor_elements_end() const libmesh_override;
324  virtual element_iterator not_subactive_elements_begin () libmesh_override;
325  virtual element_iterator not_subactive_elements_end () libmesh_override;
326  virtual const_element_iterator not_subactive_elements_begin() const libmesh_override;
327  virtual const_element_iterator not_subactive_elements_end() const libmesh_override;
329  virtual element_iterator local_elements_begin () libmesh_override;
330  virtual element_iterator local_elements_end () libmesh_override;
331  virtual const_element_iterator local_elements_begin () const libmesh_override;
332  virtual const_element_iterator local_elements_end () const libmesh_override;
334  virtual element_iterator semilocal_elements_begin () libmesh_override;
335  virtual element_iterator semilocal_elements_end () libmesh_override;
336  virtual const_element_iterator semilocal_elements_begin () const libmesh_override;
337  virtual const_element_iterator semilocal_elements_end () const libmesh_override;
339  virtual element_iterator active_semilocal_elements_begin () libmesh_override;
340  virtual element_iterator active_semilocal_elements_end () libmesh_override;
341  virtual const_element_iterator active_semilocal_elements_begin () const libmesh_override;
342  virtual const_element_iterator active_semilocal_elements_end () const libmesh_override;
344  virtual element_iterator facelocal_elements_begin () libmesh_override;
345  virtual element_iterator facelocal_elements_end () libmesh_override;
346  virtual const_element_iterator facelocal_elements_begin () const libmesh_override;
347  virtual const_element_iterator facelocal_elements_end () const libmesh_override;
349  virtual element_iterator not_local_elements_begin () libmesh_override;
350  virtual element_iterator not_local_elements_end () libmesh_override;
351  virtual const_element_iterator not_local_elements_begin () const libmesh_override;
352  virtual const_element_iterator not_local_elements_end () const libmesh_override;
354  virtual element_iterator active_local_elements_begin () libmesh_override;
355  virtual element_iterator active_local_elements_end () libmesh_override;
356  virtual const_element_iterator active_local_elements_begin () const libmesh_override;
357  virtual const_element_iterator active_local_elements_end () const libmesh_override;
361  virtual element_iterator active_not_local_elements_begin () libmesh_override;
362  virtual element_iterator active_not_local_elements_end () libmesh_override;
363  virtual const_element_iterator active_not_local_elements_begin () const libmesh_override;
364  virtual const_element_iterator active_not_local_elements_end () const libmesh_override;
366  virtual element_iterator level_elements_begin (unsigned int level) libmesh_override;
367  virtual element_iterator level_elements_end (unsigned int level) libmesh_override;
368  virtual const_element_iterator level_elements_begin (unsigned int level) const libmesh_override;
369  virtual const_element_iterator level_elements_end (unsigned int level) const libmesh_override;
371  virtual element_iterator not_level_elements_begin (unsigned int level) libmesh_override;
372  virtual element_iterator not_level_elements_end (unsigned int level) libmesh_override;
373  virtual const_element_iterator not_level_elements_begin (unsigned int level) const libmesh_override;
374  virtual const_element_iterator not_level_elements_end (unsigned int level) const libmesh_override;
376  virtual element_iterator local_level_elements_begin (unsigned int level) libmesh_override;
377  virtual element_iterator local_level_elements_end (unsigned int level) libmesh_override;
378  virtual const_element_iterator local_level_elements_begin (unsigned int level) const libmesh_override;
379  virtual const_element_iterator local_level_elements_end (unsigned int level) const libmesh_override;
381  virtual element_iterator local_not_level_elements_begin (unsigned int level) libmesh_override;
382  virtual element_iterator local_not_level_elements_end (unsigned int level) libmesh_override;
383  virtual const_element_iterator local_not_level_elements_begin (unsigned int level) const libmesh_override;
384  virtual const_element_iterator local_not_level_elements_end (unsigned int level) const libmesh_override;
386  virtual element_iterator pid_elements_begin (processor_id_type proc_id) libmesh_override;
387  virtual element_iterator pid_elements_end (processor_id_type proc_id) libmesh_override;
388  virtual const_element_iterator pid_elements_begin (processor_id_type proc_id) const libmesh_override;
389  virtual const_element_iterator pid_elements_end (processor_id_type proc_id) const libmesh_override;
391  virtual element_iterator type_elements_begin (ElemType type) libmesh_override;
392  virtual element_iterator type_elements_end (ElemType type) libmesh_override;
393  virtual const_element_iterator type_elements_begin (ElemType type) const libmesh_override;
394  virtual const_element_iterator type_elements_end (ElemType type) const libmesh_override;
396  virtual element_iterator active_type_elements_begin (ElemType type) libmesh_override;
397  virtual element_iterator active_type_elements_end (ElemType type) libmesh_override;
398  virtual const_element_iterator active_type_elements_begin (ElemType type) const libmesh_override;
399  virtual const_element_iterator active_type_elements_end (ElemType type) const libmesh_override;
401  virtual element_iterator active_pid_elements_begin (processor_id_type proc_id) libmesh_override;
402  virtual element_iterator active_pid_elements_end (processor_id_type proc_id) libmesh_override;
403  virtual const_element_iterator active_pid_elements_begin (processor_id_type proc_id) const libmesh_override;
404  virtual const_element_iterator active_pid_elements_end (processor_id_type proc_id) const libmesh_override;
406  virtual element_iterator unpartitioned_elements_begin () libmesh_override;
407  virtual element_iterator unpartitioned_elements_end () libmesh_override;
408  virtual const_element_iterator unpartitioned_elements_begin () const libmesh_override;
409  virtual const_element_iterator unpartitioned_elements_end () const libmesh_override;
411  virtual element_iterator active_unpartitioned_elements_begin () libmesh_override;
412  virtual element_iterator active_unpartitioned_elements_end () libmesh_override;
413  virtual const_element_iterator active_unpartitioned_elements_begin () const libmesh_override;
414  virtual const_element_iterator active_unpartitioned_elements_end () const libmesh_override;
416  virtual element_iterator active_local_subdomain_elements_begin (subdomain_id_type subdomain_id) libmesh_override;
417  virtual element_iterator active_local_subdomain_elements_end (subdomain_id_type subdomain_id) libmesh_override;
418  virtual const_element_iterator active_local_subdomain_elements_begin (subdomain_id_type subdomain_id) const libmesh_override;
419  virtual const_element_iterator active_local_subdomain_elements_end (subdomain_id_type subdomain_id) const libmesh_override;
421  virtual element_iterator active_subdomain_elements_begin (subdomain_id_type subdomain_id) libmesh_override;
422  virtual element_iterator active_subdomain_elements_end (subdomain_id_type subdomain_id) libmesh_override;
423  virtual const_element_iterator active_subdomain_elements_begin (subdomain_id_type subdomain_id) const libmesh_override;
424  virtual const_element_iterator active_subdomain_elements_end (subdomain_id_type subdomain_id) const libmesh_override;
426  virtual element_iterator active_subdomain_set_elements_begin (std::set<subdomain_id_type> ss) libmesh_override;
427  virtual element_iterator active_subdomain_set_elements_end (std::set<subdomain_id_type> ss) libmesh_override;
428  virtual const_element_iterator active_subdomain_set_elements_begin (std::set<subdomain_id_type> ss) const libmesh_override;
429  virtual const_element_iterator active_subdomain_set_elements_end (std::set<subdomain_id_type> ss) const libmesh_override;
431  virtual element_iterator ghost_elements_begin () libmesh_override;
432  virtual element_iterator ghost_elements_end () libmesh_override;
433  virtual const_element_iterator ghost_elements_begin () const libmesh_override;
434  virtual const_element_iterator ghost_elements_end () const libmesh_override;
436  virtual element_iterator
437  evaluable_elements_begin (const DofMap & dof_map,
438  unsigned int var_num = libMesh::invalid_uint) libmesh_override;
440  virtual element_iterator
441  evaluable_elements_end (const DofMap & dof_map,
442  unsigned int var_num = libMesh::invalid_uint) libmesh_override;
444  virtual const_element_iterator
445  evaluable_elements_begin (const DofMap & dof_map,
446  unsigned int var_num = libMesh::invalid_uint) const libmesh_override;
448  virtual const_element_iterator
449  evaluable_elements_end (const DofMap & dof_map,
450  unsigned int var_num = libMesh::invalid_uint) const libmesh_override;
453  virtual element_iterator flagged_elements_begin (unsigned char rflag) libmesh_override;
454  virtual element_iterator flagged_elements_end (unsigned char rflag) libmesh_override;
455  virtual const_element_iterator flagged_elements_begin (unsigned char rflag) const libmesh_override;
456  virtual const_element_iterator flagged_elements_end (unsigned char rflag) const libmesh_override;
458  virtual element_iterator flagged_pid_elements_begin (unsigned char rflag,
459  processor_id_type pid) libmesh_override;
460  virtual element_iterator flagged_pid_elements_end (unsigned char rflag,
461  processor_id_type pid) libmesh_override;
462  virtual const_element_iterator flagged_pid_elements_begin (unsigned char rflag,
463  processor_id_type pid) const libmesh_override;
464  virtual const_element_iterator flagged_pid_elements_end (unsigned char rflag,
465  processor_id_type pid) const libmesh_override;
466 #endif // LIBMESH_ENABLE_AMR
471  virtual node_iterator nodes_begin () libmesh_override;
472  virtual node_iterator nodes_end () libmesh_override;
473  virtual const_node_iterator nodes_begin () const libmesh_override;
474  virtual const_node_iterator nodes_end () const libmesh_override;
475  virtual SimpleRange<node_iterator> node_ptr_range() libmesh_override { return {nodes_begin(), nodes_end()}; }
476  virtual SimpleRange<const_node_iterator> node_ptr_range() const libmesh_override { return {nodes_begin(), nodes_end()}; }
478  virtual node_iterator active_nodes_begin () libmesh_override;
479  virtual node_iterator active_nodes_end () libmesh_override;
480  virtual const_node_iterator active_nodes_begin () const libmesh_override;
481  virtual const_node_iterator active_nodes_end () const libmesh_override;
483  virtual node_iterator local_nodes_begin () libmesh_override;
484  virtual node_iterator local_nodes_end () libmesh_override;
485  virtual const_node_iterator local_nodes_begin () const libmesh_override;
486  virtual const_node_iterator local_nodes_end () const libmesh_override;
490  virtual node_iterator pid_nodes_begin (processor_id_type proc_id) libmesh_override;
491  virtual node_iterator pid_nodes_end (processor_id_type proc_id) libmesh_override;
492  virtual const_node_iterator pid_nodes_begin (processor_id_type proc_id) const libmesh_override;
493  virtual const_node_iterator pid_nodes_end (processor_id_type proc_id) const libmesh_override;
495  virtual node_iterator bid_nodes_begin (boundary_id_type bndry_id) libmesh_override;
496  virtual node_iterator bid_nodes_end (boundary_id_type bndry_id) libmesh_override;
497  virtual const_node_iterator bid_nodes_begin (boundary_id_type bndry_id) const libmesh_override;
498  virtual const_node_iterator bid_nodes_end (boundary_id_type bndry_id) const libmesh_override;
500  virtual node_iterator bnd_nodes_begin () libmesh_override;
501  virtual node_iterator bnd_nodes_end () libmesh_override;
502  virtual const_node_iterator bnd_nodes_begin () const libmesh_override;
503  virtual const_node_iterator bnd_nodes_end () const libmesh_override;
505  virtual node_iterator
506  evaluable_nodes_begin (const DofMap & dof_map,
507  unsigned int var_num = libMesh::invalid_uint) libmesh_override;
508  virtual node_iterator
509  evaluable_nodes_end (const DofMap & dof_map,
510  unsigned int var_num = libMesh::invalid_uint) libmesh_override;
511  virtual const_node_iterator
512  evaluable_nodes_begin (const DofMap & dof_map,
513  unsigned int var_num = libMesh::invalid_uint) const libmesh_override;
514  virtual const_node_iterator
515  evaluable_nodes_end (const DofMap & dof_map,
516  unsigned int var_num = libMesh::invalid_uint) const libmesh_override;
519 protected:
560 #endif
566  std::set<Elem *> _extra_ghost_elems;
568 private:
583 };
586 } // namespace libMesh
virtual const Node * query_node_ptr(const dof_id_type i) const libmesh_override
virtual const Elem * elem_ptr(const dof_id_type i) const libmesh_override
The definition of the element_iterator struct.
Definition: mesh_base.h:1476
This mapvector templated class is intended to provide the performance characteristics of a std::map w...
Definition: mapvector.h:39
virtual element_iterator active_semilocal_elements_end() libmesh_override
virtual element_iterator active_local_elements_begin() libmesh_override
virtual element_iterator ghost_elements_begin() libmesh_override
Iterate over "ghost" elements in the Mesh.
virtual element_iterator flagged_elements_end(unsigned char rflag) libmesh_override
The SimpleRange templated class is intended to make it easy to construct ranges from pairs of iterato...
Definition: simple_range.h:36
virtual element_iterator evaluable_elements_end(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) libmesh_override
mapvector< Elem *, dof_id_type > _elements
The elements in the mesh.
virtual element_iterator subactive_elements_begin() libmesh_override
Iterate over elements for which elem->subactive() is true.
virtual element_iterator evaluable_elements_begin(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) libmesh_override
Iterate over elements in the Mesh where the solution (as distributed by the given DofMap) can be eval...
A Node is like a Point, but with more information.
Definition: node.h:52
Encapsulates the MPI_Comm object.
Definition: parallel.h:657
virtual SimpleRange< element_iterator > element_ptr_range() libmesh_override
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:184
virtual dof_id_type n_elem() const libmesh_override
virtual element_iterator active_unpartitioned_elements_end() libmesh_override
virtual element_iterator active_subdomain_set_elements_end(std::set< subdomain_id_type > ss) libmesh_override
virtual element_iterator facelocal_elements_end() libmesh_override
virtual node_iterator bid_nodes_end(boundary_id_type bndry_id) libmesh_override
virtual element_iterator active_type_elements_begin(ElemType type) libmesh_override
virtual element_iterator not_subactive_elements_end() libmesh_override
The definition of the const_element_iterator struct.
Definition: mesh_base.h:1494
virtual UniquePtr< MeshBase > clone() const libmesh_override
Virtual copy-constructor, creates a copy of this mesh.
unsigned int dim
virtual element_iterator ghost_elements_end() libmesh_override
bool _is_serial_on_proc_0
A boolean remembering whether we&#39;re serialized to proc 0 or not.
virtual element_iterator not_local_elements_begin() libmesh_override
dof_id_type _n_nodes
Cached data from the last renumber_nodes_and_elements call.
Defines an enum for geometric element types.
virtual void reserve_elem(const dof_id_type) libmesh_override
Reserves space for a known number of elements.
virtual SimpleRange< element_iterator > active_local_element_ptr_range() libmesh_override
virtual element_iterator unpartitioned_elements_begin() libmesh_override
Iterate over unpartitioned elements in the Mesh.
virtual element_iterator active_semilocal_elements_begin() libmesh_override
dof_id_type _next_free_local_node_id
Guaranteed globally unused IDs for use when adding new nodes or elements.
virtual SimpleRange< node_iterator > local_node_ptr_range() libmesh_override
This is the base class from which all geometric element types are derived.
Definition: elem.h:89
uint8_t processor_id_type
Definition: id_types.h:99
virtual void redistribute() libmesh_override
Redistribute elements between processors.
virtual element_iterator active_local_elements_end() libmesh_override
virtual element_iterator active_subdomain_elements_begin(subdomain_id_type subdomain_id) libmesh_override
bool _is_serial
A boolean remembering whether we&#39;re serialized or not.
virtual element_iterator ancestor_elements_begin() libmesh_override
Iterate over elements for which elem->ancestor() is true.
virtual element_iterator not_level_elements_end(unsigned int level) libmesh_override
dof_id_type parallel_max_elem_id() const
virtual SimpleRange< const_element_iterator > element_ptr_range() const libmesh_override
virtual element_iterator active_subdomain_set_elements_begin(std::set< subdomain_id_type > ss) libmesh_override
virtual element_iterator ancestor_elements_end() libmesh_override
virtual SimpleRange< const_node_iterator > local_node_ptr_range() const libmesh_override
The libMesh namespace provides an interface to certain functionality in the library.
virtual void reserve_nodes(const dof_id_type) libmesh_override
Reserves space for a known number of nodes.
virtual void gather_to_zero() libmesh_override
Gathers all elements and nodes of the mesh onto processor zero.
virtual void add_extra_ghost_elem(Elem *e)
Inserts the element and adds it to a list of elements that should not get deleted or have their desce...
virtual node_iterator local_nodes_end() libmesh_override
mapvector< Node *, dof_id_type >::veclike_iterator node_iterator_imp
Typedefs for the container implementation.
virtual bool is_replicated() const libmesh_override
virtual element_iterator active_unpartitioned_elements_begin() libmesh_override
Iterate over active unpartitioned elements in the Mesh.
virtual element_iterator flagged_pid_elements_end(unsigned char rflag, processor_id_type pid) libmesh_override
virtual node_iterator nodes_end() libmesh_override
void libmesh_assert_valid_parallel_flags() const
Verify refinement_flag and p_refinement_flag consistency of our elements containers.
virtual element_iterator unpartitioned_elements_end() libmesh_override
virtual Node * insert_node(Node *n) libmesh_override
Calls add_node().
virtual element_iterator level_elements_end(unsigned int level) libmesh_override
virtual const Point & point(const dof_id_type i) const libmesh_override
virtual void update_parallel_id_counts() libmesh_override
Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors...
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
virtual element_iterator not_ancestor_elements_begin() libmesh_override
virtual element_iterator flagged_elements_begin(unsigned char rflag) libmesh_override
Iterate over all elements with a specified refinement flag.
dof_id_type parallel_max_node_id() const
This class handles the numbering of degrees of freedom on a mesh.
Definition: dof_map.h:167
virtual node_iterator bnd_nodes_begin() libmesh_override
Iterate over nodes for which BoundaryInfo::n_boundary_ids(node) > 0.
virtual element_iterator level_elements_begin(unsigned int level) libmesh_override
Iterate over elements of a given level.
virtual void fix_broken_node_and_element_numbering() libmesh_override
There is no reason for a user to ever call this function.
virtual Node * add_node(Node *n) libmesh_override
Add Node n to the end of the vertex array.
dof_id_type renumber_dof_objects(mapvector< T *, dof_id_type > &)
Renumber a parallel objects container.
virtual element_iterator type_elements_begin(ElemType type) libmesh_override
Iterate over all elements with a specified geometric type.
virtual element_iterator local_elements_end() libmesh_override
virtual element_iterator active_subdomain_elements_end(subdomain_id_type subdomain_id) libmesh_override
virtual element_iterator type_elements_end(ElemType type) libmesh_override
virtual void set_distributed() libmesh_override
Asserts that not all elements and nodes of the mesh necessarily exist on the current processor...
int8_t boundary_id_type
Definition: id_types.h:51
mapvector< Node *, dof_id_type > _nodes
The vertices (spatial coordinates) of the mesh.
virtual dof_id_type n_active_elem() const libmesh_override
virtual element_iterator active_local_subdomain_elements_begin(subdomain_id_type subdomain_id) libmesh_override
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
std::set< Elem * > _extra_ghost_elems
These are extra ghost elements that we want to make sure not to delete when we call delete_remote_ele...
The UnstructuredMesh class is derived from the MeshBase class.
virtual element_iterator not_active_elements_end() libmesh_override
virtual element_iterator not_subactive_elements_begin() libmesh_override
virtual const Elem * query_elem_ptr(const dof_id_type i) const libmesh_override
virtual dof_id_type n_nodes() const libmesh_override
mapvector< Node *, dof_id_type >::const_veclike_iterator const_node_iterator_imp
virtual element_iterator semilocal_elements_begin() libmesh_override
Iterate over elements for which elem->is_semilocal() is true for the current processor.
virtual node_iterator active_nodes_begin() libmesh_override
Iterate over only the active nodes in the Mesh.
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:324
virtual dof_id_type max_node_id() const libmesh_override
virtual element_iterator local_level_elements_end(unsigned int level) libmesh_override
virtual bool is_serial() const libmesh_override
virtual void clear_extra_ghost_elems()
Clears extra ghost elements.
virtual const Node * node_ptr(const dof_id_type i) const libmesh_override
virtual element_iterator local_not_level_elements_end(unsigned int level) libmesh_override
virtual node_iterator bnd_nodes_end() libmesh_override
virtual element_iterator pid_elements_end(processor_id_type proc_id) libmesh_override
virtual node_iterator active_nodes_end() libmesh_override
virtual element_iterator not_level_elements_begin(unsigned int level) libmesh_override
virtual ~DistributedMesh()
The DistributedMesh class is derived from the MeshBase class, and is intended to provide identical fu...
virtual element_iterator not_active_elements_begin() libmesh_override
virtual element_iterator active_not_local_elements_end() libmesh_override
dof_id_type _next_free_unpartitioned_node_id
virtual node_iterator nodes_begin() libmesh_override
Node iterator accessor functions.
virtual element_iterator not_ancestor_elements_end() libmesh_override
virtual SimpleRange< const_element_iterator > active_local_element_ptr_range() const libmesh_override
virtual Elem * insert_elem(Elem *e) libmesh_override
Insert elem e to the element array, preserving its id and replacing/deleting any existing element wit...
virtual void allgather() libmesh_override
Gathers all elements and nodes of the mesh onto every processor.
virtual Elem * add_elem(Elem *e) libmesh_override
Add elem e to the end of the element array.
The definition of the node_iterator struct.
Definition: mesh_base.h:1528
virtual void renumber_nodes_and_elements() libmesh_override
Remove NULL elements from arrays.
virtual node_iterator bid_nodes_begin(boundary_id_type bndry_id) libmesh_override
Iterate over nodes for which BoundaryInfo::has_boundary_id(node, bndry_id) is true.
virtual element_iterator active_pid_elements_begin(processor_id_type proc_id) libmesh_override
virtual element_iterator active_elements_begin() libmesh_override
Active, local, and negation forms of the element iterators described above.
virtual void renumber_node(dof_id_type old_id, dof_id_type new_id) libmesh_override
Changes the id of node old_id, both by changing node(old_id)->id() and by moving node(old_id) in the ...
void libmesh_assert_valid_parallel_p_levels() const
Verify p_level consistency of our elements containers.
virtual node_iterator pid_nodes_end(processor_id_type proc_id) libmesh_override
virtual SimpleRange< node_iterator > node_ptr_range() libmesh_override
dof_id_type _next_free_unpartitioned_elem_id
virtual dof_id_type parallel_n_nodes() const libmesh_override
DistributedMesh(const Parallel::Communicator &comm_in, unsigned char dim=1)
virtual void renumber_elem(dof_id_type old_id, dof_id_type new_id) libmesh_override
Changes the id of element old_id, both by changing elem(old_id)->id() and by moving elem(old_id) in t...
The definition of the const_node_iterator struct.
Definition: mesh_base.h:1548
virtual void update_post_partitioning() libmesh_override
Recalculate cached data after elements and nodes have been repartitioned.
virtual element_iterator facelocal_elements_begin() libmesh_override
Iterate over elements which are on or have a neighbor on the current processor.
virtual SimpleRange< element_iterator > active_element_ptr_range() libmesh_override
void libmesh_assert_valid_parallel_object_ids(const mapvector< T *, dof_id_type > &) const
Verify id, processor_id, and if applicable unique_id consistency of a parallel objects container...
virtual element_iterator flagged_pid_elements_begin(unsigned char rflag, processor_id_type pid) libmesh_override
Iterate over all elements with a specified refinement flag on a specified processor.
virtual element_iterator active_local_subdomain_elements_end(subdomain_id_type subdomain_id) libmesh_override
unique_id_type _next_unpartitioned_unique_id
The next available unique id for assigning ids to unpartitioned DOF objects.
virtual SimpleRange< const_element_iterator > active_element_ptr_range() const libmesh_override
virtual SimpleRange< const_node_iterator > node_ptr_range() const libmesh_override
mapvector< Elem *, dof_id_type >::const_veclike_iterator const_elem_iterator_imp
virtual node_iterator evaluable_nodes_begin(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) libmesh_override
Iterate over nodes in the Mesh where the solution (as distributed by the given DofMap) can be evaluat...
virtual element_iterator local_elements_begin() libmesh_override
virtual bool is_serial_on_zero() const libmesh_override
mapvector< Elem *, dof_id_type >::veclike_iterator elem_iterator_imp
Typedefs for the container implementation.
virtual element_iterator active_not_local_elements_begin() libmesh_override
virtual element_iterator semilocal_elements_end() libmesh_override
virtual dof_id_type parallel_n_elem() const libmesh_override
virtual element_iterator elements_begin() libmesh_override
Elem iterator accessor functions.
dof_id_type _next_free_local_elem_id
virtual element_iterator subactive_elements_end() libmesh_override
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
virtual element_iterator active_type_elements_end(ElemType type) libmesh_override
uint8_t unique_id_type
Definition: id_types.h:79
virtual void delete_elem(Elem *e) libmesh_override
Removes element e from the mesh.
virtual node_iterator pid_nodes_begin(processor_id_type proc_id) libmesh_override
Iterate over nodes with processor_id() == proc_id.
virtual element_iterator pid_elements_begin(processor_id_type proc_id) libmesh_override
Iterate over all elements with a specified processor id.
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) libmesh_override
functions for adding /deleting nodes elements.
virtual dof_id_type max_elem_id() const libmesh_override
virtual element_iterator active_elements_end() libmesh_override
virtual void clear() libmesh_override
Clear all internal data.
virtual unique_id_type parallel_max_unique_id() const libmesh_override
virtual node_iterator local_nodes_begin() libmesh_override
Iterate over local nodes (nodes whose processor_id() matches the current processor).
virtual node_iterator evaluable_nodes_end(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) libmesh_override
virtual element_iterator local_not_level_elements_begin(unsigned int level) libmesh_override
virtual element_iterator not_local_elements_end() libmesh_override
uint8_t dof_id_type
Definition: id_types.h:64
virtual void libmesh_assert_valid_parallel_ids() const libmesh_override
Verify id and processor_id consistency of our elements and nodes containers.
virtual element_iterator active_pid_elements_end(processor_id_type proc_id) libmesh_override
virtual void delete_node(Node *n) libmesh_override
Removes the Node n from the mesh.
virtual element_iterator elements_end() libmesh_override
virtual element_iterator local_level_elements_begin(unsigned int level) libmesh_override
virtual void delete_remote_elements() libmesh_override
Deletes all nonlocal elements of the mesh except for "ghosts" which touch a local element...