Code_TYMPAN  4.4.0
Industrial site acoustic simulation
ParallelDefaultEngine.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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