35 #ifndef COMPUTE_INTERSECTION_H_
36 #define COMPUTE_INTERSECTION_H_
51 static const double plucker_empty = std::numeric_limits<double>::infinity();
114 plucker_coordinates_abscissa_ = p;
122 plucker_coordinates_triangle_[side_idx] = p;
127 return plucker_coordinates_abscissa_;
134 return plucker_coordinates_triangle_[side_idx];
142 { plucker_products_[side_idx] = number; };
149 {
return plucker_products_[side_idx]; };
164 int check_abscissa_topology(IPAux12& IP);
167 void print_plucker_coordinates(std::ostream &os);
178 void compute_plucker_products();
192 bool compute_plucker(IPAux12 &IP,
const arma::vec3 &local);
200 bool compute_degenerate(
unsigned int side_idx, IPAux12 &IP);
275 plucker_coordinates_[side_idx] = p;
283 plucker_coordinates_[3 + side_idx] = p;
288 return plucker_coordinates_[side_idx];
293 return plucker_coordinates_[3 + side_idx];
302 plucker_products_[sideA_idx*3 + sideB_idx] = number;
306 return plucker_products_[sideA_idx*3 + sideB_idx];
311 void print_plucker_coordinates(std::ostream &os);
313 void print_plucker_coordinates_tree(std::ostream &os);
389 plucker_coordinates_abscissa_ = p;
397 plucker_coordinates_tetrahedron[edge_idx] = p;
402 return plucker_coordinates_abscissa_;
407 return plucker_coordinates_tetrahedron[edge_idx];
415 plucker_products_[edge_idx] = number;
419 return plucker_products_[edge_idx];
424 void print_plucker_coordinates(std::ostream &os);
426 void print_plucker_coordinates_tree(std::ostream &os);
437 void correct_tetrahedron_ip_topology(
double t,
unsigned int i,
std::vector<IPAux> &ip);
506 void print_plucker_coordinates(std::ostream &os);
508 void print_plucker_coordinates_tree(std::ostream &os);
554 inline bool have_backlink(
uint i_obj);
561 IP23_list.push_back(ip);
562 return IP23_list.size() - 1;
569 inline void set_links(
uint obj_before_ip,
uint ip_idx,
uint obj_after_ip);
Class for 1D-2D intersections.
double * get_plucker_product(unsigned int side_idx)
Getter for Plucker product of abscissa and triangle side.
void set_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
void set_computed()
Sets the 'computed' flag true. Means that intersection has been computed already (e....
bool is_computed()
Gets true if the intersection has been computed already (e.g. in case of IP in vertex).
Plucker * get_pc_triangle(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle side.
void set_pc_triangle(Plucker *p, unsigned int side_idx)
Sets the pointer to Plucker coordinates of the triangle side.
bool computed_
Flag 'computed'; is true if intersection has been computed already.
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of pointers to plucker coordinates of triangle sides.
void set_plucker_product(double *number, unsigned int side_idx)
Sets the Plucker product of abscissa and triangle side (use if computed before).
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
IntersectionPointAux< 1, 2 > IPAux12
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and triangle side.
double signed_plucker_product(unsigned int i)
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
void set_plucker_product(double *number, unsigned edge_idx)
Sets the pointer to Plucker product of abscissa and tetrahedron edge.
Plucker * get_pc_tetrahedron(unsigned int edge_idx)
Gets the pointer to Plucker coordinates of the tetrahedron edge of given edge_idx.
void set_pc_tetrahedron(Plucker *p, unsigned int edge_idx)
Sets the pointer to Plucker coordinates of the tetrahedron edge.
double * get_plucker_product(unsigned edge_idx)
Gets the pointer to Plucker product of abscissa and tetrahedron edge of given edge_idx.
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and tetrahedron edges.
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of pointers to plucker coordinates of tetrahedron edges.
void set_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
IntersectionPointAux< 1, 3 > IPAux
std::vector< double * > plucker_products_
Pointers to Plucker products of triangles sides [3x[sideA x triaB]]], size 9.
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.
Plucker * get_pc_triaA(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle A side of given side_idx.
IntersectionPointAux< 2, 2 > IPAux22
void set_pc_triaB(Plucker *p, unsigned int side_idx)
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.
void set_pc_triaA(Plucker *p, unsigned int side_idx)
void set_plucker_product(double *number, unsigned sideA_idx, unsigned int sideB_idx)
std::vector< Plucker * > plucker_coordinates_
Pointers to plucker coordinates of sides of both triangles [triaA[3], triaB[3]], size 6.
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of Plucker coordinates for triangle side.
std::array< uint, 2 > FacePair
IntersectionAux< 2, 3 > * intersection_
std::vector< unsigned int > IP_next
IntersectionPointAux< 1, 3 > IPAux13
std::vector< IPAux12 > IP12s_
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of Plucker coordinates for tetrahedron edges.
std::vector< unsigned int > object_next
std::vector< IPAux23 > IP23_list
std::vector< double * > plucker_products_
Vector of pointers to Plucker products of triangle sides and tetrahedron edges.
const std::vector< std::vector< arma::uvec > > on_faces
IntersectionPointAux< 2, 3 > IPAux23
const unsigned int no_idx
std::vector< unsigned int > s3_dim_starts
std::vector< unsigned int > s2_dim_starts
IntersectionPointAux< 1, 2 > IPAux12
unsigned int add_ip(const IPAux23 &ip)
Internal auxiliary class representing intersection object of simplex<dimA> and simplex<dimB>.
Internal auxiliary class represents an intersection point of simplex<N> and simplex<M>.
Plucker coordinates representing line given by points A,B.
static unsigned int normal_orientation(unsigned int sid)
static const double plucker_empty
Auxiliary value for Plucker product. If equal this value, it is supposed not to be set yet.
Internal class representing intersection point.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.