DUNE: Uniform Navigational Environment  2020.01.0
Simulators::StreamVelocity::StreamGenerator::Gridded2DModelDataStreamGenerator Class Reference

Detailed Description

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)
 

Constructor & Destructor Documentation

Simulators::StreamVelocity::StreamGenerator::Gridded2DModelDataStreamGenerator::Gridded2DModelDataStreamGenerator ( GriddedModelDataConfig const &  config,
double  wx = 0.0,
double  wy = 0.0,
double  wz = 0.0 
)

Constructor.

Parameters
[in]configstructure containing the configuration parameters for reading the data from the file.
[in]wxdefault stream speed in the North direction (m/s).
[in]wydefault stream speed in the East direction (m/s).
[in]wzdefault 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.

Simulators::StreamVelocity::StreamGenerator::Gridded2DModelDataStreamGenerator::~Gridded2DModelDataStreamGenerator ( )
default

Member Function Documentation

std::array< double, 3 > Simulators::StreamVelocity::StreamGenerator::Gridded2DModelDataStreamGenerator::getVelocity ( double  lat,
double  lon,
double  depth,
double  time = 0.0 
) const
overridevirtual

Get a stream velocity value.

Parameters
[in]latWGS84 latitude in degrees.
[in]lonWGS84 longitude in degrees.
[in]depthdepth in meters.
[in]timetime elapsed since the simulation started.
Returns
3-dimensional array containing the stream velocity in the North, East and Down directions in meters per second.

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().

Collaboration diagram for Simulators::StreamVelocity::StreamGenerator::Gridded2DModelDataStreamGenerator:
Collaboration graph