CELIA3D  1.0
Fluid-structure interaction using cut-cells
Functions
intersections.cpp File Reference

Intersection of the fluid grid with the solid. More...

#include "intersections.hpp"
#include "fluide.hpp"
#include "solide.hpp"
#include "solide.cpp"

Functions

double intersect_cube_tetrahedron (const Bbox &cube, const Tetrahedron &Tet, double &temps_intersections, double &temps_triangulation)
 Intersection of a bounding box with a tetrahedron. More...
 
double intersect_cube_tetrahedron_bis (const Bbox &cube, const Tetrahedron &Tet, double &temps_intersections, double &temps_triangulation)
 Alternative version of the intersection of a cube with a tetrahedron. More...
 

Detailed Description

Intersection of the fluid grid with the solid.

Authors
Maria Adela Puscas and Laurent Monasse
Warning
Specific coupling procedures !

Function Documentation

double intersect_cube_tetrahedron ( const Bbox cube,
const Tetrahedron Tet,
double &  temps_intersections,
double &  temps_triangulation 
)

Intersection of a bounding box with a tetrahedron.

Intersection of the cubic bounding box cube with tetrahedron Tet. Returns the volume of the intersection. This function is called in the swept quantity calculation.
Algorithm:

  • Triangulate the faces of cube using function triang_cellule(const Bbox&, Triangles& ).
  • Search for the vertices of the tetrahedron contained in cube using function inside_box(const Bbox&, const Point_3& ).
  • Loop on the tetrahedron faces.
  • Test the intersection between cube and the tetrahedron faces using function CGAL::do_intersect(Bbox, Triangle_3). Si oui:
  • Loop on the triangular faces of cube.
  • Test the intersection between faces of cube and faces of the tetrahedron using function CGAL::do_intersect(Triangle_3, Triangle_3). If so:
  • Compute the intersection of the faces of the tetrahedron with the faces of cube using function CGAL::do_intersect(Triangle_3, Triangle_3).
  • Compute the volume of the polyhedron which results from the intersection of cube and Tet. For the volume computation, construct with the intersection points a tetrahedron tesselation using function CGAL::Triangulation(vector<Point_3>). The volume is the sum of the volumes of the tetrahedra, computed using function CGAL::tetrahedron.volume().
Parameters
cubeBox 3d
TetTetrahedron
Warning
Specific coupling procedure !
Returns
double
double intersect_cube_tetrahedron_bis ( const Bbox cube,
const Tetrahedron Tet,
double &  temps_intersections,
double &  temps_triangulation 
)

Alternative version of the intersection of a cube with a tetrahedron.