libMesh
replicated_mesh.h
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
3 
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.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
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
17 
18 
19 
20 #ifndef LIBMESH_REPLICATED_MESH_H
21 #define LIBMESH_REPLICATED_MESH_H
22 
23 // Local Includes
24 #include "libmesh/unstructured_mesh.h"
25 #include "libmesh/boundary_info.h"
26 
27 // C++ Includes
28 #include <cstddef>
29 
30 namespace libMesh
31 {
32 
46 {
47 public:
48 
54  explicit
55  ReplicatedMesh (const Parallel::Communicator & comm_in,
56  unsigned char dim=1);
57 
58 #ifndef LIBMESH_DISABLE_COMMWORLD
59 
67 #ifdef LIBMESH_ENABLE_DEPRECATED
68  explicit
69  ReplicatedMesh (unsigned char dim=1);
70 #endif
71 #endif
72 
73 
78  ReplicatedMesh (const UnstructuredMesh & other_mesh);
79 
84  ReplicatedMesh (const ReplicatedMesh & other_mesh);
85 
89  virtual UniquePtr<MeshBase> clone () const libmesh_override
90  { return UniquePtr<MeshBase>(new ReplicatedMesh(*this)); }
91 
95  virtual ~ReplicatedMesh();
96 
100  virtual void clear() libmesh_override;
101 
105  virtual void renumber_nodes_and_elements () libmesh_override;
106 
107  virtual dof_id_type n_nodes () const libmesh_override
108  { return cast_int<dof_id_type>(_nodes.size()); }
109 
110  virtual dof_id_type parallel_n_nodes () const libmesh_override
111  { return cast_int<dof_id_type>(_nodes.size()); }
112 
113  virtual dof_id_type max_node_id () const libmesh_override
114  { return cast_int<dof_id_type>(_nodes.size()); }
115 
116  virtual void reserve_nodes (const dof_id_type nn) libmesh_override
117  { _nodes.reserve (nn); }
118 
119  virtual dof_id_type n_elem () const libmesh_override
120  { return cast_int<dof_id_type>(_elements.size()); }
121 
122  virtual dof_id_type parallel_n_elem () const libmesh_override
123  { return cast_int<dof_id_type>(_elements.size()); }
124 
125  virtual dof_id_type n_active_elem () const libmesh_override;
126 
127  virtual dof_id_type max_elem_id () const libmesh_override
128  { return cast_int<dof_id_type>(_elements.size()); }
129 
130 #ifdef LIBMESH_ENABLE_UNIQUE_ID
131  virtual unique_id_type parallel_max_unique_id () const libmesh_override;
132 #endif
133 
134  virtual void reserve_elem (const dof_id_type ne) libmesh_override
135  { _elements.reserve (ne); }
136 
137  virtual void update_parallel_id_counts () libmesh_override;
138 
139  virtual const Point & point (const dof_id_type i) const libmesh_override;
140 
141  virtual const Node * node_ptr (const dof_id_type i) const libmesh_override;
142  virtual Node * node_ptr (const dof_id_type i) libmesh_override;
143 
144  virtual const Node * query_node_ptr (const dof_id_type i) const libmesh_override;
145  virtual Node * query_node_ptr (const dof_id_type i) libmesh_override;
146 
147  virtual const Elem * elem_ptr (const dof_id_type i) const libmesh_override;
148  virtual Elem * elem_ptr (const dof_id_type i) libmesh_override;
149 
150  virtual const Elem * query_elem_ptr (const dof_id_type i) const libmesh_override;
151  virtual Elem * query_elem_ptr (const dof_id_type i) libmesh_override;
152 
156  virtual Node * add_point (const Point & p,
158  const processor_id_type proc_id = DofObject::invalid_processor_id) libmesh_override;
159  virtual Node * add_node (Node * n) libmesh_override;
160 
172  virtual Node * insert_node(Node * n) libmesh_override;
173 
174  virtual void delete_node (Node * n) libmesh_override;
175  virtual void renumber_node (dof_id_type old_id, dof_id_type new_id) libmesh_override;
176  virtual Elem * add_elem (Elem * e) libmesh_override;
177  virtual Elem * insert_elem (Elem * e) libmesh_override;
178  virtual void delete_elem (Elem * e) libmesh_override;
179  virtual void renumber_elem (dof_id_type old_id, dof_id_type new_id) libmesh_override;
180 
187  virtual void fix_broken_node_and_element_numbering () libmesh_override;
188 
207  void stitch_meshes (ReplicatedMesh & other_mesh,
208  boundary_id_type this_mesh_boundary,
209  boundary_id_type other_mesh_boundary,
210  Real tol=TOLERANCE,
211  bool clear_stitched_boundary_ids=false,
212  bool verbose=true,
213  bool use_binary_search=true,
214  bool enforce_all_nodes_match_on_boundaries=false);
215 
219  void stitch_surfaces (boundary_id_type boundary_id_1,
220  boundary_id_type boundary_id_2,
221  Real tol=TOLERANCE,
222  bool clear_stitched_boundary_ids=false,
223  bool verbose=true,
224  bool use_binary_search=true,
225  bool enforce_all_nodes_match_on_boundaries=false);
226 
227 public:
231  virtual element_iterator elements_begin () libmesh_override;
232  virtual element_iterator elements_end () libmesh_override;
233  virtual const_element_iterator elements_begin() const libmesh_override;
234  virtual const_element_iterator elements_end() const libmesh_override;
235  virtual SimpleRange<element_iterator> element_ptr_range() libmesh_override { return {elements_begin(), elements_end()}; }
236  virtual SimpleRange<const_element_iterator> element_ptr_range() const libmesh_override { return {elements_begin(), elements_end()}; }
237 
238  virtual element_iterator active_elements_begin () libmesh_override;
239  virtual element_iterator active_elements_end () libmesh_override;
240  virtual const_element_iterator active_elements_begin() const libmesh_override;
241  virtual const_element_iterator active_elements_end() const libmesh_override;
244 
245  virtual element_iterator ancestor_elements_begin () libmesh_override;
246  virtual element_iterator ancestor_elements_end () libmesh_override;
247  virtual const_element_iterator ancestor_elements_begin() const libmesh_override;
248  virtual const_element_iterator ancestor_elements_end() const libmesh_override;
249 
250  virtual element_iterator subactive_elements_begin () libmesh_override;
251  virtual element_iterator subactive_elements_end () libmesh_override;
252  virtual const_element_iterator subactive_elements_begin() const libmesh_override;
253  virtual const_element_iterator subactive_elements_end() const libmesh_override;
254 
255  virtual element_iterator not_active_elements_begin () libmesh_override;
256  virtual element_iterator not_active_elements_end () libmesh_override;
257  virtual const_element_iterator not_active_elements_begin() const libmesh_override;
258  virtual const_element_iterator not_active_elements_end() const libmesh_override;
259 
260  virtual element_iterator not_ancestor_elements_begin () libmesh_override;
261  virtual element_iterator not_ancestor_elements_end () libmesh_override;
262  virtual const_element_iterator not_ancestor_elements_begin() const libmesh_override;
263  virtual const_element_iterator not_ancestor_elements_end() const libmesh_override;
264 
265  virtual element_iterator not_subactive_elements_begin () libmesh_override;
266  virtual element_iterator not_subactive_elements_end () libmesh_override;
267  virtual const_element_iterator not_subactive_elements_begin() const libmesh_override;
268  virtual const_element_iterator not_subactive_elements_end() const libmesh_override;
269 
270  virtual element_iterator local_elements_begin () libmesh_override;
271  virtual element_iterator local_elements_end () libmesh_override;
272  virtual const_element_iterator local_elements_begin () const libmesh_override;
273  virtual const_element_iterator local_elements_end () const libmesh_override;
274 
275  virtual element_iterator semilocal_elements_begin () libmesh_override;
276  virtual element_iterator semilocal_elements_end () libmesh_override;
277  virtual const_element_iterator semilocal_elements_begin () const libmesh_override;
278  virtual const_element_iterator semilocal_elements_end () const libmesh_override;
279 
280  virtual element_iterator active_semilocal_elements_begin () libmesh_override;
281  virtual element_iterator active_semilocal_elements_end () libmesh_override;
282  virtual const_element_iterator active_semilocal_elements_begin () const libmesh_override;
283  virtual const_element_iterator active_semilocal_elements_end () const libmesh_override;
284 
285  virtual element_iterator facelocal_elements_begin () libmesh_override;
286  virtual element_iterator facelocal_elements_end () libmesh_override;
287  virtual const_element_iterator facelocal_elements_begin () const libmesh_override;
288  virtual const_element_iterator facelocal_elements_end () const libmesh_override;
289 
290  virtual element_iterator not_local_elements_begin () libmesh_override;
291  virtual element_iterator not_local_elements_end () libmesh_override;
292  virtual const_element_iterator not_local_elements_begin () const libmesh_override;
293  virtual const_element_iterator not_local_elements_end () const libmesh_override;
294 
295  virtual element_iterator active_local_elements_begin () libmesh_override;
296  virtual element_iterator active_local_elements_end () libmesh_override;
297  virtual const_element_iterator active_local_elements_begin () const libmesh_override;
298  virtual const_element_iterator active_local_elements_end () const libmesh_override;
301 
302  virtual element_iterator active_not_local_elements_begin () libmesh_override;
303  virtual element_iterator active_not_local_elements_end () libmesh_override;
304  virtual const_element_iterator active_not_local_elements_begin () const libmesh_override;
305  virtual const_element_iterator active_not_local_elements_end () const libmesh_override;
306 
307  virtual element_iterator level_elements_begin (unsigned int level) libmesh_override;
308  virtual element_iterator level_elements_end (unsigned int level) libmesh_override;
309  virtual const_element_iterator level_elements_begin (unsigned int level) const libmesh_override;
310  virtual const_element_iterator level_elements_end (unsigned int level) const libmesh_override;
311 
312  virtual element_iterator not_level_elements_begin (unsigned int level) libmesh_override;
313  virtual element_iterator not_level_elements_end (unsigned int level) libmesh_override;
314  virtual const_element_iterator not_level_elements_begin (unsigned int level) const libmesh_override;
315  virtual const_element_iterator not_level_elements_end (unsigned int level) const libmesh_override;
316 
317  virtual element_iterator local_level_elements_begin (unsigned int level) libmesh_override;
318  virtual element_iterator local_level_elements_end (unsigned int level) libmesh_override;
319  virtual const_element_iterator local_level_elements_begin (unsigned int level) const libmesh_override;
320  virtual const_element_iterator local_level_elements_end (unsigned int level) const libmesh_override;
321 
322  virtual element_iterator local_not_level_elements_begin (unsigned int level) libmesh_override;
323  virtual element_iterator local_not_level_elements_end (unsigned int level) libmesh_override;
324  virtual const_element_iterator local_not_level_elements_begin (unsigned int level) const libmesh_override;
325  virtual const_element_iterator local_not_level_elements_end (unsigned int level) const libmesh_override;
326 
327  virtual element_iterator pid_elements_begin (processor_id_type proc_id) libmesh_override;
328  virtual element_iterator pid_elements_end (processor_id_type proc_id) libmesh_override;
329  virtual const_element_iterator pid_elements_begin (processor_id_type proc_id) const libmesh_override;
330  virtual const_element_iterator pid_elements_end (processor_id_type proc_id) const libmesh_override;
331 
332  virtual element_iterator type_elements_begin (ElemType type) libmesh_override;
333  virtual element_iterator type_elements_end (ElemType type) libmesh_override;
334  virtual const_element_iterator type_elements_begin (ElemType type) const libmesh_override;
335  virtual const_element_iterator type_elements_end (ElemType type) const libmesh_override;
336 
337  virtual element_iterator active_type_elements_begin (ElemType type) libmesh_override;
338  virtual element_iterator active_type_elements_end (ElemType type) libmesh_override;
339  virtual const_element_iterator active_type_elements_begin (ElemType type) const libmesh_override;
340  virtual const_element_iterator active_type_elements_end (ElemType type) const libmesh_override;
341 
342  virtual element_iterator active_pid_elements_begin (processor_id_type proc_id) libmesh_override;
343  virtual element_iterator active_pid_elements_end (processor_id_type proc_id) libmesh_override;
344  virtual const_element_iterator active_pid_elements_begin (processor_id_type proc_id) const libmesh_override;
345  virtual const_element_iterator active_pid_elements_end (processor_id_type proc_id) const libmesh_override;
346 
347  virtual element_iterator unpartitioned_elements_begin () libmesh_override;
348  virtual element_iterator unpartitioned_elements_end () libmesh_override;
349  virtual const_element_iterator unpartitioned_elements_begin () const libmesh_override;
350  virtual const_element_iterator unpartitioned_elements_end () const libmesh_override;
351 
352  virtual element_iterator active_unpartitioned_elements_begin () libmesh_override;
353  virtual element_iterator active_unpartitioned_elements_end () libmesh_override;
354  virtual const_element_iterator active_unpartitioned_elements_begin () const libmesh_override;
355  virtual const_element_iterator active_unpartitioned_elements_end () const libmesh_override;
356 
357  virtual element_iterator active_local_subdomain_elements_begin (subdomain_id_type subdomain_id) libmesh_override;
358  virtual element_iterator active_local_subdomain_elements_end (subdomain_id_type subdomain_id) libmesh_override;
359  virtual const_element_iterator active_local_subdomain_elements_begin (subdomain_id_type subdomain_id) const libmesh_override;
360  virtual const_element_iterator active_local_subdomain_elements_end (subdomain_id_type subdomain_id) const libmesh_override;
361 
362  virtual element_iterator active_subdomain_elements_begin (subdomain_id_type subdomain_id) libmesh_override;
363  virtual element_iterator active_subdomain_elements_end (subdomain_id_type subdomain_id) libmesh_override;
364  virtual const_element_iterator active_subdomain_elements_begin (subdomain_id_type subdomain_id) const libmesh_override;
365  virtual const_element_iterator active_subdomain_elements_end (subdomain_id_type subdomain_id) const libmesh_override;
366 
367  virtual element_iterator active_subdomain_set_elements_begin (std::set<subdomain_id_type> ss) libmesh_override;
368  virtual element_iterator active_subdomain_set_elements_end (std::set<subdomain_id_type> ss) libmesh_override;
369  virtual const_element_iterator active_subdomain_set_elements_begin (std::set<subdomain_id_type> ss) const libmesh_override;
370  virtual const_element_iterator active_subdomain_set_elements_end (std::set<subdomain_id_type> ss) const libmesh_override;
371 
372  virtual element_iterator ghost_elements_begin () libmesh_override;
373  virtual element_iterator ghost_elements_end () libmesh_override;
374  virtual const_element_iterator ghost_elements_begin () const libmesh_override;
375  virtual const_element_iterator ghost_elements_end () const libmesh_override;
376 
377  virtual element_iterator
378  evaluable_elements_begin (const DofMap & dof_map,
379  unsigned int var_num = libMesh::invalid_uint) libmesh_override;
380 
381  virtual element_iterator
382  evaluable_elements_end (const DofMap & dof_map,
383  unsigned int var_num = libMesh::invalid_uint) libmesh_override;
384 
385  virtual const_element_iterator
386  evaluable_elements_begin (const DofMap & dof_map,
387  unsigned int var_num = libMesh::invalid_uint) const libmesh_override;
388 
389  virtual const_element_iterator
390  evaluable_elements_end (const DofMap & dof_map,
391  unsigned int var_num = libMesh::invalid_uint) const libmesh_override;
392 
393 #ifdef LIBMESH_ENABLE_AMR
394  virtual element_iterator flagged_elements_begin (unsigned char rflag) libmesh_override;
395  virtual element_iterator flagged_elements_end (unsigned char rflag) libmesh_override;
396  virtual const_element_iterator flagged_elements_begin (unsigned char rflag) const libmesh_override;
397  virtual const_element_iterator flagged_elements_end (unsigned char rflag) const libmesh_override;
398 
399  virtual element_iterator flagged_pid_elements_begin (unsigned char rflag,
400  processor_id_type pid) libmesh_override;
401  virtual element_iterator flagged_pid_elements_end (unsigned char rflag,
402  processor_id_type pid) libmesh_override;
403  virtual const_element_iterator flagged_pid_elements_begin (unsigned char rflag,
404  processor_id_type pid) const libmesh_override;
405  virtual const_element_iterator flagged_pid_elements_end (unsigned char rflag,
406  processor_id_type pid) const libmesh_override;
407 #endif // LIBMESH_ENABLE_AMR
408 
412  virtual node_iterator nodes_begin () libmesh_override;
413  virtual node_iterator nodes_end () libmesh_override;
414  virtual const_node_iterator nodes_begin () const libmesh_override;
415  virtual const_node_iterator nodes_end () const libmesh_override;
416  virtual SimpleRange<node_iterator> node_ptr_range() libmesh_override { return {nodes_begin(), nodes_end()}; }
417  virtual SimpleRange<const_node_iterator> node_ptr_range() const libmesh_override { return {nodes_begin(), nodes_end()}; }
418 
419  virtual node_iterator active_nodes_begin () libmesh_override;
420  virtual node_iterator active_nodes_end () libmesh_override;
421  virtual const_node_iterator active_nodes_begin () const libmesh_override;
422  virtual const_node_iterator active_nodes_end () const libmesh_override;
423 
424  virtual node_iterator local_nodes_begin () libmesh_override;
425  virtual node_iterator local_nodes_end () libmesh_override;
426  virtual const_node_iterator local_nodes_begin () const libmesh_override;
427  virtual const_node_iterator local_nodes_end () const libmesh_override;
430 
431  virtual node_iterator pid_nodes_begin (processor_id_type proc_id) libmesh_override;
432  virtual node_iterator pid_nodes_end (processor_id_type proc_id) libmesh_override;
433  virtual const_node_iterator pid_nodes_begin (processor_id_type proc_id) const libmesh_override;
434  virtual const_node_iterator pid_nodes_end (processor_id_type proc_id) const libmesh_override;
435 
436  virtual node_iterator bid_nodes_begin (boundary_id_type bndry_id) libmesh_override;
437  virtual node_iterator bid_nodes_end (boundary_id_type bndry_id) libmesh_override;
438  virtual const_node_iterator bid_nodes_begin (boundary_id_type bndry_id) const libmesh_override;
439  virtual const_node_iterator bid_nodes_end (boundary_id_type bndry_id) const libmesh_override;
440 
441  virtual node_iterator bnd_nodes_begin () libmesh_override;
442  virtual node_iterator bnd_nodes_end () libmesh_override;
443  virtual const_node_iterator bnd_nodes_begin () const libmesh_override;
444  virtual const_node_iterator bnd_nodes_end () const libmesh_override;
445 
446  virtual node_iterator
447  evaluable_nodes_begin (const DofMap & dof_map,
448  unsigned int var_num = libMesh::invalid_uint) libmesh_override;
449  virtual node_iterator
450  evaluable_nodes_end (const DofMap & dof_map,
451  unsigned int var_num = libMesh::invalid_uint) libmesh_override;
452  virtual const_node_iterator
453  evaluable_nodes_begin (const DofMap & dof_map,
454  unsigned int var_num = libMesh::invalid_uint) const libmesh_override;
455  virtual const_node_iterator
456  evaluable_nodes_end (const DofMap & dof_map,
457  unsigned int var_num = libMesh::invalid_uint) const libmesh_override;
458 
459 
460 protected:
461 
465  std::vector<Node *> _nodes;
466 
470  std::vector<Elem *> _elements;
471 
472 private:
473 
478  void stitching_helper (ReplicatedMesh * other_mesh,
479  boundary_id_type boundary_id_1,
480  boundary_id_type boundary_id_2,
481  Real tol,
482  bool clear_stitched_boundary_ids,
483  bool verbose,
484  bool use_binary_search,
485  bool enforce_all_nodes_match_on_boundaries,
486  bool skip_find_neighbors);
487 
492  typedef std::vector<Elem *>::iterator elem_iterator_imp;
493  typedef std::vector<Elem *>::const_iterator const_elem_iterator_imp;
494 
499  typedef std::vector<Node *>::iterator node_iterator_imp;
500  typedef std::vector<Node *>::const_iterator const_node_iterator_imp;
501 };
502 
503 } // namespace libMesh
504 
505 
506 
507 #endif // LIBMESH_REPLICATED_MESH_H
virtual element_iterator local_level_elements_end(unsigned int level) libmesh_override
The definition of the element_iterator struct.
Definition: mesh_base.h:1476
virtual SimpleRange< element_iterator > active_local_element_ptr_range() libmesh_override
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 pid_elements_end(processor_id_type proc_id) 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 node_iterator pid_nodes_end(processor_id_type proc_id) libmesh_override
virtual const Elem * elem_ptr(const dof_id_type i) const libmesh_override
virtual element_iterator local_not_level_elements_begin(unsigned int level) libmesh_override
virtual const Node * node_ptr(const dof_id_type i) const libmesh_override
virtual element_iterator active_unpartitioned_elements_begin() libmesh_override
Iterate over active unpartitioned elements in the Mesh.
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
virtual const Node * query_node_ptr(const dof_id_type i) const libmesh_override
virtual element_iterator active_subdomain_elements_end(subdomain_id_type subdomain_id) libmesh_override
A Node is like a Point, but with more information.
Definition: node.h:52
Encapsulates the MPI_Comm object.
Definition: parallel.h:657
virtual element_iterator local_not_level_elements_end(unsigned int level) libmesh_override
virtual element_iterator facelocal_elements_begin() libmesh_override
Iterate over elements which are on or have a neighbor on the current processor.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:184
virtual SimpleRange< const_element_iterator > active_element_ptr_range() const libmesh_override
virtual element_iterator active_subdomain_elements_begin(subdomain_id_type subdomain_id) libmesh_override
virtual node_iterator bnd_nodes_begin() libmesh_override
Iterate over nodes for which BoundaryInfo::n_boundary_ids(node) > 0.
virtual Elem * add_elem(Elem *e) libmesh_override
Add elem e to the end of the element array.
std::vector< Elem * > _elements
The elements in the mesh.
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 node_iterator active_nodes_end() libmesh_override
virtual element_iterator active_local_elements_end() libmesh_override
virtual element_iterator active_subdomain_set_elements_end(std::set< subdomain_id_type > ss) 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 ~ReplicatedMesh()
Destructor.
virtual element_iterator ancestor_elements_begin() libmesh_override
Iterate over elements for which elem->ancestor() is true.
The definition of the const_element_iterator struct.
Definition: mesh_base.h:1494
virtual SimpleRange< element_iterator > element_ptr_range() libmesh_override
std::vector< Elem * >::const_iterator const_elem_iterator_imp
unsigned int dim
virtual void delete_elem(Elem *e) libmesh_override
Removes element e from the mesh.
virtual const Elem * query_elem_ptr(const dof_id_type i) const libmesh_override
virtual element_iterator level_elements_end(unsigned int level) libmesh_override
virtual element_iterator ghost_elements_end() libmesh_override
virtual SimpleRange< element_iterator > active_element_ptr_range() libmesh_override
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 ...
virtual element_iterator active_not_local_elements_begin() libmesh_override
std::vector< Node * >::iterator node_iterator_imp
Typedefs for the container implementation.
virtual element_iterator not_active_elements_begin() libmesh_override
ElemType
Defines an enum for geometric element types.
virtual SimpleRange< node_iterator > node_ptr_range() libmesh_override
virtual void renumber_nodes_and_elements() libmesh_override
Remove NULL elements from arrays.
virtual element_iterator not_ancestor_elements_begin() libmesh_override
virtual Node * add_node(Node *n) libmesh_override
Add Node n to the end of the vertex array.
virtual void reserve_nodes(const dof_id_type nn) libmesh_override
Reserves space for a known number of nodes.
virtual void clear() libmesh_override
Clear all internal data.
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 node_iterator local_nodes_end() libmesh_override
virtual element_iterator local_level_elements_begin(unsigned int level) libmesh_override
virtual element_iterator unpartitioned_elements_end() libmesh_override
virtual element_iterator not_subactive_elements_end() libmesh_override
static const Real TOLERANCE
virtual SimpleRange< node_iterator > local_node_ptr_range() libmesh_override
virtual SimpleRange< const_node_iterator > local_node_ptr_range() const libmesh_override
virtual element_iterator unpartitioned_elements_begin() libmesh_override
Iterate over unpartitioned elements in the Mesh.
The libMesh namespace provides an interface to certain functionality in the library.
virtual SimpleRange< const_element_iterator > active_local_element_ptr_range() const libmesh_override
virtual element_iterator ghost_elements_begin() libmesh_override
Iterate over "ghost" elements in the Mesh.
virtual element_iterator not_subactive_elements_begin() libmesh_override
virtual element_iterator type_elements_begin(ElemType type) libmesh_override
Iterate over all elements with a specified geometric type.
virtual void update_parallel_id_counts() libmesh_override
Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors...
virtual node_iterator bnd_nodes_end() libmesh_override
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
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...
virtual dof_id_type n_elem() const libmesh_override
virtual element_iterator not_level_elements_begin(unsigned int level) libmesh_override
virtual element_iterator not_ancestor_elements_end() libmesh_override
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...
This class handles the numbering of degrees of freedom on a mesh.
Definition: dof_map.h:167
virtual element_iterator active_type_elements_begin(ElemType type) libmesh_override
virtual element_iterator elements_begin() libmesh_override
Elem iterator accessor functions.
virtual element_iterator not_local_elements_end() libmesh_override
virtual Node * insert_node(Node *n) libmesh_override
Insert Node n into the Mesh at a location consistent with n->id(), allocating extra storage if necess...
virtual element_iterator active_local_subdomain_elements_begin(subdomain_id_type subdomain_id) libmesh_override
virtual element_iterator elements_end() libmesh_override
virtual element_iterator not_local_elements_begin() libmesh_override
virtual node_iterator pid_nodes_begin(processor_id_type proc_id) libmesh_override
Iterate over nodes with processor_id() == proc_id.
int8_t boundary_id_type
Definition: id_types.h:51
virtual SimpleRange< const_node_iterator > node_ptr_range() const libmesh_override
virtual element_iterator local_elements_begin() libmesh_override
virtual element_iterator active_pid_elements_begin(processor_id_type proc_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
virtual void fix_broken_node_and_element_numbering() libmesh_override
There is no reason for a user to ever call this function.
virtual element_iterator flagged_elements_end(unsigned char rflag) libmesh_override
The UnstructuredMesh class is derived from the MeshBase class.
std::vector< Node * >::const_iterator const_node_iterator_imp
virtual element_iterator active_subdomain_set_elements_begin(std::set< subdomain_id_type > ss) libmesh_override
virtual node_iterator active_nodes_begin() libmesh_override
Iterate over only the active nodes in the Mesh.
virtual element_iterator active_local_elements_begin() libmesh_override
virtual element_iterator active_local_subdomain_elements_end(subdomain_id_type subdomain_id) libmesh_override
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:324
virtual element_iterator active_unpartitioned_elements_end() libmesh_override
virtual element_iterator subactive_elements_end() libmesh_override
std::vector< Node * > _nodes
The vertices (spatial coordinates) of the mesh.
virtual node_iterator evaluable_nodes_end(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) libmesh_override
virtual node_iterator nodes_begin() libmesh_override
Node iterator accessor functions.
virtual node_iterator local_nodes_begin() libmesh_override
Iterate over local nodes (nodes whose processor_id() matches the current processor).
virtual void delete_node(Node *n) libmesh_override
Removes the Node n from the mesh.
virtual element_iterator semilocal_elements_end() libmesh_override
virtual node_iterator bid_nodes_end(boundary_id_type bndry_id) libmesh_override
virtual element_iterator not_level_elements_end(unsigned int level) libmesh_override
virtual element_iterator local_elements_end() libmesh_override
virtual unique_id_type parallel_max_unique_id() const libmesh_override
The definition of the node_iterator struct.
Definition: mesh_base.h:1528
virtual SimpleRange< const_element_iterator > element_ptr_range() const libmesh_override
virtual element_iterator flagged_pid_elements_end(unsigned char rflag, processor_id_type pid) libmesh_override
virtual dof_id_type n_nodes() const libmesh_override
virtual element_iterator facelocal_elements_end() libmesh_override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual dof_id_type n_active_elem() const libmesh_override
virtual node_iterator nodes_end() libmesh_override
virtual element_iterator active_type_elements_end(ElemType type) libmesh_override
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.
void stitching_helper(ReplicatedMesh *other_mesh, boundary_id_type boundary_id_1, boundary_id_type boundary_id_2, Real tol, bool clear_stitched_boundary_ids, bool verbose, bool use_binary_search, bool enforce_all_nodes_match_on_boundaries, bool skip_find_neighbors)
Helper function for stitch_meshes and stitch_surfaces that does the mesh stitching.
virtual UniquePtr< MeshBase > clone() const libmesh_override
Virtual copy-constructor, creates a copy of this mesh.
virtual element_iterator active_elements_begin() libmesh_override
Active, local, and negation forms of the element iterators described above.
virtual element_iterator not_active_elements_end() libmesh_override
void stitch_surfaces(boundary_id_type boundary_id_1, boundary_id_type boundary_id_2, Real tol=TOLERANCE, bool clear_stitched_boundary_ids=false, bool verbose=true, bool use_binary_search=true, bool enforce_all_nodes_match_on_boundaries=false)
Similar to stitch_meshes, except that we stitch two adjacent surfaces within this mesh...
virtual element_iterator evaluable_elements_end(const DofMap &dof_map, unsigned int var_num=libMesh::invalid_uint) libmesh_override
The definition of the const_node_iterator struct.
Definition: mesh_base.h:1548
virtual element_iterator active_semilocal_elements_begin() libmesh_override
std::vector< Elem * >::iterator elem_iterator_imp
Typedefs for the container implementation.
virtual element_iterator active_semilocal_elements_end() libmesh_override
virtual dof_id_type parallel_n_nodes() const libmesh_override
void stitch_meshes(ReplicatedMesh &other_mesh, boundary_id_type this_mesh_boundary, boundary_id_type other_mesh_boundary, Real tol=TOLERANCE, bool clear_stitched_boundary_ids=false, bool verbose=true, bool use_binary_search=true, bool enforce_all_nodes_match_on_boundaries=false)
Stitch other_mesh to this mesh so that this mesh is the union of the two meshes.
virtual element_iterator active_elements_end() libmesh_override
virtual element_iterator level_elements_begin(unsigned int level) libmesh_override
Iterate over elements of a given level.
virtual dof_id_type max_node_id() const libmesh_override
virtual element_iterator subactive_elements_begin() libmesh_override
Iterate over elements for which elem->subactive() is true.
virtual element_iterator ancestor_elements_end() libmesh_override
virtual element_iterator active_not_local_elements_end() libmesh_override
ReplicatedMesh(const Parallel::Communicator &comm_in, unsigned char dim=1)
Constructor.
virtual void reserve_elem(const dof_id_type ne) libmesh_override
Reserves space for a known number of elements.
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...
virtual dof_id_type parallel_n_elem() const libmesh_override
virtual element_iterator pid_elements_begin(processor_id_type proc_id) libmesh_override
Iterate over all elements with a specified processor id.
virtual element_iterator type_elements_end(ElemType type) libmesh_override
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
uint8_t unique_id_type
Definition: id_types.h:79
virtual element_iterator semilocal_elements_begin() libmesh_override
Iterate over elements for which elem->is_semilocal() is true for the current processor.
virtual element_iterator active_pid_elements_end(processor_id_type proc_id) libmesh_override
virtual const Point & point(const dof_id_type i) const libmesh_override
uint8_t dof_id_type
Definition: id_types.h:64
virtual element_iterator flagged_elements_begin(unsigned char rflag) libmesh_override
Iterate over all elements with a specified refinement flag.