Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYTask.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
16 #include "TYAcousticModel.h"
18 #include "TYTask.h"
19 
21  const tympan::material_pool_t& materials, int nNbTrajets)
22  : _nNbTrajets(nNbTrajets), _nodes(nodes), _triangles(triangles), _materials(materials)
23 {
24 }
25 
27 
29 {
30  TabPoint3D ptsTop;
31  TabPoint3D ptsLeft;
32  TabPoint3D ptsRight;
33 
34  // Construction du rayon SR
35  OSegment3D rayon;
36  getRayonFromTrajet(rayon);
37  // _trajet.getPtSetPtRfromOSeg3D(rayon);
38 
39  // On selectionne les faces de la scene concernes par le calcul acoustique pour la paire concernee
40  selectFaces(rayon);
41 
42  // On calcul les trajets acoustiques horizontaux et verticaux reliant la paire source/recepteur
43  computePath(ptsTop, ptsLeft, ptsRight);
44 
45  // On effectue les calculs acoustiques en utilisant les formules du modele acoustique
46  launchAcousticComputation(ptsTop, ptsLeft, ptsRight);
47 
48  ptsTop.clear();
49  ptsLeft.clear();
50  ptsRight.clear();
51  _tabIntersect.clear();
52 }
std::vector< OPoint3D > TabPoint3D
Definition: 3d.h:483
Class to define a segment.
Definition: 3d.h:1141
virtual void computePath(TabPoint3D &ptsTop, TabPoint3D &ptsLeft, TabPoint3D &ptsRight)=0
Delegate to solver the computation of the intersecting top, left and right points between the scene a...
void main()
Main procedure to run the task.
Definition: TYTask.cpp:28
virtual void getRayonFromTrajet(OSegment3D &rayon)=0
Build a ray from the source->receptor Trajet.
~TYTask()
Destructor.
Definition: TYTask.cpp:26
virtual void selectFaces(OSegment3D &rayon)=0
Delegate to solver the build of the intersecting faces between the scene and the ray.
std::deque< TYSIntersection > _tabIntersect
Array of intersections.
Definition: TYTask.h:81
virtual void launchAcousticComputation(TabPoint3D &ptsTop, TabPoint3D &ptsLeft, TabPoint3D &ptsRight)=0
Delegate to solver the acoustic computation for this task.
TYTask(const tympan::nodes_pool_t &nodes, const tympan::triangle_pool_t &triangles, const tympan::material_pool_t &materials, int nNbTrajets)
Constructor.
Definition: TYTask.cpp:20
std::deque< Point > nodes_pool_t
std::deque< material_ptr_t > material_pool_t
Definition: entities.hpp:56
std::deque< AcousticTriangle > triangle_pool_t
Array of AcousticTriangle.
Definition: entities.hpp:227