Flow123d  JS_before_hm-919-g5f1bbbf
mesh.h
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file mesh.h
15  * @brief
16  */
17 
18 #ifndef MAKE_MESH_H
19 #define MAKE_MESH_H
20 
21 #include <mpi.h> // for MPI_Comm, MPI_COMM_WORLD
22 #include <boost/exception/info.hpp> // for error_info::~error_info<...
23 //#include <boost/range.hpp>
24 #include <memory> // for shared_ptr
25 #include <string> // for string
26 #include <vector> // for vector, vector<>::iterator
27 #include "input/accessors.hh" // for Record, Array (ptr only)
28 #include "input/accessors_impl.hh" // for Record::val
29 #include "input/storage.hh" // for ExcStorageTypeMismatch
30 #include "input/type_record.hh" // for Record (ptr only), Recor...
31 #include "mesh/region.hh" // for RegionDB, RegionDB::MapE...
32 #include "mesh/elements.h"
33 #include "mesh/bounding_box.hh" // for BoundingBox
34 #include "mesh/range_wrapper.hh"
35 #include "mesh/mesh_data.hh"
38 #include "system/index_types.hh" // for LongIdx
39 #include "system/exceptions.hh" // for operator<<, ExcStream, EI
40 #include "system/file_path.hh" // for FilePath
41 #include "system/sys_vector.hh" // for FullIterator, VectorId<>...
42 #include "system/armor.hh"
43 
44 
45 class BIHTree;
46 class Distribution;
47 class Partitioning;
49 class Neighbour;
50 class SideIter;
51 class Boundary;
52 class Edge;
53 class BCMesh;
54 class DuplicateNodes;
55 template <int spacedim> class ElementAccessor;
56 template <int spacedim> class NodeAccessor;
57 
58 
59 
60 #define ELM 0
61 #define BC 1
62 #define NODE 2
63 
64 /**
65  * This parameter limits volume of elements from below.
66  */
67 #define MESH_CRITICAL_VOLUME 1.0E-12
68 
70 public:
72 };
73 
74 //=============================================================================
75 // STRUCTURE OF THE MESH
76 //=============================================================================
77 
78 class Mesh {
79 public:
80  TYPEDEF_ERR_INFO( EI_ElemLast, int);
81  TYPEDEF_ERR_INFO( EI_ElemNew, int);
82  TYPEDEF_ERR_INFO( EI_RegLast, std::string);
83  TYPEDEF_ERR_INFO( EI_RegNew, std::string);
84  DECLARE_EXCEPTION(ExcDuplicateBoundary,
85  << "Duplicate boundary elements! \n"
86  << "Element id: " << EI_ElemLast::val << " on region name: " << EI_RegLast::val << "\n"
87  << "Element id: " << EI_ElemNew::val << " on region name: " << EI_RegNew::val << "\n");
88 
89 
90  /**
91  * \brief Types of search algorithm for finding intersection candidates.
92  */
93  typedef enum IntersectionSearch {
94  BIHsearch = 1,
95  BIHonly = 2,
96  BBsearch = 3
98 
99  /**
100  * \brief The definition of input record for selection of variant of file format
101  */
102  static const Input::Type::Selection & get_input_intersection_variant();
103 
104  static const unsigned int undef_idx=-1;
105  static const Input::Type::Record & get_input_type();
106 
107 
108  /** Labels for coordinate indexes in arma::vec3 representing vectors and points.*/
109  enum {x_coord=0, y_coord=1, z_coord=2};
110 
111  /**
112  * Empty constructor.
113  *
114  * Use only for unit tests!!!
115  */
116  Mesh();
117  /**
118  * Constructor from an input record.
119  * Do not process input record. That is done in init_from_input.
120  */
121  Mesh(Input::Record in_record, MPI_Comm com = MPI_COMM_WORLD);
122 
123  /// Destructor.
124  virtual ~Mesh();
125 
126  virtual inline unsigned int n_nodes() const {
127  return nodes_.size();
128  }
129 
130  inline unsigned int n_boundaries() const {
131  return boundary_.size();
132  }
133 
134  inline unsigned int n_edges() const {
135  return edges.size();
136  }
137 
138  Edge edge(uint edge_idx) const;
139  Boundary boundary(uint edge_idx) const;
140 
141  unsigned int n_corners();
142 
143  inline const RegionDB &region_db() const {
144  return region_db_;
145  }
146 
147  /**
148  * Returns pointer to partitioning object. Partitioning is created during setup_topology.
149  */
150  virtual Partitioning *get_part();
151 
152  virtual const LongIdx *get_local_part();
153 
155  { return el_ds; }
156 
158  { return row_4_el; }
159 
161  { return el_4_loc; }
162 
164  { return node_ds_; }
165 
167  { return node_4_loc_; }
168 
169  unsigned int n_local_nodes() const
170  { return n_local_nodes_; }
171 
172  /**
173  * Returns MPI communicator of the mesh.
174  */
175  inline MPI_Comm get_comm() const { return comm_; }
176 
177 
178  MixedMeshIntersections &mixed_intersections();
179 
180  unsigned int n_sides() const;
181 
182  unsigned int n_vb_neighbours() const;
183 
184  /**
185  * Returns maximal number of sides of one edge, which connects elements of dimension @p dim.
186  * @param dim Dimension of elements sharing the edge.
187  */
188  unsigned int max_edge_sides(unsigned int dim) const { return max_edge_sides_[dim-1]; }
189 
190  /**
191  * Reads mesh from stream.
192  *
193  * Method is especially used in unit tests.
194  */
195  void read_gmsh_from_stream(istream &in);
196  /**
197  * Reads input record, creates regions, read the mesh, setup topology. creates region sets.
198  */
199  void init_from_input();
200 
201 
202  /**
203  * Initialize all mesh structures from raw information about nodes and elements (including boundary elements).
204  * Namely: create remaining boundary elements and Boundary objects, find edges and compatible neighborings.
205  */
206  void setup_topology();
207 
208  /**
209  * Returns vector of ID numbers of elements, either bulk or bc elemnts.
210  */
211  void elements_id_maps( vector<LongIdx> & bulk_elements_id, vector<LongIdx> & boundary_elements_id) const;
212 
213  /*
214  * Check if nodes and elements are compatible with \p mesh.
215  */
216  virtual bool check_compatible_mesh( Mesh & mesh, vector<LongIdx> & bulk_elements_id, vector<LongIdx> & boundary_elements_id );
217 
218  /// Create and return ElementAccessor to element of given idx
219  virtual ElementAccessor<3> element_accessor(unsigned int idx) const;
220 
221  /// Create and return NodeAccessor to node of given idx
222  NodeAccessor<3> node(unsigned int idx) const;
223 
224  /**
225  * Reads elements and their affiliation to regions and region sets defined by user in input file
226  * Format of input record is defined in method RegionSetBase::get_input_type()
227  *
228  * @param region_list Array input AbstractRecords which define regions, region sets and elements
229  */
230  void read_regions_from_input(Input::Array region_list);
231 
232  /**
233  * Returns nodes_elements vector, if doesn't exist creates its.
234  */
235  vector<vector<unsigned int> > const & node_elements();
236 
237  /// Vector of boundary sides where is prescribed boundary condition.
238  /// TODO: apply all boundary conditions in the main assembling cycle over elements and remove this Vector.
240 
241  //flow::VectorId<int> bcd_group_id; // gives a index of group for an id
242 
243  /**
244  * Vector of individual intersections of two elements.
245  * This is enough for local mortar.
246  */
247  std::shared_ptr<MixedMeshIntersections> intersections;
248 
249  /**
250  * For every element El we have vector of indices into @var intersections array for every intersection in which El is master element.
251  * This is necessary for true mortar.
252  */
254 
256 
257  /**
258  * Vector of compatible neighbourings.
259  */
261 
262  int n_insides; // # of internal sides
263  int n_exsides; // # of external sides
264  mutable int n_sides_; // total number of sides (should be easy to count when we have separated dimensions
265 
266  int n_lines; // Number of line elements
267  int n_triangles; // Number of triangle elements
268  int n_tetrahedras; // Number of tetrahedra elements
269 
270  // Temporary solution for numbering of nodes on sides.
271  // The data are defined in RefElement<dim>::side_nodes,
272  // Mesh::side_nodes can be removed as soon as Element
273  // is templated by dimension.
274  //
275  // side_nodes[dim][elm_side_idx][side_node_idx]
276  // for every side dimension D = 0 .. 2
277  // for every element side 0 .. D+1
278  // for every side node 0 .. D
279  // index into element node array
281 
282  /**
283  * Check usage of regions, set regions to elements defined by user, close RegionDB
284  */
285  void check_and_finish();
286 
287  /// Compute bounding boxes of elements contained in mesh.
288  std::vector<BoundingBox> get_element_boxes();
289 
290  /// Getter for BIH. Creates and compute BIH at first call.
291  const BIHTree &get_bih_tree();\
292 
293  /**
294  * Find intersection of element lists given by Mesh::node_elements_ for elements givne by @p nodes_list parameter.
295  * The result is placed into vector @p intersection_element_list. If the @p node_list is empty, and empty intersection is
296  * returned.
297  */
298  void intersect_element_lists(vector<unsigned int> const &nodes_list, vector<unsigned int> &intersection_element_list);
299 
300  /// Add new node of given id and coordinates to mesh
301  void add_node(unsigned int node_id, arma::vec3 coords);
302 
303  /// Add new element of given id to mesh
304  void add_element(unsigned int elm_id, unsigned int dim, unsigned int region_id, unsigned int partition_id,
305  std::vector<unsigned int> node_ids);
306 
307  /// Add new node of given id and coordinates to mesh
308  void add_physical_name(unsigned int dim, unsigned int id, std::string name);
309 
310  /// Return FilePath object representing "mesh_file" input key
311  inline FilePath mesh_file() {
312  return in_record_.val<FilePath>("mesh_file");
313  }
314 
315  /// Getter for input type selection for intersection search algorithm.
316  IntersectionSearch get_intersection_search();
317 
318  /// Maximal distance of observe point from Mesh relative to its size
319  double global_snap_radius() const;
320 
321  /// Initialize element_vec_, set size and reset counters of boundary and bulk elements.
322  void init_element_vector(unsigned int size);
323 
324  /// Initialize node_vec_, set size
325  void init_node_vector(unsigned int size);
326 
327  /// Returns range of bulk elements
328  virtual Range<ElementAccessor<3>> elements_range() const;
329 
330  /// Returns range of nodes
331  Range<NodeAccessor<3>> node_range() const;
332 
333  /// Returns range of edges
334  Range<Edge> edge_range() const;
335 
336  /// Returns count of boundary or bulk elements
337  virtual unsigned int n_elements(bool boundary=false) const {
338  if (boundary) return element_ids_.size()-bulk_size_;
339  else return bulk_size_;
340  }
341 
342  /// For each node the vector contains a list of elements that use this node
344 
345  /// For element of given elem_id returns index in element_vec_ or (-1) if element doesn't exist.
346  inline int elem_index(int elem_id) const
347  {
348  return element_ids_.get_position(elem_id);
349  }
350 
351  /// Return element id (in GMSH file) of element of given position in element vector.
352  inline int find_elem_id(unsigned int pos) const
353  {
354  return element_ids_[pos];
355  }
356 
357  /// For node of given node_id returns index in element_vec_ or (-1) if node doesn't exist.
358  inline int node_index(int node_id) const
359  {
360  return node_ids_.get_position(node_id);
361  }
362 
363  /// Return node id (in GMSH file) of node of given position in node vector.
364  inline int find_node_id(unsigned int pos) const
365  {
366  return node_ids_[pos];
367  }
368 
369  /// Check if given index is in element_vec_
370  void check_element_size(unsigned int elem_idx) const;
371 
372  /// Create boundary elements from data of temporary structure, this method MUST be call after read mesh from
373  void create_boundary_elements();
374 
375  /// Permute nodes of 3D elements of given elm_idx
376  void permute_tetrahedron(unsigned int elm_idx, std::vector<unsigned int> permutation_vec);
377 
378  /// Permute nodes of 2D elements of given elm_idx
379  void permute_triangle(unsigned int elm_idx, std::vector<unsigned int> permutation_vec);
380 
381  /// Create boundary mesh if doesn't exist and return it.
382  BCMesh *get_bc_mesh();
383 
384 protected:
385 
386  /**
387  * Part of the constructor whichdoes not depedn on input record.
388  * Initializes node-side numbering according to RefElement.
389  */
390  void init();
391 
392  /**
393  * Allow store boundary element data to temporary structure.
394  *
395  * We need this structure to preserve correct order of boundary elements.
396  */
397  struct ElementTmpData {
398  /// Constructor
399  ElementTmpData(unsigned int e_id, unsigned int dm, RegionIdx reg_idx, unsigned int part_id, std::vector<unsigned int> nodes)
400  : elm_id(e_id), dim(dm), region_idx(reg_idx), partition_id(part_id), node_ids(nodes) {}
401 
402  unsigned int elm_id;
403  unsigned int dim;
405  unsigned int partition_id;
407  };
408 
409  /**
410  * This replaces read_neighbours() in order to avoid using NGH preprocessor.
411  *
412  * TODO:
413  * - Avoid maps:
414  *
415  * 5) need not to have temporary array for Edges, only postpone setting pointers in elements and set them
416  * after edges are found; we can temporary save Edge index instead of pointer in Neigbours and elements
417  *
418  * 6) Try replace Edge * by indexes in Neigbours and elements (anyway we have mesh pointer in elements so it is accessible also from Neigbours)
419  *
420  */
421  void make_neighbours_and_edges();
422 
423  /**
424  * On edges sharing sides of many elements it may happen that each side has its nodes ordered in a different way.
425  * This method finds the permutation for each side so as to obtain the ordering of side 0.
426  */
427  void make_edge_permutations();
428  /**
429  * Create element lists for nodes in Mesh::nodes_elements.
430  */
431  void create_node_element_lists();
432  /**
433  * Remove elements with dimension not equal to @p dim from @p element_list. Index of the first element of dimension @p dim-1,
434  * is returned in @p element_idx. If no such element is found the method returns false, if one such element is found the method returns true,
435  * if more elements are found we report an user input error.
436  */
437  bool find_lower_dim_element(vector<unsigned int> &element_list, unsigned int dim, unsigned int &element_idx);
438 
439  /**
440  * Returns true if side @p si has same nodes as in the list @p side_nodes.
441  */
442  bool same_sides(const SideIter &si, vector<unsigned int> &side_nodes);
443 
444 
445  void element_to_neigh_vb();
446 
447  void count_element_types();
448  void count_side_types();
449 
450  /**
451  * Check the element quality and remove unused nodes.
452  */
453  void check_mesh_on_read();
454 
455  /**
456  * Possibly modify region id of elements sets by user in "regions" part of input file.
457  *
458  * TODO: This method needs check in issue 'Review mesh setting'.
459  * Changes have been done during generalized region key and may be causing problems
460  * during the further development.
461  */
462  void modify_element_ids(const RegionDB::MapElementIDToRegionID &map);
463 
464  /// Adds element to mesh data structures (element_vec_, element_ids_), returns pointer to this element.
465  Element * add_element_to_vector(int id);
466 
467  /// Initialize element
468  void init_element(Element *ele, unsigned int elm_id, unsigned int dim, RegionIdx region_idx, unsigned int partition_id,
469  std::vector<unsigned int> node_ids);
470 
471  unsigned int n_bb_neigh, n_vb_neigh;
472 
473  /// Maximal number of sides per one edge in the actual mesh (set in make_neighbours_and_edges()).
474  unsigned int max_edge_sides_[3];
475 
476  /// Output of neighboring data into raw output.
477  void output_internal_ngh_data();
478 
479  /**
480  * Database of regions (both bulk and boundary) of the mesh. Regions are logical parts of the
481  * domain that allows setting of different data and boundary conditions on them.
482  */
484  /**
485  * Mesh partitioning. Created in setup_topology.
486  */
487  std::shared_ptr<Partitioning> part_;
488 
489  /**
490  * BIH Tree for intersection and observe points lookup.
491  */
492  std::shared_ptr<BIHTree> bih_tree_;
493 
494 
495  /**
496  * Accessor to the input record for the mesh.
497  */
499 
500  /**
501  * MPI communicator used for partitioning and ...
502  */
504 
505  /**
506  * Vector of elements of the mesh.
507  *
508  * Store all elements of the mesh in order bulk elements - boundary elements
509  */
511 
512  /// Hold data of boundary elements during reading mesh (allow to preserve correct order during reading of mix bulk-boundary element)
514 
515  /// Count of bulk elements
516  unsigned int bulk_size_;
517 
518  /// Count of boundary elements loaded from mesh file
519  unsigned int boundary_loaded_size_;
520 
521  /// Maps element ids to indexes into vector element_vec_
523 
524  /**
525  * Vector of nodes of the mesh.
526  */
528 
529  /// Maps node ids to indexes into vector node_vec_
531 
532  /// Vector of MH edges, this should not be part of the geometrical mesh
534 
535 
536  friend class Edge;
537  friend class Side;
538  friend class RegionSetBase;
539  friend class Element;
540  friend class BIHTree;
541  friend class Boundary;
542  friend class BCMesh;
543  template <int spacedim> friend class ElementAccessor;
544  template <int spacedim> friend class NodeAccessor;
545 
546 
547 
548 private:
549 
550  /// Fill array node_4_loc_ and create object node_ds_ according to element distribution.
551  void distribute_nodes();
552 
553  /// Index set assigning to global element index the local index used in parallel vectors.
555  /// Index set assigning to local element index its global index.
557  /// Parallel distribution of elements.
559  /// Index set assigning to local node index its global index.
561  /// Parallel distribution of nodes. Depends on elements distribution.
563  /// Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array.
564  unsigned int n_local_nodes_;
565  /// Boundary mesh, object is created only if it's necessary
567 
569 };
570 
571 #endif
572 //-----------------------------------------------------------------------------
573 // vim: set cindent:
int n_triangles
Definition: mesh.h:267
Distribution * el_ds
Parallel distribution of elements.
Definition: mesh.h:558
Class for the mesh partitioning. This should provide:
Definition: partitioning.hh:52
vector< Element > element_vec_
Definition: mesh.h:510
ElementTmpData(unsigned int e_id, unsigned int dm, RegionIdx reg_idx, unsigned int part_id, std::vector< unsigned int > nodes)
Constructor.
Definition: mesh.h:399
BidirectionalMap< int > node_ids_
Maps node ids to indexes into vector node_vec_.
Definition: mesh.h:530
Accessor to input data conforming to declared Array.
Definition: accessors.hh:567
unsigned int n_local_nodes_
Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array.
Definition: mesh.h:564
LongIdx * get_row_4_el() const
Definition: mesh.h:157
unsigned int uint
int MPI_Comm
Definition: mpi.h:141
unsigned int partition_id
Definition: mesh.h:405
BCMesh * bc_mesh_
Boundary mesh, object is created only if it&#39;s necessary.
Definition: mesh.h:566
LongIdx * get_node_4_loc() const
Definition: mesh.h:166
BidirectionalMap< int > element_ids_
Maps element ids to indexes into vector element_vec_.
Definition: mesh.h:522
static Input::Type::Record input_type
Definition: mesh.h:71
LongIdx * node_4_loc_
Index set assigning to local node index its global index.
Definition: mesh.h:560
DuplicateNodes * tree
Definition: mesh.h:255
int n_lines
Definition: mesh.h:266
Implementation of bidirectional map.
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
Definition: exceptions.hh:158
ofstream raw_ngh_output_file
Definition: mesh.h:568
int elem_index(int elem_id) const
For element of given elem_id returns index in element_vec_ or (-1) if element doesn&#39;t exist...
Definition: mesh.h:346
std::shared_ptr< MixedMeshIntersections > intersections
Definition: mesh.h:247
Definition: mesh.h:78
Template Iter serves as general template for internal iterators.
unsigned int n_local_nodes() const
Definition: mesh.h:169
std::vector< EdgeData > edges
Vector of MH edges, this should not be part of the geometrical mesh.
Definition: mesh.h:533
std::vector< unsigned int > node_ids
Definition: mesh.h:406
Input::Record in_record_
Definition: mesh.h:498
vector< vector< vector< unsigned int > > > side_nodes
Definition: mesh.h:280
int n_tetrahedras
Definition: mesh.h:268
const RegionDB & region_db() const
Definition: mesh.h:143
virtual unsigned int n_nodes() const
Definition: mesh.h:126
vector< BoundaryData > boundary_
Definition: mesh.h:239
int node_index(int node_id) const
For node of given node_id returns index in element_vec_ or (-1) if node doesn&#39;t exist.
Definition: mesh.h:358
int n_exsides
Definition: mesh.h:263
Armor::Array< double > nodes_
Definition: mesh.h:527
unsigned int boundary_loaded_size_
Count of boundary elements loaded from mesh file.
Definition: mesh.h:519
int find_elem_id(unsigned int pos) const
Return element id (in GMSH file) of element of given position in element vector.
Definition: mesh.h:352
MPI_Comm get_comm() const
Definition: mesh.h:175
LongIdx * el_4_loc
Index set assigning to local element index its global index.
Definition: mesh.h:556
Range helper class.
unsigned int n_boundaries() const
Definition: mesh.h:130
Accessor to the data with type Type::Record.
Definition: accessors.hh:292
Class for O(log N) lookup for intersections with a set of bounding boxes.
Definition: bih_tree.hh:38
LongIdx * row_4_el
Index set assigning to global element index the local index used in parallel vectors.
Definition: mesh.h:554
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
Definition: exceptions.hh:194
std::shared_ptr< BIHTree > bih_tree_
Definition: mesh.h:492
Distribution * get_el_ds() const
Definition: mesh.h:154
vector< vector< unsigned int > > node_elements_
For each node the vector contains a list of elements that use this node.
Definition: mesh.h:343
unsigned int dim
Definition: mesh.h:403
Dedicated class for storing path to input and output files.
Definition: file_path.hh:54
vector< vector< unsigned int > > master_elements
Definition: mesh.h:253
vector< Neighbour > vb_neighbours_
Definition: mesh.h:260
unsigned int n_vb_neigh
Definition: mesh.h:471
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
Definition: index_types.hh:24
Distribution * node_ds_
Parallel distribution of nodes. Depends on elements distribution.
Definition: mesh.h:562
virtual unsigned int n_elements(bool boundary=false) const
Returns count of boundary or bulk elements.
Definition: mesh.h:337
int n_sides_
Definition: mesh.h:264
unsigned int max_edge_sides(unsigned int dim) const
Definition: mesh.h:188
FilePath mesh_file()
Return FilePath object representing "mesh_file" input key.
Definition: mesh.h:311
Class represents boundary part of mesh.
Definition: bc_mesh.hh:35
Vector classes to support both Iterator, index and Id access and creating co-located vectors...
RegionDB region_db_
Definition: mesh.h:483
MPI_Comm comm_
Definition: mesh.h:503
int n_insides
Definition: mesh.h:262
Internal mesh data classes.
#define MPI_COMM_WORLD
Definition: mpi.h:123
Record type proxy class.
Definition: type_record.hh:182
IntersectionSearch
Types of search algorithm for finding intersection candidates.
Definition: mesh.h:93
unsigned int n_edges() const
Definition: mesh.h:134
Distribution * get_node_ds() const
Definition: mesh.h:163
LongIdx * get_el_4_loc() const
Definition: mesh.h:160
Template for classes storing finite set of named values.
Implementation of range helper class.
unsigned int bulk_size_
Count of bulk elements.
Definition: mesh.h:516
std::shared_ptr< Partitioning > part_
Definition: mesh.h:487
vector< ElementTmpData > bc_element_tmp_
Hold data of boundary elements during reading mesh (allow to preserve correct order during reading of...
Definition: mesh.h:513
Main class for computation of intersection of meshes of combined dimensions.
int find_node_id(unsigned int pos) const
Return node id (in GMSH file) of node of given position in node vector.
Definition: mesh.h:364
RegionIdx region_idx
Definition: mesh.h:404
unsigned int elm_id
Definition: mesh.h:402