Code_TYMPAN  4.4.0
Industrial site acoustic simulation
config.cpp
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 #include "config.h"
17 
18 namespace tympan
19 {
20 
21 // Initialise a NULL.
23 
25 {
26  AtmosPressure = 101325.;
27  AtmosTemperature = 20.;
28  AtmosHygrometry = 50.;
29  // AnalyticC0 = 340.;
30  AnalyticGradC = 0.;
31  AnalyticGradV = 0.;
32  WindDirection = 0.;
33 
34  RayTracingOrder = 0;
35  Discretization = 2;
36  NbRaysPerSource = 10000;
37  MaxLength = 5000;
38  SizeReceiver = 10.;
39  Accelerator = 1;
40  MaxTreeDepth = 12;
41  AngleDiffMin = 5.;
42  CylindreThick = 0.5f;
43  MaxProfondeur = 10;
44  UseSol = 1;
45  MaxReflexion = 5;
46  MaxDiffraction = 2;
51  UsePathDifValidation = true;
52  MaxPathDifference = 25.;
54  KeepDebugRay = false;
55  UsePostFilters = true;
56  MeshElementSizeMax = 0.0;
57  RefineMesh = true;
58  UseVolumesLandtake = false;
59 
60  // EnableFullTargets = false;
61  // TargetsDensity = 0.1f;
62 
63  InitialAngleTheta = 0.;
64  InitialAnglePhi = 0.;
65  AnalyticNbRay = 20;
66  AnalyticTMax = 10.;
67  AnalyticH = 0.1;
68  AnalyticDMax = 3000;
69 
71 
72  MinSRDistance = 0.3;
73  NbThreads = 4;
74  UseRealGround = true;
75  UseLateralDiffraction = true;
76  UseReflection = true;
77  KeepRays = false;
78 
79  PropaConditions = 0;
80  DSWindDirection = 0;
81  AngleFavorable = 45;
82  AngleDefavorable = 45;
83 
84  H1parameter = 10.;
85  ModSummation = false;
86 
91  DebugUseFaceSelector = true;
92 }
93 
95 {
96  if (!_pInstance)
97  {
98  _pInstance = boost::shared_ptr<SolverConfiguration>(new SolverConfiguration());
99  }
100  return _pInstance;
101 }
102 
104 {
105  _pInstance = config;
106 }
107 
109 
110 } // namespace tympan
Base class for accelerators.
Definition: Accelerator.h:27
bool KeepRays
Flag to keep the rays in the results.
Definition: config.h:104
float MaxPathDifference
Parameter (by default 24) for path validations during diffraction.
Definition: config.h:69
float MaxLength
LengthSelector Selector option (maximal length)
Definition: config.h:51
bool UsePathDifValidation
Flag to activate path validations during diffraction.
Definition: config.h:68
int NbThreads
Number of threads used by TYSolver.
Definition: config.h:93
float MinSRDistance
Not used.
Definition: config.h:92
int AnalyticNbRay
Rays number to launch for the curve ray sampler.
Definition: config.h:80
int MaxReflexion
Maximal reflection events.
Definition: config.h:61
bool UseSol
Flag to activate specular reflection on the ground.
Definition: config.h:60
static void set(LPSolverConfiguration config)
Set a configuration.
Definition: config.cpp:103
~SolverConfiguration()
Destructor.
Definition: config.cpp:108
bool KeepDebugRay
Flag to store rays into a debug_rays array after being invalidated.
Definition: config.h:72
int MaxTreeDepth
BvhAccelerator Accelerator option (Maximal tree depth)
Definition: config.h:55
float CylindreThick
Diffraction cylinder diameter.
Definition: config.h:58
double AtmosTemperature
Atmospheric temperature [°C].
Definition: config.h:40
bool DiffractionFilterRayAtCreation
Flag to filter the created rays during diffraction.
Definition: config.h:67
bool DebugUseFaceSelector
Flag to add the FaceSelector filter.
Definition: config.h:114
float InitialAnglePhi
Starting angle phi for the curve ray sampler.
Definition: config.h:78
double AtmosHygrometry
Atmospheric hygrometry.
Definition: config.h:41
float H1parameter
Multiplicative coefficient for the additional reflections if PropaConditions is true.
Definition: config.h:107
float InitialAngleTheta
Starting angle theta for the curve ray sampler.
Definition: config.h:76
bool DebugUseCloseEventSelector
Flag to add the the CloseEventSelector filter.
Definition: config.h:110
bool DiffractionUseDistanceAsFilter
Definition: config.h:70
int NbRayWithDiffraction
Number of rays to throw during diffraction.
Definition: config.h:64
static LPSolverConfiguration _pInstance
Definition: config.h:123
float MeshElementSizeMax
Not used.
Definition: config.h:87
int NbRaysPerSource
Number of rays per source for the Sampler.
Definition: config.h:50
double WindDirection
Wind direction.
Definition: config.h:42
double AnalyticH
The propagation time step for the curve ray sampler.
Definition: config.h:82
static LPSolverConfiguration get()
Get the configuration.
Definition: config.cpp:94
bool ModSummation
Flag to activate in the acoustic model a calculation with interference.
Definition: config.h:108
double AnalyticGradV
Wind gradient.
Definition: config.h:44
bool DiffractionUseRandomSampler
Flag to enable random (and not regular) sampling for diffraction.
Definition: config.h:63
bool DebugUseDiffractionPathSelector
Flag to add the DiffractionPathSelector filter.
Definition: config.h:112
double AnalyticDMax
The maximal distance for the curve ray sampler.
Definition: config.h:83
bool DebugUseFermatSelector
Flag to add the FermatSelector filter.
Definition: config.h:113
SolverConfiguration()
Constructor.
Definition: config.cpp:24
bool UseRealGround
Flag to model ground into the acoustic model.
Definition: config.h:94
bool UsePostFilters
Flag to use some specifics Selector.
Definition: config.h:73
double AnalyticGradC
Sound speed gradient.
Definition: config.h:43
bool DebugUseDiffractionAngleSelector
Flag to add the DiffractionAngleSelector filter.
Definition: config.h:111
double AtmosPressure
Atmospheric pressure [Pa].
Definition: config.h:39
bool UseReflection
Flag to use reflection on vertical walls.
Definition: config.h:98
int MaxProfondeur
Maximal number of events for ray validation in ANIME3D solver.
Definition: config.h:59
int MaxDiffraction
Maximal diffraction events.
Definition: config.h:62
bool UseLateralDiffraction
Flag to compute horizontal paths in the acoustic path finder.
Definition: config.h:97
double AnalyticTMax
The maximal propagation time for the curve ray sampler.
Definition: config.h:81
This file provides class for solver configuration.
boost::shared_ptr< SolverConfiguration > LPSolverConfiguration
Definition: interfaces.h:25