Marine systems simulation
Loading...
Searching...
No Matches
environmentmodels::CNetCDFField Class Reference

#include <NetCDFField.h>

+ Inheritance diagram for environmentmodels::CNetCDFField:
+ Collaboration diagram for environmentmodels::CNetCDFField:

Public Member Functions

 CNetCDFField (string sSimObjectName, ISimObjectCreator *pCreator)
 
void OdeFcn (const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep)
 
void GetDomainBounds (double *Bound)
 
void GetFieldData (const double dT, const double *const dX, const double Pos[3], double *DataOut)
 

Protected Attributes

NetcdfHandlerm_NetCDF
 NetCDF handler for data I/O. Protected to allow subclass access.
 
float m_Bounds [6]
 Domain bounds [xmin, xmax, ymin, ymax, zmin, zmax] [m]. Protected to allow subclass access.
 

Detailed Description

NetCDF field implementation.

Loads field data from NetCDF files and provides GetFieldData() for bilinear/trilinear interpolation at query positions.

Constructor & Destructor Documentation

◆ CNetCDFField()

environmentmodels::CNetCDFField::CNetCDFField ( string  sSimObjectName,
ISimObjectCreator *  pCreator 
)

Construct NetCDF field.

Parameters
[in]sSimObjectNameUnique name for this simulation object.
[in]pCreatorPointer to the object creator/registry.

Member Function Documentation

◆ GetDomainBounds()

void environmentmodels::CNetCDFField::GetDomainBounds ( double *  Bound)

Get domain bounds.

Parameters
[out]BoundArray of at least 6 doubles [xmin, xmax, ymin, ymax, zmin, zmax].

◆ GetFieldData()

void environmentmodels::CNetCDFField::GetFieldData ( const double  dT,
const double *const  dX,
const double  Pos[3],
double *  DataOut 
)

Get interpolated field data at a position.

Parameters
[in]dTCurrent simulation time.
[in]dXCurrent state vector.
[in]PosQuery position [x, y, z].
[out]DataOutInterpolated field values.

◆ OdeFcn()

void environmentmodels::CNetCDFField::OdeFcn ( const double  T,
const double *const  X,
double *const  XDot,
const bool  bIsMajorTimeStep 
)

ODE function for state updates.

Parameters
[in]TCurrent simulation time.
[in]XCurrent state vector.
[out]XDotState derivative vector.
[in]bIsMajorTimeStepTrue if this is a major timestep.

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