Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYChemin9613Solver.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 
98  void calcMinimalExtensionCondition(const OPoint3D& S, const OPoint3D& O, const OPoint3D& R, double a,
99  double h, const OVector3D& n);
100 
112  void computeBarAttenuation(const OSpectreOctave& Dz, const bool vertical, const bool left);
113 
120 
125  void setAttenuation(const TYTypeAttenuation& type, const OSpectreOctave& att)
126  {
127  _attenuations[type] = att;
128  }
129 
134  void setAttenuationBarWhenNoPath(bool vertical, bool left);
135 
136 protected:
148  const OSpectreOctave& Agr_r,
149  const OSpectreOctave& Agr_m, double hs, double hr,
150  double dp) const;
151 
163  const OPoint3D& R, double a, double h,
164  const OVector3D& n) const;
165 
166 private:
167  void calcGroundAttenuations(double distance, double hs, double hr, double Gs, double Gm, double Gr);
168  OSpectreOctave calcGroundAttenuationSR(double dp, double h, double G);
169  OSpectreOctave calcGroundAttenuationM(double q, double Gm);
170 
171 protected:
173  std::map<TYTypeAttenuation, OSpectreOctave> _attenuations;
174 };
175 
177 typedef std::deque<TYChemin9613Solver> TYTabChemin9613Solver;
178 
179 #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.
The 3D point class.
Definition: 3d.h:487
The 3D vector class.
Definition: 3d.h:298
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)
Compute barrier attenuation on the path. It implements recommendation 5.5 of 17534-3 standard,...
virtual OSpectreOctave calcTotalGroundAttenuation(const OSpectreOctave &Agr_s, const OSpectreOctave &Agr_r, const OSpectreOctave &Agr_m, double hs, double hr, double dp) const
Compute total ground attenuation Agr from region ground attenuations and geometric configuration.
virtual OSpectreOctave calcMinimalExtensionConditionOneReflection(const OPoint3D &S, const OPoint3D &O, const OPoint3D &R, double a, double h, const OVector3D &n) const
Evaluate minimal extension condition for a specular reflection on a flat surface in function of the w...
void calcMinimalExtensionCondition(const OPoint3D &S, const OPoint3D &O, const OPoint3D &R, double a, double h, const OVector3D &n)
Evaluate minimal extension condition for specular reflections on flat surfaces in function of the wav...
Representation of one of the most optimal path between source and receptor: S—>R. The class TYChemin ...
Definition: TYChemin.h:66