Flow123d  intersections_paper-476-gbe68821
ref_element.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 ref_element.hh
15  * @brief Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.
16  * @author Jan Stebel
17  * @todo
18  *
19  * TODO: reconsider following whether it is actual...
20  * - design interface in such a way, that we can change numbering
21  * - design numbering and orientations on ref element that is consistent (orientation and numbering od 2d el. match sides of 3d),
22  * and possibly allows permute vertices of elements so that sides sharing an edge match numbering and orientation (we dos'nt need permute faces)
23  *
24  * Proposal(prefers combinatoric order) :
25  * 1D - orientation V0 -> V1
26  *
27  * 2D - edges: E0: V0 -> V1,
28  * E1: V0 -> V2
29  * E2: V1 -> V2
30  * This maximize number of edge orientations achievable by edge permutations
31  * edge numbering edge orientation( in original numbering)
32  * 0 1 2 + + +
33  * 0 2 1 - + +
34  * 1 0 2 + + -
35  * 1 2 0 - - +
36  * 2 0 1 + - -
37  * 2 1 0 - - -
38  *
39  * vertices edges normal (out = +)
40  * 3D - sides: S0: 0 1 2 E0 E1 E3 -
41  * S1: 0 1 3 E0 E2 E4 +
42  * S2: 0 2 3 E1 E2 E5 -
43  * S3: 1 2 3 E3 E4 E5 -
44  *
45  * edges: E0: V0 -> V1 x direction
46  * E1: V0 -> V2 y direction
47  * E2: V0 -> V3 z direction
48  * E3: V1 -> V2
49  * E4: V1 -> V3
50  * E5: V2 -> V3
51  *
52  * - functions from DEAL.ii:
53  * bool is_inside_unit_cell( point )
54  * line_to_cell_vertices(line, vertex) vertex index on line to index on whole element
55  * face_to_cell_vertices(face, vertex, Orientation), Orientation should be some class describing permutation of shared face to element's face/side
56  * face_to_cel_lines
57  * standard_to_real_face_vertex(vertex, Orientation), maps vertex to permuted face
58  * real_to_standard_face_vertex - inverse
59  * ... same for line; we should need also something like standard_to_real_line_vertex; Deal dosn;t support Orientation changes for 2D element faces
60  * Point unit_cell_vertex(vertex) - coordinates
61  * project_to_unit_cell
62  * distance_to_unit_cell
63  * d_linear_shape_function
64  *
65  * - can not change numbering of element sides due to DarcyFlow, which use hardwired side numbering in construction of basis functions
66  * - any change of side numbering requires also change in flow/old_bcd.cc
67  *
68  *
69  */
70 
71 #ifndef REF_ELEMENT_HH_
72 #define REF_ELEMENT_HH_
73 
74 #include <armadillo>
75 #include "system/system.hh"
76 
77 
78 /*
79  * Ordering of nodes and sides in reference elements
80  * =================================================
81  *
82  * TODO we want the following (22.10.):
83  *
84  * 1D element (line segment) 2D element (triangle) 3D element (tetrahedron)
85  *
86  * z
87  * .
88  * ,/
89  * /
90  * 3
91  * y ,/|`\
92  * ^ ,/ | `\
93  * | ,/ '. `\
94  * 2 ,/ | `\
95  * |`\ ,/ | `\
96  * | `\ 0-----------'.--------1 --> x
97  * | `\ `\. | ,/
98  * | `\ `\. | ,/
99  * | `\ `\. '. ,/
100  * 0----------1 --> x 0----------1 --> x `\. |/
101  * `2
102  * `\.
103  * `y
104  *
105  * side id node ids side id node ids side id node ids normal
106  * 0 0 0 0,1 0 0,1,2 OUT
107  * 1 1 1 0,2 1 0,1,3 IN
108  * 2 1,2 2 0,2,3 OUT
109  * 3 1,2,3 IN
110  *
111  *
112  * nodes coordinates:
113  * 0 [0] 0 [0,0] 0 [0,0,0]
114  * 1 [1] 1 [1,0] 1 [1,0,0]
115  * 2 [0,1] 2 [0,1,0]
116  * 3 [0,0,1]
117  *
118  * barycentric coordinates of nodes:
119  * 0 [1,0] 0 [1,0,0] 0 [1,0,0,0]
120  * 1 [0,1] 1 [0,1,0] 1 [0,1,0,0]
121  * 2 [0,0,1] 2 [0,0,1,0]
122  * 3 [0,0,0,1]
123  */
124 
125 /** Auxilliary class representing vector of indices (unsigned int).
126  * @tparam Size is the fixed size of the vector.
127  */
128 /*
129 template<unsigned int Size>
130 class IdxVector{
131  unsigned int data_[Size]; ///< Array with indices.
132 
133  public:
134  /// Constructor taking in array of indices.
135  IdxVector(std::array<unsigned int,Size> data_in);
136  /// Constructor enabling creating object with initializer list {...}.
137  IdxVector(std::initializer_list<unsigned int> data_in);
138  /// Getter for index @p idx.
139  unsigned int operator[](unsigned int idx) const;
140 };
141 */
142 
143 template<std::size_t Size>
144 using IdxVector = std::array<unsigned int, Size>;
145 
146 
147 /** Auxilliary structure that is used to pass template arguments into interact function of RefElement:
148  * RefElement<dim>::interact( Interaction<OutDim,InDim>(i) )
149  *
150  * This enables automatic deduction of dimensional template arguments.
151  * @see @p RefElement<dim>::interact
152  */
153 template <unsigned int OutDim, unsigned int InDim>
154 struct Interaction {
155  Interaction(unsigned int i) : i_(i) {}
156  unsigned int i_;
157 };
158 
159 template<unsigned int dim>
161 {
162 public:
163  typedef arma::vec::fixed<dim> LocalPoint;
164  /**
165  * Barycentric coordinates.
166  *
167  * e.g. coordinates (a,b,c) on triangle with vertices X, Y, Z
168  * represents a point: a*X+b*Y+c*Z
169  */
170  typedef arma::vec::fixed<dim+1> BaryPoint;
171  typedef arma::vec::fixed<dim> FaceBaryPoint;
172 
173  /**
174  * Return coordinates of given node.
175  * @see the class documentation @p RefElement
176  * @param nid Node number.
177  * NOTE: Implementation is dependent on current node and side numbering.
178  */
179  static LocalPoint node_coords(unsigned int nid);
180 
181  /**
182  * Compute normal vector to a given side.
183  * @param sid Side number.
184  */
185  static LocalPoint normal_vector(unsigned int sid);
186 
187 
188  /**
189  * If the given barycentric coordinate is in the ref. element, return unchanged.
190  * If the given barycentric coordinate is out of the ref. element,
191  * project it on the surface of the ref. element.
192  */
193  static BaryPoint clip(const BaryPoint &barycentric);
194 
195  /** Returns orientation of the normal of side @p sid. 0 -> OUT, 1 -> IN.
196  * NOTE: Implementation is dependent on current node and side numbering.
197  */
198  static unsigned int normal_orientation(unsigned int sid);
199 
200  static double side_measure(unsigned int sid);
201 
202  /**
203  * Returns index of the node that is oposite to side of given index @p sid.
204  * Note: It is dependent on current node and side numbering.
205  * @param sid Side number.
206  * NOTE: Implementation is dependent on current node and side numbering.
207  */
208  static unsigned int oposite_node(unsigned int sid);
209 
210  /**
211  * Return index of 1D line, shared by two faces @p f1 and @p f2 of the reference tetrahedron.
212  * Implemented only for @p dim == 3.
213  */
214  static unsigned int line_between_faces(unsigned int f1, unsigned int f2);
215 
216 
217  static const unsigned int n_sides = dim + 1; ///< Number of sides.
218  static const unsigned int n_nodes = dim + 1; ///< Number of nodes.
219  static const unsigned int n_nodes_per_side = dim; ///< Number of nodes on one side.
220  static const unsigned int n_lines_per_node = dim; ///< Number of lines with one common node.
221  static const unsigned int n_nodes_per_line = 2; ///< Number of nodes in one line.
222  static const unsigned int n_sides_per_line = 2; ///< Number of sides with one common line. @p dim == 3.
223  static const unsigned int n_sides_per_node = dim; ///< Number of sides with one common line.
224 
225  /// Number of lines on boundary of one side.
226  static const unsigned int n_lines_per_side = (unsigned int)((dim * (dim - 1)) / 2);//( dim == 3 ? 3 : 0);// Kombinační číslo dim nad dvěma
227 
228  /// Number of lines, i.e. @p object of dimension @p dim-2 on the boundary of the reference element.
229  static const unsigned int n_lines = (unsigned int)((dim * (dim + 1)) / 2); //( dim == 3 ? 6 : dim == 2 ? 3 : dim == 1 ? 1 : 0); součet posloupnosti
230 
231 
232 // /**
233 // * Node numbers for each side.
234 // */
235 // static const unsigned int side_nodes[n_sides][n_nodes_per_side];
236 //
237 // /**
238 // * Indices of 1D lines of the 2D sides of an tetrahedron. Nonempty only for @p dim==3.
239 // */
240 // static const unsigned int side_lines[n_sides][n_lines_per_side];
241 //
242 // /**
243 // * Nodes of 1D lines of the tetrahedron.
244 // */
245 // static const unsigned int line_nodes[n_lines][2];
246 //
247 // /**
248 // * Indices of sides for each line. Nonempty only for @p dim==3 and @p dim==2.
249 // */
250 // static const unsigned int line_sides[n_lines][2];
251 
252 
254 
255  /**
256  * Number of permutations of nodes on sides.
257  * dim value
258  * -----------
259  * 1 1
260  * 2 2
261  * 3 6
262  */
263  static const unsigned int n_side_permutations = (dim+1)*(2*dim*dim-5*dim+6)/6;
264 
265  /**
266  * Permutations of nodes on sides.
267  */
268  static const unsigned int side_permutations[n_side_permutations][n_nodes_per_side];
269 
270  /**
271  * For a given permutation @p p of nodes finds its index within @p side_permutations.
272  * @param p Permutation of nodes.
273  */
274  static unsigned int permutation_index(unsigned int p[n_nodes_per_side]);
275 
276  /** @brief Converts from local to barycentric coordinates.
277  * @param lp point in local coordinates (x,y)
278  * @return point in barycentric coordinates (1-x-y, x, y)
279  */
280  static BaryPoint local_to_bary(const LocalPoint& lp);
281 
282  /** @brief Converts from barycentric to local coordinates.
283  * @param bp point in barycentric coordinates
284  * @return point in local coordinates
285  */
286  static LocalPoint bary_to_local(const BaryPoint& bp);
287 
289 
290  /**
291  * Used in the clip method.
292  */
293  static BarycentricUnitVec make_bary_unit_vec();
294 
295  /**
296  * For given barycentric coordinates on the ref element returns barycentric coordinates
297  * on the ref. element of given face. Assumes that the input point is on the face.
298  * Barycentric order: (complanatory, local_coords )
299  */
300  static FaceBaryPoint barycentric_on_face(const BaryPoint &barycentric, unsigned int i_face);
301 
302 
304  static CentersList centers_of_subelements(unsigned int sub_dim);
305 
306  /**
307  * According to positions of zeros in barycentric coordinates, it gives the index of subdim-simplex
308  * in the reference element. Number of zeros must be equal to (3-subdim).
309  * e.g.:
310  * if 1 zeros, return index of side (subdim 2)
311  * if 2 zeros, return index of edge (subdim 1)
312  * if 3 zeros, return index of vertex (subdim 0)
313  */
314  template<unsigned int subdim> static unsigned int topology_idx(unsigned int zeros_positions);
315 
316  /** Function returns number of subdim-simplices inside dim-simplex.
317  * The aim is covering all the n_**** members with a single function.
318  * TODO: think of generalization for n_****_per_**** members, like function @p interact:
319  * template<unsigned int subdimA, unsigned int subdimB> static unsigned int count();
320  */
321  template<unsigned int subdim> static unsigned int count();
322 
323  /**
324  * @param sid - index of a sub-simplex in a simplex
325  * return an array of barycentric coordinates on <dim> simplex from <subdim> simplex
326  * for example: simplex<3> - ABCD and its subsubsimplex<1> AD (line index: 3)
327  * AD has barycoords for A (1,0), for D (0,1), but A in ABCD is (1,0,0,0) and D is (0,0,0,1)
328  * this method creates array ((1,0,0,0),(0,0,0,1))
329  */
330  template<unsigned int subdim> static arma::mat::fixed<dim+1,subdim+1> bary_coords(unsigned int sid);
331 
332  /** Interpolate barycentric coords to a higher dimension of a simplex.
333  * @param coord - barycentric coords of a point on a sub-simplex
334  * @param sub_simplex_idx - id of sub-simplex on a simplex
335  */
336  template<unsigned int subdim> static BaryPoint interpolate(arma::vec::fixed<subdim+1> coord, int sub_simplex_idx);
337 
338 
339  /**
340  * Basic line interpolation.
341  */
342  static BaryPoint line_barycentric_interpolation(BaryPoint first_coords,
343  BaryPoint second_coords,
344  double first_theta, double second_theta, double theta);
345 
346  /**
347  * Usage:
348  * RefElement<3>::interact(Interaction<2,0>(1))
349  * (means: In tetrahedron <3>, give indices of sides <2>, connected by node <0> with index 1)
350  * RefElement<3>::interact(Interaction<2,0>(1))[1]
351  * (as above, but give only the side with index 1)
352  *
353  * Template usage: RefElement<dim>::interact(Interaction<OutDim, InDim>(i))[j]
354  * (means: on dim-dimensional reference element, go on InDim-dimensional subelement with index i,
355  * which connects OutDim-dimnesional subelements and select the one with index j)
356  *
357  * This method serves as an interface to topology information of the reference element.
358  * It returns indices of OutDim-dimensional object
359  * of InDim-dimnesional object of given index
360  * in dim-dimnesional reference element.
361  * @tparam interaction - auxilliary object carying the index and the template arguments OutDim and InDim
362  * @tparam OutDim - output dimension (give me node-0, line-1, side-2), <= dim
363  * @tparam InDim - input dimension (for node-0, line-1, side-2), <= dim
364  * @return vector of indices of OutDim-dimensional subelements represented by @p IdxVector object.
365  *
366  * possible calls:
367  * dim OutDim InDim return
368  * 1,2,3 0 1 InDim+1 - give me indices of nodes of line of given index
369  * 3 0 2 InDim+1 - give me indices of nodes of a side (triangle) of given index
370  * 3 1 2 InDim+1 - give me indices of lines of side (triangle) of given index
371  *
372  * 1,2,3 1 0 dim-InDim - give me indices of lines with common node of given index
373  * 3 2 0 dim-InDim - give me indices of sides (triangles) with common node of given index
374  * 3 2 1 dim-InDim - give me indices of sides (triangles) with common line of given index
375  *
376  */
377  template < template <unsigned int OutDim, unsigned int InDim> class TInteraction, unsigned int OutDim, unsigned int InDim>
378  static const IdxVector< (InDim>OutDim ? InDim+1 : dim-InDim) > interact( TInteraction<OutDim,InDim> interaction );
379 
380 
381 private:
382  /// Internal part of the interact function.
383  template<unsigned int OutDim, unsigned int InDim>
384  static const IdxVector< (InDim>OutDim ? InDim+1 : dim-InDim) > interact_(unsigned int index);
385 
386  static const IdxVector<n_nodes_per_line> line_nodes_[n_lines]; ///< For given line, returns its nodes indices.
387  static const IdxVector<n_lines_per_node> node_lines_[n_nodes]; ///< For given node, returns lines indices.
388  static const IdxVector<n_nodes_per_side> side_nodes_[n_sides]; ///< For given side, returns nodes indices. For @p dim == 3.
389  static const IdxVector<n_sides_per_node> node_sides_[n_nodes]; ///< For given node, returns sides indices. For @p dim == 3.
390  static const IdxVector<n_sides_per_line> line_sides_[n_lines]; ///< For given line, returns sides indices. For @p dim == 3.
391  static const IdxVector<n_lines_per_side> side_lines_[n_sides]; ///< For given side, returns lines indices. For @p dim == 3.
392 
393  //TODO: implement for 1d and 2d
394  static const IdxVector<n_lines> topology_zeros_[dim]; ///< Maps the zero mask of the barycentric coordinates to topology indices.
395 };
396 
397 
398 
399 /************************* template implementation ****************************/
400 
401 template<unsigned int dim>
402 template<unsigned int subdim> inline
403 arma::mat::fixed<dim+1,subdim+1> RefElement<dim>::bary_coords(unsigned int sid){
404  ASSERT_LT_DBG(subdim, dim).error("Dimension mismatch!");
405  arma::mat::fixed<dim+1,subdim+1> bary_c;
406 
407  for(unsigned int i = 0; i < subdim+1; i++){
408  unsigned int nid = interact_<0,subdim>(sid)[i];
409  bary_c.col(i).zeros();
410  bary_c.col(i)(nid) = 1;
411  }
412 
413  return bary_c;
414 };
415 
416 
417 template<unsigned int dim> inline
418 arma::vec::fixed<dim> RefElement<dim>::node_coords(unsigned int nid)
419 {
420  ASSERT_LT_DBG(nid, n_nodes).error("Node number is out of range!");
421 
422  arma::vec::fixed<dim> p;
423  p.zeros();
424 
425  if (nid > 0)
426  p(nid-1) = 1;
427 
428  return p;
429 }
430 
431 
432 template<unsigned int dim>
433 template<unsigned int subdim>
434 auto RefElement<dim>::interpolate(arma::vec::fixed<subdim+1> coord, int sub_simplex_idx) -> BaryPoint
435 {
436  return RefElement<dim>::bary_coords<subdim>(sub_simplex_idx)*coord;
437 };
438 /*
439 template <unsigned int Size>
440 IdxVector<Size>::IdxVector(std::array<unsigned int,Size> data_in)
441 : data_(data_in){}
442 
443 template <unsigned int Size>
444 IdxVector<Size>::IdxVector(std::initializer_list<unsigned int> data_in)
445 {
446  ASSERT_EQ_DBG(data_in.size(), Size).error("Incorrect data size.");
447  std::copy(data_in.begin(), data_in.end(), data_);
448 }
449 
450 template <unsigned int Size>
451 inline unsigned int IdxVector<Size>::operator[](unsigned int idx) const
452 { ASSERT_LT_DBG(idx, Size).error("Index out of bounds.");
453  return data_[idx]; }
454 
455 */
456 
457 template<> template<> inline unsigned int RefElement<3>::count<0>()
458 { return n_nodes; }
459 template<> template<> inline unsigned int RefElement<3>::count<1>()
460 { return n_lines; }
461 template<> template<> inline unsigned int RefElement<3>::count<2>()
462 { return n_sides; }
463 template<> template<> inline unsigned int RefElement<2>::count<0>()
464 { return n_nodes; }
465 template<> template<> inline unsigned int RefElement<2>::count<1>()
466 { return n_lines; }
467 template<> template<> inline unsigned int RefElement<1>::count<0>()
468 { return n_nodes; }
469 
470 template<unsigned int dim>
471 template<unsigned int subdim>
472 unsigned int RefElement<dim>::topology_idx(unsigned int zeros_positions)
473 {
474  for(unsigned int i=0; i < RefElement<dim>::count<subdim>(); i++){
475  if(zeros_positions == topology_zeros_[subdim][i]) return i;
476  }
477  ASSERT(0).error("Undefined zero pattern.");
478  return -1;
479 }
480 
481 
482 /// This function is for "side_nodes" - for given side, give me nodes (0->0, 1->1).
483 template<> template<> inline const IdxVector<1> RefElement<1>::interact_<0,0>(unsigned int i)
484 { ASSERT_LT_DBG(i, RefElement<1>::n_nodes).error("Index out of bounds.");
485  return IdxVector<1>({i});}
486 
487 /// For line i {0}, give me indices of its nodes.
488 template<> template<> inline const IdxVector<2> RefElement<1>::interact_<0,1>(unsigned int i)
489 { ASSERT_LT_DBG(i, RefElement<1>::n_lines).error("Index out of bounds.");
490  return line_nodes_[i];}
491 
492 /// For line i {0,1,2}, give me indices of its nodes.
493 template<> template<> inline const IdxVector<2> RefElement<2>::interact_<0,1>(unsigned int i)
494 { ASSERT_LT_DBG(i, RefElement<2>::n_lines).error("Index out of bounds.");
495  return line_nodes_[i];}
496 
497 /// For line i {0,1,2,3,4,5}, give me indices of its nodes.
498 template<> template<> inline const IdxVector<2> RefElement<3>::interact_<0,1>(unsigned int i)
499 { ASSERT_LT_DBG(i, RefElement<3>::n_lines).error("Index out of bounds.");
500  return line_nodes_[i];}
501 
502 /// For node i {0,1}, give me indices of lines.
503 template<> template<> inline const IdxVector<1> RefElement<1>::interact_<1,0>(unsigned int i)
504 { ASSERT_LT_DBG(i, RefElement<1>::n_nodes).error("Index out of bounds.");
505  return node_lines_[i];}
506 
507 /// For node i {0,1,2}, give me indices of lines.
508 template<> template<> inline const IdxVector<2> RefElement<2>::interact_<1,0>(unsigned int i)
509 { ASSERT_LT_DBG(i, RefElement<2>::n_nodes).error("Index out of bounds.");
510  return node_lines_[i];}
511 
512 /// For node i {0,1,2,3}, give me indices of lines.
513 template<> template<> inline const IdxVector<3> RefElement<3>::interact_<1,0>(unsigned int i)
514 { ASSERT_LT_DBG(i, RefElement<3>::n_nodes).error("Index out of bounds.");
515  return node_lines_[i];}
516 
517 /// For side i {0,1,2}, give me indices of its nodes.
518 template<> template<> inline const IdxVector<3> RefElement<3>::interact_<0,2>(unsigned int i)
519 { ASSERT_LT_DBG(i, RefElement<3>::n_sides).error("Index out of bounds.");
520  return side_nodes_[i];}
521 
522 /// For node i {0,1,2,3}, give me indices of sides.
523 template<> template<> inline const IdxVector<3> RefElement<3>::interact_<2,0>(unsigned int i)
524 { ASSERT_LT_DBG(i, RefElement<3>::n_sides).error("Index out of bounds.");
525  return node_sides_[i];}
526 
527 /// For line i {0,1,2,3}, give me indices of sides.
528 template<> template<> inline const IdxVector<2> RefElement<3>::interact_<2,1>(unsigned int i)
529 { ASSERT_LT_DBG(i, RefElement<3>::n_lines).error("Index out of bounds.");
530  return line_sides_[i];}
531 
532 /// For side i {0,1,2}, give me indices of its lines.
533 template<> template<> inline const IdxVector<3> RefElement<3>::interact_<1,2>(unsigned int i)
534 { ASSERT_LT_DBG(i, RefElement<3>::n_sides).error("Index out of bounds.");
535  return side_lines_[i];}
536 
537 template<unsigned int dim> template<unsigned int OutDim, unsigned int InDim>
538 inline const IdxVector< (InDim>OutDim ? InDim+1 : dim-InDim) > RefElement<dim>::interact_(unsigned int i)
539 {
540  ASSERT(false)(dim)(OutDim)(InDim)(i).error("Not implemented.");
541  //ASSERT_LT_DBG(OutDim, dim);
542  //ASSERT_LT_DBG(InDim, dim);
543 }
544 
545 
546 template<unsigned int dim>
547 template < template <unsigned int OutDim, unsigned int InDim> class TInteraction, unsigned int OutDim, unsigned int InDim>
548 inline const IdxVector< (InDim>OutDim ? InDim+1 : dim-InDim) > RefElement<dim>::interact( TInteraction<OutDim,InDim> interaction )
549 {
550  return interact_<OutDim,InDim>(interaction.i_);
551 }
552 
553 #endif /* REF_ELEMENT_HH_ */
static arma::mat::fixed< dim+1, subdim+1 > bary_coords(unsigned int sid)
Definition: ref_element.hh:403
static BaryPoint interpolate(arma::vec::fixed< subdim+1 > coord, int sub_simplex_idx)
std::vector< BaryPoint > BarycentricUnitVec
Definition: ref_element.hh:288
arma::vec::fixed< dim > LocalPoint
Definition: ref_element.hh:163
unsigned int i_
Definition: ref_element.hh:156
static const std::vector< std::vector< std::vector< unsigned int > > > nodes_of_subelements
Definition: ref_element.hh:253
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
Definition: asserts.hh:347
static LocalPoint node_coords(unsigned int nid)
Definition: ref_element.hh:418
Interaction(unsigned int i)
Definition: ref_element.hh:155
const std::vector< LocalPoint > & CentersList
Definition: ref_element.hh:303
std::array< unsigned int, Size > IdxVector
Definition: ref_element.hh:144
arma::vec::fixed< dim > FaceBaryPoint
Definition: ref_element.hh:171
arma::vec::fixed< dim+1 > BaryPoint
Definition: ref_element.hh:170
IntersectionPoint * interpolate(const IntersectionPoint &A1, const IntersectionPoint &A2, double t)
static unsigned int topology_idx(unsigned int zeros_positions)
Definition: ref_element.hh:472
#define ASSERT_LT_DBG(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
Definition: asserts.hh:300