Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYTask9613Solver.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 
18 #include "TYSolver9613Solver.h"
19 #include "TYTask9613Solver.h"
20 
22  const tympan::triangle_pool_t& triangles,
23  const tympan::material_pool_t& materials, TYTrajet9613Solver& trajet,
24  int nNbTrajets)
25  : TYTask(nodes, triangles, materials, nNbTrajets), _solver(solver), _trajet(trajet)
26 {
27 }
28 
30 {
32 }
33 
35 {
37 }
38 
40 {
41  _solver.getAcousticPathFinder()->computePath(_tabIntersect, _trajet, ptsTop, ptsLeft, ptsRight);
42 }
43 
45  TabPoint3D& ptsRight)
46 {
47  _solver.getAcousticModel()->compute(_tabIntersect, _trajet, ptsTop, ptsLeft, ptsRight);
48 }
std::vector< OPoint3D > TabPoint3D
Definition: 3d.h:483
Class to define a segment.
Definition: 3d.h:1141
void compute(const std::deque< TYSIntersection > &tabIntersect, TYTrajet9613Solver &trajet, TabPoint3D &ptsTop, TabPoint3D &ptsLeft, TabPoint3D &ptsRight)
Main entry point, trigger acoustic computations.
virtual void computePath(const std::deque< TYSIntersection > &tabIntersect, const TYTrajet &trajet, TabPoint3D &ptsTop, TabPoint3D &ptsLeft, TabPoint3D &ptsRight)
Compute a path between a source and a receptor. The receptor is not included in the path.
virtual TYAcousticModel9613Solver * getAcousticModel()
Get acoustic model.
TYAcousticPathFinder * getAcousticPathFinder()
Get the acoustic path finder.
Definition: TYSolver.h:66
void selectFaces(std::deque< TYSIntersection > &tabIntersect, const OSegment3D &rayon, const string &sourceVolumeId)
Delegate to _faceSelector the build of the array of intersections.
Definition: TYSolver.cpp:148
virtual void getRayonFromTrajet(OSegment3D &rayon) override
Build a ray from the source->receptor Trajet.
void launchAcousticComputation(TabPoint3D &ptsTop, TabPoint3D &ptsLeft, TabPoint3D &ptsRight) override
Delegate to solver the acoustic computation for this task.
TYTask9613Solver(TYSolver9613Solver &solver, const tympan::nodes_pool_t &nodes, const tympan::triangle_pool_t &triangles, const tympan::material_pool_t &materials, TYTrajet9613Solver &trajet, int nNbTrajets)
Constructor.
TYTrajet9613Solver & _trajet
Reference to the path.
TYSolver9613Solver & _solver
Reference to the solver.
virtual void selectFaces(OSegment3D &rayon) override
Delegate to solver the build of the intersecting faces between the scene and the ray.
virtual void computePath(TabPoint3D &ptsTop, TabPoint3D &ptsLeft, TabPoint3D &ptsRight) override
Delegate to solver the computation of the intersecting top, left and right points between the scene a...
Task of a thread collection for Tympan.
Definition: TYTask.h:30
std::deque< TYSIntersection > _tabIntersect
Array of intersections.
Definition: TYTask.h:81
This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths,...
void getPtSetPtRfromOSeg3D(OSegment3D &seg) const
Definition: TYTrajet.h:115
tympan::AcousticSource & asrc
Business source.
Definition: TYTrajet.h:126
string volume_id
Volume id.
Definition: entities.hpp:404
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