logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

c_dsgrid3s - primary single precision C entry for 3D gridding

Access

       To use c_dsgrid3s, load the NCAR Graphics library ngmath.

Description

       n           The number of input data points.

       x           An array containing the X coordinates of the input data points.

       y           An array containing the Y coordinates of the input data points.

       z           An array containing the Z coordinates of the input data points.

       u           An  array  of size n containing the functional values of the input data points. That is, z[m]
                   is the value of the input function at coordinate (x[m],y[m],z[m]), for 0 <= m < n.

       nx          The number of X values in the output grid.

       ny          The number of Y values in the output grid.

       nz          The number of Z values in the output grid.

       xo          An array of size nx containing the X coordinates of the output data grid. The  values  in  xo
                   must be increasing, but need not be equally spaced.

       yo          An  array  of  size ny containing the Y coordinates of the output data grid. The values in yo
                   must be increasing, but need not be equally spaced.

       zo          An array of size nz containing the Z coordinates of the output data grid. The  values  in  zo
                   must be increasing, but need not be equally spaced.

       ier         An  error  return  value.  If *ier is returned as 0, then no errors were detected. If *ier is
                   non-zero, then refer to the man page for dsgrid_errors.

Function Prototype

       float  *c_dsgrid3s(int, float [], float [], float [], float [],
                 int, int, int, float [], float [], float [], int *);

Name

       c_dsgrid3s - primary single precision C entry for 3D gridding

See Also

       dsgrid, dsgrid_params, c_dsseti, c_dsgeti, c_dssetr, c_dsgetr, c_dssetc, c_dsgetc.

       Complete documentation for Dsgrid is available at URL
       http://ngwww.ucar.edu/ngdoc/ng/ngmath/dsgrid/dshome.html

Synopsis

       float  *c_dsgrid3s(int n, float x[], float y[], float z[],
                 float u[], int nx, int ny, int nz, float xo[],
                 float yo[], float zo[], int *ier);

Usage

       c_dsgrid3s returns a pointer to a linear array of data that is the interpolated grid stored in  row-major
       order. That is, if out is declared as

       float *out;

       and we set:

         out = *c_dsgrid3s(n, x, y, z, u, nx, ny, nz,
                   xo, yo, zo, ier);

       then  out[nz*ny*i  + nz*j + k] is the interpolated function value at coordinate point (xo[i],yo[j],zo[k])
       for 0 <= i < nx, 0 <= j < ny, and 0 <= k < nz. The space for out is allocated internal to c_dsgrid3s  and
       is nx*ny*nz floats in size.

See Also