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

Class to describe the acoustic problem. More...

#include <acoustic_problem_model.hpp>

Collaboration diagram for tympan::AcousticProblemModel:
Collaboration graph
[legend]

Public Member Functions

 AcousticProblemModel ()
 
virtual ~AcousticProblemModel ()
 Constructor. More...
 
node_idx make_node (const Point &point)
 Destructor. More...
 
node_idx make_node (double x, double y, double z)
 Call make_node(Point) with a point given by its coordinates. More...
 
triangle_idx make_triangle (node_idx n1, node_idx n2, node_idx n3)
 
size_t npoints () const
 Return the total number of nodes. More...
 
size_t ntriangles () const
 Return the total number of triangles. More...
 
size_t nsources () const
 Return the total number of sources. More...
 
size_t nreceptors () const
 Return the total number of receptors. More...
 
AcousticTriangletriangle (triangle_idx tri_idx)
 Return a triangle by its id. More...
 
const AcousticTriangletriangle (triangle_idx tri_idx) const
 Return a triangle by its id. More...
 
Pointnode (node_idx idx)
 Return a node by its id. More...
 
const Pointnode (node_idx idx) const
 Return a node by its id. More...
 
AcousticSourcesource (source_idx idx)
 Return a source by its id. More...
 
const AcousticSourcesource (source_idx idx) const
 Return a source by its id. More...
 
AcousticReceptorreceptor (receptor_idx idx)
 Return a receptor by its id. More...
 
const AcousticReceptorreceptor (receptor_idx idx) const
 Return a receptor by its id. More...
 
size_t nmaterials () const
 Return the total number of materials. More...
 
const AcousticMaterialBasematerial (size_t mat_idx) const
 Return a material by its id. More...
 
AcousticMaterialBasematerial (size_t mat_idx)
 Return a material by its id. More...
 
material_ptr_t make_material (const string &name, double resistivity, double deviation, double length, double factor_g)
 Push a representation of a ground material into the model. If an instance of a ground material with same name and characteristics is already pushed, then return it. More...
 
material_ptr_t make_material (const string &name, const ComplexSpectrum &spectrum)
 Push a representation of a building material into the model. More...
 
source_idx make_source (const Point &point_, const Spectrum &spectrum_, SourceDirectivityInterface *directivity)
 Push a new acoustic source into the model. More...
 
receptor_idx make_receptor (const Point &position_)
 Push a new acoustic receptor into the model. More...
 
const nodes_pool_tnodes () const
 Return array of nodes. More...
 
const triangle_pool_ttriangles () const
 Return array of triangles. More...
 
const material_pool_tmaterials () const
 Return array of materials. More...
 
const source_pool_tsources () const
 Return array of sources. More...
 
const receptor_pool_treceptors () const
 Return array of receptors. More...
 

Protected Attributes

nodes_pool_t all_nodes
 Array of all nodes. More...
 
triangle_pool_t all_triangles
 Array of all triangles. More...
 
material_pool_t all_materials
 Array of all materials. More...
 
source_pool_t all_sources
 Array of all sources. More...
 
receptor_pool_t all_receptors
 Array of all receptors. More...
 

Detailed Description

Class to describe the acoustic problem.

Definition at line 39 of file acoustic_problem_model.hpp.

Constructor & Destructor Documentation

◆ AcousticProblemModel()

tympan::AcousticProblemModel::AcousticProblemModel ( )
inline

Definition at line 42 of file acoustic_problem_model.hpp.

◆ ~AcousticProblemModel()

virtual tympan::AcousticProblemModel::~AcousticProblemModel ( )
inlinevirtual

Constructor.

Definition at line 43 of file acoustic_problem_model.hpp.

Member Function Documentation

◆ make_material() [1/2]

material_ptr_t tympan::AcousticProblemModel::make_material ( const string &  name,
const ComplexSpectrum spectrum 
)

Push a representation of a building material into the model.

Parameters
namethe name of the material
spectrumthe absorption spectrum (TO BE PRECISED)
Returns
a shared_ptr to the corresponding AcousticBuildingMaterial instance

Definition at line 109 of file acoustic_problem_model.cpp.

◆ make_material() [2/2]

material_ptr_t tympan::AcousticProblemModel::make_material ( const string &  name,
double  resistivity,
double  deviation,
double  length,
double  factor_g 
)

Push a representation of a ground material into the model. If an instance of a ground material with same name and characteristics is already pushed, then return it.

Parameters
namethe name of the material
resistivitythe resistivity of the ground, expressed in kRayls
deviationthe deviation of the ground
lengthmedium length
factor_gthe ground factor G used in ISO 9613-2
Returns
a shared_ptr to the corresponding AcousticGroundMaterial instance

Definition at line 76 of file acoustic_problem_model.cpp.

◆ make_node() [1/2]

node_idx tympan::AcousticProblemModel::make_node ( const Point point)

Destructor.

Maps a Point or OPoint3D as a node_ref

Parameters
pointthe TYPoint or OPoint3D to be mapped
Returns
a smart pointer to the corresponding Node (created on the fly if needed)

Definition at line 57 of file acoustic_problem_model.cpp.

Here is the caller graph for this function:

◆ make_node() [2/2]

node_idx tympan::AcousticProblemModel::make_node ( double  x,
double  y,
double  z 
)
inline

Call make_node(Point) with a point given by its coordinates.

Definition at line 52 of file acoustic_problem_model.hpp.

Here is the call graph for this function:

◆ make_receptor()

receptor_idx tympan::AcousticProblemModel::make_receptor ( const Point position_)

Push a new acoustic receptor into the model.

Definition at line 125 of file acoustic_problem_model.cpp.

◆ make_source()

