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

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

#include <compute_intersection.hh>

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

Public Types

typedef IntersectionPointAux< 1, 2 > IPAux12
 
typedef IntersectionPointAux< 1, 3 > IPAux13
 
typedef IntersectionPointAux< 2, 3 > IPAux23
 

Public Member Functions

 ComputeIntersection ()
 Default constructor, creates empty object. Resizes vectors for Plucker coordinates and products. More...
 
 ComputeIntersection (Simplex< 2 > &triangle, Simplex< 3 > &tetrahedron, 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...
 
void compute (IntersectionAux< 2, 3 > &intersection)
 Computes intersection points for 2D-3D intersection. Computes lower dimensional CIs: 1) 3x triangle side vs tetrahedron 2) 6x tetrahedron edge vs triangle During cycle determine topology information and set computed flags accordingly. Finally, tracing algorithm is called to sort the intersection points to create convex polygon. More...
 
void print_plucker_coordinates (std::ostream &os)
 Prints out the Plucker coordinates of triangle sides and tetrahedron edges. More...
 
void print_plucker_coordinates_tree (std::ostream &os)
 Prints out the Plucker coordinates in a tree simplices. More...
 

Private Types

typedef std::array< uint, 2 > FacePair
 

Private Member Functions

bool ips_topology_equal (const IPAux23 &first, const IPAux23 &second)
 
bool obj_have_back_link (unsigned int i_obj)
 
auto edge_faces (uint i_edge) -> FacePair
 
auto vertex_faces (uint i_vtx) -> FacePair
 
bool have_backlink (uint i_obj)
 
void set_links (uint obj_before_ip, uint ip_idx, uint obj_after_ip)
 

Private Attributes

const unsigned int no_idx
 
std::vector< unsigned int > s3_dim_starts
 
std::vector< unsigned int > s2_dim_starts
 
std::vector< IPAux12IP12s_
 
std::vector< IPAux23IP23_list
 
std::vector< Plucker * > plucker_coordinates_triangle_
 Vector of Plucker coordinates for triangle side. More...
 
std::vector< Plucker * > plucker_coordinates_tetrahedron
 Vector of Plucker coordinates for tetrahedron edges. More...
 
std::vector< double * > plucker_products_
 Vector of pointers to Plucker products of triangle sides and tetrahedron edges. More...
 
ComputeIntersection< Simplex< 1 >, Simplex< 3 > > CI13 [3]
 Compute 1D-3D intersection objects [3]. More...
 
ComputeIntersection< Simplex< 1 >, Simplex< 2 > > CI12 [6]
 Compute 1D-2D intersection objects [6]. More...
 
std::vector< unsigned int > IP_next
 
std::vector< unsigned int > object_next
 
IntersectionAux< 2, 3 > * intersection_
 
Meshmesh_
 

Detailed Description

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

Class for 2D-2D intersections.

Computes the intersection of a triangle and a tetrahedron. Uses 3 ComputeIntersection<Simplex<1>,Simplex<3>> for triangle sides vs tetrahedron intersections. Uses 6 ComputeIntersection<Simplex<1>,Simplex<2>> for tetrahedron sides vs triangle intersections.

Definition at line 460 of file compute_intersection.hh.

Member Typedef Documentation

typedef std::array<uint, 2> ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::FacePair
private

Definition at line 507 of file compute_intersection.hh.

Definition at line 462 of file compute_intersection.hh.

Definition at line 463 of file compute_intersection.hh.

Definition at line 464 of file compute_intersection.hh.

Constructor & Destructor Documentation

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

Definition at line 949 of file compute_intersection.cc.

ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::ComputeIntersection ( Simplex< 2 > &  triangle,
Simplex< 3 > &  tetrahedron,
Mesh mesh 
)

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

Parameters
triangleintersecting triangle object
tetrahedronintersecting tetrahedron object

Definition at line 962 of file compute_intersection.cc.

Definition at line 991 of file compute_intersection.cc.

Member Function Documentation

void ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::compute ( IntersectionAux< 2, 3 > &  intersection)

Computes intersection points for 2D-3D intersection. Computes lower dimensional CIs: 1) 3x triangle side vs tetrahedron 2) 6x tetrahedron edge vs triangle During cycle determine topology information and set computed flags accordingly. Finally, tracing algorithm is called to sort the intersection points to create convex polygon.

Parameters
intersectionfinal 2D-3D intersection object (output) It is then used further in prolongation decision routines.
Returns
number of intersection points found

Definition at line 1077 of file compute_intersection.cc.

auto ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::edge_faces ( uint  i_edge) -> FacePair
private

Definition at line 1329 of file compute_intersection.cc.

bool ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::have_backlink ( uint  i_obj)
inlineprivate

Definition at line 1046 of file compute_intersection.cc.

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

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

Definition at line 1017 of file compute_intersection.cc.

bool ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::ips_topology_equal ( const IPAux23 first,
const IPAux23 second 
)
private

Definition at line 1320 of file compute_intersection.cc.

bool ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::obj_have_back_link ( unsigned int  i_obj)
private
void ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::print_plucker_coordinates ( std::ostream &  os)

Prints out the Plucker coordinates of triangle sides and tetrahedron edges.

Definition at line 1419 of file compute_intersection.cc.

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

Prints out the Plucker coordinates in a tree simplices.

Definition at line 1438 of file compute_intersection.cc.

void ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::set_links ( uint  obj_before_ip,
uint  ip_idx,
uint  obj_after_ip 
)
inlineprivate

Set links: obj_before -> IP -> obj_after if obj_after have null successor, set obj_after -> IP (backlink)

Definition at line 1058 of file compute_intersection.cc.

auto ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::vertex_faces ( uint  i_vtx) -> FacePair
private

Definition at line 1341 of file compute_intersection.cc.

Member Data Documentation

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

Compute 1D-2D intersection objects [6].

Definition at line 529 of file compute_intersection.hh.

ComputeIntersection<Simplex<1>, Simplex<3> > ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::CI13[3]
private

Compute 1D-3D intersection objects [3].

Definition at line 527 of file compute_intersection.hh.

IntersectionAux< 2 , 3 >* ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::intersection_
private

Definition at line 553 of file compute_intersection.hh.

std::vector<IPAux12> ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::IP12s_
private

Definition at line 515 of file compute_intersection.hh.

std::vector<IPAux23> ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::IP23_list
private

Definition at line 516 of file compute_intersection.hh.

std::vector<unsigned int> ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::IP_next
private

Definition at line 533 of file compute_intersection.hh.

Mesh* ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::mesh_
private

Definition at line 554 of file compute_intersection.hh.

const unsigned int ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::no_idx
private

Definition at line 510 of file compute_intersection.hh.

std::vector<unsigned int> ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::object_next
private

Definition at line 536 of file compute_intersection.hh.

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

Vector of Plucker coordinates for tetrahedron edges.

Definition at line 521 of file compute_intersection.hh.

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

Vector of Plucker coordinates for triangle side.

Definition at line 519 of file compute_intersection.hh.

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

Vector of pointers to Plucker products of triangle sides and tetrahedron edges.

Definition at line 524 of file compute_intersection.hh.

std::vector<unsigned int> ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::s2_dim_starts
private

Definition at line 513 of file compute_intersection.hh.

std::vector<unsigned int> ComputeIntersection< Simplex< 2 >, Simplex< 3 > >::s3_dim_starts
private

Definition at line 512 of file compute_intersection.hh.


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