DUNE: Uniform Navigational Environment
2020.01.0
|
Get stream velocity values from 2D (horizontal velocities) model data on a cartesian grid.
Uses the HDF5 format to load the stream values.
Public Member Functions | |
Gridded2DModelDataStreamGenerator (GriddedModelDataConfig const &config, double wx=0.0, double wy=0.0, double wz=0.0) | |
~Gridded2DModelDataStreamGenerator ()=default | |
virtual std::array< double, 3 > | getVelocity (double lat, double lon, double depth, double time=0.0) const override |
Public Member Functions inherited from Simulators::StreamVelocity::StreamGenerator::StreamGenerator | |
StreamGenerator (double wx, double wy, double wz=0.0) | |
~StreamGenerator ()=default | |
std::array< double, 3 > | getDefaultVelocity () const |
void | setVelocity (double wx, double wy, double wz=0.0) |
Simulators::StreamVelocity::StreamGenerator::Gridded2DModelDataStreamGenerator::Gridded2DModelDataStreamGenerator | ( | GriddedModelDataConfig const & | config, |
double | wx = 0.0 , |
||
double | wy = 0.0 , |
||
double | wz = 0.0 |
||
) |
Constructor.
[in] | config | structure containing the configuration parameters for reading the data from the file. |
[in] | wx | default stream speed in the North direction (m/s). |
[in] | wy | default stream speed in the East direction (m/s). |
[in] | wz | default stream speed in the Down direction (m/s). |
References DUNE::Parsers::HDF5Reader::getDataset(), DUNE::Math::Grid< dim >::getDimensions(), Simulators::StreamVelocity::StreamGenerator::ModelDataConfig::u_data_path, and Simulators::StreamVelocity::StreamGenerator::ModelDataConfig::v_data_path.
|
default |
|
overridevirtual |
Get a stream velocity value.
[in] | lat | WGS84 latitude in degrees. |
[in] | lon | WGS84 longitude in degrees. |
[in] | depth | depth in meters. |
[in] | time | time elapsed since the simulation started. |
Reimplemented from Simulators::StreamVelocity::StreamGenerator::StreamGenerator.
References DUNE::Math::Grid< dim >::getCoordinates(), DUNE::Math::Grid< dim >::getCorner(), Simulators::StreamVelocity::StreamGenerator::StreamGenerator::getDefaultVelocity(), DUNE::Math::Grid< dim >::getDimensions(), DUNE::Math::Grid< dim >::getLower(), DUNE::Math::Grid< dim >::getOffset(), DUNE::Math::Grid< dim >::getSpacing(), and Simulators::StreamVelocity::StreamGenerator::interpolateLinear2d().