Code_TYMPAN
4.2.0
Industrial site acoustic simulation
|
This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths, in addition to the direct path. More...
#include <TYTrajet.h>
Public Member Functions | |
TYTrajet (tympan::AcousticSource &asrc_, tympan::AcousticReceptor &arcpt_) | |
Constructor. More... | |
TYTrajet (const TYTrajet &other) | |
Copy constructor. More... | |
virtual | ~TYTrajet () |
Destructor. More... | |
TYTrajet & | operator= (const TYTrajet &other) |
Operator =. More... | |
bool | operator== (const TYTrajet &other) const |
Operator ==. More... | |
bool | operator!= (const TYTrajet &other) const |
Operator !=. More... | |
void | reset () |
Reset method. More... | |
double | getDistance () |
Get/Set the distance between source and receptor. More... | |
const double | getDistance () const |
void | setDistance (const double &distance) |
size_t | getNbChemins () |
Return the number of path in *this (in addition to the direct path). More... | |
TYTabChemin & | getChemins () |
Return the collection of paths of *this. More... | |
TYTabChemin & | getCheminsDirect () |
Return an array of the direct paths. More... | |
void | addChemin (const TYChemin &chemin) |
Add a new path. More... | |
void | addCheminDirect (const TYChemin &chemin) |
Add a new path to the array of direct paths. More... | |
TYChemin | getChemin (int index) |
Return a path thanks to its index. More... | |
OSpectre | getPNoOp () |
Return the attenuation without computation (computed by an external function) More... | |
void | setPtSetPtR (const OPoint3D &pt1, const OPoint3D &pt2) |
Get/Set points for source and receptor. More... | |
void | getPtSetPtR (OPoint3D &pt1, OPoint3D &pt2) |
void | setPtSetPtRfromOSeg3D (const OSegment3D &seg) |
Get/Set points for source and receptor with an OSegment3D. More... | |
void | getPtSetPtRfromOSeg3D (OSegment3D &seg) const |
OSpectre & | getSpectre () |
Get/Set the spectrum at the receptor point. More... | |
const OSpectre | getSpectre () const |
void | setSpectre (const OSpectre &spectre) |
OSpectre | getPEnergetique (const AtmosphericConditions &atmos) |
Compute the acoustic pressure (phase modulation) on the journey. More... | |
OSpectre | getPInterference (const AtmosphericConditions &atmos) |
Compute the quadratic pressure on the journey. More... | |
std::vector< acoustic_path * > & | get_tab_rays () |
Public Attributes | |
tympan::AcousticSource & | asrc |
Business source. More... | |
tympan::source_idx | asrc_idx |
tympan::AcousticReceptor & | arcpt |
Business receptor. More... | |
tympan::receptor_idx | arcpt_idx |
Protected Attributes | |
OPoint3D | _ptS |
Source point definition in the site frame. More... | |
OPoint3D | _ptR |
Receptor point definition in the site frame. More... | |
TYTabChemin | _chemins |
Paths collection. More... | |
TYTabChemin | _cheminsDirect |
Direct paths collection (without obstacles) More... | |
double | _distance |
Distance between source and receptor. More... | |
OSpectre | _sLP |
Spectrum at the receptor point of the journey which integrates geometrical divergence and the source power. More... | |
std::vector< acoustic_path * > | _tabRays |
Vector of rays equivalent to chemin. More... | |
Private Member Functions | |
OSpectre | correctTiers (const OSpectreComplex &si, const OSpectreComplex &sj, const AtmosphericConditions &atmos, const double &ri, const double &rj) const |
void | build_tab_rays () |
FRIEND_TEST (test_TYTrajet, getPInterference) | |
FRIEND_TEST (test_TYTrajet, getPEnergetique) | |
This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths, in addition to the direct path.
Definition at line 35 of file TYTrajet.h.
TYTrajet::TYTrajet | ( | tympan::AcousticSource & | asrc_, |
tympan::AcousticReceptor & | arcpt_ | ||
) |
Constructor.
asrc_ | Source |
arcpt_ | Receptor |
Definition at line 20 of file TYTrajet.cpp.
TYTrajet::TYTrajet | ( | const TYTrajet & | other | ) |
Copy constructor.
Definition at line 32 of file TYTrajet.cpp.
|
virtual |
void TYTrajet::addChemin | ( | const TYChemin & | chemin | ) |
Add a new path.
Definition at line 96 of file TYTrajet.cpp.
void TYTrajet::addCheminDirect | ( | const TYChemin & | chemin | ) |
Add a new path to the array of direct paths.
Definition at line 101 of file TYTrajet.cpp.
|
private |
|
private |
Definition at line 338 of file TYTrajet.cpp.
|
private |
|
private |
std::vector< acoustic_path * > & TYTrajet::get_tab_rays | ( | ) |
|
inline |
Return a path thanks to its index.
Definition at line 121 of file TYTrajet.h.
|
inline |
Return the collection of paths of *this.
Definition at line 95 of file TYTrajet.h.
|
inline |
Return an array of the direct paths.
Definition at line 102 of file TYTrajet.h.
|
inline |
Get/Set the distance between source and receptor.
const double getDistance()
Definition at line 78 of file TYTrajet.h.
|
inline |
Definition at line 79 of file TYTrajet.h.
|
inline |
Return the number of path in *this (in addition to the direct path).
Definition at line 88 of file TYTrajet.h.
OSpectre TYTrajet::getPEnergetique | ( | const AtmosphericConditions & | atmos | ) |
Compute the acoustic pressure (phase modulation) on the journey.
Definition at line 111 of file TYTrajet.cpp.
OSpectre TYTrajet::getPInterference | ( | const AtmosphericConditions & | atmos | ) |
Compute the quadratic pressure on the journey.
Definition at line 181 of file TYTrajet.cpp.
OSpectre TYTrajet::getPNoOp | ( | ) |
Return the attenuation without computation (computed by an external function)
Definition at line 106 of file TYTrajet.cpp.
Definition at line 135 of file TYTrajet.h.
|
inline |
|
inline |
Get/Set the spectrum at the receptor point.
const TYSpectre getSpectre() void setSpectre(const TYSpectre& spectre)
Definition at line 155 of file TYTrajet.h.
|
inline |
Definition at line 156 of file TYTrajet.h.
bool TYTrajet::operator!= | ( | const TYTrajet & | other | ) | const |
Operator =.
Definition at line 56 of file TYTrajet.cpp.
bool TYTrajet::operator== | ( | const TYTrajet & | other | ) | const |
Operator ==.
Definition at line 73 of file TYTrajet.cpp.
void TYTrajet::reset | ( | void | ) |
Reset method.
Definition at line 49 of file TYTrajet.cpp.
|
inline |
Definition at line 81 of file TYTrajet.h.
Get/Set points for source and receptor.
void getPtSetPtR(OPoint3D& pt1, OPoint3D& pt2)
Definition at line 134 of file TYTrajet.h.
|
inline |
Get/Set points for source and receptor with an OSegment3D.
void getPtSetPtRfromOSeg3D(OSegment3D& seg)
Definition at line 142 of file TYTrajet.h.
|
inline |
|
protected |
Paths collection.
Definition at line 199 of file TYTrajet.h.
|
protected |
Direct paths collection (without obstacles)
Definition at line 202 of file TYTrajet.h.
|
protected |
Distance between source and receptor.
Definition at line 205 of file TYTrajet.h.
|
protected |
Receptor point definition in the site frame.
Definition at line 196 of file TYTrajet.h.
|
protected |
Source point definition in the site frame.
Definition at line 193 of file TYTrajet.h.
|
protected |
Spectrum at the receptor point of the journey which integrates geometrical divergence and the source power.
Definition at line 209 of file TYTrajet.h.
|
protected |
Vector of rays equivalent to chemin.
Definition at line 212 of file TYTrajet.h.
tympan::AcousticReceptor& TYTrajet::arcpt |
Business receptor.
Definition at line 186 of file TYTrajet.h.
tympan::receptor_idx TYTrajet::arcpt_idx |
Definition at line 187 of file TYTrajet.h.
tympan::AcousticSource& TYTrajet::asrc |
Business source.
Definition at line 182 of file TYTrajet.h.
tympan::source_idx TYTrajet::asrc_idx |
Definition at line 183 of file TYTrajet.h.