Flow123d  JS_before_hm-1728-g5d7ebd453
accessors.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 accessors.hh
15  * @brief
16  */
17 
18 #ifndef ACCESSORS_HH_
19 #define ACCESSORS_HH_
20 
21 #include "mesh/bounding_box.hh"
22 #include "mesh/region.hh"
23 #include "mesh/elements.h"
24 #include "mesh/mesh.h"
25 #include "mesh/node_accessor.hh"
26 #include "mesh/ref_element.hh"
27 #include "la/distribution.hh"
28 #include "mesh/point.hh"
29 #include <vector>
30 #include <armadillo>
31 
32 
33 /**
34  * Due to circular dependence of return parameters in mesh accessors,
35  * and the intention to have all methods inlined,
36  * we gathered the accessors into a single file.
37  * This way, it is possible to implement it, see the simple test below.
38  *
39  * Do not include accessors_impl.hh file anywhere but at the end of this file!
40  *
41  * previous include loops:
42  * side -> boundary -> elemen accessor
43  * element accessor <-> side
44  * edge <-> side
45  * boundary -> edge
46  */
47 
48 // Compilable test of class loop dependence of return parameters.
49 // class A;
50 // class B;
51 
52 // class A{
53 // public:
54 // A()
55 // {};
56 
57 // B create_b();
58 // };
59 
60 // class B{
61 // public:
62 // B()
63 // {};
64 
65 // A create_a();
66 // };
67 
68 
69 // B A::create_b()
70 // { return B(); }
71 
72 // A B::create_a()
73 // { return A(); }
74 
75 
76 class Side;
77 class SiderIter;
78 class Edge;
79 class Boundary;
80 
81 /**
82  * Element accessor templated just by dimension of the embedding space, used by Fields.
83  * This should allow algorithms over elements where dimension of particular element is runtime parameter.
84  *
85  * This class suites as interface of Fields to the mesh elements, in particular this accessor knows directly
86  * the region, and also can be used as an accessor that works on the whole region if used by Fields that do not depend on
87  * particular elements as FieldConstant, FiledFormula, and FieldPython.
88  *
89  * TODO:
90  * - make this kind of accessor subclass of FieldCommonBase or at least move it into src/fields
91  * since it has functionality particular for Fields
92  *
93  * Ideas:
94  * need function to calculate intersection (object) of two ElementAccessors, but this definitely should be templated by
95  * dimension of the ref. element (or rather shape of ref. element), here we can have case dispatch
96  *
97  */
98 template <int spacedim>
99 class ElementAccessor {
100 public:
101  /// Default invalid accessor.
102  ElementAccessor();
103 
104  /// Regional accessor.
105  ElementAccessor(const Mesh *mesh, RegionIdx r_idx);
106 
107  /// Element accessor.
108  ElementAccessor(const Mesh *mesh, unsigned int idx);
109 
110  /// Incremental function of the Element iterator.
111  void inc();
112 
113  /// Return list of element vertices.
115 
116  /// Computes the measure of the element.
117  double measure() const;
118 
119  /** Computes the Jacobian of the element.
120  * J = det ( 1 1 1 1 )
121  * x1 x2 x3 x4
122  * y1 y2 y3 y4
123  * z1 z2 z3 z4
124  */
125  double tetrahedron_jacobian() const;
126 
127  /// Computes the barycenter.
128  arma::vec::fixed<spacedim> centre() const;
129 
130  /**
131  * Quality of the element based on the smooth and scale-invariant quality measures proposed in:
132  * J. R. Schewchuk: What is a Good Linear Element?
133  *
134  * We scale the measure so that is gives value 1 for regular elements. Line 1d elements
135  * have always quality 1.
136  */
137  double quality_measure_smooth() const;
138 
139  SideIter side(const unsigned int loc_index);
140 
141  const SideIter side(const unsigned int loc_index) const;
142 
143 
144 
145  bool is_regional() const {
146  return dim_ == undefined_dim_;
147  }
148 
149  bool is_elemental() const {
150  return ( is_valid() && ! is_regional() );
151  }
152 
153  bool is_valid() const {
154  return mesh_ != NULL;
155  }
156 
157  unsigned int dim() const
158  { return dim_; }
159 
160  const Element * element() const {
161  return &(mesh_->element_vec_[element_idx_]);
162  }
163 
164 
165  Region region() const
166  { return Region( r_idx_, mesh_->region_db()); }
167 
169  { return r_idx_; }
170 
171  /// We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular mesh
172  //unsigned int region_id() const {
173  // return region().id();
174  //}
175 
176  bool is_boundary() const {
177  return boundary_;
178  }
179 
180  /// Return local idx of element in boundary / bulk part of element vector
181  unsigned int idx() const {
182  if (boundary_) return ( element_idx_ - mesh_->bulk_size_ );
183  else return element_idx_;
184  }
185 
186  /// Return global idx of element in full element vector
187  unsigned int mesh_idx() const {
188  return element_idx_;
189  }
190 
191  unsigned int index() const {
192  return (unsigned int)mesh_->find_elem_id(element_idx_);
193  }
194 
195  unsigned int proc() const {
197  }
198 
199 
200  NodeAccessor<3> node(unsigned int ni) const {
201  return mesh_->node( element()->node_idx(ni) );
202  }
203 
204  /**
205  * Return bounding box of the element.
206  * Simpler code, but need to check performance penelty.
207  */
209  return BoundingBox(this->vertex_list());
210  }
211 
212  bool operator==(const ElementAccessor<spacedim>& other) const {
213  return (element_idx_ == other.element_idx_);
214  }
215 
216  inline bool operator!=(const ElementAccessor<spacedim>& other) const {
217  return (element_idx_ != other.element_idx_);
218  }
219 
220  /**
221  * -> dereference operator
222  *
223  * Allow simplify calling of element() method. Example:
224  @code
225  ElementAccessor<3> elm_ac(mesh, index);
226  arma::vec centre;
227  centre = elm_ac.element()->node_idx(0); // full format of access to element
228  centre = elm_ac->node_idx(0); // short format with dereference operator
229  @endcode
230  */
231  const Element * operator ->() const {
232  return &(mesh_->element_vec_[element_idx_]);
233  }
234 
235 
236 private:
237  /**
238  * When dim_ == undefined_dim_ ; the value of element_idx_ is invalid.
239  * Is used for ElementAccessors for whole region
240  */
241  static const unsigned int undefined_dim_ = 100;
242 
243  /// Dimension of reference element.
244  unsigned int dim_;
245 
246  /// Pointer to the mesh owning the element.
247  const Mesh *mesh_;
248  /// True if the element is boundary
249  bool boundary_;
250 
251  /// Index into Mesh::element_vec_ array.
252  unsigned int element_idx_;
253 
254  /// Region index.
256 };
257 
258 
259 
260 
261 
262 //=============================================================================
263 // Edge class
264 //=============================================================================
265 class Edge
266 {
267 public:
268  /// Default invalid edge accessor constructor.
269  Edge();
270 
271  /// Valid edge accessor constructor.
272  Edge(const Mesh *mesh, unsigned int edge_idx);
273 
274  /// Gets side iterator of the @p i -th side.
275  SideIter side(const unsigned int i) const;
276 
277 
278 
279  bool is_valid() const
280  { return mesh_ != nullptr; }
281 
282  /// Returns edge global index.
283  unsigned int idx() const {
284  ASSERT_DBG(is_valid());
285  return edge_idx_;
286  }
287 
288  /// Incremental function of the Edge iterator.
289  void inc() {
290  ASSERT_DBG(is_valid()).error("Do not call inc() for invalid accessor!");
291  edge_idx_++;
292  }
293 
294  /// Comparison operator of the iterator.
295  bool operator==(const Edge& other) const{
296  return (edge_idx_ == other.edge_idx_);
297  }
298 
299  /// Returns number of sides aligned with the edge.
300  unsigned int n_sides() const
301  { return edge_data()->n_sides;}
302 
303 private:
304  /// Pointer to the mesh owning the node.
305  const Mesh *mesh_;
306  /// Index into Mesh::edges vector.
307  unsigned int edge_idx_;
308 
309  /// Getter for edge data from mesh.
310  const EdgeData* edge_data() const;
311 };
312 
313 
314 
315 
316 
317 //=============================================================================
318 // Boundary class
319 //=============================================================================
320 class Boundary
321 {
322 public:
323  Boundary();
324  Boundary(BoundaryData* boundary_data);
325 
326  Edge edge();
328  Region region();
329  Element * element();
330 
331  bool is_valid() const {
332  return boundary_data_ != nullptr;
333  }
334 
335  Mesh* mesh() {
336  ASSERT_DBG(is_valid());
337  return boundary_data_->mesh_;
338  }
339 
341  ASSERT_DBG(is_valid());
342  return boundary_data_->edge_idx_;
343  }
344 
346  ASSERT_DBG(is_valid());
347  return boundary_data_->bc_ele_idx_;
348  }
349 
350 private:
352 };
353 
354 
355 
356 
357 
358 //=============================================================================
359 // Side class
360 //=============================================================================
361 class Side {
362 public:
363  /// Default invalid side accessor constructor.
364  Side();
365 
366  /// Valid edge accessor constructor.
367  Side(const Mesh * mesh, unsigned int elem_idx, unsigned int set_lnum);
368 
369  double measure() const; ///< Calculate metrics of the side
370  arma::vec3 centre() const; ///< Centre of side
371  arma::vec3 normal() const; ///< Vector of (generalized) normal
372  double diameter() const; ///< Calculate the side diameter.
373 
374  /// Returns dimension of the side, that is dimension of the element minus one.
375  unsigned int dim() const;
376 
377  /// Returns true for all sides either on boundary or connected to vb neigboring.
378  bool is_external() const;
379 
380  /// Returns true for side on the boundary.
381  bool is_boundary() const;
382 
383  /// Returns node for given local index @p i on the side.
384  NodeAccessor<3> node(unsigned int i) const;
385 
386  /// Returns iterator to the element of the side.
387  ElementAccessor<3> element() const;
388 
389  /// Returns global index of the edge connected to the side.
390  unsigned int edge_idx() const;
391 
392  /// Returns pointer to the edge connected to the side.
393  Edge edge() const;
394 
395  /**
396  * Returns boundary condition prescribed on the side.
397  * Fails on assert if side if not on boundary and no BC is prescribed.
398  */
399  Boundary cond() const;
400 
401  /// Returns global index of the prescribed boundary condition.
402  unsigned int cond_idx() const;
403 
404 
405 
406  /// Returns number of nodes of the side.
407  unsigned int n_nodes() const
408  { return dim()+1; }
409 
410  /// Returns pointer to the mesh.
411  const Mesh * mesh() const
412  { return this->mesh_; }
413 
414  /// Returns local index of the side on the element.
415  unsigned int side_idx() const
416  { return side_idx_; }
417 
418  /// Returns index of element in Mesh::element_vec_.
419  unsigned int elem_idx() const
420  { return elem_idx_; }
421 
422  /// Returns true if the side has assigned element.
423  bool is_valid() const
424  { return mesh_!= nullptr; }
425 
426  /// Iterate over local sides of the element.
427  void inc() {
428  ASSERT_DBG(is_valid()).error("Do not call inc() for invalid accessor!");
429  side_idx_++;
430  }
431 
432  bool operator==(const Side &other) const {
433  return (mesh_ == other.mesh_ ) && ( elem_idx_ == other.elem_idx_ )
434  && ( side_idx_ == other.side_idx_ );
435  }
436 
437  bool operator!=(const Side &other) const {
438  return !( *this == other);
439  }
440 
441  /// This is necessary by current DofHandler, should change this
442  //void *make_ptr() const;
443 private:
444 
445  arma::vec3 normal_point() const;
446  arma::vec3 normal_line() const;
447  arma::vec3 normal_triangle() const;
448 
449  // Topology of the mesh
450 
451  const Mesh * mesh_; ///< Pointer to Mesh to which belonged
452  unsigned int elem_idx_; ///< Index of element in Mesh::element_vec_
453  unsigned int side_idx_; ///< Local # of side in element (to remove it, we heve to remove calc_side_rhs)
454 
455 };
456 
457 
458 /*
459  * Iterator to a side.
460  */
461 class SideIter {
462 public:
464  {}
465 
466  SideIter(const Side &side)
467  : side_(side)
468  {}
469 
470  bool operator==(const SideIter &other) {
471  return (side_.mesh() == other.side_.mesh() ) && ( side_.elem_idx() == other.side_.elem_idx() )
472  && ( side_.side_idx() == other.side_.side_idx() );
473  }
474 
475 
476  bool operator!=(const SideIter &other) {
477  return !( *this == other);
478  }
479 
480  /// * dereference operator
481  const Side & operator *() const
482  { return side_; }
483 
484  /// -> dereference operator
485  const Side * operator ->() const
486  { return &side_; }
487 
488  /// prefix increment iterate only on local element
490  side_.inc();
491  return (*this);
492  }
493 
494 private:
496 };
497 
498 
499 
500 #include "mesh/accessors_impl.hh"
501 
502 #endif /* ACCESSORS_HH_ */
ElementAccessor::dim
unsigned int dim() const
Definition: accessors.hh:157
SideIter::operator->
const Side * operator->() const
-> dereference operator
Definition: accessors.hh:485
Mesh::get_el_ds
Distribution * get_el_ds() const
Definition: mesh.h:171
Side::edge
Edge edge() const
Returns pointer to the edge connected to the side.
Definition: accessors_impl.hh:242
Side::side_idx_
unsigned int side_idx_
Local # of side in element (to remove it, we heve to remove calc_side_rhs)
Definition: accessors.hh:453
Side::mesh
const Mesh * mesh() const
Returns pointer to the mesh.
Definition: accessors.hh:411
Boundary
Definition: accessors.hh:320
ElementAccessor::mesh_idx
unsigned int mesh_idx() const
Return global idx of element in full element vector.
Definition: accessors.hh:187
ElementAccessor::r_idx_
RegionIdx r_idx_
Region index.
Definition: accessors.hh:255
ref_element.hh
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.
ElementAccessor::operator==
bool operator==(const ElementAccessor< spacedim > &other) const
Definition: accessors.hh:212
ElementAccessor::dim_
unsigned int dim_
Dimension of reference element.
Definition: accessors.hh:244
SideIter::side_
Side side_
Definition: accessors.hh:495
Side::elem_idx_
unsigned int elem_idx_
Index of element in Mesh::element_vec_.
Definition: accessors.hh:452
Side::is_external
bool is_external() const
Returns true for all sides either on boundary or connected to vb neigboring.
Definition: accessors_impl.hh:218
ElementAccessor::tetrahedron_jacobian
double tetrahedron_jacobian() const
Definition: accessors_impl.hh:69
ElementAccessor::mesh_
const Mesh * mesh_
Pointer to the mesh owning the element.
Definition: accessors.hh:247
Boundary::edge_idx
uint edge_idx()
Definition: accessors.hh:340
Edge::mesh_
const Mesh * mesh_
Pointer to the mesh owning the node.
Definition: accessors.hh:305
SideIter::SideIter
SideIter(const Side &side)
Definition: accessors.hh:466
Side::Side
Side()
Default invalid side accessor constructor.
Definition: accessors_impl.hh:203
Edge::inc
void inc()
Incremental function of the Edge iterator.
Definition: accessors.hh:289
Side::mesh_
const Mesh * mesh_
Pointer to Mesh to which belonged.
Definition: accessors.hh:451
distribution.hh
Support classes for parallel programing.
Edge::n_sides
unsigned int n_sides() const
Returns number of sides aligned with the edge.
Definition: accessors.hh:300
point.hh
BoundaryData::edge_idx_
unsigned int edge_idx_
Definition: mesh_data.hh:49
Side::is_boundary
bool is_boundary() const
Returns true for side on the boundary.
Definition: accessors_impl.hh:223
Mesh::element_vec_
vector< Element > element_vec_
Definition: mesh.h:573
ASSERT_DBG
#define ASSERT_DBG(expr)
Definition: include_fadbad.hh:28
Side::dim
unsigned int dim() const
Returns dimension of the side, that is dimension of the element minus one.
Definition: accessors_impl.hh:213
std::vector< arma::vec3 >
Side::measure
double measure() const
Calculate metrics of the side.
Definition: accessors.cc:27
ElementAccessor
Definition: dh_cell_accessor.hh:32
Side::elem_idx
unsigned int elem_idx() const
Returns index of element in Mesh::element_vec_.
Definition: accessors.hh:419
arma::vec3
Definition: doxy_dummy_defs.hh:17
Edge::idx
unsigned int idx() const
Returns edge global index.
Definition: accessors.hh:283
SideIter::operator==
bool operator==(const SideIter &other)
Definition: accessors.hh:470
Mesh::get_row_4_el
LongIdx * get_row_4_el() const
Definition: mesh.h:174
BoundaryData
Definition: mesh_data.hh:40
Edge::edge_data
const EdgeData * edge_data() const
Getter for edge data from mesh.
Definition: accessors_impl.hh:185
EdgeData
Definition: mesh_data.hh:25
uint
unsigned int uint
Definition: mh_dofhandler.hh:101
Side::cond
Boundary cond() const
Definition: accessors_impl.hh:246
ElementAccessor::is_elemental
bool is_elemental() const
Definition: accessors.hh:149
Edge::is_valid
bool is_valid() const
Definition: accessors.hh:279
ElementAccessor::element
const Element * element() const
Definition: accessors.hh:160
Edge::Edge
Edge()
Default invalid edge accessor constructor.
Definition: accessors_impl.hh:175
BoundaryData::bc_ele_idx_
unsigned int bc_ele_idx_
Definition: mesh_data.hh:53
ElementAccessor::quality_measure_smooth
double quality_measure_smooth() const
Definition: accessors_impl.hh:128
Side::normal_point
arma::vec3 normal_point() const
This is necessary by current DofHandler, should change this.
Definition: accessors.cc:64
Element
Definition: elements.h:39
accessors_impl.hh
Implementation of the inline functions of the mesh accessors.
BoundingBox
Bounding box in 3d ambient space.
Definition: bounding_box.hh:54
Side::normal_triangle
arma::vec3 normal_triangle() const
Definition: accessors.cc:101
Region
Definition: region.hh:146
Distribution::get_proc
unsigned int get_proc(unsigned int idx) const
get processor of the given index
Definition: distribution.cc:130
Boundary::bc_ele_idx
uint bc_ele_idx()
Definition: accessors.hh:345
ElementAccessor::is_boundary
bool is_boundary() const
We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular...
Definition: accessors.hh:176
ElementAccessor::bounding_box
BoundingBox bounding_box() const
Definition: accessors.hh:208
Side::edge_idx
unsigned int edge_idx() const
Returns global index of the edge connected to the side.
Definition: accessors_impl.hh:238
Side::cond_idx
unsigned int cond_idx() const
Returns global index of the prescribed boundary condition.
Definition: accessors_impl.hh:250
elements.h
Edge::side
SideIter side(const unsigned int i) const
Gets side iterator of the i -th side.
Definition: accessors_impl.hh:192
Side::normal_line
arma::vec3 normal_line() const
Definition: accessors.cc:80
ElementAccessor::operator!=
bool operator!=(const ElementAccessor< spacedim > &other) const
Definition: accessors.hh:216
ElementAccessor::inc
void inc()
Incremental function of the Element iterator.
Definition: accessors_impl.hh:53
Boundary::is_valid
bool is_valid() const
Definition: accessors.hh:331
Side::inc
void inc()
Iterate over local sides of the element.
Definition: accessors.hh:427
Side
Definition: accessors.hh:361
ElementAccessor::undefined_dim_
static const unsigned int undefined_dim_
Definition: accessors.hh:241
Mesh::find_elem_id
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:387
Mesh::region_db
const RegionDB & region_db() const
Definition: mesh.h:160
SideIter::operator*
const Side & operator*() const
Definition: accessors.hh:481
ElementAccessor::boundary_
bool boundary_
True if the element is boundary.
Definition: accessors.hh:249
SideIter::SideIter
SideIter()
Definition: accessors.hh:463
Side::element
ElementAccessor< 3 > element() const
Returns iterator to the element of the side.
Definition: accessors_impl.hh:233
ElementAccessor::vertex_list
vector< arma::vec3 > vertex_list() const
Return list of element vertices.
Definition: accessors_impl.hh:62
mesh.h
Edge::operator==
bool operator==(const Edge &other) const
Comparison operator of the iterator.
Definition: accessors.hh:295
SideIter::operator!=
bool operator!=(const SideIter &other)
Definition: accessors.hh:476
Boundary::element_accessor
ElementAccessor< 3 > element_accessor()
Definition: accessors_impl.hh:274
Side::n_nodes
unsigned int n_nodes() const
Returns number of nodes of the side.
Definition: accessors.hh:407
ElementAccessor::proc
unsigned int proc() const
Definition: accessors.hh:195
bounding_box.hh
ElementAccessor::node
NodeAccessor< 3 > node(unsigned int ni) const
Definition: accessors.hh:200
Side::centre
arma::vec3 centre() const
Centre of side.
Definition: accessors.cc:116
Side::side_idx
unsigned int side_idx() const
Returns local index of the side on the element.
Definition: accessors.hh:415
Boundary::element
Element * element()
Definition: accessors_impl.hh:285
EdgeData::n_sides
unsigned int n_sides
Definition: mesh_data.hh:29
ElementAccessor::is_valid
bool is_valid() const
Definition: accessors.hh:153
Mesh
Definition: mesh.h:77
ElementAccessor::ElementAccessor
ElementAccessor()
Default invalid accessor.
Definition: accessors_impl.hh:25
Edge
Definition: accessors.hh:265
Side::operator!=
bool operator!=(const Side &other) const
Definition: accessors.hh:437
Side::diameter
double diameter() const
Calculate the side diameter.
Definition: accessors.cc:132
RegionIdx
Definition: region.hh:67
ElementAccessor::region
Region region() const
Definition: accessors.hh:165
Boundary::mesh
Mesh * mesh()
Definition: accessors.hh:335
Boundary::boundary_data_
BoundaryData * boundary_data_
Definition: accessors.hh:351
NodeAccessor
Definition: mesh.h:55
region.hh
Boundary::Boundary
Boundary()
Definition: accessors_impl.hh:260
ElementAccessor::idx
unsigned int idx() const
Return local idx of element in boundary / bulk part of element vector.
Definition: accessors.hh:181
ElementAccessor::operator->
const Element * operator->() const
Definition: accessors.hh:231
ElementAccessor::element_idx_
unsigned int element_idx_
Index into Mesh::element_vec_ array.
Definition: accessors.hh:252
Mesh::bulk_size_
unsigned int bulk_size_
Count of bulk elements.
Definition: mesh.h:579
Side::is_valid
bool is_valid() const
Returns true if the side has assigned element.
Definition: accessors.hh:423
SideIter::operator++
SideIter & operator++()
prefix increment iterate only on local element
Definition: accessors.hh:489
Side::node
NodeAccessor< 3 > node(unsigned int i) const
Returns node for given local index i on the side.
Definition: accessors_impl.hh:227
ElementAccessor::side
SideIter side(const unsigned int loc_index)
Definition: accessors_impl.hh:160
Mesh::node
NodeAccessor< 3 > node(unsigned int idx) const
Create and return NodeAccessor to node of given idx.
Definition: mesh.cc:919
BoundaryData::mesh_
Mesh * mesh_
Definition: mesh_data.hh:54
Edge::edge_idx_
unsigned int edge_idx_
Index into Mesh::edges vector.
Definition: accessors.hh:307
Side::operator==
bool operator==(const Side &other) const
Definition: accessors.hh:432
ElementAccessor::index
unsigned int index() const
Definition: accessors.hh:191
Boundary::region
Region region()
Definition: accessors_impl.hh:280
SideIter
Definition: accessors.hh:461
Boundary::edge
Edge edge()
Definition: accessors_impl.hh:268
Side::normal
arma::vec3 normal() const
Vector of (generalized) normal.
Definition: accessors.cc:48
ElementAccessor::measure
double measure() const
Computes the measure of the element.
Definition: accessors_impl.hh:82
ElementAccessor::region_idx
RegionIdx region_idx() const
Definition: accessors.hh:168
ElementAccessor::centre
arma::vec::fixed< spacedim > centre() const
Computes the barycenter.
Definition: accessors_impl.hh:112
ElementAccessor::is_regional
bool is_regional() const
Definition: accessors.hh:145
node_accessor.hh