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

Class which represents the Solver for 9613 family solvers. More...

#include <TYSolver.h>

Inheritance diagram for TYSolver:
Inheritance graph
[legend]
Collaboration diagram for TYSolver:
Collaboration graph
[legend]

Public Member Functions

 TYSolver ()
 Constructor. More...
 
virtual ~TYSolver ()
 Destructor. More...
 
void init ()
 Initialize solver This method must be called after instantiation of a solver. More...
 
virtual bool solve (const tympan::AcousticProblemModel &aproblem, tympan::AcousticResultModel &aresult, tympan::LPSolverConfiguration configuration)
 Launch the resolution and get the results. More...
 
const std::vector< TYStructSurfIntersect > & getTabPolygon () const
 Get the array of polygons. More...
 
TYFaceSelectorgetFaceSelector ()
 Get the face selector. More...
 
TYAcousticPathFindergetAcousticPathFinder ()
 Get the acoustic path finder. More...
 
const ScenegetScene () const
 Get the Scene. More...
 
void selectFaces (std::deque< TYSIntersection > &tabIntersect, const OSegment3D &rayon, const string &sourceVolumeId)
 Delegate to _faceSelector the build of the array of intersections. More...
 
- Public Member Functions inherited from SolverInterface
 SolverInterface ()
 
virtual ~SolverInterface ()
 
virtual void purge ()
 

Protected Member Functions

std::unique_ptr< TYFaceSelectormake_face_selector ()
 TYFaceSelector builder. More...
 
std::unique_ptr< TYAcousticPathFindermake_path_finder ()
 TYAcousticPathFinder builder. More...
 

Protected Attributes

std::unique_ptr< TYFaceSelector_faceSelector
 Pointer to the TYFaceSelector. More...
 
std::unique_ptr< TYAcousticPathFinder_acousticPathFinder
 Pointer to the TYAcousticPathFinder. More...
 
OThreadPool_pool
 

Private Member Functions

bool buildCalcStruct (const tympan::AcousticProblemModel &aproblem)
 
bool appendTriangleToScene ()
 Convertion des triangles Tympan en primitives utilisables par ray tracer. More...
 
virtual void clearTabTrajets ()=0
 Clear the specific array of TYTrajet depending on the solver. More...
 
virtual void addNewTaskForOneTrajetSrcRcp (const tympan::AcousticProblemModel &aproblem, unsigned int src_index, unsigned int rcp_index, int nbTrajetsForThisSource, int nNbTrajets)=0
 Instanciate a new task to compute a Trajet. More...
 
virtual void buildAcousticModel ()=0
 Build the acoustic model. More...
 
virtual void initAcousticModel ()=0
 Initialize the acoustic model. More...
 
virtual void displayRaysInGUI (tab_acoustic_path &tabRays)=0
 Keep rays in tab in order to display them in GUI. More...
 
virtual void buildResultsMatrix (int nSourceTrajetsNumber, tympan::SpectrumMatrix &matrix)=0
 Build the matrix of the results for a given source and all the receptors These results are the resulting spectrum of acoustic pressure in Pa at each receptor due to this source. More...
 
virtual void deleteTrajets ()=0
 Delete all the Trajets. More...
 

Private Attributes

std::vector< TYStructSurfIntersect_tabPolygon
 Vector of TYStructSurfIntersect. More...
 
std::unique_ptr< Scene_scene
 Pointer to the Scene. More...
 

Detailed Description

Class which represents the Solver for 9613 family solvers.

Definition at line 35 of file TYSolver.h.

Constructor & Destructor Documentation

◆ TYSolver()

TYSolver::TYSolver ( )

Constructor.

Definition at line 27 of file TYSolver.cpp.

Here is the call graph for this function:

◆ ~TYSolver()

TYSolver::~TYSolver ( )
virtual

Destructor.

Definition at line 43 of file TYSolver.cpp.

Member Function Documentation

◆ addNewTaskForOneTrajetSrcRcp()

virtual void TYSolver::addNewTaskForOneTrajetSrcRcp ( const tympan::AcousticProblemModel aproblem,
unsigned int  src_index,
unsigned int  rcp_index,
int  nbTrajetsForThisSource,
int  nNbTrajets 
)
privatepure virtual

Instanciate a new task to compute a Trajet.

Parameters
aproblemThe acoustic problem
src_indexIndex of the source in the acoustic problem
rcp_indexIndex of the receptor in the acoustic problem
nbTrajetsForThisSourceNumber of routes already created for the considered source
nNbTrajetsTotal number of routes already created

Implemented in TYSolverDefaultSolver, and TYSolver9613Solver.

Here is the caller graph for this function:

◆ appendTriangleToScene()

bool TYSolver::appendTriangleToScene ( )
private

Convertion des triangles Tympan en primitives utilisables par ray tracer.

Returns
Renvoie vrai si l'ensemble des primitives a bien pu etre importe dans la simulation.

Definition at line 195 of file TYSolver.cpp.

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

◆ buildAcousticModel()

virtual void TYSolver::buildAcousticModel ( )
privatepure virtual

Build the acoustic model.

Implemented in TYSolverDefaultSolver, and TYSolver9613Solver.

