Code_TYMPAN  4.2.0
Industrial site acoustic simulation
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DefaultEngine Class Reference

Default Engine class. More...

#include <DefaultEngine.h>

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

Public Member Functions

 DefaultEngine ()
 Constructors. More...
 
 DefaultEngine (Scene *_scene, std::vector< Source > *_sources, Solver *_solver, Scene *_recepteurs)
 
 DefaultEngine (const DefaultEngine &other)
 Copy constructor. More...
 
virtual ~DefaultEngine ()
 Destructor. More...
 
virtual bool process ()
 If implemented, process and return true if success. More...
 
virtual void runStructureBenchmark ()
 If implemented, run a benchmark for the engine. More...
 
RaygenRay ()
 Create rays from the sources. More...
 
- Public Member Functions inherited from Engine
 Engine ()
 Default constructor. More...
 
 Engine (Scene *_scene, std::vector< Source > *_sources, Solver *_solver, Scene *_recepteurs)
 Constructor. More...
 
 Engine (const Engine &other)
 Copy constructor. More...
 
virtual ~Engine ()
 Destructor. More...
 
ScenegetScene ()
 Get the Scene. More...
 
void setScene (Scene *_scene)
 Set the Scene. More...
 
std::vector< Source > * getSources ()
 Get the Sources. More...
 
void setSources (std::vector< Source > *_sources)
 Set the Sources. More...
 
SolvergetSolver ()
 Get the Solver. More...
 
void setSolver (Solver *_solver)
 Set the Solver. More...
 
virtual unsigned long long int getRayCounter ()
 

Protected Member Functions

void searchForReceptor (const decimal &tmin, Ray *r)
 Search if a ray intersects a receptor before traveling a tmin distance (NB: this is the only place in the code where a ray is added to the solver's list of valid rays) More...
 
void initialReceptorTargeting ()
 Initialize the rays treatment stack by a loop on the receptors. More...
 
void copyRayAndAddToStack (Ray *r)
 Copy a ray and use its last event to generate a response to use as the copy's direction (used to handle the generation of rays by diffraction events) More...
 
virtual bool traitementRay (Ray *r, std::list< validRay > &result)
 Ray treatment method. More...
 

Protected Attributes

std::stack< Ray *, std::deque< Ray * > > pile_traitement
 Treatment stack containing the rays to treat. More...
 
unsigned long long int nbRayonsTraites
 Treated rays number. More...
 
- Protected Attributes inherited from Engine
Scenescene
 Pointer to the scene. More...
 
std::vector< Source > * sources
 Pointer to all the receptors. More...
 
Scenerecepteurs
 Pointer to all the sources. More...
 
Solversolver
 Pointer to the solver. More...
 
unsigned long long int rayCounter
 Ray counter. More...
 

Detailed Description

Default Engine class.

Definition at line 25 of file DefaultEngine.h.

Constructor & Destructor Documentation

◆ DefaultEngine() [1/3]

DefaultEngine::DefaultEngine ( )
inline

Constructors.

Definition at line 30 of file DefaultEngine.h.

Here is the caller graph for this function:

◆ DefaultEngine() [2/3]

DefaultEngine::DefaultEngine ( Scene _scene,
std::vector< Source > *  _sources,
Solver _solver,
Scene _recepteurs 
)
inline

Definition at line 32 of file DefaultEngine.h.

◆ DefaultEngine() [3/3]

DefaultEngine::DefaultEngine ( const DefaultEngine other)
inline

Copy constructor.

Definition at line 35 of file DefaultEngine.h.

◆ ~DefaultEngine()

virtual DefaultEngine::~DefaultEngine ( )
inlinevirtual

Destructor.

Definition at line 43 of file DefaultEngine.h.

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

Member Function Documentation

◆ copyRayAndAddToStack()

void DefaultEngine::copyRayAndAddToStack ( Ray r)
inlineprotected

Copy a ray and use its last event to generate a response to use as the copy's direction (used to handle the generation of rays by diffraction events)

Parameters
rReturn modified ray

Definition at line 209 of file DefaultEngine.h.

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

◆ genRay()

Ray * DefaultEngine::genRay ( )

Create rays from the sources.

Definition at line 129 of file DefaultEngine.cpp.

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

◆ initialReceptorTargeting()

void DefaultEngine::initialReceptorTargeting ( )
inlineprotected

Initialize the rays treatment stack by a loop on the receptors.

Definition at line 103 of file DefaultEngine.h.

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

◆ process()

bool DefaultEngine::process ( )
virtual

If implemented, process and return true if success.

Reimplemented from Engine.

Reimplemented in DefaultCurvRayEngine.

Definition at line 61 of file DefaultEngine.cpp.

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

◆ runStructureBenchmark()

void DefaultEngine::runStructureBenchmark ( )
virtual

If implemented, run a benchmark for the engine.

Reimplemented from Engine.

Definition at line 226 of file DefaultEngine.cpp.

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

◆ searchForReceptor()

void DefaultEngine::searchForReceptor ( const decimal &  tmin,
Ray r 
)
inlineprotected

Search if a ray intersects a receptor before traveling a tmin distance (NB: this is the only place in the code where a ray is added to the solver's list of valid rays)

Parameters
tminmaximum distance the ray can travel before hiting a receptor for the intersection to be considered valid
rThe ray

Definition at line 59 of file DefaultEngine.h.

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

◆ traitementRay()

bool DefaultEngine::traitementRay ( Ray r,
std::list< validRay > &  result 
)
protectedvirtual

Ray treatment method.

Parameters
rRay to treat
resultUpdated valid rays list
Returns

Reimplemented in DefaultCurvRayEngine.

Definition at line 154 of file DefaultEngine.cpp.

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

Member Data Documentation

◆ nbRayonsTraites

unsigned long long int DefaultEngine::nbRayonsTraites
protected

Treated rays number.

Definition at line 235 of file DefaultEngine.h.

◆ pile_traitement

std::stack< Ray*, std::deque <Ray*> > DefaultEngine::pile_traitement
protected

Treatment stack containing the rays to treat.

Definition at line 233 of file DefaultEngine.h.


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