Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYTrajetDefaultSolver.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 __TY_TRAJET_DEFAULTSOLVER__
17 #define __TY_TRAJET_DEFAULTSOLVER__
18 
25 #include <gtest/gtest_prod.h>
26 
37 {
38 
39  // Methods
40 public:
48 
53  virtual ~TYTrajetDefaultSolver();
54 
58  bool operator==(const TYTrajetDefaultSolver& other) const;
60  bool operator!=(const TYTrajetDefaultSolver& other) const;
61 
66  void reset() override;
67 
73  size_t getNbChemins()
74  {
75  return _chemins.size();
76  }
77 
84  {
85  return _chemins;
86  }
87 
94  {
95  return _cheminsDirect;
96  }
97 
102  void addChemin(const TYCheminDefaultSolver& chemin);
103 
108  void addCheminDirect(const TYCheminDefaultSolver& chemin);
109 
116  {
117  return _chemins.at(index);
118  }
119 
128  {
129  return _sLP;
130  }
131  const OSpectre getSpectre() const
132  {
133  return _sLP;
134  }
135  void setSpectre(const OSpectre& spectre)
136  {
137  _sLP = spectre;
138  }
139 
145 
151 
152 private:
154  const AtmosphericConditions& atmos, const double& ri, const double& rj) const;
155  void build_tab_rays();
156  FRIEND_TEST(test_TYTrajet, getPInterference);
157  FRIEND_TEST(test_TYTrajet, getPEnergetique);
158 
159 public:
160  // Members
161 protected:
164 
167 
169 };
170 #endif // __TY_TRAJET_DEFAULTSOLVER__
All base classes related to 3D manipulation.
Representation of one of the most optimal path between source and receptor: S—>R Specific derivation ...
std::deque< TYCheminDefaultSolver > TYTabCheminDefaultSolver
TYChemin collection.
Class for the definition of atmospheric conditions.
Representation of one of the most optimal path between source and receptor: S—>R. The class TYChemin ...
This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths,...
const OSpectre getSpectre() const
TYTrajetDefaultSolver(tympan::AcousticSource &asrc_, tympan::AcousticReceptor &arcpt_)
Constructor.
bool operator!=(const TYTrajetDefaultSolver &other) const
Operator !=.
void reset() override
Reset method.
OSpectre correctTiers(const OSpectreComplex &si, const OSpectreComplex &sj, const AtmosphericConditions &atmos, const double &ri, const double &rj) const
size_t getNbChemins()
Return the number of path in *this (in addition to the direct path).
TYTabCheminDefaultSolver _chemins
Paths collection.
void addChemin(const TYCheminDefaultSolver &chemin)
Add a new path.
FRIEND_TEST(test_TYTrajet, getPEnergetique)
OSpectre & getSpectre()
Get/Set the spectrum at the receptor point.
TYTabCheminDefaultSolver & getChemins()
Return the collection of paths of *this.
FRIEND_TEST(test_TYTrajet, getPInterference)
OSpectre getPInterference(const AtmosphericConditions &atmos)
Compute the quadratic pressure on the journey.
void setSpectre(const OSpectre &spectre)
TYTrajetDefaultSolver & operator=(const TYTrajetDefaultSolver &other)
Operator =.
virtual ~TYTrajetDefaultSolver()
Destructor.
bool operator==(const TYTrajetDefaultSolver &other) const
Operator ==.
TYTabCheminDefaultSolver & getCheminsDirect()
Return an array of the direct paths.
TYCheminDefaultSolver getChemin(int index)
Return a path thanks to its index.
void addCheminDirect(const TYCheminDefaultSolver &chemin)
Add a new path to the array of direct paths.
OSpectre getPEnergetique(const AtmosphericConditions &atmos)
Compute the acoustic pressure (phase modulation) on the journey.
TYTabCheminDefaultSolver _cheminsDirect
Direct paths collection (without obstacles)
This class TYTrajet (journey) links a couple Source-Receptor and a collection of paths,...
Definition: TYTrajet.h:33
Describes an acoustic receptor.
Definition: entities.hpp:416
Describes an acoustic source.
Definition: entities.hpp:394
This file provides the declaration of the entities of the model, which inherit from BaseEntity.