Code_TYMPAN  4.4.0
Industrial site acoustic simulation
config.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2014> <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 #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  NbThreads = 4;
73  UseRealGround = true;
74  UseLateralDiffraction = true;
75  UseReflection = true;
76  KeepRays = false;
77 
78  PropaConditions = 0;
79  DSWindDirection = 0;
80  AngleFavorable = 45;
81  AngleDefavorable = 45;
82 
83  H1parameter = 10.;
84  ModSummation = false;
85 
90  DebugUseFaceSelector = true;
91 }
92 
94 {
95  if (!_pInstance)
96  {
97  _pInstance = boost::shared_ptr<SolverConfiguration>(new SolverConfiguration());
98  }
99  return _pInstance;
100 }
101 
103 {
104  _pInstance = config;
105 }
106 
108 
109 } // namespace tympan
Base class for accelerators.
Definition: Accelerator.h:27
bool KeepRays
Flag to keep the rays in the results.
Definition: config.h:89
float MaxPathDifference
Parameter (by default 24) for path validations during diffraction.
Definition: config.h:54
float MaxLength
LengthSelector Selector option (maximal length)
Definition: config.h:36
bool UsePathDifValidation
Flag to activate path validations during diffraction.
Definition: config.h:53
int NbThreads
Number of threads used by TYSolver.
Definition: config.h:78
int AnalyticNbRay
Rays number to launch for the curve ray sampler.
Definition: config.h:65
int MaxReflexion
Maximal reflection events.
Definition: config.h:46
bool UseSol
Flag to activate specular reflection on the ground.
Definition: config.h:45
static void set(LPSolverConfiguration config)
Set a configuration.
Definition: config.cpp:102
~SolverConfiguration()
Destructor.
Definition: config.cpp:107
bool KeepDebugRay
Flag to store rays into a debug_rays array after being invalidated.
Definition: config.h:57
int MaxTreeDepth
BvhAccelerator Accelerator option (Maximal tree depth)
Definition: config.h:40
float CylindreThick
Diffraction cylinder diameter.
Definition: config.h:43
double AtmosTemperature
Atmospheric temperature [°C].
Definition: config.h:25
bool DiffractionFilterRayAtCreation
Flag to filter the created rays during diffraction.
Definition: config.h:52
bool DebugUseFaceSelector
Flag to add the FaceSelector filter.
Definition: config.h:99
float InitialAnglePhi
Starting angle phi for the curve ray sampler.
Definition: config.h:63
double AtmosHygrometry
Atmospheric hygrometry.
Definition: config.h:26
float H1parameter
Multiplicative coefficient for the additional reflections if PropaConditions is true.
Definition: config.h:92
float InitialAngleTheta
Starting angle theta for the curve ray sampler.
Definition: config.h:61
bool DebugUseCloseEventSelector
Flag to add the the CloseEventSelector filter.
Definition: config.h:95
bool DiffractionUseDistanceAsFilter
Definition: config.h:55
int NbRayWithDiffraction
Number of rays to throw during diffraction.
Definition: config.h:49
static LPSolverConfiguration _pInstance
Definition: config.h:108
float MeshElementSizeMax
Not used.
Definition: config.h:72
int NbRaysPerSource
Number of rays per source for the Sampler.
Definition: config.h:35
double WindDirection
Wind direction.
Definition: config.h:27
double AnalyticH
The propagation time step for the curve ray sampler.
Definition: config.h:67
static LPSolverConfiguration get()
Get the configuration.
Definition: config.cpp:93
bool ModSummation
Flag to activate in the acoustic model a calculation with interference.
Definition: config.h:93
double AnalyticGradV
Wind gradient.
Definition: config.h:29
bool DiffractionUseRandomSampler
Flag to enable random (and not regular) sampling for diffraction.
Definition: config.h:48
bool DebugUseDiffractionPathSelector
Flag to add the DiffractionPathSelector filter.
Definition: config.h:97
double AnalyticDMax
The maximal distance for the curve ray sampler.
Definition: config.h:68
bool DebugUseFermatSelector
Flag to add the FermatSelector filter.
Definition: config.h:98
SolverConfiguration()
Constructor.
Definition: config.cpp:24
bool UseRealGround
Flag to model ground into the acoustic model.
Definition: config.h:79
bool UsePostFilters
Flag to use some specifics Selector.
Definition: config.h:58
double AnalyticGradC
Sound speed gradient.
Definition: config.h:28
bool DebugUseDiffractionAngleSelector
Flag to add the DiffractionAngleSelector filter.
Definition: config.h:96
double AtmosPressure
Atmospheric pressure [Pa].
Definition: config.h:24
bool UseReflection
Flag to use reflection on vertical walls.
Definition: config.h:83
int MaxProfondeur
Maximal number of events for ray validation in ANIME3D solver.
Definition: config.h:44
int MaxDiffraction
Maximal diffraction events.
Definition: config.h:47
bool UseLateralDiffraction
Flag to compute horizontal paths in the acoustic path finder.
Definition: config.h:82
double AnalyticTMax
The maximal propagation time for the curve ray sampler.
Definition: config.h:66
This file provides class for solver configuration.
boost::shared_ptr< SolverConfiguration > LPSolverConfiguration
Definition: interfaces.h:25