Flow123d  3.9.0-b05f67a5a
output_mesh.hh
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 output_mesh.hh
15  * @brief Classes for auxiliary output mesh.
16  */
17 
18 #ifndef OUTPUT_MESH_HH_
19 #define OUTPUT_MESH_HH_
20 
21 #include <memory> // for shared_ptr, enable_shared_from_...
22 #include <string> // for string
23 #include <vector> // for vector
24 #include "input/accessors.hh" // for Record
25 #include "mesh/point.hh"
26 #include "tools/general_iterator.hh" // for Iter
27 #include "system/armor.hh" // for Armor::array
28 #include "system/index_types.hh" // for LongIdx
29 #include "la/distribution.hh" // for Distribution
30 
31 class Mesh;
32 class OutputElement;
33 class OutputMesh;
35 namespace Input { namespace Type { class Record; } }
36 template<class T> class ElementDataCache;
37 template<int> class ElementAccessor;
38 
39 
41 
42 
43 /**
44  * @brief Base class for Output mesh.
45  *
46  * Defines common members for Output mesh classes:
47  * - OutputMesh represents output mesh with continuous elements
48  * - OutputMeshDiscontinuous represents output mesh with discontinuous elements
49  *
50  * Making of output meshes and calling of their initialization methods must be execute in correct order, see example:
51 @code
52  // Create or get Mesh object
53  Mesh * my_mesh = ...
54 
55  // Construct mesh with continuous elements
56  std::make_shared<OutputMesh> output_mesh = std::make_shared<OutputMesh>(*my_mesh);
57  // Creates the sub meshes on all processes identical to the computational one.
58  output_mesh->create_sub_mesh();
59  // Creates mesh on zero process identical to the computational one.
60  std::make_shared<OutputMesh> serial_output_mesh = output_mesh->make_serial_master_mesh();
61 
62  // Construct mesh with discontinuous elements
63  std::make_shared<OutputMeshDiscontinuous> output_mesh_discont = std::make_shared<OutputMeshDiscontinuous>(*my_mesh);
64  // Creates sub meshes on all processes mesh from the original my_mesh.
65  output_mesh_discont->create_sub_mesh();
66  // Creates mesh on zero process from the original my_mesh.
67  std::make_shared<OutputMeshDiscontinuous> serial_output_mesh = output_mesh->make_serial_master_mesh();
68 @endcode
69  */
70 class OutputMeshBase : public std::enable_shared_from_this<OutputMeshBase>
71 {
72 public:
73  /// Shortcut instead of spacedim template. We suppose only spacedim=3 at the moment.
74  static const unsigned int spacedim = 3;
75 
76  typedef std::function<void(const Armor::array &, const ElementAccessor<spacedim> &, std::vector<double> &)>
78 
79  /// Constructor. Takes computational mesh as a parameter.
80  OutputMeshBase(Mesh &mesh);
81  /// Constructor. Takes computational mesh and input record as a parameters.
82  OutputMeshBase(Mesh &mesh, const Input::Record &in_rec);
83  virtual ~OutputMeshBase();
84 
85  /**
86  * @brief The specification of output mesh.
87  * @return record for output mesh
88  */
89  static const Input::Type::Record & get_input_type();
90 
91  /// Gives iterator to the FIRST element of the output mesh.
93  /// Gives iterator to the LAST element of the output mesh.
95 
96  /**
97  * Creates sub mesh containing only local part of original (computation) mesh.
98  *
99  * TODO: should be replaced by local part of future parallel computational mesh.
100  */
101  void create_sub_mesh();
102 
103  /**
104  * Creates refined sub mesh containing only local part of original (computation) mesh.
105  */
106  virtual void create_refined_sub_mesh()=0;
107 
108  /// Selects the error control field computing function of output field set according to input record.
109  void set_error_control_field(ErrorControlFieldFunc error_control_field_func);
110 
111  /// Returns number of nodes.
112  unsigned int n_nodes();
113  /// Returns number of element.
114  unsigned int n_elements();
115 
116  /// Check if nodes_, connectivity_ and offsets_ data caches are created
117  bool is_created();
118 
119  /// Create nodes and elements data caches
120  void create_id_caches();
121 
122  /// Synchronize parallel data and create serial COLECTIVE output mesh on zero process.
124 
125  /// Create output mesh of parallel output (implemented only for discontinuous mesh)
127  {};
128 
129  /// Return master output mesh if exists or shared_ptr of this object.
130  inline std::shared_ptr<OutputMeshBase> get_master_mesh() {
131  if (master_mesh_) return master_mesh_;
132  else return shared_from_this();
133  };
134 
135  /**
136  * Return local element index to its global index.
137  *
138  * Temporary method. Used only in output assembly classes. DO NOT USE in other code!
139  */
140  inline LongIdx get_loc_elem_idx(LongIdx global_idx) {
141  ASSERT_LT(global_idx, (int)el_ds_->size()).error("Index of element is out of mesh.\n");
142  ASSERT(loc_4_el_[global_idx] != -1)(global_idx).error("Element is not local.\n");
143  return loc_4_el_[global_idx];
144  }
145 
146  /// Getter to offsets data
147  inline std::shared_ptr<ElementDataCache<unsigned int>> offsets() const {
148  return offsets_;
149  }
150 
151 protected:
152  /**
153  * Possible types of OutputMesh.
154  */
155  enum MeshType
156  {
157  orig, //!< same as original (computational) mesh
158  refined, //!< refined mesh
159  discont //!< discontinuous mesh
160  };
161 
162  /**
163  * Construct empty output mesh.
164  *
165  * Use in make_serial_master_mesh method and create mesh of same type as this object (continuous / discontinuos)
166  */
167  virtual std::shared_ptr<OutputMeshBase> construct_mesh()=0;
168 
169  /**
170  * Create serial (collective) nodes cache on zero process.
171  *
172  * Implements part of \p make_serial_master_mesh that are specific for continuous and discontinuous case.
173  */
174  virtual std::shared_ptr<ElementDataCache<double>> make_serial_nodes_cache(std::shared_ptr<ElementDataCache<unsigned int>> global_offsets)=0;
175 
176  /**
177  * Create serial (collective) connectivity cache on zero process.
178  *
179  * Implements part of \p make_serial_master_mesh that are specific for continuous and discontinuous case.
180  */
181  virtual std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<ElementDataCache<unsigned int>> global_offsets)=0;
182 
183  /// Compute and return number of nodes for each elements (compute from offsets)
184  std::shared_ptr<ElementDataCache<unsigned int>> get_elems_n_nodes();
185 
186  /// Input record for output mesh.
188 
189  /// Pointer to the computational mesh.
191 
192  /// Maximal level of refinement.
193  const unsigned int max_level_;
194 
195  /// Refinement error control field function (hold value_list function of field).
197 
198  MeshType mesh_type_; ///< Type of OutputMesh
199  bool refine_by_error_; ///< True, if output mesh is to be refined by error criterion.
200  double refinement_error_tolerance_; ///< Tolerance for error criterion refinement.
201 
202  /// Vector of element indices in the computational mesh. (Important when refining.)
203  std::shared_ptr<std::vector<unsigned int>> orig_element_indices_;
204 
205  /// Vector of node coordinates. [spacedim x n_nodes]
206  std::shared_ptr<ElementDataCache<double>> nodes_;
207  /// Vector maps the nodes to their coordinates in vector @p nodes_.
208  std::shared_ptr<ElementDataCache<unsigned int>> connectivity_;
209  /// Vector of offsets of node indices of elements. Maps elements to their nodes in connectivity_.
210  std::shared_ptr<ElementDataCache<unsigned int>> offsets_;
211 
212  /// Vector gets ids of nodes. Data is used in GMSH output.
213  std::shared_ptr<ElementDataCache<unsigned int>> node_ids_;
214  /// Vector gets ids of elements. Data is used in GMSH output.
215  std::shared_ptr<ElementDataCache<unsigned int>> elem_ids_;
216  /// Vector gets ids of regions. Data is used in GMSH output.
217  std::shared_ptr<ElementDataCache<unsigned int>> region_ids_;
218  /// Vector gets partitions of elements. Data is used in GMSH output.
219  std::shared_ptr<ElementDataCache<int>> partitions_;
220 
221  /**
222  * Master OutputMesh.
223  *
224  * - serial output: is constructed on zero process (collective) and allow to produce serial output of parallel computation
225  * - parallel output: is constructed on each process only for discontinuous mesh
226  */
227  std::shared_ptr<OutputMeshBase> master_mesh_;
228 
229  /**
230  * Next variables hold distributions of elements and nodes. They differ for mesh types
231  * - continuous and discontinuous mesh shared objects with computational (orig) mesh
232  * - refined mesh creates own objects
233  */
234  LongIdx *el_4_loc_; ///< Index set assigning to local element index its global index.
235  LongIdx *loc_4_el_; ///< Index set assigning to global index its local element index.
236  Distribution *el_ds_; ///< Parallel distribution of elements.
237  LongIdx *node_4_loc_; ///< Index set assigning to local node index its global index.
238  Distribution *node_ds_; ///< Parallel distribution of nodes. Depends on elements distribution.
239  unsigned int n_local_nodes_; ///< Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array.
240 
241  /// Friend provides access to vectors for element accessor class.
242  friend class OutputElement;
243  friend class OutputTime;
244  friend class OutputMSH;
245  friend class OutputVTK;
246  friend class OutputMesh;
248 };
249 
250 
251 /// @brief Class represents output mesh with continuous elements.
253 {
254 public:
255  OutputMesh(Mesh &mesh);
256  OutputMesh(Mesh &mesh, const Input::Record &in_rec);
257  ~OutputMesh();
258 
259  /// Implements OutputMeshBase::create_refined_sub_mesh
260  void create_refined_sub_mesh() override;
261 
262 protected:
263  bool refinement_criterion();
264 
265  /// Implements OutputMeshBase::construct_mesh
266  std::shared_ptr<OutputMeshBase> construct_mesh() override;
267 
268  /// Implements OutputMeshBase::make_serial_nodes_cache
269  std::shared_ptr<ElementDataCache<double>> make_serial_nodes_cache(std::shared_ptr<ElementDataCache<unsigned int>> global_offsets) override;
270 
271  /// Implements OutputMeshBase::make_serial_connectivity_cache
272  std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<ElementDataCache<unsigned int>> global_offsets) override;
273 
274  /// Friend provides access to vectors for discontinous output mesh.
276 };
277 
278 
279 /// @brief Class represents output mesh with discontinuous elements.
281 {
282 public:
284  OutputMeshDiscontinuous(Mesh &mesh, const Input::Record& in_rec);
286 
287  /// Implements OutputMeshBase::create_refined_sub_mesh
288  void create_refined_sub_mesh() override;
289 
290  /// Overrides OutputMeshBase::make_parallel_master_mesh
291  void make_parallel_master_mesh() override;
292 
293 protected:
294  ///Auxiliary structure defining element of refined output mesh.
295  struct AuxElement{
297  unsigned int level;
298  };
299 
300  ///Performs the actual refinement of AuxElement. Recurrent.
301  template<int dim>
302  void refine_aux_element(const AuxElement& aux_element,
303  std::vector< AuxElement >& refinement,
304  const ElementAccessor<spacedim> &ele_acc
305  );
306 
307  /// Collects different refinement criteria results.
308  bool refinement_criterion(const AuxElement& ele,
309  const ElementAccessor<spacedim> &ele_acc);
310 
311  /// Refinement flag - checks only maximal level of refinement.
312  bool refinement_criterion_uniform(const AuxElement& ele);
313 
314  /// Refinement flag - measures discretisation error according to error control field.
315  bool refinement_criterion_error(const AuxElement& ele,
316  const Space<spacedim>::Point &centre,
317  const ElementAccessor<spacedim> &ele_acc
318  );
319 
320  /// Implements OutputMeshBase::construct_mesh
321  std::shared_ptr<OutputMeshBase> construct_mesh() override;
322 
323  /// Implements OutputMeshBase::make_serial_nodes_cache
324  std::shared_ptr<ElementDataCache<double>> make_serial_nodes_cache(std::shared_ptr<ElementDataCache<unsigned int>> global_offsets) override;
325 
326  /// Implements OutputMeshBase::make_serial_connectivity_cache
327  std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<ElementDataCache<unsigned int>> global_offsets) override;
328 };
329 
330 #endif // OUTPUT_MESH_HH_
331 
Space::Point
Armor::ArmaVec< double, spacedim > Point
Definition: point.hh:42
OutputMeshDiscontinuous::refinement_criterion_error
bool refinement_criterion_error(const AuxElement &ele, const Space< spacedim >::Point &centre, const ElementAccessor< spacedim > &ele_acc)
Refinement flag - measures discretisation error according to error control field.
Definition: output_mesh.cc:542
OutputMeshBase::refined
@ refined
refined mesh
Definition: output_mesh.hh:158
OutputMeshBase::spacedim
static const unsigned int spacedim
Shortcut instead of spacedim template. We suppose only spacedim=3 at the moment.
Definition: output_mesh.hh:74
OutputMeshBase::node_4_loc_
LongIdx * node_4_loc_
Index set assigning to local node index its global index.
Definition: output_mesh.hh:237
general_iterator.hh
Template Iter serves as general template for internal iterators.
armor.hh
OutputElementIterator
Iter< OutputElement > OutputElementIterator
Definition: output_mesh.hh:37
OutputMeshDiscontinuous::AuxElement
Auxiliary structure defining element of refined output mesh.
Definition: output_mesh.hh:295
OutputMesh::refinement_criterion
bool refinement_criterion()
Definition: output_mesh.cc:299
OutputMeshDiscontinuous::~OutputMeshDiscontinuous
~OutputMeshDiscontinuous()
Definition: output_mesh.cc:364
OutputMeshBase::get_master_mesh
std::shared_ptr< OutputMeshBase > get_master_mesh()
Return master output mesh if exists or shared_ptr of this object.
Definition: output_mesh.hh:130
Input
Abstract linear system class.
Definition: balance.hh:40
OutputMeshBase::discont
@ discont
discontinuous mesh
Definition: output_mesh.hh:159
Iter
General iterator template. Provides iterator over objects of type Object in some container.
Definition: general_iterator.hh:32
ElementDataCache
Definition: element_data_cache.hh:44
ASSERT
#define ASSERT(expr)
Definition: asserts.hh:350
distribution.hh
Support classes for parallel programing.
OutputMeshBase::el_ds_
Distribution * el_ds_
Parallel distribution of elements.
Definition: output_mesh.hh:236
point.hh
OutputMeshBase::offsets
std::shared_ptr< ElementDataCache< unsigned int > > offsets() const
Getter to offsets data.
Definition: output_mesh.hh:147
OutputMeshDiscontinuous::refine_aux_element
void refine_aux_element(const AuxElement &aux_element, std::vector< AuxElement > &refinement, const ElementAccessor< spacedim > &ele_acc)
Performs the actual refinement of AuxElement. Recurrent.
Definition: output_mesh.cc:370
OutputMeshBase::MeshType
MeshType
Definition: output_mesh.hh:155
OutputMeshBase::OutputMeshDiscontinuous
friend class OutputMeshDiscontinuous
Definition: output_mesh.hh:247
OutputMeshBase::el_4_loc_
LongIdx * el_4_loc_
Index set assigning to local element index its global index.
Definition: output_mesh.hh:234
OutputElement
Represents an element of the output mesh. Provides element access on the data of the output mesh (nod...
Definition: output_element.hh:38
OutputMeshBase::error_control_field_func_
ErrorControlFieldFunc error_control_field_func_
Refinement error control field function (hold value_list function of field).
Definition: output_mesh.hh:196
std::vector< double >
OutputMeshBase::offsets_
std::shared_ptr< ElementDataCache< unsigned int > > offsets_
Vector of offsets of node indices of elements. Maps elements to their nodes in connectivity_.
Definition: output_mesh.hh:210
ElementAccessor
Definition: dh_cell_accessor.hh:32
Distribution::size
unsigned int size() const
get global size
Definition: distribution.hh:118
OutputMeshBase::n_nodes
unsigned int n_nodes()
Returns number of nodes.
Definition: output_mesh.cc:107
OutputMeshBase::elem_ids_
std::shared_ptr< ElementDataCache< unsigned int > > elem_ids_
Vector gets ids of elements. Data is used in GMSH output.
Definition: output_mesh.hh:215
OutputMeshBase::partitions_
std::shared_ptr< ElementDataCache< int > > partitions_
Vector gets partitions of elements. Data is used in GMSH output.
Definition: output_mesh.hh:219
OutputMeshBase::orig_mesh_
Mesh * orig_mesh_
Pointer to the computational mesh.
Definition: output_mesh.hh:190
OutputMeshDiscontinuous::refinement_criterion
bool refinement_criterion(const AuxElement &ele, const ElementAccessor< spacedim > &ele_acc)
Collects different refinement criteria results.
Definition: output_mesh.cc:516
OutputVTK
This class is used for output data to VTK file format.
Definition: output_vtk.hh:44
OutputMeshDiscontinuous
Class represents output mesh with discontinuous elements.
Definition: output_mesh.hh:280
OutputMesh::construct_mesh
std::shared_ptr< OutputMeshBase > construct_mesh() override
Implements OutputMeshBase::construct_mesh.
Definition: output_mesh.cc:306
OutputMeshDiscontinuous::make_serial_connectivity_cache
std::shared_ptr< ElementDataCache< unsigned int > > make_serial_connectivity_cache(std::shared_ptr< ElementDataCache< unsigned int >> global_offsets) override
Implements OutputMeshBase::make_serial_connectivity_cache.
Definition: output_mesh.cc:610
index_types.hh
OutputMeshBase::OutputMeshBase
OutputMeshBase(Mesh &mesh)
Constructor. Takes computational mesh as a parameter.
Definition: output_mesh.cc:46
ASSERT_LT
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
Definition: asserts.hh:300
OutputMeshBase::mesh_type_
MeshType mesh_type_
Type of OutputMesh.
Definition: output_mesh.hh:198
OutputMeshBase::ErrorControlFieldFunc
std::function< void(const Armor::array &, const ElementAccessor< spacedim > &, std::vector< double > &)> ErrorControlFieldFunc
Definition: output_mesh.hh:77
OutputMeshBase::node_ids_
std::shared_ptr< ElementDataCache< unsigned int > > node_ids_
Vector gets ids of nodes. Data is used in GMSH output.
Definition: output_mesh.hh:213
OutputMeshBase::make_serial_connectivity_cache
virtual std::shared_ptr< ElementDataCache< unsigned int > > make_serial_connectivity_cache(std::shared_ptr< ElementDataCache< unsigned int >> global_offsets)=0
OutputMesh::create_refined_sub_mesh
void create_refined_sub_mesh() override
Implements OutputMeshBase::create_refined_sub_mesh.
Definition: output_mesh.cc:294
OutputMeshBase::make_serial_nodes_cache
virtual std::shared_ptr< ElementDataCache< double > > make_serial_nodes_cache(std::shared_ptr< ElementDataCache< unsigned int >> global_offsets)=0
OutputMeshBase::~OutputMeshBase
virtual ~OutputMeshBase()
Definition: output_mesh.cc:70
Distribution
Definition: distribution.hh:50
Input::Record
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
OutputMeshBase::n_elements
unsigned int n_elements()
Returns number of element.
Definition: output_mesh.cc:101
accessors.hh
OutputMesh::make_serial_nodes_cache
std::shared_ptr< ElementDataCache< double > > make_serial_nodes_cache(std::shared_ptr< ElementDataCache< unsigned int >> global_offsets) override
Implements OutputMeshBase::make_serial_nodes_cache.
Definition: output_mesh.cc:312
OutputMeshBase::create_refined_sub_mesh
virtual void create_refined_sub_mesh()=0
OutputMeshBase::make_parallel_master_mesh
virtual void make_parallel_master_mesh()
Create output mesh of parallel output (implemented only for discontinuous mesh)
Definition: output_mesh.hh:126
OutputTime
The class for outputting data during time.
Definition: output_time.hh:51
OutputMeshBase::input_record_
Input::Record input_record_
Input record for output mesh.
Definition: output_mesh.hh:187
OutputMeshDiscontinuous::construct_mesh
std::shared_ptr< OutputMeshBase > construct_mesh() override
Implements OutputMeshBase::construct_mesh.
Definition: output_mesh.cc:573
OutputMeshBase::n_local_nodes_
unsigned int n_local_nodes_
Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array.
Definition: output_mesh.hh:239
OutputMeshBase::construct_mesh
virtual std::shared_ptr< OutputMeshBase > construct_mesh()=0
OutputMeshDiscontinuous::make_serial_nodes_cache
std::shared_ptr< ElementDataCache< double > > make_serial_nodes_cache(std::shared_ptr< ElementDataCache< unsigned int >> global_offsets) override
Implements OutputMeshBase::make_serial_nodes_cache.
Definition: output_mesh.cc:579
OutputMeshBase
Base class for Output mesh.
Definition: output_mesh.hh:70
OutputMeshBase::set_error_control_field
void set_error_control_field(ErrorControlFieldFunc error_control_field_func)
Selects the error control field computing function of output field set according to input record.
Definition: output_mesh.cc:96
Input::Type::Record
Record type proxy class.
Definition: type_record.hh:182
OutputMeshDiscontinuous::create_refined_sub_mesh
void create_refined_sub_mesh() override
Implements OutputMeshBase::create_refined_sub_mesh.
Definition: output_mesh.cc:625
LongIdx
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
Definition: index_types.hh:24
OutputMeshBase::end
OutputElementIterator end()
Gives iterator to the LAST element of the output mesh.
Definition: output_mesh.cc:88
OutputMeshBase::master_mesh_
std::shared_ptr< OutputMeshBase > master_mesh_
Definition: output_mesh.hh:227
Mesh
Definition: mesh.h:359
OutputMSH
This class is used for output data to VTK file format.
Definition: output_msh.hh:30
OutputMeshBase::max_level_
const unsigned int max_level_
Maximal level of refinement.
Definition: output_mesh.hh:193
OutputMeshBase::node_ds_
Distribution * node_ds_
Parallel distribution of nodes. Depends on elements distribution.
Definition: output_mesh.hh:238
OutputMeshBase::create_id_caches
void create_id_caches()
Create nodes and elements data caches.
Definition: output_mesh.cc:113
OutputMeshBase::orig_element_indices_
std::shared_ptr< std::vector< unsigned int > > orig_element_indices_
Vector of element indices in the computational mesh. (Important when refining.)
Definition: output_mesh.hh:203
OutputMeshDiscontinuous::refinement_criterion_uniform
bool refinement_criterion_uniform(const AuxElement &ele)
Refinement flag - checks only maximal level of refinement.
Definition: output_mesh.cc:537
OutputMeshBase::create_sub_mesh
void create_sub_mesh()
Definition: output_mesh.cc:151
OutputMesh::~OutputMesh
~OutputMesh()
Definition: output_mesh.cc:289
OutputMeshBase::orig
@ orig
same as original (computational) mesh
Definition: output_mesh.hh:157
Armor::Array< double >
OutputMeshDiscontinuous::make_parallel_master_mesh
void make_parallel_master_mesh() override
Overrides OutputMeshBase::make_parallel_master_mesh.
Definition: output_mesh.cc:729
OutputMeshBase::refine_by_error_
bool refine_by_error_
True, if output mesh is to be refined by error criterion.
Definition: output_mesh.hh:199
OutputMesh::make_serial_connectivity_cache
std::shared_ptr< ElementDataCache< unsigned int > > make_serial_connectivity_cache(std::shared_ptr< ElementDataCache< unsigned int >> global_offsets) override
Implements OutputMeshBase::make_serial_connectivity_cache.
Definition: output_mesh.cc:324
OutputMeshBase::get_elems_n_nodes
std::shared_ptr< ElementDataCache< unsigned int > > get_elems_n_nodes()
Compute and return number of nodes for each elements (compute from offsets)
Definition: output_mesh.cc:256
OutputMeshDiscontinuous::AuxElement::nodes
std::vector< Space< spacedim >::Point > nodes
Definition: output_mesh.hh:296
OutputMeshBase::is_created
bool is_created()
Check if nodes_, connectivity_ and offsets_ data caches are created.
Definition: output_mesh.cc:145
OutputMeshBase::loc_4_el_
LongIdx * loc_4_el_
Index set assigning to global index its local element index.
Definition: output_mesh.hh:235
OutputMesh
Class represents output mesh with continuous elements.
Definition: output_mesh.hh:252
OutputMeshBase::OutputMesh
friend class OutputMesh
Definition: output_mesh.hh:246
OutputMeshBase::refinement_error_tolerance_
double refinement_error_tolerance_
Tolerance for error criterion refinement.
Definition: output_mesh.hh:200
OutputMeshBase::get_input_type
static const Input::Type::Record & get_input_type()
The specification of output mesh.
Definition: output_mesh.cc:31
OutputMeshBase::get_loc_elem_idx
LongIdx get_loc_elem_idx(LongIdx global_idx)
Definition: output_mesh.hh:140
OutputMeshBase::make_serial_master_mesh
void make_serial_master_mesh()
Synchronize parallel data and create serial COLECTIVE output mesh on zero process.
Definition: output_mesh.cc:217
OutputMeshBase::region_ids_
std::shared_ptr< ElementDataCache< unsigned int > > region_ids_
Vector gets ids of regions. Data is used in GMSH output.
Definition: output_mesh.hh:217
OutputMeshBase::begin
OutputElementIterator begin()
Gives iterator to the FIRST element of the output mesh.
Definition: output_mesh.cc:81
OutputMeshBase::nodes_
std::shared_ptr< ElementDataCache< double > > nodes_
Vector of node coordinates. [spacedim x n_nodes].
Definition: output_mesh.hh:206
OutputMeshBase::connectivity_
std::shared_ptr< ElementDataCache< unsigned int > > connectivity_
Vector maps the nodes to their coordinates in vector nodes_.
Definition: output_mesh.hh:208
OutputMeshDiscontinuous::AuxElement::level
unsigned int level
Definition: output_mesh.hh:297