Flow123d  release_2.2.0-914-gf1a3a4f
Public Member Functions | Private Attributes | List of all members
ComputeIntersection< Simplex< 2 >, Simplex< 2 > > Class Template Reference

Class for 2D-2D intersections. More...

#include <compute_intersection.hh>

Collaboration diagram for ComputeIntersection< Simplex< 2 >, Simplex< 2 > >:
Collaboration graph
[legend]

Public Member Functions

 ComputeIntersection ()
 Default constructor, creates empty object. Resizes vectors for Plucker coordinates and products. More...
 
 ComputeIntersection (Simplex< 2 > &triaA, Simplex< 2 > &triaB, Mesh *mesh)
 Constructor, sets both triangle objects. It allocates memory, computes plucker coordinates and products. More...
 
 ~ComputeIntersection ()
 
void init ()
 Initializes lower dimensional objects. Sets correctly the pointers to Plucker coordinates and products. More...
 
unsigned int compute (IntersectionAux< 2, 2 > &intersection)
 Computes final 2D-2D intersection. Computes CIs (side vs triangle) in following order: [A0_B, A1_B, A2_B, B0_A, B1_A, B2_A]. During cycle determine topology information and set computed flags accordingly. More...
 
void print_plucker_coordinates (std::ostream &os)
 Prints out the Plucker coordinates of abscissa and tetrahedron edges. More...
 
void print_plucker_coordinates_tree (std::ostream &os)
 Prints out the Plucker coordinates of tetrahedron edges in a tree of tetrahedron sides (triangles). More...
 
void clear_all ()
 
Setters and Getters
void set_data (Simplex< 2 > &triaA, Simplex< 2 > &triaB)
 Sets the abscissa and tetrahedron. More...
 
void set_pc_triaA (Plucker *p, unsigned int side_idx)
 
void set_pc_triaB (Plucker *p, unsigned int side_idx)
 
Pluckerget_pc_triaA (unsigned int side_idx)
 Gets the pointer to Plucker coordinates of the triangle A side of given side_idx. More...
 
Pluckerget_pc_triaB (unsigned int side_idx)
 Gets the pointer to Plucker coordinates of the triangle B side of given side_idx. More...
 
void set_plucker_product (double *number, unsigned sideA_idx, unsigned int sideB_idx)
 
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. More...
 

Private Attributes

std::vector< Plucker * > plucker_coordinates_
 Pointers to plucker coordinates of sides of both triangles [triaA[3], triaB[3]], size 6. More...
 
std::vector< double * > plucker_products_
 Pointers to Plucker products of triangles sides [3x[sideA x triaB]]], size 9. More...
 
ComputeIntersection< Simplex< 1 >, Simplex< 2 > > CI12 [6]
 Compute intersection for side x triangle [3x[sideA x tria B],3x[sideB x triaA]]. More...
 

Detailed Description

template<>
class ComputeIntersection< Simplex< 2 >, Simplex< 2 > >

Class for 2D-2D intersections.

Computes the intersection of triangle A and triangle B. Uses 6 ComputeIntersection<Simplex<1>,Simplex<2>>:

It creates a final intersection.

TODO: do not remember, if the function correct_triangle_ip_topology used to have some meaning here..

Definition at line 228 of file compute_intersection.hh.

Constructor & Destructor Documentation

Default constructor, creates empty object. Resizes vectors for Plucker coordinates and products.

Definition at line 460 of file compute_intersection.cc.

ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::ComputeIntersection ( Simplex< 2 > &  triaA,
Simplex< 2 > &  triaB,
Mesh mesh 
)

Constructor, sets both triangle objects. It allocates memory, computes plucker coordinates and products.

Definition at line 466 of file compute_intersection.cc.

Definition at line 484 of file compute_intersection.cc.

Member Function Documentation

void ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::clear_all ( )

Resets Plucker products to 'nullptr'. Use this CAREFULLY as it does not destroy the objects. It is intended to be used only from higher dimensions when before destroying.

