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