Code_TYMPAN  4.4.0
Industrial site acoustic simulation
ParallelDefaultEngine.h
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 #ifndef PARALLEL_DEFAULT_ENGINE_H
17 #define PARALLEL_DEFAULT_ENGINE_H
18 
19 #include "DefaultEngine.h"
20 
24 #ifdef TEST_ACCELERATION_RECEPTORS
26 {
27 
28 public:
32  ParallelDefaultEngine(Scene* _scene, std::vector<Source>* _sources, Solver* _solver, Scene* _recepteurs)
33  : Engine(_scene, _sources, _solver, _recepteurs)
34  {
35  }
38  {
39  scene = other.scene;
40  sources = other.sources;
41  solver = other.solver;
42  recepteurs = other.recepteurs;
43  }
46 
47  virtual bool process();
48 };
49 #else
50 class ParallelDefaultEngine : public Engine
51 {
52 
53 public:
55 
56  ParallelDefaultEngine(Scene* _scene, std::vector<Source>* _sources, Solver* _solver,
57  std::vector<Recepteur>* _recepteurs)
58  : Engine(_scene, _sources, _solver, _recepteurs)
59  {
60  }
61 
63  {
64  scene = other.scene;
65  sources = other.sources;
66  solver = other.solver;
67  recepteurs = other.recepteurs;
68  }
69 
70  virtual ~ParallelDefaultEngine() {}
71 
72  virtual bool process();
73 };
74 
75 #endif // TEST_ACCELERATION_RECEPTORS
76 #endif
Base class for engines (DefaultEngine, ParallelDefaultEngine,...)
Definition: Engine.h:36
Scene * recepteurs
Pointer to all the sources.
Definition: Engine.h:105
Scene * scene
Pointer to the scene.
Definition: Engine.h:103
Solver * solver
Pointer to the solver.
Definition: Engine.h:106
std::vector< Source > * sources
Pointer to all the receptors.
Definition: Engine.h:104
Parallel default engine class.
virtual bool process()
If implemented, process and return true if success.
ParallelDefaultEngine(const ParallelDefaultEngine &other)
Copy constructor.
ParallelDefaultEngine(Scene *_scene, std::vector< Source > *_sources, Solver *_solver, Scene *_recepteurs)
Constructor.
virtual ~ParallelDefaultEngine()
Destructor.
ParallelDefaultEngine()
Default constructor.
This class mainly define a mesh (list of Shape) used by the Simulation object.
Definition: Scene.h:51
The Solver class gives an interface to the developer to add easily a new acoustic method using ray tr...
Definition: Solver.h:45