data_grid_svp Class Reference
[Data Grids and Sequences]

Collaboration diagram for data_grid_svp:
Collaboration graph
[legend]

Detailed Description

Implements fast calculations for data_grids using a non-recursive engine on interpolation.

Takes an existing data_grid and wraps it into a new data_grid_svp and overrides the interpolate function to implement the non-recursive algorithm.

Assumes that both axes of the passed data_grid both have the same interp_type.

WARNING: This wrapper is specific to 3-dimensional grids only. For 2-dimensional grids, the user should implement the data_grid_bathy wrapper instead.

Since the data is passed in and referenced by this wrapper, the data is taken control of and destroyed at the end of its use cycle.


Constructor & Destructor Documentation

data_grid_svp ( const data_grid< double, 3 > *  grid  )  [inline]

Constructor - Creates a fast interpolation grid from an existing data_grid.

Parameters:
grid The data_grid that is to be wrapped.
virtual ~data_grid_svp (  )  [inline, virtual]

Destructor.


Member Function Documentation

double data_3d ( size_t  dim0,
size_t  dim1,
size_t  dim2 
) [inline, private]

Utility accessor function for data grid values.

void interpolate ( const matrix< double > &  x,
const matrix< double > &  y,
const matrix< double > &  z,
matrix< double > *  result,
matrix< double > *  dx = NULL,
matrix< double > *  dy = NULL,
matrix< double > *  dz = NULL 
) [inline]

Interpolation 3-D specialization where the arguments, and results, are matrix<double>.

This is used frequently in the WaveQ3D model to interpolate environmental parameters.

Parameters:
x First dimension of location.
y Second dimension of location.
z Third dimension of location.
result Interpolated values at each location (output).
dx First dimension of derivative (output).
dy Second dimension of derivative (output).
dz Third dimension of derivative (output).

Reimplemented from data_grid< double, 3 >.

double interpolate ( double *  location,
double *  derivative = NULL 
) [inline]

Overrides the interpolate function within data_grid using the non-recursive formula.

Determines which interpolate function to based on the interp_type enumeral stored within the 0th dimensional axis.

Interpolate at a single location.

Parameters:
location Location to do the interpolation at
derivative Calculates first derivative if not NULL

Reimplemented from data_grid< double, 3 >.


Member Data Documentation

c_matrix<double, 2, 2> _dz [private]
c_matrix<double, 2, 2> _interp_plane [private]
size_t _kxmax [private]
size_t _kymax [private]
size_t _kzmax [private]

Create all variables needed for each calculation once to same time and memory.

double*** derv_z [private]

Generated on 4 May 2015 for USML by  doxygen 1.6.1