Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITAPropagationPathSim
Commits
a5349abc
Commit
a5349abc
authored
Apr 03, 2020
by
Philipp Schäfer
Browse files
Atmospheric Ray Tracing
- added first version of API for Simulation Engine
parent
ce37fa28
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/ITAPropagationPathSim/AtmosphericRayTracing/SimulationEngine.h
0 → 100644
View file @
a5349abc
/*
* ----------------------------------------------------------------
*
* ITA geometrical acoustics
* (c) Copyright Institute of Technical Acoustics (ITA)
* RWTH Aachen University, Germany, 2015-2019
*
* ----------------------------------------------------------------
* ____ __________ _______
* // / //__ ___/ // _ |
* // / // / // /_| |
* // / // / // ___ |
* //__/ //__/ //__/ |__|
*
* ----------------------------------------------------------------
*
*/
#ifndef IW_ITA_PROPAGATIONPATHSIM_ART_ENGINE
#define IW_ITA_PROPAGATIONPATHSIM_ART_ENGINE
#include <ITAPropagationPathSim/Definitions.h>
// Vista includes
#include <VistaBase/VistaVector3D.h>
// ITA includes
#include <ITAPropagationPathSim/AtmosphericRayTracing/ODESolver.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Rays.h>
#include <ITAGeo/Atmosphere/StratifiedAtmosphere.h>
namespace
ITAPropagationPathSim
{
namespace
AtmosphericRayTracing
{
struct
SimulationSettings
{
ODESolver
::
SolverMethod
solverMethod
=
ODESolver
::
EULER
;
double
dTMax
=
30
;
double
dIntegrationTimeStep
=
0.1
;
IAbortCriterion
*
pAbortCriterion
=
nullptr
;
//!< Pointer to external abort criterion. If this is a NULL-pointer, it is ignored.
};
class
ITA_PROPAGATION_PATH_SIM_API
IAbortCriterion
{
virtual
bool
Abort
(
const
CRay
&
ray
)
const
=
0
;
};
class
ITA_PROPAGATION_PATH_SIM_API
CSimulationEngine
{
private:
class
CIntegrationStepAdaptor
{
public:
bool
bActive
=
true
;
//!< If this is set to false, this class is bypassed and the integration step size is therefore not adapted
double
dMaxError
=
0.015
;
double
dUncriticalError
=
0.005
;
CIntegrationStepAdaptor
()
{}
//CIntegrationStepAdaptor(double maxError, double uncriticalError) : dMaxError(maxError), dUncriticalError(uncriticalError) {}
};
CIntegrationStepAdaptor
integrationStepAdaptor
;
class
CWorker
{
private:
CRay
&
rRay
;
const
SimulationSettings
&
rSettings
;
const
CIntegrationStepAdaptor
&
rIntegrationStepAdaptor
;
public:
CWorker
(
CRay
&
ray
,
const
SimulationSettings
&
settings
,
const
CIntegrationStepAdaptor
&
adaptor
)
:
rRay
(
ray
),
rSettings
(
settings
),
rIntegrationStepAdaptor
(
adaptor
){}
void
TraceRay
();
};
public:
SimulationSettings
settings
;
VistaVector3D
v3SourcePosition
;
std
::
vector
<
VistaVector3D
>
v3RayDirections
;
private:
std
::
vector
<
CRay
>
rays
;
public:
CSimulationEngine
()
{}
virtual
~
CSimulationEngine
()
{}
public:
void
Run
();
private:
void
InitRays
();
CRay
TraceRay
(
const
VistaVector3D
&
v3Direction
);
};
}
}
#endif //IW_ITA_PROPAGATIONPATHSIM_ART_ENGINE
\ No newline at end of file
include/ITAPropagationPathSim/AtmosphericRayTracing/_SourceFiles.cmake
View file @
a5349abc
...
...
@@ -6,6 +6,8 @@ set( RelativeSourceGroup "Header Files\\ITAPropagationPathSim\\AtmosphericRayTra
set
(
DirFiles
ODESolver.h
SimulationEngine.h
Rays.h
)
set
(
DirFiles_SourceGroup
"
${
RelativeSourceGroup
}
"
)
...
...
src/ITAPropagationPathSim/AtmosphericRayTracing/SimulationEngine.cpp
0 → 100644
View file @
a5349abc
#include <ITAPropagationPathSim/AtmosphericRayTracing/SimulationEngine.h>
// ITA includes
#include <ITAPropagationPathSim/AtmosphericRayTracing/ODESolver.h>
// STD
//#include <cmath>
using
namespace
ITAPropagationPathSim
::
AtmosphericRayTracing
;
src/ITAPropagationPathSim/AtmosphericRayTracing/_SourceFiles.cmake
View file @
a5349abc
...
...
@@ -6,6 +6,7 @@ set( RelativeSourceGroup "Source Files\\ITAPropagationPathSim\\AtmosphericRayTra
set
(
DirFiles
ODESolver.cpp
SimulationEngine.cpp
)
set
(
DirFiles_SourceGroup
"
${
RelativeSourceGroup
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment