Code_TYMPAN
4.2.0
Industrial site acoustic simulation
|
Describes analytical ray curve tracing. More...
#include <Lancer.h>
Public Member Functions | |
Lancer () | |
Constructor. More... | |
Lancer (Lancer &L) | |
Copy constructor. More... | |
~Lancer () | |
Destructor. More... | |
void | setMeteo (const meteo *Meteo) |
Set the pointer to the weather object. More... | |
void | purgeMatRes () |
Clear the memory of MatRes object. More... | |
void | clear () |
Clear all the arrays. More... | |
void | setNbRay (const unsigned int &nb) |
Set the rays number to launch. More... | |
void | setTMax (const double &TmpMax) |
Change the maximal propagation time. More... | |
void | setDMax (const double &DistMax) |
Set the maximal distance. More... | |
void | setTimeStep (const decimal &tt) |
Set the discretization step. More... | |
void | setTriangle (vec3 *triangle) |
Add a triangle to the geometry. More... | |
decimal | distance_max () |
Compute and return the maximal distance between sources and receptors. More... | |
void | createTemps () |
Build the time vector (different times solved) More... | |
Step | EqRay (const Step &y0) |
Function to define the eikonal equation. More... | |
vec3 | valideIntersection (const vec3 &S, const vec3 &R, const vec3 *A, int &reflexion, const vec3 &nExt_plan, const vec3 &SR) |
Compute the intersection point between a plane and a line. More... | |
void | intersection (const unsigned int &timer, RayCourb ¤t, Step &Y_t0, Step &Y_t1) |
RayCourb | RK4 (const Step &y0) |
Fourth order Runge-Kutta algorithm. More... | |
void | RemplirMat () |
Fill the MatRes matrix containing the ray curves. More... | |
void | run () |
Run the calculation. More... | |
void | loadRayFile (vector< vec3 > &tableau_norm) |
Read the file containing the starting angles of the rays. More... | |
void | setSampler (Sampler *generator) |
Set a pointer to the ray generator. More... | |
Sampler * | getSampler () |
Get ray generator for modification. More... | |
void | setLaunchType (const unsigned int &launchType) |
Set how rays will be created (launch type) More... | |
void | addSource (const vec3 &source) |
Add a source into the sources list. More... | |
Public Attributes | |
vector< vec3 > | sources |
Sources vector. More... | |
vector< vec3 > | recepteurs |
Receptors vector. More... | |
vector< vec3 * > | _plan |
List of objects defined by 3 points. More... | |
meteo * | _weather |
Pointer to weather. More... | |
Sampler * | _sampler |
Pointer to a ray generator. More... | |
decimal | h |
Discretization step. More... | |
decimal | TMax |
Maximal propagation time. More... | |
vector< decimal > | temps |
[0:h:TMax] Vector containing the different times solved More... | |
decimal | dmax |
Maximal distance traveled by the rays. More... | |
decimal | initialAngleTheta |
Initial shot angle according theta. More... | |
decimal | finalAngleTheta |
Final shot angle according theta. More... | |
decimal | initialAnglePhi |
Initial shot angle according phi. More... | |
decimal | finalAnglePhi |
Final shot angle according phi. More... | |
unsigned int | nbRay |
Launched rays number. More... | |
unsigned int | _launchType |
Launch type with 1:horizontal / 2:vertical / 3:spherical / 4:file. More... | |
bool | wantOutFile |
True if an output file is wanted. More... | |
string | ray_fileName |
Filename of file containing angles of rays. More... | |
string | out_fileName |
Filename of the output file. More... | |
vector< RayCourb * > | MatRes |
Array containing the resulting rays for each source. More... | |
Private Member Functions | |
void | init_sampler () |
Initialize ray generator. More... | |
void | save () |
Save rays to a file. More... | |
Step | compute_next_step (const Step ¤t_step) |
Compute next step taking account of the weather. More... | |
Lancer::Lancer | ( | ) |
Constructor.
< angle de tir initial selon theta
< angle de tir final selon theta
< angle de tir initial selon phi
< angle de tir final selon phi
< mode de lancer des rayons 1:horizontal / 2:vertical / 3:spheric / 4:file
< true if outputfile wanted
Definition at line 28 of file Lancer.cpp.
Lancer::Lancer | ( | Lancer & | L | ) |
Copy constructor.
Definition at line 41 of file Lancer.cpp.
Lancer::~Lancer | ( | ) |
|
inline |
|
inline |
Compute next step taking account of the weather.
Definition at line 238 of file Lancer.cpp.
void Lancer::createTemps | ( | ) |
Build the time vector (different times solved)
Definition at line 251 of file Lancer.cpp.
decimal Lancer::distance_max | ( | ) |
Compute and return the maximal distance between sources and receptors.
Definition at line 432 of file Lancer.cpp.
Function to define the eikonal equation.
y0 | Initial vector |
Definition at line 114 of file Lancer.cpp.
|
inline |
|
private |
Initialize ray generator.
Definition at line 68 of file Lancer.cpp.
void Lancer::intersection | ( | const unsigned int & | timer, |
RayCourb & | current, | ||
Step & | Y_t0, | ||
Step & | Y_t1 | ||
) |
Definition at line 360 of file Lancer.cpp.
void Lancer::loadRayFile | ( | vector< vec3 > & | tableau_norm | ) |
Read the file containing the starting angles of the rays.
tableau_norm | Vector of the normals |
Definition at line 447 of file Lancer.cpp.
void Lancer::purgeMatRes | ( | ) |
Clear the memory of MatRes object.
Definition at line 103 of file Lancer.cpp.
void Lancer::RemplirMat | ( | ) |
Fill the MatRes matrix containing the ray curves.
Definition at line 202 of file Lancer.cpp.
Fourth order Runge-Kutta algorithm.
y0 | Initial vector |
Definition at line 150 of file Lancer.cpp.
|
inline |
|
private |
Save rays to a file.
Definition at line 496 of file Lancer.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
vec3 Lancer::valideIntersection | ( | const vec3 & | S, |
const vec3 & | R, | ||
const vec3 * | A, | ||
int & | reflexion, | ||
const vec3 & | nExt_plan, | ||
const vec3 & | SR | ||
) |
Compute the intersection point between a plane and a line.
[in] | S | Source |
[in] | R | Receptor |
[in] | A | Plane: array containing the 3 vertices of the face (all the vertices should be coplanar) |
[out] | reflexion | True if intersection has been founded, False if not |
[in] | nExt_plan | Exterior normal relative to the plane |
[in] | SR | Vector between source and receptor |
Definition at line 262 of file Lancer.cpp.
unsigned int Lancer::_launchType |
vector<vec3*> Lancer::_plan |
decimal Lancer::dmax |
decimal Lancer::finalAnglePhi |
decimal Lancer::finalAngleTheta |
decimal Lancer::initialAnglePhi |
decimal Lancer::initialAngleTheta |
vector<RayCourb*> Lancer::MatRes |
string Lancer::ray_fileName |
vector<decimal> Lancer::temps |