CELIA3D  1.0
Fluid-structure interaction using cut-cells
Data Structures | Macros | Functions | Variables
solide.cpp File Reference

Definition of the functions in class Solide. Specific coupling procedures are preceded by a "warning" sign. More...

#include "solide.hpp"
#include "intersections.hpp"
#include <iostream>

Data Structures

struct  Mat3x3
 
struct  Vect3
 

Macros

#define SOLIDE_CPP
 

Functions

double signe (const double x)
 Sign function. More...
 
void rot (Mat3x3 &a, const double s, const double tau, const int i, const int j, const int k, const int l)
 Function rot for subroutine jacobi3x3. More...
 
void jacobi3x3 (Mat3x3 &a, Vect3 &d, Mat3x3 &v, int &nrot)
 Diagonalization of a 3x3 matrix a using Jacobi's method. More...
 
double Error (Solide &S1, Solide &S2)
 Compute the error for the semi-implicit scheme. More...
 
void Copy_f_m (Solide &S1, Solide &S2)
 Copy values of fluid forces Ff and torques Mf from S2 to S1. More...
 
bool inside_box (const Bbox &cell, const Point_3 &P)
 Check whether point P is in the Bbox cell. More...
 
bool inside_convex_polygon (const Particule &S, const Point_3 &P)
 Check whether point P is inside the convex polygon S. More...
 
bool box_inside_convex_polygon (const Particule &S, const Bbox &cell)
 Check whether cell is fully contained in S. More...
 
bool box_inside_tetra (const Tetrahedron &tetra, const Bbox &cell)
 Check whether cell is fully contained in tetra. More...
 

Variables

const double eps_relat =0.000001
 

Detailed Description

Definition of the functions in class Solide. Specific coupling procedures are preceded by a "warning" sign.

Authors
Laurent Monasse and Maria Adela Puscas

Macro Definition Documentation

#define SOLIDE_CPP

Function Documentation

bool box_inside_convex_polygon ( const Particule S,
const Bbox cell 
)

Check whether cell is fully contained in S.

Returns true if cell is fully contained in S and false otherwise.

Parameters
SParticule
cellBbox
Warning
Specific coupling procedure !
Returns
bool
bool box_inside_tetra ( const Tetrahedron tetra,
const Bbox cell 
)

Check whether cell is fully contained in tetra.

Returns true if cell is fully contained in tetra and false otherwise.

Parameters
tetraTetrahedron
cellBbox
Warning
Specific coupling procedure !
Returns
bool
void Copy_f_m ( Solide S1,
Solide S2 
)

Copy values of fluid forces Ff and torques Mf from S2 to S1.

Function used in the semi-implicit scheme fixed-point procedure.

Parameters
S1Solide at time t
S2Solide at iteration k of the fixed-point procedure
Warning
Specific coupling procedure !
Returns
void
double Error ( Solide S1,
Solide S2 
)

Compute the error for the semi-implicit scheme.

The function is used as a stopping criterion in the semi-implicit scheme:

\begin{eqnarray*} error = max( \, \Vert S1.solide[i].Dx - S2.solide[i].Dx \, \Vert_{\infty} + h_{max} \Vert \, S1.solide[i].e - S2.solide[i].e \, \Vert_{\infty})_i \end{eqnarray*}


\begin{eqnarray*} h_{max}=& max(abs(S1.max\_x - S1.min\_x),abs(S1.max\_y - S1.min\_y), \\ & abs(S1.max\_z - S1.min\_z), abs(S2.max\_x - S2.min\_x),\\ & abs(S2.max\_y - S2.min\_y),abs(S2.max\_z - S2.min\_z)). \end{eqnarray*}

Parameters
S1Solide at iteration k of the fixed-point procedure
S2Solide at iteration k-1 of the fixed-point procedure
Warning
Specific coupling procedure !
Returns
double
bool inside_box ( const Bbox cell,
const Point_3 P 
)

Check whether point P is in the Bbox cell.

Returns true if P is inside cell and false otherwise.

Parameters
cellBbox
PPoint_3
Warning
Specific coupling procedure !
Returns
bool
bool inside_convex_polygon ( const Particule S,
const Point_3 P 
)

Check whether point P is inside the convex polygon S.

Returns true if P is inside S and false otherwise.

Parameters
SParticule
PPoint_3
Warning
Specific coupling procedure !
Returns
bool
void jacobi3x3 ( Mat3x3 a,
Vect3 d,
Mat3x3 v,
int &  nrot 
)

Diagonalization of a 3x3 matrix a using Jacobi's method.

taken from Numerical Recipes C++

Parameters
aMatrix diagonalized
dEigenvalues diagonal
vEigenvector matrix
nrotNumber of Jacobi iterations
void rot ( Mat3x3 a,
const double  s,
const double  tau,
const int  i,
const int  j,
const int  k,
const int  l 
)
inline

Function rot for subroutine jacobi3x3.

double signe ( const double  x)
inline

Sign function.

Variable Documentation

const double eps_relat =0.000001