Here is the caller graph for this function:

◆ buildCalcStruct()

bool TYSolver::buildCalcStruct ( const tympan::AcousticProblemModel aproblem)
private

Definition at line 164 of file TYSolver.cpp.

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

◆ buildResultsMatrix()

virtual void TYSolver::buildResultsMatrix ( int  nSourceTrajetsNumber,
tympan::SpectrumMatrix matrix 
)
privatepure virtual

Build the matrix of the results for a given source and all the receptors These results are the resulting spectrum of acoustic pressure in Pa at each receptor due to this source.

Parameters
nSourceTrajetsNumberThe number of routes for a given source to all the receptors
matrixThe global contribution matrix

Implemented in TYSolverDefaultSolver, and TYSolver9613Solver.

Here is the caller graph for this function:

◆ clearTabTrajets()

void TYSolver::clearTabTrajets ( )
privatepure virtual

Clear the specific array of TYTrajet depending on the solver.

Implemented in TYSolverDefaultSolver, and TYSolver9613Solver.

Here is the caller graph for this function:

◆ deleteTrajets()

virtual void TYSolver::deleteTrajets ( )
privatepure virtual

Delete all the Trajets.

Implemented in TYSolverDefaultSolver, and TYSolver9613Solver.

Here is the caller graph for this function:

◆ displayRaysInGUI()

virtual void TYSolver::displayRaysInGUI ( tab_acoustic_path tabRays)
privatepure virtual

Keep rays in tab in order to display them in GUI.

Parameters
tabRaysThe tab of rays

Implemented in TYSolverDefaultSolver, and TYSolver9613Solver.

Here is the caller graph for this function:

◆ getAcousticPathFinder()

TYAcousticPathFinder* TYSolver::getAcousticPathFinder ( )
inline

Get the acoustic path finder.

Definition at line 66 of file TYSolver.h.

Here is the caller graph for this function:

◆ getFaceSelector()

TYFaceSelector* TYSolver::getFaceSelector ( )
inline

Get the face selector.

Definition at line 62 of file TYSolver.h.

Here is the caller graph for this function:

◆ getScene()

const Scene* TYSolver::getScene ( ) const
inline

Get the Scene.

Definition at line 71 of file TYSolver.h.

Here is the caller graph for this function:

◆ getTabPolygon()

const std::vector<TYStructSurfIntersect>& TYSolver::getTabPolygon ( ) const
inline

Get the array of polygons.

Definition at line 57 of file TYSolver.h.

Here is the caller graph for this function:

◆ init()

void TYSolver::init ( )

Initialize solver This method must be called after instantiation of a solver.

Definition at line 52 of file TYSolver.cpp.

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

◆ initAcousticModel()

virtual void TYSolver::initAcousticModel ( )
privatepure virtual

Initialize the acoustic model.

Implemented in TYSolverDefaultSolver, and TYSolver9613Solver.

Here is the caller graph for this function:

◆ make_face_selector()

std::unique_ptr< TYFaceSelector > TYSolver::make_face_selector ( )
protected

TYFaceSelector builder.

Definition at line 154 of file TYSolver.cpp.

Here is the caller graph for this function:

◆ make_path_finder()

std::unique_ptr< TYAcousticPathFinder > TYSolver::make_path_finder ( )
protected

TYAcousticPathFinder builder.

Definition at line 159 of file TYSolver.cpp.

Here is the caller graph for this function:

◆ selectFaces()

void TYSolver::selectFaces ( std::deque< TYSIntersection > &  tabIntersect,
const OSegment3D rayon,
const string &  sourceVolumeId 
)

Delegate to _faceSelector the build of the array of intersections.

Parameters
tabIntersectArray of intersections
rayonRay path
sourceVolumeIdvolume_id of source when first ray point is a source

Definition at line 148 of file TYSolver.cpp.

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

◆ solve()

bool TYSolver::solve ( const tympan::AcousticProblemModel aproblem,
tympan::AcousticResultModel aresult,
tympan::LPSolverConfiguration  configuration 
)
virtual

Launch the resolution and get the results.

Parameters
aproblemAcoustic problem
aresultResults
configurationSolver configuration
Returns
Always true

Implements SolverInterface.

Definition at line 70 of file TYSolver.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _acousticPathFinder

std::unique_ptr<TYAcousticPathFinder> TYSolver::_acousticPathFinder
protected

Pointer to the TYAcousticPathFinder.

Definition at line 90 of file TYSolver.h.

◆ _faceSelector

std::unique_ptr<TYFaceSelector> TYSolver::_faceSelector
protected

Pointer to the TYFaceSelector.

Definition at line 89 of file TYSolver.h.

◆ _pool

OThreadPool* TYSolver::_pool
protected

Definition at line 151 of file TYSolver.h.

◆ _scene

std::unique_ptr<Scene> TYSolver::_scene
private

Pointer to the Scene.

Definition at line 154 of file TYSolver.h.

◆ _tabPolygon

std::vector<TYStructSurfIntersect> TYSolver::_tabPolygon
private

Vector of TYStructSurfIntersect.

Definition at line 149 of file TYSolver.h.


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