cubic.h File Reference

#include "cstd.h"

Go to the source code of this file.

Functions

int cubic_getworksize (int nt)
 Returns necessary workspace for interpolation.
int cubic_ (float const *oin, float const *din, float const *vin, int const *nin, float const *oout, float const *dout, float *vout, int const *nout, int const *iend, float *work, int const *wl)
 Cubic spline interpolation.
int cubicadj_getworksize (int nout, int nin)
 Returns workspace size for adjoint interpolation.
int cubicadj_ (float const *oin, float const *din, float const *vin, int const *nin, float const *oout, float const *dout, float *vout, int const *nout, int const *iend, float *work, int const *wl)
 Cubic spline adjoint interpoation.


Function Documentation

int cubic_getworksize ( int  nt  ) 

Returns necessary workspace for interpolation.

int cubic_ ( float const *  oin,
float const *  din,
float const *  vin,
int const *  nin,
float const *  oout,
float const *  dout,
float *  vout,
int const *  nout,
int const *  iend,
float *  work,
int const *  wl 
)

Cubic spline interpolation.

Parameters:
[in] nin (int) number of input gridpoints;
[in] din (float) step for input grid;
[in] oin (float) coordinate of first input sample;
[in] vin (float *) input data array;
[in] nout (int) number of output gridpoints;
[in] dout (float) step for output grid;
[in] oout (float) coordinate of first output sample;
[out] vout (float *) output data array;
[in] iend (int) endpoint code:
  1. iend=1: linear ends, s(1)=s(n)=0
  2. iend=2: parabolic ends, s(1)=s(2),s(n)=s(n-1)
  3. iend=3 cubic ends, s(1),s(n) are extrapolated
[in] work (float *) workspace (memory managed externally);
[in] wl (int) size of workspace.
Code translated from Fortran by f2c, so all args passed by pointer, whether they are logically const or not.

The helper function cubic_getworksize returns the necessary workspace length.

Return values:
0 normal return
11 incorrect end condition given (must lie between 1 and 3)
12 not enough input data points, must be > 3
10 not enough workspace, needs 4*ni-3 words

int cubicadj_getworksize ( int  nout,
int  nin 
)

Returns workspace size for adjoint interpolation.

int cubicadj_ ( float const *  oin,
float const *  din,
float const *  vin,
int const *  nin,
float const *  oout,
float const *  dout,
float *  vout,
int const *  nout,
int const *  iend,
float *  work,
int const *  wl 
)

Cubic spline adjoint interpoation.

Parameters:
[in] nin (int) number of input gridpoints;
[in] din (float) step for input grid;
[in] oin (float) coordinate of first input sample;
[in] vin (float *) input data array;
[in] nout (int) number of output gridpoints;
[in] dout (float) step for output grid;
[in] oout (float) coordinate of first output sample;
[out] vout (float *) output data array;
[in] iend (int) endpoint code:
  1. iend=1: linear ends, s(1)=s(n)=0
  2. iend=2: parabolic ends, s(1)=s(2),s(n)=s(n-1)
  3. iend=3 cubic ends, s(1),s(n) are extrapolated
[in] work (float *) workspace (memory managed externally);
[in] wl (int) size of workspace.
Code translated from Fortran by f2c, so all args passed by pointer, whether they are logically const or not.

The helper function cubicadg_getworksize returns the necessary workspace length.

Return values:
0 normal return
11 incorrect end condition given (must lie between 1 and 3)
12 not enough input data points, must be > 3
10 not enough workspace, needs nin+7*nout-8 words.


Generated on 5 Jan 2017 for IWAVETRACE by  doxygen 1.4.7