Flow123d  release_3.0.0-893-gf7bf019
compute_intersection.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 compute_intersection.hh
15  * @brief Fundamental simplicial intersections.
16  * @author Viktor Fris, Pavel Exner
17  *
18  * Contains classes that compute the fundamental intersection of simplical objects:
19  * 1D-2D, 2D-2D, 1D-3D, 2D-3D
20  *
21  *
22  * TODO: Idea: constructor creates empty object; for each abscissa and triangle only update data
23  * [abscissa, triangle] and (plucker coordinates, products) if not final dimension.
24  * Remove init() methods.
25  * Wouldn't a flag for final dimension object help code structure?
26  *
27  * TODO: 2D-2D and 2D-3D (creating final objects) seems to not need functions for sequence:
28  * ComputeIntersection() -remove default
29  * init() - make private, call in constructor
30  * set_data() - remove, use only proper constructor
31  * compute () - can be called in constructor, but keep it in the same fashion as in other classes
32  *
33  */
34 
35 #ifndef COMPUTE_INTERSECTION_H_
36 #define COMPUTE_INTERSECTION_H_
37 
38 #include "system/system.hh"
39 #include "mesh/ref_element.hh"
41 
42 #include "mesh/mesh.h"
43 
44 // forward declare
45 class Mesh;
46 template <int spacedim> class ElementAccessor;
47 template<unsigned int, unsigned int> class ComputeIntersection;
48 class Plucker;
49 template<unsigned int, unsigned int> class IntersectionAux;
50 template<unsigned int, unsigned int> class IntersectionPointAux;
51 
52 /// Auxiliary value for Plucker product. If equal this value, it is supposed not to be set yet.
53 static const double plucker_empty = std::numeric_limits<double>::infinity();
54 
55 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
56 // CLASS FOR 1D - 2D
57 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
58 
59 /**
60  *
61  * @brief Class for 1D-2D intersections.
62  *
63  * Computes the intersection of an abscissa and a triangle.
64  * Can be used both as sub-algorithm to higher dimnesional intersection
65  * and also for 1D-2D intersection as a result.
66  */
67 template<> class ComputeIntersection<1,2> {
68 public:
70 
71  /// Default constructor. Use when this is NOT final intersection object.
73  /** @brief Constructor, sets abscissa and triangle object.
74  * Use when this is final intersection object.
75  * It allocates memory, computes plucker coordinates and products.
76  */
79 
80  /** @brief Computes intersection points of line and triangle.
81  *
82  * If Plucker products are non-zero and with the same sign, then IP is inside the triangle.
83  * If some of the Plucker products are zero:
84  * 1 zero product -> IP is on the triangle side
85  * 2 zero products -> IP is at the vertex of triangle (there is no other IP)
86  * 3 zero products: -> line and triangle are coplanar
87  *
88  * IP is intersection of triangle and whole line (bisector).
89  * @param IP12s - input/output vector of IPs. If IP found, it is pushed back. Should be empty on start.
90  * @return Orientation flag (0,1 sign of product if get intersection, 2 - three zero products (degenerated),
91  * 3 - no intersection
92  *
93  * NOTE: Why this is not done in constructor?
94  * Because default constructor is called in 1d-3d, 2d-3d and compute() is called later.
95  */
96  IntersectionResult compute(IPAux12 &IP);
97 
98  /** Computes final 1d-2d intersection. (Use when this is the resulting dimension object).
99  * @param IP12s input/output vector of IPs. If IP found, it is pushed back. Should be empty on start.
100  * @return number of intersection points found
101  */
102  unsigned int compute_final(std::vector<IPAux12> &IP12s);
103 
104  /** Computes final 1d-2d intersection, supposing situation in 2d plane (only degenerate case).
105  * (Use when this is the resulting dimension object).
106  * @param IP12s input/output vector of IPs. If IP found, it is pushed back. Should be empty on start.
107  * @return number of intersection points found
108  */
109  unsigned int compute_final_in_plane(std::vector<IPAux12> &IP12s);
110 
111  /// @name Setters and Getters
112  //@{
113 
114  /// Sets the pointer to Plucker coordinates of the abscissa.
116  plucker_coordinates_abscissa_ = p;
117  }
118 
119  /** @brief Sets the pointer to Plucker coordinates of the triangle side.
120  * @param p pointer to Plucker coordinates
121  * @param side_idx local index of a side of triangle
122  */
123  void set_pc_triangle(Plucker *p, unsigned int side_idx){
124  plucker_coordinates_triangle_[side_idx] = p;
125  }
126 
127  /// Gets the pointer to Plucker coordinates of the abscissa.
129  return plucker_coordinates_abscissa_;
130  }
131 
132  /** @brief Gets the pointer to Plucker coordinates of the triangle side.
133  * @param side_idx local index of a side of triangle
134  */
135  Plucker *get_pc_triangle(unsigned int side_idx){
136  return plucker_coordinates_triangle_[side_idx];
137  }
138 
139  /** @brief Sets the Plucker product of abscissa and triangle side (use if computed before).
140  * @param value value of the Plucker product
141  * @param side_idx local index of a side of triangle
142  */
143  void set_plucker_product(double* number, unsigned int side_idx)
144  { plucker_products_[side_idx] = number; };
145 
146  /** @brief Getter for Plucker product of abscissa and triangle side.
147  * @param side_idx local index of a side of triangle
148  * @return pointer to Plucker product
149  */
150  double* get_plucker_product(unsigned int side_idx)
151  { return plucker_products_[side_idx]; };
152 
153  /// Gets true if the intersection has been computed already (e.g. in case of IP in vertex).
154  bool is_computed() { return computed_; }
155  /// Sets the 'computed' flag true. Means that intersection has been computed already (e.g. in case of IP in vertex).
156  void set_computed() { computed_ = true; }
157 
158  //@}
159 
160  /** Checks the position of IP on abscissa, possibly changes topology to end points.
161  * Returns -2, -1, 0, 1, 2; -1.
162  * 0 - inside abscissa
163  * -2, 2 - outside of abscissa
164  * -1, 1 - end points
165  */
166  int check_abscissa_topology(IPAux12& IP);
167 
168  /// Prints out all the Plucker coordinates.
169  void print_plucker_coordinates(std::ostream &os);
170 
171  /// Resets Plucker products to 'nullptr'.
172  /// Use this CAREFULLY as it does not destroy the objects.
173  /// It is intended to be used only from higher dimensions when before destroying.
174  void clear_all();
175 
176 private:
177  /** Computes Plucker coordinates (abscissa, triangle lines) and Plucker products,
178  * if not computed already, or set from outside.
179  */
180  void compute_plucker_products();
181 
182  /** Auxiliary function providing correctly signed Plucker product
183  * according to the triangle side orientation.
184  * @param i local index of a side of triangle.
185  */
186  double signed_plucker_product(unsigned int i)
187  { return RefElement<2>::normal_orientation(i) ? -(*plucker_products_[i]) : (*plucker_products_[i]); }
188 
189  /** @brief Computes intersection when nonezero Plucker products are of the same sign.
190  * @param IP intersection point (if found)
191  * @param local local coordinates of IP (got from Plucker products)
192  * @return true, if intersection is found; false otherwise
193  */
194  bool compute_plucker(IPAux12 &IP, const arma::vec3 &local);
195 
196  /** Computes intersection of abscissa and triangle side in degenerate case (all products are zero).
197  * Inspects also topology.
198  * @param side_idx is the local index of the triangle side
199  * @param IP is the intersection point (if found)
200  * @return true, if intersection is found; false otherwise
201  */
202  bool compute_degenerate(unsigned int side_idx, IPAux12 &IP);
203 
204  /** @brief After interpolation, the topology information in tetrahedron must be updated.
205  * @param ip intersection point to be corrected
206  */
207  void correct_triangle_ip_topology(double t, unsigned int i, std::vector<IPAux12> &ip);
208 
209  /// Flag 'computed'; is true if intersection has been computed already.
210  bool computed_;
211  ///
212  double scale_line_, scale_triangle_;
213 
214  /// Pointer to plucker coordinates of abscissa.
216  /// Vector of pointers to plucker coordinates of triangle sides.
218  /// Pointers to Plucker products of abscissa and triangle side.
220 
221 };
222 
223 
224 
225 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
226 // CLASS FOR 2D - 2D
227 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
228 
229 /**
230  * @brief Class for 2D-2D intersections.
231  *
232  * Computes the intersection of triangle A and triangle B.
233  * Uses 6 ComputeIntersection<1,2>:
234  * - 3x side of triangle A X triangle B
235  * - 3x side of triangle B X triangle A
236  *
237  * It creates a final intersection.
238  *
239  * TODO: do not remember, if the function correct_triangle_ip_topology used to have some meaning here..
240  */
241 template<> class ComputeIntersection<2,2> {
242 public:
245 
246  /** @brief Default constructor, creates empty object.
247  * Resizes vectors for Plucker coordinates and products.
248  */
250  /** @brief Constructor, sets both triangle objects.
251  * It allocates memory, computes plucker coordinates and products.
252  */
255 
256  /** @brief Initializes lower dimensional objects.
257  * Sets correctly the pointers to Plucker coordinates and products.
258  */
259  void init();
260 
261  /** @brief Computes final 2D-2D intersection.
262  * Computes CIs (side vs triangle) in following order: [A0_B, A1_B, A2_B, B0_A, B1_A, B2_A].
263  * During cycle determine topology information and set computed flags accordingly.
264  * @param intersection final 2D-2D intersection object (output)
265  * @return number of intersection points found
266  */
267  unsigned int compute(IntersectionAux<2,2> &intersection);
268 
269  /// @name Setters and Getters
270  //@{
271 
272  /** Sets the pointer to Plucker coordinates of the triangle A side.
273  * @param p pointer to Plucker coordinates
274  * @param side_idx local index of a side of triangle A
275  */
276  void set_pc_triaA(Plucker *p, unsigned int side_idx){
277  plucker_coordinates_[side_idx] = p;
278  }
279 
280  /** Sets the pointer to Plucker coordinates of the triangle B side.
281  * @param p pointer to Plucker coordinates
282  * @param side_idx local index of a side of triangle B
283  */
284  void set_pc_triaB(Plucker *p, unsigned int side_idx){
285  plucker_coordinates_[3 + side_idx] = p;
286  }
287 
288  /// Gets the pointer to Plucker coordinates of the triangle A side of given @p side_idx.
289  Plucker *get_pc_triaA(unsigned int side_idx){
290  return plucker_coordinates_[side_idx];
291  }
292 
293  /// Gets the pointer to Plucker coordinates of the triangle B side of given @p side_idx.
294  Plucker *get_pc_triaB(unsigned int side_idx){
295  return plucker_coordinates_[3 + side_idx];
296  }
297 
298  /** Sets the pointer to Plucker product of triangle A side and triangle B side.
299  * @param number pointer to value of Plucker product
300  * @param sideA_idx local index of a side of triangle A
301  * @param sideB_idx local index of a side of triangle B
302  */
303  void set_plucker_product(double * number, unsigned sideA_idx, unsigned int sideB_idx){
304  plucker_products_[sideA_idx*3 + sideB_idx] = number;
305  }
306  /// Gets the pointer to Plucker product of triangle A side @p sideA_idx and triangle B side @p sideB_idx.
307  double* get_plucker_product(unsigned sideA_idx, unsigned int sideB_idx){
308  return plucker_products_[sideA_idx*3 + sideB_idx];
309  }
310  //@}
311 
312  /// Prints out the Plucker coordinates of abscissa and tetrahedron edges.
313  void print_plucker_coordinates(std::ostream &os);
314  /// Prints out the Plucker coordinates of tetrahedron edges in a tree of tetrahedron sides (triangles).
315  void print_plucker_coordinates_tree(std::ostream &os);
316 
317  /// Resets Plucker products to 'nullptr'.
318  /// Use this CAREFULLY as it does not destroy the objects.
319  /// It is intended to be used only from higher dimensions when before destroying.
320  void clear_all();
321 
322 private:
323  /// Pointers to plucker coordinates of sides of both triangles [triaA[3], triaB[3]], size 6.
325  /// Pointers to Plucker products of triangles sides [3x[sideA x triaB]]], size 9.
327  /// Compute intersection for side x triangle [3x[sideA x tria B],3x[sideB x triaA]].
329 
330  // After interpolation, the topology information in triangle must be updated.
331 // void correct_triangle_ip_topology(IntersectionPointAux<2,2> &ip);
332 };
333 
334 
335 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
336 // CLASS FOR 1D - 3D
337 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
338 
339 /**
340  * @brief * @brief Class for 1D-3D intersections.
341  *
342  * Computes the intersection of an abscissa and a tetrahedron.
343  * Uses 4 ComputeIntersection<1,2> for abscissa and tetrahedron sides intersections.
344  */
345 template<> class ComputeIntersection<1,3> {
346 
347 public:
349 
350  /// Default constructor. Use when this is NOT final intersection object.
352  /** @brief Constructor, sets abscissa and tetrahedron object.
353  * Use when this is final intersection object.
354  * It allocates memory, computes plucker coordinates and products.
355  */
356  ComputeIntersection(ElementAccessor<3> abscissa, ElementAccessor<3> tetrahedron, Mesh *mesh);
358 
359  /** @brief Initializes lower dimensional objects.
360  * Sets correctly the pointers to Plucker coordinates and products.
361  */
362  void init();
363 
364  /** @brief Computes intersection points for 1D-3D intersection.
365  * Computes lower dimensional CIs abscissa vs tetrahedron face.
366  * During cycle determine topology information and set computed flags accordingly.
367  * We can have 2 IPs at maximum.
368  * If there are 2 IPs:
369  * - sort them in direction of abscissa
370  * - possibly cut (move IPs so they are inside abscissa)
371  * - after cutting interpolate 3D coordinates
372  * - check that IPs are not the same, if true, throw one away
373  * @param IP13d vector of intersection points (output)
374  * @return number of intersection points found
375  */
376  unsigned int compute(std::vector<IPAux> &IP13s);
377 
378  /** @brief Computes final 1D-3D intersection.
379  * Computes IPs and check if any of them are pathologic to set the resulting object also pathologic.
380  * Calls @p compute function inside.
381  * @param intersection final 1D-3D intersection object (output)
382  * @return number of intersection points found
383  */
384  unsigned int compute(IntersectionAux<1,3> &intersection);
385 
386  /// @name Setters and Getters
387  //@{
388 
389  /// Sets the pointer to Plucker coordinates of the abscissa.
391  plucker_coordinates_abscissa_ = p;
392  }
393 
394  /** @brief Sets the pointer to Plucker coordinates of the tetrahedron edge.
395  * @param p pointer to Plucker coordinates
396  * @param edge_idx local index of an edge of tetrahedron
397  */
398  void set_pc_tetrahedron(Plucker *p, unsigned int edge_idx){
399  plucker_coordinates_tetrahedron[edge_idx] = p;
400  }
401 
402  /// Gets the pointer to Plucker coordinates of the abscissa.
404  return plucker_coordinates_abscissa_;
405  }
406 
407  /// Gets the pointer to Plucker coordinates of the tetrahedron edge of given @p edge_idx.
408  Plucker *get_pc_tetrahedron(unsigned int edge_idx){
409  return plucker_coordinates_tetrahedron[edge_idx];
410  }
411 
412  /** @brief Sets the pointer to Plucker product of abscissa and tetrahedron edge.
413  * @param number pointer to value of Plucker product
414  * @param edge_idx local index of an edge of tetrahedron
415  */
416  void set_plucker_product(double * number, unsigned edge_idx){
417  plucker_products_[edge_idx] = number;
418  }
419  /// Gets the pointer to Plucker product of abscissa and tetrahedron edge of given @p edge_idx.
420  double* get_plucker_product(unsigned edge_idx){
421  return plucker_products_[edge_idx];
422  }
423  //@}
424 
425  /// Prints out the Plucker coordinates of abscissa and tetrahedron edges.
426  void print_plucker_coordinates(std::ostream &os);
427  /// Prints out the Plucker coordinates of tetrahedron edges in a tree of tetrahedron sides (triangles).
428  void print_plucker_coordinates_tree(std::ostream &os);
429 
430  /// Resets Plucker products to 'nullptr'.
431  /// Use this CAREFULLY as it does not destroy the objects.
432  /// It is intended to be used only from higher dimensions when before destroying.
433  void clear_all();
434 
435 private:
436  /** @brief After interpolation, the topology information in tetrahedron must be updated.
437  * @param ip intersection point to be corrected
438  */
439  void correct_tetrahedron_ip_topology(double t, unsigned int i, std::vector<IPAux> &ip);
440 
441  /// Pointer to plucker coordinates of abscissa.
443  /// Vector of pointers to plucker coordinates of tetrahedron edges.
445  /// Pointers to Plucker products of abscissa and tetrahedron edges.
447  /// Compute 1D-2D intersection objects [4x line X tetrahedron face]
449 };
450 
451 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
452 // CLASS FOR 2D - 3D
453 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
454 
455 /**
456  * @brief Class for 2D-2D intersections.
457  *
458  * Computes the intersection of a triangle and a tetrahedron.
459  * Uses 3 ComputeIntersection<1,3> for triangle sides vs tetrahedron intersections.
460  * Uses 6 ComputeIntersection<1,2> for tetrahedron sides vs triangle intersections.
461  */
462 template<> class ComputeIntersection<2,3> {
463 public:
467 
468 
469  /** @brief Default constructor, creates empty object.
470  * Resizes vectors for Plucker coordinates and products.
471  */
473 
474  /** @brief Constructor, sets both triangle objects.
475  * It allocates memory, computes plucker coordinates and products.
476  * @param triangle intersecting triangle object
477  * @param tetrahedron intersecting tetrahedron object
478  */
479  ComputeIntersection(ElementAccessor<3> triangle, ElementAccessor<3> tetrahedron, Mesh *mesh);
481 
482  /** @brief Initializes lower dimensional objects.
483  * Sets correctly the pointers to Plucker coordinates and products.
484  */
485  void init();
486 
487  /** @brief Computes intersection points for 2D-3D intersection.
488  * Computes lower dimensional CIs:
489  * 1) 3x triangle side vs tetrahedron
490  * 2) 6x tetrahedron edge vs triangle
491  * During cycle determine topology information and set computed flags accordingly.
492  * Finally, tracing algorithm is called to sort the intersection points to
493  * create convex polygon.
494  * @param intersection final 2D-3D intersection object (output)
495  * It is then used further in prolongation decision routines.
496  * @return number of intersection points found
497  */
498  void compute(IntersectionAux<2,3> &intersection);
499 
500 
501 
502  /// Prints out the Plucker coordinates of triangle sides and tetrahedron edges.
503  void print_plucker_coordinates(std::ostream &os);
504  /// Prints out the Plucker coordinates in a tree simplices.
505  void print_plucker_coordinates_tree(std::ostream &os);
506 
507 private:
508  // S3 n-face pair (for edge-triangle phase)
509  typedef std::array<uint, 2> FacePair;
510 
511 
512  const unsigned int no_idx;
513  // TODO rename s4 to s3, s3 to s2
514  std::vector<unsigned int> s3_dim_starts; // get global index of n-face i of dimension d: s4_dim_starts[d]+i
515  std::vector<unsigned int> s2_dim_starts; // same for n-faces of S2
516 
518  std::vector<IPAux23> IP23_list; //, degenerate_ips;
519 
520  /// Vector of Plucker coordinates for triangle side.
522  /// Vector of Plucker coordinates for tetrahedron edges.
524 
525  /// Vector of pointers to Plucker products of triangle sides and tetrahedron edges.
527 
528  /// Compute 1D-3D intersection objects [3]
530  /// Compute 1D-2D intersection objects [6]
532 
533 
534  // successors of IPs
536  // successors of n-face objects
537  // 4 vertices, 6 edges, 4 faces, 1 volume, 3 corners, 3 sides, 1 surface; total 22
539 
540  bool obj_have_back_link(unsigned int i_obj);
541  auto edge_faces(uint i_edge) -> FacePair;
542  auto vertex_faces(uint i_vtx) -> FacePair;
543 
544 
545  inline bool have_backlink(uint i_obj);
546  /**
547  * Set links: obj_before -> IP -> obj_after
548  * if obj_after have null successor, set obj_after -> IP (backlink)
549  */
550  inline void set_links(uint obj_before_ip, uint ip_idx, uint obj_after_ip);
551 
554 
557 };
558 
559 
560 
561 #endif // COMPUTE_INTERSECTION_H_
void set_plucker_product(double *number, unsigned int side_idx)
Sets the Plucker product of abscissa and triangle side (use if computed before).
void set_plucker_product(double *number, unsigned edge_idx)
Sets the pointer to Plucker product of abscissa and tetrahedron edge.
double * get_plucker_product(unsigned int side_idx)
Getter for Plucker product of abscissa and triangle side.
void set_pc_triaB(Plucker *p, unsigned int side_idx)
void set_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of pointers to plucker coordinates of tetrahedron edges.
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and triangle side.
IntersectionPointAux< 1, 2 > IPAux12
unsigned int uint
bool is_computed()
Gets true if the intersection has been computed already (e.g. in case of IP in vertex).
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of pointers to plucker coordinates of triangle sides.
bool computed_
Flag &#39;computed&#39;; is true if intersection has been computed already.
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
Plucker * get_pc_triangle(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle side.
std::vector< unsigned int > s2_dim_starts
Plucker * get_pc_triaA(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle A side of given side_idx. ...
std::vector< Plucker * > plucker_coordinates_
Pointers to plucker coordinates of sides of both triangles [triaA[3], triaB[3]], size 6...
Definition: mesh.h:76
Plucker * get_pc_tetrahedron(unsigned int edge_idx)
Gets the pointer to Plucker coordinates of the tetrahedron edge of given edge_idx.
std::vector< unsigned int > IP_next
double * get_plucker_product(unsigned edge_idx)
Gets the pointer to Plucker product of abscissa and tetrahedron edge of given edge_idx.
static unsigned int normal_orientation(unsigned int sid)
Definition: ref_element.cc:315
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of Plucker coordinates for tetrahedron edges.
IntersectionPointAux< 2, 3 > IPAux23
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
std::vector< unsigned int > object_next
double * get_plucker_product(unsigned sideA_idx, unsigned int sideB_idx)
Gets the pointer to Plucker product of triangle A side sideA_idx and triangle B side sideB_idx...
Class for 1D-2D intersections.
IntersectionPointAux< 2, 2 > IPAux22
void set_pc_triaA(Plucker *p, unsigned int side_idx)
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
IntersectionPointAux< 1, 2 > IPAux12
Plucker * get_pc_triaB(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle B side of given side_idx. ...
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of Plucker coordinates for triangle side.
void set_plucker_product(double *number, unsigned sideA_idx, unsigned int sideB_idx)
void set_computed()
Sets the &#39;computed&#39; flag true. Means that intersection has been computed already (e.g. in case of IP in vertex).
const std::vector< std::vector< arma::uvec > > on_faces
void set_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
std::vector< IPAux23 > IP23_list
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
IntersectionAux< 2, 3 > * intersection_
IntersectionPointAux< 1, 2 > IPAux12
static const double plucker_empty
Auxiliary value for Plucker product. If equal this value, it is supposed not to be set yet...
std::vector< unsigned int > s3_dim_starts
Internal auxiliary class represents an intersection point of simplex<N> and simplex<M>.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc...
void set_pc_triangle(Plucker *p, unsigned int side_idx)
Sets the pointer to Plucker coordinates of the triangle side.
Internal auxiliary class representing intersection object of simplex<dimA> and simplex<dimB>.
std::vector< double * > plucker_products_
Vector of pointers to Plucker products of triangle sides and tetrahedron edges.
IntersectionPointAux< 1, 3 > IPAux
Internal class representing intersection point.
Plucker coordinates representing line given by points A,B.
Definition: plucker.hh:44
std::vector< double * > plucker_products_
Pointers to Plucker products of triangles sides [3x[sideA x triaB]]], size 9.
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and tetrahedron edges.
void set_pc_tetrahedron(Plucker *p, unsigned int edge_idx)
Sets the pointer to Plucker coordinates of the tetrahedron edge.
IntersectionPointAux< 1, 3 > IPAux13
double signed_plucker_product(unsigned int i)