Definition at line 502 of file compute_intersection.cc.

unsigned int ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::compute ( IntersectionAux< 2, 2 > &  intersection)

Computes final 2D-2D intersection. Computes CIs (side vs triangle) in following order: [A0_B, A1_B, A2_B, B0_A, B1_A, B2_A]. During cycle determine topology information and set computed flags accordingly.

Parameters
intersectionfinal 2D-2D intersection object (output)
Returns
number of intersection points found

Definition at line 552 of file compute_intersection.cc.

Plucker* ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::get_pc_triaA ( unsigned int  side_idx)
inline

Gets the pointer to Plucker coordinates of the triangle A side of given side_idx.

Definition at line 280 of file compute_intersection.hh.

Plucker* ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::get_pc_triaB ( unsigned int  side_idx)
inline

Gets the pointer to Plucker coordinates of the triangle B side of given side_idx.

Definition at line 285 of file compute_intersection.hh.

double* ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::get_plucker_product ( unsigned  sideA_idx,
unsigned int  sideB_idx 
)
inline

Gets the pointer to Plucker product of triangle A side sideA_idx and triangle B side sideB_idx.

Definition at line 298 of file compute_intersection.hh.

void ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::init ( )

Initializes lower dimensional objects. Sets correctly the pointers to Plucker coordinates and products.

Definition at line 514 of file compute_intersection.cc.

void ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::print_plucker_coordinates ( std::ostream &  os)

Prints out the Plucker coordinates of abscissa and tetrahedron edges.

Definition at line 656 of file compute_intersection.cc.

void ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::print_plucker_coordinates_tree ( std::ostream &  os)

Prints out the Plucker coordinates of tetrahedron edges in a tree of tetrahedron sides (triangles).

Definition at line 676 of file compute_intersection.cc.

void ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::set_data ( Simplex< 2 > &  triaA,
Simplex< 2 > &  triaB 
)

Sets the abscissa and tetrahedron.

Parameters
triaAintersecting triangle A
triaBintersecting triangle B

Definition at line 542 of file compute_intersection.cc.

void ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::set_pc_triaA ( Plucker p,
unsigned int  side_idx 
)
inline

Sets the pointer to Plucker coordinates of the triangle A side.

Parameters
ppointer to Plucker coordinates
side_idxlocal index of a side of triangle A

Definition at line 267 of file compute_intersection.hh.

void ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::set_pc_triaB ( Plucker p,
unsigned int  side_idx 
)
inline

Sets the pointer to Plucker coordinates of the triangle B side.

Parameters
ppointer to Plucker coordinates
side_idxlocal index of a side of triangle B

Definition at line 275 of file compute_intersection.hh.

void ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::set_plucker_product ( double *  number,
unsigned  sideA_idx,
unsigned int  sideB_idx 
)
inline

Sets the pointer to Plucker product of triangle A side and triangle B side.

Parameters
numberpointer to value of Plucker product
sideA_idxlocal index of a side of triangle A
sideB_idxlocal index of a side of triangle B

Definition at line 294 of file compute_intersection.hh.

Member Data Documentation

ComputeIntersection<Simplex<1>, Simplex<2> > ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::CI12[6]
private

Compute intersection for side x triangle [3x[sideA x tria B],3x[sideB x triaA]].

Definition at line 319 of file compute_intersection.hh.

std::vector<Plucker *> ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::plucker_coordinates_
private

Pointers to plucker coordinates of sides of both triangles [triaA[3], triaB[3]], size 6.

Definition at line 315 of file compute_intersection.hh.

std::vector<double *> ComputeIntersection< Simplex< 2 >, Simplex< 2 > >::plucker_products_
private

Pointers to Plucker products of triangles sides [3x[sideA x triaB]]], size 9.

Definition at line 317 of file compute_intersection.hh.


The documentation for this class was generated from the following files: