Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | List of all members
TYTrajet Class Reference

This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths, in addition to the direct path. More...

#include <TYTrajet.h>

Collaboration diagram for TYTrajet:
Collaboration graph
[legend]

Public Member Functions

 TYTrajet (tympan::AcousticSource &asrc_, tympan::AcousticReceptor &arcpt_)
 Constructor. More...
 
 TYTrajet (const TYTrajet &other)
 Copy constructor. More...
 
virtual ~TYTrajet ()
 Destructor. More...
 
TYTrajetoperator= (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...
 
TYTabChemingetChemins ()
 Return the collection of paths of *this. More...
 
TYTabChemingetCheminsDirect ()
 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...
 
OSpectreOctave 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
 
OSpectreOctavegetSpectreOct ()
 Get the spectrum in octave band at the receptor point \Used to compute the pressure spectrum in octave band. More...
 
OSpectre getSpectre ()
 Get the spectrum in third-octave band at the receptor point \Used to build the result matrix by TYSolver.cpp. More...
 
const OSpectre getSpectre () const
 
OSpectreOctave getPEnergetique (const AtmosphericConditions &atmos)
 Compute the acoustic pressure in octave bands on the journey. More...
 
std::vector< acoustic_path * > & get_tab_rays ()
 
void build_tab_rays ()
 
 TYTrajet (tympan::AcousticSource &asrc_, tympan::AcousticReceptor &arcpt_)
 
 TYTrajet (const TYTrajet &other)
 
virtual ~TYTrajet ()
 
TYTrajetoperator= (const TYTrajet &other)
 Operator =. More...
 
bool operator== (const TYTrajet &other) const
 Operator ==. More...
 
bool operator!= (const TYTrajet &other) const
 Operator !=. More...
 
void reset ()
 
double getDistance ()
 
const double getDistance () const
 
void setDistance (const double &distance)
 
size_t getNbChemins ()
 
TYTabChemingetChemins ()
 
TYTabChemingetCheminsDirect ()
 
void addChemin (const TYChemin &chemin)
 
void addCheminDirect (const TYChemin &chemin)
 
TYChemin getChemin (int index)
 
OSpectre getPNoOp ()
 
void setPtSetPtR (const OPoint3D &pt1, const OPoint3D &pt2)
 
void getPtSetPtR (OPoint3D &pt1, OPoint3D &pt2)
 
void setPtSetPtRfromOSeg3D (const OSegment3D &seg)
 
void getPtSetPtRfromOSeg3D (OSegment3D &seg) const
 
OSpectregetSpectre ()
 
const OSpectre getSpectre () const
 
void setSpectre (const OSpectre &spectre)
 
OSpectre getPEnergetique (const AtmosphericConditions &atmos)
 
OSpectre getPInterference (const AtmosphericConditions &atmos)
 Compute the quadratic pressure on the journey. More...
 
std::vector< acoustic_path * > & get_tab_rays ()
 

Public Attributes

tympan::AcousticSourceasrc
 Business source. More...
 
tympan::source_idx asrc_idx
 
tympan::AcousticReceptorarcpt
 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...
 
OSpectreOctave _sLP
 
std::vector< acoustic_path * > _tabRays
 Vector of rays equivalent to chemin. More...
 
OSpectre _sLP
 

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)
 

Detailed Description

This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths, in addition to the direct path.

Version
v 1.1
Date
2008/01/21
Author
Projet_Tympan

Definition at line 34 of file TYTrajet.h.

Constructor & Destructor Documentation

◆ TYTrajet() [1/4]

TYTrajet::TYTrajet ( tympan::AcousticSource asrc_,
tympan::AcousticReceptor arcpt_ 
)

Constructor.

Parameters
asrc_Source
arcpt_Receptor

Definition at line 19 of file TYTrajet.cpp.

Here is the call graph for this function:

◆ TYTrajet() [2/4]

TYTrajet::TYTrajet ( const TYTrajet other)

Copy constructor.

Definition at line 28 of file TYTrajet.cpp.

Here is the call graph for this function:

◆ ~TYTrajet() [1/2]

TYTrajet::~TYTrajet ( )
virtual

Destructor.

Definition at line 42 of file TYTrajet.cpp.

Here is the call graph for this function:

◆ TYTrajet() [3/4]

TYTrajet::TYTrajet ( tympan::AcousticSource asrc_,
tympan::AcousticReceptor arcpt_ 
)

◆ TYTrajet() [4/4]

TYTrajet::TYTrajet ( const TYTrajet other)

◆ ~TYTrajet() [2/2]

virtual TYTrajet::~TYTrajet ( )
virtual

Member Function Documentation

◆ addChemin() [1/2]

void TYTrajet::addChemin ( const TYChemin chemin)

Add a new path.

Definition at line 114 of file TYTrajet.cpp.

◆ addChemin() [2/2]

void TYTrajet::addChemin ( const TYChemin chemin)

◆ addCheminDirect() [1/2]

void TYTrajet::addCheminDirect ( const TYChemin chemin)

Add a new path to the array of direct paths.

Definition at line 119 of file TYTrajet.cpp.

◆ addCheminDirect() [2/2]

void TYTrajet::addCheminDirect ( const TYChemin chemin)

◆ build_tab_rays() [1/2]

void TYTrajet::build_tab_rays ( )

Definition at line 198 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ build_tab_rays() [2/2]

void TYTrajet::build_tab_rays ( )
private

◆ correctTiers()

OSpectre TYTrajet::correctTiers ( const OSpectreComplex si,
const OSpectreComplex sj,
const AtmosphericConditions atmos,
const double &  ri,
const double &  rj 
) const
private

Definition at line 369 of file TYTrajet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FRIEND_TEST() [1/2]

TYTrajet::FRIEND_TEST ( test_TYTrajet  ,
getPEnergetique   
)
private

◆ FRIEND_TEST() [2/2]

TYTrajet::FRIEND_TEST ( test_TYTrajet  ,
getPInterference   
)
private

◆ get_tab_rays() [1/2]

std::vector< acoustic_path * > & TYTrajet::get_tab_rays ( )

Definition at line 207 of file TYTrajet.cpp.

◆ get_tab_rays() [2/2]

std::vector<acoustic_path*>& TYTrajet::get_tab_rays ( )

◆ getChemin() [1/2]

TYChemin TYTrajet::getChemin ( int  index)
inline

Return a path thanks to its index.

Returns
_chemins.at(index)

Definition at line 138 of file TYTrajet.h.

Here is the caller graph for this function:

◆ getChemin() [2/2]

TYChemin TYTrajet::getChemin ( int  index)
inline

Definition at line 138 of file TYTrajet.h.

◆ getChemins() [1/2]

TYTabChemin & TYTrajet::getChemins ( )
inline

Return the collection of paths of *this.

Returns
_chemins

Definition at line 106 of file TYTrajet.h.

Here is the caller graph for this function:

◆ getChemins() [2/2]

TYTabChemin& TYTrajet::getChemins ( )
inline

Definition at line 106 of file TYTrajet.h.

◆ getCheminsDirect() [1/2]

TYTabChemin & TYTrajet::getCheminsDirect ( )
inline

Return an array of the direct paths.

Returns
_cheminsDirect

Definition at line 116 of file TYTrajet.h.

◆ getCheminsDirect() [2/2]

TYTabChemin& TYTrajet::getCheminsDirect ( )
inline

Definition at line 116 of file TYTrajet.h.

◆ getDistance() [1/4]

double TYTrajet::getDistance ( )
inline

Get/Set the distance between source and receptor.

const double getDistance()

Returns
_distance

Definition at line 77 of file TYTrajet.h.

Here is the caller graph for this function:

◆ getDistance() [2/4]

double TYTrajet::getDistance ( )
inline

Definition at line 77 of file TYTrajet.h.

◆ getDistance() [3/4]

const double TYTrajet::getDistance ( ) const
inline

Definition at line 81 of file TYTrajet.h.

◆ getDistance() [4/4]

const double TYTrajet::getDistance ( ) const
inline

Definition at line 81 of file TYTrajet.h.

◆ getNbChemins() [1/2]

size_t TYTrajet::getNbChemins ( )
inline

Return the number of path in *this (in addition to the direct path).

Returns
_chemins.size()

Definition at line 96 of file TYTrajet.h.

Here is the caller graph for this function:

◆ getNbChemins() [2/2]

size_t TYTrajet::getNbChemins ( )
inline

Definition at line 96 of file TYTrajet.h.

◆ getPEnergetique() [1/2]

OSpectre TYTrajet::getPEnergetique ( const AtmosphericConditions atmos)

Compute the acoustic pressure in octave bands on the journey.

Compute the acoustic pressure (phase modulation) on the journey.

Definition at line 129 of file TYTrajet.cpp.

Here is the call graph for this function:

◆ getPEnergetique() [2/2]

OSpectre TYTrajet::getPEnergetique ( const AtmosphericConditions atmos)

◆ getPInterference()

OSpectre TYTrajet::getPInterference ( const AtmosphericConditions atmos)

Compute the quadratic pressure on the journey.

Definition at line 199 of file TYTrajet.cpp.

Here is the call graph for this function:

◆ getPNoOp() [1/2]

OSpectre TYTrajet::getPNoOp ( )

Return the attenuation without computation (computed by an external function)

Definition at line 124 of file TYTrajet.cpp.

◆ getPNoOp() [2/2]

OSpectre TYTrajet::getPNoOp ( )

◆ getPtSetPtR() [1/2]

void TYTrajet::getPtSetPtR ( OPoint3D pt1,
OPoint3D pt2 
)
inline

Definition at line 159 of file TYTrajet.h.

◆ getPtSetPtR() [2/2]

void TYTrajet::getPtSetPtR ( OPoint3D pt1,
OPoint3D pt2 
)
inline

Definition at line 159 of file TYTrajet.h.

◆ getPtSetPtRfromOSeg3D() [1/2]

void TYTrajet::getPtSetPtRfromOSeg3D ( OSegment3D seg) const
inline

Definition at line 175 of file TYTrajet.h.

Here is the caller graph for this function:

◆ getPtSetPtRfromOSeg3D() [2/2]

void TYTrajet::getPtSetPtRfromOSeg3D ( OSegment3D seg) const
inline

Definition at line 175 of file TYTrajet.h.

◆ getSpectre() [1/4]

TYSpectre & TYTrajet::getSpectre ( )
inline

Get the spectrum in third-octave band at the receptor point \Used to build the result matrix by TYSolver.cpp.

Get/Set the spectrum at the receptor point.

const OSpectre getSpectre() const

Returns
OSpectre

const TYSpectre getSpectre() void setSpectre(const TYSpectre& spectre)

Returns
_sLP

Definition at line 203 of file TYTrajet.h.

Here is the call graph for this function:

◆ getSpectre() [2/4]

OSpectre& TYTrajet::getSpectre ( )
inline

Definition at line 190 of file TYTrajet.h.

◆ getSpectre() [3/4]

const OSpectre TYTrajet::getSpectre ( ) const
inline

Definition at line 207 of file TYTrajet.h.

Here is the call graph for this function:

◆ getSpectre() [4/4]

const OSpectre TYTrajet::getSpectre ( ) const
inline

Definition at line 194 of file TYTrajet.h.

◆ getSpectreOct()

OSpectreOctave & TYTrajet::getSpectreOct ( )
inline

Get the spectrum in octave band at the receptor point \Used to compute the pressure spectrum in octave band.

Returns
OSpectreOctave&

Definition at line 189 of file TYTrajet.h.

Here is the caller graph for this function:

◆ operator!=() [1/2]

bool TYTrajet::operator!= ( const TYTrajet other) const

Operator !=.

Definition at line 109 of file TYTrajet.cpp.

Here is the call graph for this function:

◆ operator!=() [2/2]

bool TYTrajet::operator!= ( const TYTrajet other) const

Operator !=.

◆ operator=() [1/2]

TYTrajet & TYTrajet::operator= ( const TYTrajet other)

Operator =.

Definition at line 53 of file TYTrajet.cpp.

◆ operator=() [2/2]

TYTrajet& TYTrajet::operator= ( const TYTrajet other)

Operator =.

◆ operator==() [1/2]

bool TYTrajet::operator== ( const TYTrajet other) const

Operator ==.

Definition at line 70 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ operator==() [2/2]

bool TYTrajet::operator== ( const TYTrajet other) const

Operator ==.

◆ reset() [1/2]

void TYTrajet::reset ( void  )

Reset method.

Definition at line 47 of file TYTrajet.cpp.

Here is the caller graph for this function:

◆ reset() [2/2]

void TYTrajet::reset ( )

◆ setDistance() [1/2]

void TYTrajet::setDistance ( const double &  distance)
inline

Definition at line 86 of file TYTrajet.h.

◆ setDistance() [2/2]

void TYTrajet::setDistance ( const double &  distance)
inline

Definition at line 86 of file TYTrajet.h.

◆ setPtSetPtR() [1/2]

void TYTrajet::setPtSetPtR ( const OPoint3D pt1,
const OPoint3D pt2 
)
inline

Get/Set points for source and receptor.

void getPtSetPtR(OPoint3D& pt1, OPoint3D& pt2)

Definition at line 154 of file TYTrajet.h.

◆ setPtSetPtR() [2/2]

void TYTrajet::setPtSetPtR ( const OPoint3D pt1,
const OPoint3D pt2 
)
inline

Definition at line 154 of file TYTrajet.h.

◆ setPtSetPtRfromOSeg3D() [1/2]

void TYTrajet::setPtSetPtRfromOSeg3D ( const OSegment3D seg)
inline

Get/Set points for source and receptor with an OSegment3D.

void getPtSetPtRfromOSeg3D(OSegment3D& seg)

Definition at line 170 of file TYTrajet.h.

◆ setPtSetPtRfromOSeg3D() [2/2]

void TYTrajet::setPtSetPtRfromOSeg3D ( const OSegment3D seg)
inline

Definition at line 170 of file TYTrajet.h.

◆ setSpectre()

void TYTrajet::setSpectre ( const OSpectre spectre)
inline

Definition at line 198 of file TYTrajet.h.

Member Data Documentation

◆ _chemins

TYTabChemin TYTrajet::_chemins
protected

Paths collection.

Definition at line 241 of file TYTrajet.h.

◆ _cheminsDirect

TYTabChemin TYTrajet::_cheminsDirect
protected

Direct paths collection (without obstacles)

Definition at line 244 of file TYTrajet.h.

◆ _distance

double TYTrajet::_distance
protected

Distance between source and receptor.

Definition at line 247 of file TYTrajet.h.

◆ _ptR

OPoint3D TYTrajet::_ptR
protected

Receptor point definition in the site frame.

Definition at line 238 of file TYTrajet.h.

◆ _ptS

OPoint3D TYTrajet::_ptS
protected

Source point definition in the site frame.

Definition at line 235 of file TYTrajet.h.

◆ _sLP [1/2]

OSpectreOctave TYTrajet::_sLP
protected

Spectrum in octave band at the receptor point of the journey which integrates geometrical divergence and the source power

Definition at line 251 of file TYTrajet.h.

◆ _sLP [2/2]

OSpectre TYTrajet::_sLP
protected

Spectrum at the receptor point of the journey which integrates geometrical divergence and the source power

Definition at line 254 of file TYTrajet.h.

◆ _tabRays

std::vector< acoustic_path * > TYTrajet::_tabRays
protected

Vector of rays equivalent to chemin.

Definition at line 254 of file TYTrajet.h.

◆ arcpt

tympan::AcousticReceptor & TYTrajet::arcpt

Business receptor.

Definition at line 229 of file TYTrajet.h.

◆ arcpt_idx

tympan::receptor_idx TYTrajet::arcpt_idx

Definition at line 230 of file TYTrajet.h.

◆ asrc

tympan::AcousticSource & TYTrajet::asrc

Business source.

Definition at line 225 of file TYTrajet.h.

◆ asrc_idx

tympan::source_idx TYTrajet::asrc_idx

Definition at line 226 of file TYTrajet.h.


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