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