Flow123d
master-ac4164ba5
|
Go to the documentation of this file.
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);
580 #endif // COMPUTE_INTERSECTION_H_
IntersectionPointAux< 1, 2 > IPAux12
void set_plucker_product(double *number, unsigned edge_idx)
Sets the pointer to Plucker product of abscissa and tetrahedron edge.
Class for 1D-2D intersections.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.
bool is_computed()
Gets true if the intersection has been computed already (e.g. in case of IP in vertex).
Plucker coordinates representing line given by points A,B.
void set_computed()
Sets the 'computed' flag true. Means that intersection has been computed already (e....
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
const unsigned int no_idx
static unsigned int normal_orientation(unsigned int sid)
bool computed_
Flag 'computed'; is true if intersection has been computed already.
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_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
IntersectionPointAux< 1, 3 > IPAux
unsigned int add_ip(const IPAux23 &ip)
std::vector< IPAux23 > IP23_list
IntersectionPointAux< 2, 3 > IPAux23
IntersectionPointAux< 1, 2 > IPAux12
double signed_plucker_product(unsigned int i)
Plucker * get_pc_abscissa()
Gets the pointer to Plucker coordinates of the abscissa.
IntersectionPointAux< 1, 2 > IPAux12
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of Plucker coordinates for tetrahedron edges.
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and triangle side.
IntersectionAux< 2, 3 > * intersection_
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.
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
std::vector< unsigned int > IP_next
Plucker * get_pc_triangle(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle side.
Internal auxiliary class represents an intersection point of simplex<N> and simplex<M>.
std::vector< IPAux12 > IP12s_
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.
std::vector< double * > plucker_products_
Pointers to Plucker products of triangles sides [3x[sideA x triaB]]], size 9.
IntersectionPointAux< 2, 2 > IPAux22
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of pointers to plucker coordinates of triangle sides.
Plucker * get_pc_tetrahedron(unsigned int edge_idx)
Gets the pointer to Plucker coordinates of the tetrahedron edge of given edge_idx.
std::vector< Plucker * > plucker_coordinates_tetrahedron
Vector of pointers to plucker coordinates of tetrahedron edges.
std::vector< unsigned int > s2_dim_starts
double * get_plucker_product(unsigned edge_idx)
Gets the pointer to Plucker product of abscissa and tetrahedron edge of given edge_idx.
Internal auxiliary class representing intersection object of simplex<dimA> and simplex<dimB>.
std::vector< Plucker * > plucker_coordinates_triangle_
Vector of Plucker coordinates for triangle side.
void set_pc_abscissa(Plucker *p)
Sets the pointer to Plucker coordinates of the abscissa.
Plucker * get_pc_triaB(unsigned int side_idx)
Gets the pointer to Plucker coordinates of the triangle B side of given side_idx.
double * get_plucker_product(unsigned int side_idx)
Getter for Plucker product of abscissa and triangle side.
std::vector< unsigned int > object_next
std::vector< double * > plucker_products_
Pointers to Plucker products of abscissa and tetrahedron edges.
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
void set_pc_tetrahedron(Plucker *p, unsigned int edge_idx)
Sets the pointer to Plucker coordinates of the tetrahedron edge.
static const double plucker_empty
Auxiliary value for Plucker product. If equal this value, it is supposed not to be set yet.
IntersectionPointAux< 1, 3 > IPAux13
void set_pc_triangle(Plucker *p, unsigned int side_idx)
Sets the pointer to Plucker coordinates of the triangle side.
void set_pc_triaA(Plucker *p, unsigned int side_idx)
std::vector< unsigned int > s3_dim_starts
void set_pc_triaB(Plucker *p, unsigned int side_idx)
void set_plucker_product(double *number, unsigned sideA_idx, unsigned int sideB_idx)
Plucker * plucker_coordinates_abscissa_
Pointer to plucker coordinates of abscissa.
std::array< uint, 2 > FacePair
Internal class representing intersection point.