24 #ifndef INTERPOLATION_H_ 25 #define INTERPOLATION_H_ 72 const char* proj_input,
const float* infield,
const double* in_x_axis,
const double* in_y_axis,
73 const int in_x_axis_type,
const int in_y_axis_type,
const int ix,
const int iy,
const int iz,
74 const char* proj_output,
float* outfield,
const double* out_x_axis,
const double* out_y_axis,
75 const int out_x_axis_type,
const int out_y_axis_type,
const int ox,
const int oy);
84 char* proj_input,
double* infield,
double* in_x_axis,
double* in_y_axis,
85 int in_x_axis_type,
int in_y_axis_type,
int ix,
int iy,
int iz,
86 char* proj_output,
double* outfield,
double* out_x_axis,
double* out_y_axis,
87 int out_x_axis_type,
int out_y_axis_type,
int ox,
int oy);
125 const char* proj_input,
126 const char* proj_output,
127 float* u_out,
float* v_out,
128 const double* out_x_axis,
const double* out_y_axis,
129 int out_x_axis_type,
int out_y_axis_type,
130 int ox,
int oy,
int oz);
143 const double* matrix,
144 float* u_out,
float* v_out,
145 int ox,
int oy,
int oz);
159 const double* matrix,
161 int ox,
int oy,
int oz);
178 const char* proj_output,
179 const double* out_x_axis,
const double* out_y_axis,
180 int out_x_axis_type,
int out_y_axis_type,
198 const char* proj_output,
199 const double* in_x_field,
const double* in_y_field,
217 const char* proj_output,
219 const double* out_x_points,
const double* out_y_points,
231 extern int mifi_get_values_f(
const float* infield,
float* outfield,
const double x,
const double y,
const int ix,
const int iy,
const int iz);
241 extern int mifi_get_values_weak_extrapol_f(
const float* infield,
float* outfield,
const double x,
const double y,
const int ix,
const int iy,
const int iz);
251 extern int mifi_get_values_no_extrapol_f(
const float* infield,
float* outfield,
const double x,
const double y,
const int ix,
const int iy,
const int iz);
274 extern int mifi_get_values_bilinear_f(
const float* infield,
float* outvalues,
const double x,
const double y,
const int ix,
const int iy,
const int iz);
291 extern int mifi_get_values_bicubic_f(
const float* infield,
float* outvalues,
const double x,
const double y,
const int ix,
const int iy,
const int iz);
305 extern int mifi_get_values_nearest_f(
const float* infieldA,
const float* infieldB,
float* outfield,
const size_t n,
const double a,
const double b,
const double x);
323 extern int mifi_get_values_linear_f(
const float* infieldA,
const float* infieldB,
float* outfield,
const size_t n,
const double a,
const double b,
const double x);
363 extern int mifi_get_values_linear_d(
const double* infieldA,
const double* infieldB,
double* outfield,
const size_t n,
const double a,
const double b,
const double x);
381 extern int mifi_get_values_log_f(
const float* infieldA,
const float* infieldB,
float* outfield,
const size_t n,
const double a,
const double b,
const double x);
400 extern int mifi_get_values_log_log_f(
const float* infieldA,
const float* infieldB,
float* outfield,
const size_t n,
const double a,
const double b,
const double x);
415 extern int mifi_points2position(
double* points,
const int n,
const double* axis,
const int num,
const int axis_type);
425 return (z*iy + y)*ix + x;
443 int mifi_project_values(
const char* proj_input,
const char* proj_output,
double* in_out_x_vals,
double* in_out_y_vals,
const int num);
461 extern int mifi_project_axes(
const char* proj_input,
const char* proj_output,
const double* in_x_axis,
const double* in_y_axis,
const int ix,
const int iy,
double* out_xproj_axis,
double* out_yproj_axis);
483 extern int mifi_fill2d_f(
size_t nx,
size_t ny,
float* field,
float relaxCrit,
float corrEff,
size_t maxLoop,
size_t* nChanged);
505 extern int mifi_creepfill2d_f(
size_t nx,
size_t ny,
float* field,
unsigned short repeat,
char setWeight,
size_t* nChanged);
528 extern int mifi_creepfillval2d_f(
size_t nx,
size_t ny,
float* field,
float defaultVal,
unsigned short repeat,
char setWeight,
size_t* nChanged);
542 int mifi_griddistance(
size_t nx,
size_t ny,
const double* lonVals,
const double* latVals,
float* gridDistX,
float* gridDistY);
564 size_t mifi_compute_vertical_velocity(
size_t nx,
size_t ny,
size_t nz,
double dx,
double dy,
const float* gridDistX,
const float* gridDistY,
const double* ap,
const double* b,
565 const float* zs,
const float* ps,
const float* u,
const float* v,
const float* t,
579 extern size_t mifi_bad2nanf(
float* posPtr,
float* endPtr,
float badVal);
588 extern size_t mifi_nanf2bad(
float* posPtr,
float* endPtr,
float badVal);
int mifi_string_to_interpolation_method(const char *stringMethod)
int mifi_project_axes(const char *proj_input, const char *proj_output, const double *in_x_axis, const double *in_y_axis, const int ix, const int iy, double *out_xproj_axis, double *out_yproj_axis)
project axes so that the projetion (x,y) => (x_proj), (y_proj) can be expressed as x_proj(x...
int mifi_creepfillval2d_f(size_t nx, size_t ny, float *field, float defaultVal, unsigned short repeat, char setWeight, size_t *nChanged)
Method to fill undefined values in a 2d field in stable time.
static int mifi_3d_array_position(int x, int y, int z, int ix, int iy, int iz)
Definition: interpolation.h:423
int mifi_vector_reproject_direction_by_matrix_f(int method, const double *matrix, float *angle_out, int ox, int oy, int oz)
int mifi_get_values_linear_d(const double *infieldA, const double *infieldB, double *outfield, const size_t n, const double a, const double b, const double x)
int mifi_points2position(double *points, const int n, const double *axis, const int num, const int axis_type)
find position in array of position in projection
int mifi_get_vector_reproject_matrix(const char *proj_input, const char *proj_output, const double *out_x_axis, const double *out_y_axis, int out_x_axis_type, int out_y_axis_type, int ox, int oy, double *matrix)
size_t mifi_compute_vertical_velocity(size_t nx, size_t ny, size_t nz, double dx, double dy, const float *gridDistX, const float *gridDistY, const double *ap, const double *b, const float *zs, const float *ps, const float *u, const float *v, const float *t, float *w)
int mifi_fill2d_f(size_t nx, size_t ny, float *field, float relaxCrit, float corrEff, size_t maxLoop, size_t *nChanged)
Method to fill undefined values in a 2d field.
int mifi_get_values_log_f(const float *infieldA, const float *infieldB, float *outfield, const size_t n, const double a, const double b, const double x)
int mifi_get_values_linear_weak_extrapol_f(const float *infieldA, const float *infieldB, float *outfield, const size_t n, const double a, const double b, const double x)
int mifi_vector_reproject_values_f(int method, const char *proj_input, const char *proj_output, float *u_out, float *v_out, const double *out_x_axis, const double *out_y_axis, int out_x_axis_type, int out_y_axis_type, int ox, int oy, int oz)
interpolate the vector values
int mifi_get_values_bicubic_f(const float *infield, float *outvalues, const double x, const double y, const int ix, const int iy, const int iz)
not implemented yet
size_t mifi_bad2nanf(float *posPtr, float *endPtr, float badVal)
int mifi_get_values_linear_no_extrapol_f(const float *infieldA, const float *infieldB, float *outfield, const size_t n, const double a, const double b, const double x)
int mifi_vector_reproject_values_by_matrix_f(int method, const double *matrix, float *u_out, float *v_out, int ox, int oy, int oz)
int mifi_get_values_bilinear_f(const float *infield, float *outvalues, const double x, const double y, const int ix, const int iy, const int iz)
int mifi_project_values(const char *proj_input, const char *proj_output, double *in_out_x_vals, double *in_out_y_vals, const int num)
project values so that the projetion (x,y) => (x_proj), (y_proj) can be expressed as x_proj(x...
int mifi_interpolate_d(int method, char *proj_input, double *infield, double *in_x_axis, double *in_y_axis, int in_x_axis_type, int in_y_axis_type, int ix, int iy, int iz, char *proj_output, double *outfield, double *out_x_axis, double *out_y_axis, int out_x_axis_type, int out_y_axis_type, int ox, int oy)
not implemented yet
size_t mifi_nanf2bad(float *posPtr, float *endPtr, float badVal)
int mifi_get_values_linear_const_extrapol_f(const float *infieldA, const float *infieldB, float *outfield, const size_t n, const double a, const double b, const double x)
int mifi_get_vector_reproject_matrix_points(const char *proj_input, const char *proj_output, int inputIsMetric, const double *out_x_points, const double *out_y_points, int on, double *matrix)
int mifi_griddistance(size_t nx, size_t ny, const double *lonVals, const double *latVals, float *gridDistX, float *gridDistY)
int mifi_get_values_nearest_f(const float *infieldA, const float *infieldB, float *outfield, const size_t n, const double a, const double b, const double x)
int mifi_interpolate_f(int method, const char *proj_input, const float *infield, const double *in_x_axis, const double *in_y_axis, const int in_x_axis_type, const int in_y_axis_type, const int ix, const int iy, const int iz, const char *proj_output, float *outfield, const double *out_x_axis, const double *out_y_axis, const int out_x_axis_type, const int out_y_axis_type, const int ox, const int oy)
int mifi_get_values_weak_extrapol_f(const float *infield, float *outfield, const double x, const double y, const int ix, const int iy, const int iz)
int mifi_get_values_log_log_f(const float *infieldA, const float *infieldB, float *outfield, const size_t n, const double a, const double b, const double x)
int mifi_get_values_f(const float *infield, float *outfield, const double x, const double y, const int ix, const int iy, const int iz)
MIFI_DEPRECATED(int mifi_isnanf(float val))
int mifi_get_values_linear_f(const float *infieldA, const float *infieldB, float *outfield, const size_t n, const double a, const double b, const double x)
int mifi_get_vector_reproject_matrix_field(const char *proj_input, const char *proj_output, const double *in_x_field, const double *in_y_field, int ox, int oy, double *matrix)
int mifi_creepfill2d_f(size_t nx, size_t ny, float *field, unsigned short repeat, char setWeight, size_t *nChanged)
Method to fill undefined values in a 2d field in stable time.
int mifi_get_values_no_extrapol_f(const float *infield, float *outfield, const double x, const double y, const int ix, const int iy, const int iz)