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

#include <Solver.h>

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

Public Member Functions

 BasicSolver ()
 
 ~BasicSolver ()
 
virtual bool postTreatmentScene (Scene *scene, std::vector< Source > &sources, std::vector< Recepteur > &recepteurs)
 Virtual function to post-process the Scene. It has two phases: transform the meta-objects and load the Scene. During the first phase, we iterate on the different meta-objects lists and are extracted elements for the ray tracer. Typically, a wall object would be transformed in a set of Primitives, extract polylines from punctual Sources,... The Scene will be loaded with objects related to acoustic calculation which are not present into the physical description of the Scene. For instance, diffraction edges are modeled by a cylinder and should be generated. More...
 
virtual bool valideIntersection (Ray *r, Intersection *inter)
 Validation function for an intersection. If the intersection is validated, an event is created and added on the ray. More...
 
virtual bool valideRayon (Ray *r)
 Ray validation. The developer may, for instance, choose a filtering on the rays and only validate single paths. If the ray is valid, it is added to the valid rays list and will be used for the export. More...
 
virtual bool invalidRayon (Ray *r)
 Method to arrange the invalid rays. The invalid rays are put away into a debug_ray array in order to visualize all of the rays. More...
 
virtual void finish ()
 End the operations. More...
 
- Public Member Functions inherited from Solver
 Solver ()
 Default constructor. More...
 
 Solver (Solver *_solver)
 Copy constructor. More...
 
virtual double leafTreatment (vector< Intersection > &primitives)
 Leaf treatment function for accelerators. The default is to keep only the first intersection. It is possible to keep all the intersections which happens before a type specific intersection. For instance, we can keep all the intersections before an intersection with a triangle considered as blocking. More...
 
virtual deque< Ray * > * getValidRays ()
 Return a pointer to the validated rays list. More...
 
deque< Ray * > * getDebugRays ()
 Return a pointer to the invalidated rays list. More...
 
virtual void clean ()
 Delete the valid rays array. More...
 
virtual bool loadParameters ()
 Load the computation parameters. More...
 

Public Attributes

bool _useFresnelArea
 Flag to use Fresnel weighting. More...
 

Protected Attributes

SelectorManager< RayselectorManagerIntersection
 
SelectorManager< RayselectorManagerValidation
 
- Protected Attributes inherited from Solver
deque< Ray * > valid_rays
 Rays list which are validated by the solver. More...
 
deque< Ray * > debug_rays
 Rays list which are invalidated by the solver. More...
 

Detailed Description

Definition at line 133 of file Solver.h.

Constructor & Destructor Documentation

◆ BasicSolver()

BasicSolver::BasicSolver ( )
inline

Definition at line 137 of file Solver.h.

◆ ~BasicSolver()

BasicSolver::~BasicSolver ( )
inline

Definition at line 138 of file Solver.h.

Member Function Documentation

◆ finish()

void BasicSolver::finish ( )
virtual

End the operations.

Reimplemented from Solver.

Definition at line 188 of file Solver.cpp.

Here is the call graph for this function:

◆ invalidRayon()

bool BasicSolver::invalidRayon ( Ray r)
virtual

Method to arrange the invalid rays. The invalid rays are put away into a debug_ray array in order to visualize all of the rays.

Parameters
r: Ray to invalid.
Returns
Return true if the ray has been invalidated.

Reimplemented from Solver.

Definition at line 173 of file Solver.cpp.

Here is the call graph for this function:

◆ postTreatmentScene()

bool BasicSolver::postTreatmentScene ( Scene scene,
std::vector< Source > &  sources,
std::vector< Recepteur > &  recepteurs 
)
virtual

Virtual function to post-process the Scene. It has two phases: transform the meta-objects and load the Scene. During the first phase, we iterate on the different meta-objects lists and are extracted elements for the ray tracer. Typically, a wall object would be transformed in a set of Primitives, extract polylines from punctual Sources,... The Scene will be loaded with objects related to acoustic calculation which are not present into the physical description of the Scene. For instance, diffraction edges are modeled by a cylinder and should be generated.

Parameters
sceneScene to post-process
sourcesSources
recepteursReceptors
Returns
Return true if success

Reimplemented from Solver.

Definition at line 82 of file Solver.cpp.

Here is the call graph for this function:

◆ valideIntersection()

bool BasicSolver::valideIntersection ( Ray r,
Intersection inter 
)
virtual

Validation function for an intersection. If the intersection is validated, an event is created and added on the ray.

Parameters
r: Ray
inter: Intersection to validate
Returns
Return true if the validation is done
Warning
The validation functions should agree with the primitives types in the Scene. The unsupported primitives types should throw an exception if not handled by the simulation.

Reimplemented from Solver.

Definition at line 125 of file Solver.cpp.

Here is the call graph for this function:

◆ valideRayon()

bool BasicSolver::valideRayon ( Ray r)
virtual

Ray validation. The developer may, for instance, choose a filtering on the rays and only validate single paths. If the ray is valid, it is added to the valid rays list and will be used for the export.

Parameters
r: Ray to validate. The ray should have a source and a receiver.
Returns
Return true if the ray has been validated.

Reimplemented from Solver.

Definition at line 159 of file Solver.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _useFresnelArea

bool BasicSolver::_useFresnelArea

Flag to use Fresnel weighting.

Definition at line 160 of file Solver.h.

◆ selectorManagerIntersection

SelectorManager<Ray> BasicSolver::selectorManagerIntersection
protected

Definition at line 163 of file Solver.h.

◆ selectorManagerValidation

SelectorManager<Ray> BasicSolver::selectorManagerValidation
protected

Definition at line 164 of file Solver.h.


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