Marine systems simulation
Loading...
Searching...
No Matches
marenv::current::CurrentField3DArray Class Reference

#include <CurrentField3DArray.h>

+ Inheritance diagram for marenv::current::CurrentField3DArray:
+ Collaboration diagram for marenv::current::CurrentField3DArray:

Public Member Functions

 CurrentField3DArray (std::vector< double > velocityX, std::vector< double > velocityY, std::vector< double > velocityZ, int numX, int numY, int numZ, std::vector< double > depthZ, double lengthX, double lengthY)
 
Status GetCurrent (double time, const double position[3], double currentVelocity[3]) override
 
- Public Member Functions inherited from marenv::current::CurrentField
virtual ~CurrentField ()=default
 Virtual destructor.
 

Detailed Description

Ocean current using a 3D array representation.

This class models an ocean current field defined on a structured 3D grid. Current velocity components (x, y, z) are stored in vectors across spatial dimensions, allowing queries of current velocity at arbitrary positions in space and time.

Constructor & Destructor Documentation

◆ CurrentField3DArray()

marenv::current::CurrentField3DArray::CurrentField3DArray ( std::vector< double >  velocityX,
std::vector< double >  velocityY,
std::vector< double >  velocityZ,
int  numX,
int  numY,
int  numZ,
std::vector< double >  depthZ,
double  lengthX,
double  lengthY 
)

Constructs a 3D current field.

Parameters
[in]velocityXX-component velocities [m/s].
[in]velocityYY-component velocities [m/s].
[in]velocityZZ-component velocities [m/s].
[in]numXNumber of grid points in the x-direction.
[in]numYNumber of grid points in the y-direction.
[in]numZNumber of grid points in the z-direction (depth layers).
[in]depthZDepth values [m] corresponding to z-layers.
[in]lengthXPhysical length of the domain in the x-direction [m].
[in]lengthYPhysical length of the domain in the y-direction [m].

Member Function Documentation

◆ GetCurrent()

Status marenv::current::CurrentField3DArray::GetCurrent ( double  time,
const double  position[3],
double  currentVelocity[3] 
)
overridevirtual

Returns the ocean current velocity at a given position.

Parameters
[in]timeSimulation time [s].
[in]positionPosition (x,y,z) in meters where the current is queried.
[out]currentVelocityCurrent velocity vector [m/s] at the given position.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Implements marenv::current::CurrentField.


The documentation for this class was generated from the following file: