|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
Class hosting all the informations needed for ray tracing. It contains the function to launch the rays treatment and the main loop of the program. To run a simulation, a call to launchSimulation() is enough. More...
#include <Simulation.h>


Public Member Functions | |
| Simulation () | |
| Constructor. More... | |
| Simulation (const Simulation &other) | |
| Copy constructor. More... | |
| virtual | ~Simulation () |
| Destructor. More... | |
| Scene * | getScene () |
| Get a pointer to the scene. More... | |
| Scene * | get_receptors_landscape () |
| Return the geometric distribution of receptors. More... | |
| void | setSolver (Solver *_solver) |
| Tool function to set the acoustic solver for the simulation. More... | |
| Solver * | getSolver () |
| Get the acoustic solver. More... | |
| Engine * | getEngine () |
| Get the engine. More... | |
| void | clean () |
| Clean the simulation: the scene, sources, and receptors and all the rays are deleted. More... | |
| bool | launchSimulation () |
| Program main loop. Extract all the rays from the sources then treat them. The loop finishes when the treatment stack is empty and there is no more sources creating rays. Once the ray is treated, either it is added to the stack to continue its path or is suppressed. The receptor search is launched once the ray is treated. Single-threaded function. More... | |
| void | addSource (const Source &s) |
| Tool function to add a source to the simulation. More... | |
| std::vector< Source > & | getSources () |
| Return the sources list of the scene. More... | |
| void | addRecepteur (Recepteur &r) |
| Tool function to add quickly a receptor for the simulation. More... | |
| std::vector< Recepteur > & | getRecepteurs () |
| Return a vector of all receptors of the scene. More... | |
| void | setMaterialManager (MaterialManager *_materialManager) |
| Set/Get the pointer to the MaterialManager. More... | |
| MaterialManager * | getMaterialManager () |
| void | setEngine (engineChoice engine=DEFAULT) |
| Set the engine (by default, the DefaultEngine) More... | |
| AcousticRaytracerConfiguration * | getConfiguration () |
| Get the configuration. More... | |
Public Member Functions inherited from Base | |
| Base () | |
| Default constructor. More... | |
| Base (const Base &other) | |
| Copy constructor. More... | |
| virtual | ~Base () |
| Destructor. More... | |
| std::string | getName () |
| Get the name of the object. More... | |
| void | setName (const std::string &_name) |
| Set the name of the object. More... | |
Protected Attributes | |
| Scene | scene |
| Description of the geometry in an accelerated structure. More... | |
| Scene | receptors_landscape |
| Geometric distribution of receptors. More... | |
| Solver * | solver |
| Pointer to a solver (acoustic method) More... | |
| MaterialManager * | materialManager |
| Pointer to a MaterialManager object. More... | |
| std::vector< Source > | sources |
| All the acoustic sources for the Simulation. More... | |
| std::vector< Recepteur > | recepteurs |
| All the acoustic receptors for the Simulation. More... | |
| Engine * | engine |
| Pointer to the selected Engine. More... | |
| engineChoice | engineC |
| Enum giving the Engine choice. More... | |
| unsigned int | compteurSource |
| Source counter. More... | |
| unsigned int | compteurRecepteur |
| Receptor counter. More... | |
| AcousticRaytracerConfiguration * | configuration |
| Pointer to the Acoustic RayTracer configuration. More... | |
Protected Attributes inherited from Base | |
| std::string | name |
| Each instantiated object may be named. More... | |
Class hosting all the informations needed for ray tracing. It contains the function to launch the rays treatment and the main loop of the program. To run a simulation, a call to launchSimulation() is enough.
Definition at line 43 of file Simulation.h.
|
inline |
|
inline |
Copy constructor.
Definition at line 55 of file Simulation.h.
|
inlinevirtual |
Destructor.
Definition at line 66 of file Simulation.h.
|
inline |
Tool function to add quickly a receptor for the simulation.
| r | : Receptor |
Definition at line 159 of file Simulation.h.


|
inline |
Tool function to add a source to the simulation.
| s | : Source |
Definition at line 138 of file Simulation.h.

| void Simulation::clean | ( | ) |
Clean the simulation: the scene, sources, and receptors and all the rays are deleted.
Definition at line 17 of file Simulation.cpp.


|
inline |
Return the geometric distribution of receptors.
Definition at line 83 of file Simulation.h.

|
inline |
Get the configuration.
Definition at line 197 of file Simulation.h.

|
inline |
|
inline |
Definition at line 185 of file Simulation.h.
|
inline |
Return a vector of all receptors of the scene.
Definition at line 175 of file Simulation.h.

|
inline |
Get a pointer to the scene.
Definition at line 73 of file Simulation.h.

|
inline |
|
inline |
Return the sources list of the scene.
Definition at line 149 of file Simulation.h.

| bool Simulation::launchSimulation | ( | ) |
Program main loop. Extract all the rays from the sources then treat them. The loop finishes when the treatment stack is empty and there is no more sources creating rays. Once the ray is treated, either it is added to the stack to continue its path or is suppressed. The receptor search is launched once the ray is treated. Single-threaded function.
Definition at line 30 of file Simulation.cpp.


|
inline |
Set the engine (by default, the DefaultEngine)
Definition at line 191 of file Simulation.h.
|
inline |
Set/Get the pointer to the MaterialManager.
Definition at line 181 of file Simulation.h.
|
inline |
Tool function to set the acoustic solver for the simulation.
Definition at line 93 of file Simulation.h.

|
protected |
Receptor counter.
Definition at line 221 of file Simulation.h.
|
protected |
Source counter.
Definition at line 220 of file Simulation.h.
|
protected |
Pointer to the Acoustic RayTracer configuration.
Definition at line 223 of file Simulation.h.
|
protected |
Pointer to the selected Engine.
Definition at line 217 of file Simulation.h.
|
protected |
Enum giving the Engine choice.
Definition at line 218 of file Simulation.h.
|
protected |
Pointer to a MaterialManager object.
Definition at line 212 of file Simulation.h.
|
protected |
All the acoustic receptors for the Simulation.
Definition at line 215 of file Simulation.h.
|
protected |
Geometric distribution of receptors.
Definition at line 208 of file Simulation.h.
|
protected |
Description of the geometry in an accelerated structure.
Definition at line 206 of file Simulation.h.
|
protected |
Pointer to a solver (acoustic method)
Definition at line 211 of file Simulation.h.
|
protected |
All the acoustic sources for the Simulation.
Definition at line 214 of file Simulation.h.