Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYChemin9613Sover.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_CHEMIN_9613SOLVER__
17 #define __TY_CHEMIN_9613SOLVER__
18 
19 #include <deque>
24 
41 {
42  // Methods
43 public:
58  ~TYChemin9613Solver() override;
59 
63  bool operator==(const TYChemin9613Solver& other) const;
65  bool operator!=(const TYChemin9613Solver& other) const;
66 
82  void calcAttenuation(const TYTabEtape9613Solver& tabEtapes, const AtmosphericConditions& atmos,
83  double dp = 0.0, double hs = 0.0, double hr = 0.0, double Gs = 0.5, double Gm = 0.5,
84  double Gr = 0.5);
85 
90  void computeBarAttenuation(const OSpectreOctave& Dz, const bool vertical, const bool left);
91 
98 
103  void setAttenuation(const TYTypeAttenuation& type, const OSpectreOctave& att)
104  {
105  _attenuations[type] = att;
106  }
107 
112  void setAttenuationBarWhenNoPath(bool vertical, bool left);
113 
114 protected:
116  std::map<TYTypeAttenuation, OSpectreOctave> _attenuations;
117 
118 private:
119  void calcGroundAttenuations(double distance, double hs, double hr, double Gs, double Gm, double Gr);
120  OSpectreOctave calcGroundAttenuationSR(double dp, double h, double G);
121  OSpectreOctave calcGroundAttenuationM(double q, double Gm);
122 };
123 
125 typedef std::deque<TYChemin9613Solver> TYTabChemin9613Solver;
126 
127 #endif // __TY_CHEMIN_9613SOLVER__
std::deque< TYChemin9613Solver > TYTabChemin9613Solver
TYChemin collection.
Representation of one of the most optimal path between source and receptor: S—>R.
TYTypeAttenuation
Definition: TYChemin.h:41
std::deque< TYEtape9613Solver > TYTabEtape9613Solver
TYEtape 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 ...
bool operator!=(const TYChemin9613Solver &other) const
Operator !=.
bool operator==(const TYChemin9613Solver &other) const
Operator ==.
OSpectreOctave calcGroundAttenuationM(double q, double Gm)
TYChemin9613Solver & operator=(const TYChemin9613Solver &other)
Operator =.
void calcGroundAttenuations(double distance, double hs, double hr, double Gs, double Gm, double Gr)
~TYChemin9613Solver() override
Destructor.
OSpectreOctave calcGroundAttenuationSR(double dp, double h, double G)
std::map< TYTypeAttenuation, OSpectreOctave > _attenuations
Attenuations spectra of the path.
void setAttenuationBarWhenNoPath(bool vertical, bool left)
Set attenuation bar to max to traduce the lack of diffracted ray on this path.
OSpectreOctave & getAttenuation(const TYTypeAttenuation type)
Return attenuation of the path of the type.
void calcAttenuation(const TYTabEtape9613Solver &tabEtapes, const AtmosphericConditions &atmos, double dp=0.0, double hs=0.0, double hr=0.0, double Gs=0.5, double Gm=0.5, double Gr=0.5)
Compute the global attenuation on the path.
void setAttenuation(const TYTypeAttenuation &type, const OSpectreOctave &att)
Set the atmospheric attenuation.
TYChemin9613Solver()
Constructor.
void computeBarAttenuation(const OSpectreOctave &Dz, const bool vertical, const bool left)
Representation of one of the most optimal path between source and receptor: S—>R. The class TYChemin ...
Definition: TYChemin.h:64