Flow123d  JS_before_hm-1804-gf2ad740aa
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  /**
448  * Intersection objects for the tetrahedron's faces.
449  * Faces follows element node ordering, element inversion not handled at this stage.
450  * Element inversin is taken into account in the compute method.
451  * TODO: reuse these calculactions for elements with common face.
452  */
454 };
455 
456 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
457 // CLASS FOR 2D - 3D
458 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
459 
460 /**
461  * @brief Class for 2D-2D intersections.
462  *
463  * Computes the intersection of a triangle and a tetrahedron.
464  * Uses 3 ComputeIntersection<1,3> for triangle sides vs tetrahedron intersections.
465  * Uses 6 ComputeIntersection<1,2> for tetrahedron sides vs triangle intersections.
466  */
467 template<> class ComputeIntersection<2,3> {
468 public:
472 
473 
474  /** @brief Default constructor, creates empty object.
475  * Resizes vectors for Plucker coordinates and products.
476  */
478 
479  /** @brief Constructor, sets both triangle objects.
480  * It allocates memory, computes plucker coordinates and products.
481  * @param triangle intersecting triangle object
482  * @param tetrahedron intersecting tetrahedron object
483  */
484  ComputeIntersection(ElementAccessor<3> triangle, ElementAccessor<3> tetrahedron, Mesh *mesh);
486 
487  /** @brief Initializes lower dimensional objects.
488  * Sets correctly the pointers to Plucker coordinates and products.
489  */
490  void init();
491 
492  /** @brief Computes intersection points for 2D-3D intersection.
493  * Computes lower dimensional CIs:
494  * 1) 3x triangle side vs tetrahedron
495  * 2) 6x tetrahedron edge vs triangle
496  * During cycle determine topology information and set computed flags accordingly.
497  * Finally, tracing algorithm is called to sort the intersection points to
498  * create convex polygon.
499  * @param intersection final 2D-3D intersection object (output)
500  * It is then used further in prolongation decision routines.
501  * @return number of intersection points found
502  */
503  void compute(IntersectionAux<2,3> &intersection);
504 
505 
506 
507  /// Prints out the Plucker coordinates of triangle sides and tetrahedron edges.
508  void print_plucker_coordinates(std::ostream &os);
509  /// Prints out the Plucker coordinates in a tree simplices.
510  void print_plucker_coordinates_tree(std::ostream &os);
511 
512 private:
513  // S3 n-face pair (for edge-triangle phase)
514  typedef std::array<uint, 2> FacePair;
515 
516 
517  const unsigned int no_idx;
518  // TODO rename s4 to s3, s3 to s2
519  std::vector<unsigned int> s3_dim_starts; // get global index of n-face i of dimension d: s4_dim_starts[d]+i
520  std::vector<unsigned int> s2_dim_starts; // same for n-faces of S2
521 
523  std::vector<IPAux23> IP23_list; //, degenerate_ips;
524 
525  /// Vector of Plucker coordinates for triangle side.
527  /// Vector of Plucker coordinates for tetrahedron edges.
529 
530  /// Vector of pointers to Plucker products of triangle sides and tetrahedron edges.
532 
533  /// Compute 1D-3D intersection objects [3]
535  /// Compute 1D-2D intersection objects [6]
537 
538 
539  // successors of IPs
541  // successors of n-face objects
542  // 4 vertices, 6 edges, 4 faces, 1 volume, 3 corners, 3 sides, 1 surface; total 22
544 
545  //bool obj_have_back_link(unsigned int i_obj);
546  auto edge_faces(uint i_edge) -> FacePair;
547 
548  auto vertex_faces(uint i_vtx) -> FacePair;
549 
550  /**
551  * Returns true if: i_obj -> IP -> i_obj
552  * Returns false if i_obj -> no_idx OR i_obj -> IP -> j_obj != i_obj
553  *
554  * Backlink marks: end of the created chain
555  */
556  inline bool have_backlink(uint i_obj);
557 
558  /**
559  * Add raw intersection point.
560  */
561  inline unsigned int add_ip(const IPAux23 &ip) {
562  //DebugOut() << "IP[" << IP23_list.size() << "]:" << ip;
563  IP23_list.push_back(ip);
564  return IP23_list.size() - 1;
565  }
566 
567  /**
568  * Set links: obj_before -> IP -> obj_after
569  * if obj_after have null successor, set obj_after -> IP (backlink)
570  */
571  inline void set_links(uint obj_before_ip, uint ip_idx, uint obj_after_ip);
572 
575 
579 };
580 
581 
582 
583 #endif // COMPUTE_INTERSECTION_H_
ComputeIntersection< 2, 3 >::IPAux12
IntersectionPointAux< 1, 2 > IPAux12
Definition: compute_intersection.hh:469
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:416
ComputeIntersection< 1, 2 >
Class for 1D-2D intersections.
Definition: compute_intersection.hh:67
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:154
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:156
ComputeIntersection< 1, 3 >::get_pc_abscissa
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
Definition: compute_intersection.hh:403
ComputeIntersection< 2, 3 >::no_idx
const unsigned int no_idx
Definition: compute_intersection.hh:517
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:210
ComputeIntersection< 1, 3 >
Definition: compute_intersection.hh:345
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:143
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:115
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:348
ComputeIntersection< 2, 3 >::add_ip
unsigned int add_ip(const IPAux23 &ip)
Definition: compute_intersection.hh:561
ComputeIntersection< 2, 3 >::IP23_list
std::vector< IPAux23 > IP23_list
Definition: compute_intersection.hh:523
uint
unsigned int uint
Definition: mh_dofhandler.hh:101
ComputeIntersection< 2, 3 >::IPAux23
IntersectionPointAux< 2, 3 > IPAux23
Definition: compute_intersection.hh:471
ComputeIntersection< 2, 2 >::IPAux12
IntersectionPointAux< 1, 2 > IPAux12
Definition: compute_intersection.hh:243
ComputeIntersection< 1, 2 >::scale_triangle_
double scale_triangle_
Definition: compute_intersection.hh:212
ComputeIntersection< 1, 2 >::signed_plucker_product
double signed_plucker_product(unsigned int i)
Definition: compute_intersection.hh:186
ComputeIntersection< 1, 2 >::get_pc_abscissa
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
Definition: compute_intersection.hh:128
ComputeIntersection< 1, 2 >::IPAux12
IntersectionPointAux< 1, 2 > IPAux12
Definition: compute_intersection.hh:69
ComputeIntersection< 2, 3 >::plucker_coordinates_tetrahedron
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of Plucker coordinates for tetrahedron edges.
Definition: compute_intersection.hh:528
ComputeIntersection< 2, 3 >::mesh_
Mesh * mesh_
Definition: compute_intersection.hh:578
ComputeIntersection< 1, 2 >::plucker_products_
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and triangle side.
Definition: compute_intersection.hh:219
ComputeIntersection< 2, 3 >::intersection_
IntersectionAux< 2, 3 > * intersection_
Definition: compute_intersection.hh:577
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:289
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:324
ComputeIntersection< 1, 3 >::plucker_coordinates_abscissa_
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
Definition: compute_intersection.hh:442
ComputeIntersection< 2, 3 >::IP_next
std::vector< unsigned int > IP_next
Definition: compute_intersection.hh:540
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:135
IntersectionPointAux
Internal auxiliary class represents an intersection point of simplex<N> and simplex<M>.
Definition: compute_intersection.hh:50
IntersectionResult
IntersectionResult
Definition: intersection_point_aux.hh:38
ComputeIntersection< 2, 3 >::IP12s_
std::vector< IPAux12 > IP12s_
Definition: compute_intersection.hh:522
mesh.h
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:307
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:326
ComputeIntersection< 2, 2 >::IPAux22
IntersectionPointAux< 2, 2 > IPAux22
Definition: compute_intersection.hh:244
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:217
Mesh
Definition: mesh.h:98
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:408
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:444
ComputeIntersection< 2, 3 >::s2_dim_starts
std::vector< unsigned int > s2_dim_starts
Definition: compute_intersection.hh:520
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:420
IntersectionAux
Internal auxiliary class representing intersection object of simplex<dimA> and simplex<dimB>.
Definition: compute_intersection.hh:49
ComputeIntersection< 2, 3 >::plucker_coordinates_triangle_
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of Plucker coordinates for triangle side.
Definition: compute_intersection.hh:526
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:390
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:294
ComputeIntersection< 2, 3 >::S3_inverted
bool S3_inverted
Definition: compute_intersection.hh:576
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:150
ComputeIntersection< 2, 3 >::object_next
std::vector< unsigned int > object_next
Definition: compute_intersection.hh:543
ComputeIntersection< 1, 3 >::plucker_products_
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and tetrahedron edges.
Definition: compute_intersection.hh:446
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:531
ComputeIntersection< 2, 3 >::on_faces
const std::vector< std::vector< arma::uvec > > on_faces
Definition: compute_intersection.hh:573
ComputeIntersection
Definition: compute_intersection.hh:47
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:398
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:53
ComputeIntersection< 2, 3 >::IPAux13
IntersectionPointAux< 1, 3 > IPAux13
Definition: compute_intersection.hh:470
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:123
ComputeIntersection< 2, 2 >::set_pc_triaA
void set_pc_triaA(Plucker *p, unsigned int side_idx)
Definition: compute_intersection.hh:276
ComputeIntersection< 2, 3 >::s3_dim_starts
std::vector< unsigned int > s3_dim_starts
Definition: compute_intersection.hh:519
ComputeIntersection< 2, 2 >::set_pc_triaB
void set_pc_triaB(Plucker *p, unsigned int side_idx)
Definition: compute_intersection.hh:284
ComputeIntersection< 2, 2 >::set_plucker_product
void set_plucker_product(double *number, unsigned sideA_idx, unsigned int sideB_idx)
Definition: compute_intersection.hh:303
ComputeIntersection< 1, 2 >::plucker_coordinates_abscissa_
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
Definition: compute_intersection.hh:215
ComputeIntersection< 2, 3 >::FacePair
std::array< uint, 2 > FacePair
Definition: compute_intersection.hh:514
intersection_point_aux.hh
Internal class representing intersection point.