source_idx tympan::AcousticProblemModel::make_source ( const Point point_,
const Spectrum spectrum_,
SourceDirectivityInterface directivity 
)

Push a new acoustic source into the model.

Parameters
point_Source position
spectrum_Spectrum associated to the source
directivityPointer to a source directivity
Returns
the source id

Definition at line 117 of file acoustic_problem_model.cpp.

◆ make_triangle()

triangle_idx tympan::AcousticProblemModel::make_triangle ( node_idx  n1,
node_idx  n2,
node_idx  n3 
)

Definition at line 70 of file acoustic_problem_model.cpp.

◆ material() [1/2]

AcousticMaterialBase& tympan::AcousticProblemModel::material ( size_t  mat_idx)
inline

Return a material by its id.

Definition at line 129 of file acoustic_problem_model.hpp.

◆ material() [2/2]

const AcousticMaterialBase& tympan::AcousticProblemModel::material ( size_t  mat_idx) const
inline

Return a material by its id.

Definition at line 124 of file acoustic_problem_model.hpp.

◆ materials()

const material_pool_t& tympan::AcousticProblemModel::materials ( ) const
inline

Return array of materials.

Definition at line 178 of file acoustic_problem_model.hpp.

Here is the caller graph for this function:

◆ nmaterials()

size_t tympan::AcousticProblemModel::nmaterials ( ) const
inline

Return the total number of materials.

Definition at line 119 of file acoustic_problem_model.hpp.

◆ node() [1/2]

Point& tympan::AcousticProblemModel::node ( node_idx  idx)
inline

Return a node by its id.

Definition at line 89 of file acoustic_problem_model.hpp.

◆ node() [2/2]

const Point& tympan::AcousticProblemModel::node ( node_idx  idx) const
inline

Return a node by its id.

Definition at line 94 of file acoustic_problem_model.hpp.

◆ nodes()

const nodes_pool_t& tympan::AcousticProblemModel::nodes ( ) const
inline

Return array of nodes.

Definition at line 170 of file acoustic_problem_model.hpp.

Here is the caller graph for this function:

◆ npoints()

size_t tympan::AcousticProblemModel::npoints ( ) const
inline

Return the total number of nodes.

Definition at line 59 of file acoustic_problem_model.hpp.

◆ nreceptors()

size_t tympan::AcousticProblemModel::nreceptors ( ) const
inline

Return the total number of receptors.

Definition at line 74 of file acoustic_problem_model.hpp.

Here is the caller graph for this function:

◆ nsources()

size_t tympan::AcousticProblemModel::nsources ( ) const
inline

Return the total number of sources.

Definition at line 69 of file acoustic_problem_model.hpp.

Here is the caller graph for this function:

◆ ntriangles()

size_t tympan::AcousticProblemModel::ntriangles ( ) const
inline

Return the total number of triangles.

Definition at line 64 of file acoustic_problem_model.hpp.

◆ receptor() [1/2]

AcousticReceptor& tympan::AcousticProblemModel::receptor ( receptor_idx  idx)
inline

Return a receptor by its id.

Definition at line 109 of file acoustic_problem_model.hpp.

◆ receptor() [2/2]

const AcousticReceptor& tympan::AcousticProblemModel::receptor ( receptor_idx  idx) const
inline

Return a receptor by its id.

Definition at line 114 of file acoustic_problem_model.hpp.

◆ receptors()

const receptor_pool_t& tympan::AcousticProblemModel::receptors ( ) const
inline

Return array of receptors.

Definition at line 186 of file acoustic_problem_model.hpp.

◆ source() [1/2]

AcousticSource& tympan::AcousticProblemModel::source ( source_idx  idx)
inline

Return a source by its id.

Definition at line 99 of file acoustic_problem_model.hpp.

◆ source() [2/2]

const AcousticSource& tympan::AcousticProblemModel::source ( source_idx  idx) const
inline

Return a source by its id.

Definition at line 104 of file acoustic_problem_model.hpp.

◆ sources()

const source_pool_t& tympan::AcousticProblemModel::sources ( ) const
inline

Return array of sources.

Definition at line 182 of file acoustic_problem_model.hpp.

◆ triangle() [1/2]

AcousticTriangle& tympan::AcousticProblemModel::triangle ( triangle_idx  tri_idx)
inline

Return a triangle by its id.

Definition at line 79 of file acoustic_problem_model.hpp.

◆ triangle() [2/2]

const AcousticTriangle& tympan::AcousticProblemModel::triangle ( triangle_idx  tri_idx) const
inline

Return a triangle by its id.

Definition at line 84 of file acoustic_problem_model.hpp.

◆ triangles()

const triangle_pool_t& tympan::AcousticProblemModel::triangles ( ) const
inline

Return array of triangles.

Definition at line 174 of file acoustic_problem_model.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ all_materials

material_pool_t tympan::AcousticProblemModel::all_materials
protected

Array of all materials.

Definition at line 208 of file acoustic_problem_model.hpp.

◆ all_nodes

nodes_pool_t tympan::AcousticProblemModel::all_nodes
protected

Array of all nodes.

Definition at line 206 of file acoustic_problem_model.hpp.

◆ all_receptors

receptor_pool_t tympan::AcousticProblemModel::all_receptors
protected

Array of all receptors.

Definition at line 210 of file acoustic_problem_model.hpp.

◆ all_sources

source_pool_t tympan::AcousticProblemModel::all_sources
protected

Array of all sources.

Definition at line 209 of file acoustic_problem_model.hpp.

◆ all_triangles

triangle_pool_t tympan::AcousticProblemModel::all_triangles
protected

Array of all triangles.

Definition at line 207 of file acoustic_problem_model.hpp.


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