ASCOT5
Loading...
Searching...
No Matches
interp.h
Go to the documentation of this file.
1
27#ifndef INTERP_H
28#define INTERP_H
29#include "../offload_acc_omp.h"
30#include "../ascot5.h"
31#include "../error.h"
32
40
45 NSIZE_COMP1D = 2,
46 NSIZE_COMP2D = 4,
47 NSIZE_COMP3D = 8,
48 NSIZE_EXPL1D = 4,
49 NSIZE_EXPL2D = 16,
50 NSIZE_EXPL3D = 64
51};
52
64
81
103
105 int n_x, int bc_x,
106 real x_min, real x_max);
107
109 int n_x, int n_y, int bc_x, int bc_y,
110 real x_min, real x_max,
111 real y_min, real y_max);
112
114 int n_x, int n_y, int n_z,
115 int bc_x, int bc_y, int bc_z,
116 real x_min, real x_max,
117 real y_min, real y_max,
118 real z_min, real z_max);
119
121 int n_x, int bc_x,
122 real x_min, real x_max);
123
125 int n_x, int n_y, int bc_x, int bc_y,
126 real x_min, real x_max,
127 real y_min, real y_max);
128
130 int n_x, int n_y, int n_z,
131 int bc_x, int bc_y, int bc_z,
132 real x_min, real x_max,
133 real y_min, real y_max,
134 real z_min, real z_max);
135
137 int n_x, int bc_x,
138 real x_min, real x_max);
139
141 int n_x, int n_y, int bc_x, int bc_y,
142 real x_min, real x_max,
143 real y_min, real y_max);
144
146 int n_x, int n_y, int n_z,
147 int bc_x, int bc_y, int bc_z,
148 real x_min, real x_max,
149 real y_min, real y_max,
150 real z_min, real z_max);
151
153 int n_x, int bc_x,
154 real x_min, real x_max);
155
157 int n_x, int n_y, int bc_x, int bc_y,
158 real x_min, real x_max,
159 real y_min, real y_max);
160
162 int n_x, int n_y, int n_z,
163 int bc_x, int bc_y, int bc_z,
164 real x_min, real x_max,
165 real y_min, real y_max,
166 real z_min, real z_max);
167
168GPU_DECLARE_TARGET_SIMD_UNIFORM(str)
170DECLARE_TARGET_END
171GPU_DECLARE_TARGET_SIMD_UNIFORM(str)
173DECLARE_TARGET_END
174GPU_DECLARE_TARGET_SIMD_UNIFORM(str)
176 real x, real y, real z);
177DECLARE_TARGET_END
178
179DECLARE_TARGET_SIMD_UNIFORM(str)
181DECLARE_TARGET_SIMD_UNIFORM(str)
183DECLARE_TARGET_SIMD_UNIFORM(str)
185 real x, real y, real z);
186
187GPU_DECLARE_TARGET_SIMD_UNIFORM(str)
189DECLARE_TARGET_END
190GPU_DECLARE_TARGET_SIMD_UNIFORM(str)
192DECLARE_TARGET_END
193GPU_DECLARE_TARGET_SIMD_UNIFORM(str)
195 real x, real y, real z);
196DECLARE_TARGET_END
197
198DECLARE_TARGET_SIMD_UNIFORM(str)
200DECLARE_TARGET_SIMD_UNIFORM(str)
202DECLARE_TARGET_SIMD_UNIFORM(str)
204 real x, real y, real z);
205#endif
Main header file for ASCOT5.
double real
Definition ascot5.h:85
Error module for ASCOT5.
unsigned long int a5err
Simulation error flag.
Definition error.h:17
DECLARE_TARGET_END a5err interp3Dcomp_eval_f(real *f, interp3D_data *str, real x, real y, real z)
Evaluate interpolated value of 3D scalar field.
void interp1Dexpl_init_spline(interp1D_data *str, real *c, int n_x, int bc_x, real x_min, real x_max)
Initialize a cubic spline.
int interp3Dcomp_init_coeff(real *c, real *f, int n_x, int n_y, int n_z, int bc_x, int bc_y, int bc_z, real x_min, real x_max, real y_min, real y_max, real z_min, real z_max)
Calculate tricubic spline interpolation coefficients for 3D data.
int interp3Dexpl_init_coeff(real *c, real *f, int n_x, int n_y, int n_z, int bc_x, int bc_y, int bc_z, real x_min, real x_max, real y_min, real y_max, real z_min, real z_max)
Calculate tricubic spline interpolation coefficients for 3D data.
boundaryCondition
Boundary conditions for the spline interpolation.
Definition interp.h:36
@ NATURALBC
Definition interp.h:37
@ PERIODICBC
Definition interp.h:38
int interp1Dcomp_init_coeff(real *c, real *f, int n_x, int bc_x, real x_min, real x_max)
Calculate cubic spline interpolation coefficients for scalar 1D data.
DECLARE_TARGET_END a5err interp2Dcomp_eval_df(real *f_df, interp2D_data *str, real x, real y)
Evaluate interpolated value and 1st and 2nd derivatives of 2D field.
int interp2Dcomp_init_coeff(real *c, real *f, int n_x, int n_y, int bc_x, int bc_y, real x_min, real x_max, real y_min, real y_max)
Calculate bicubic spline interpolation coefficients for scalar 2D data.
a5err interp1Dcomp_eval_f(real *f, interp1D_data *str, real x)
Evaluate interpolated value of 1D scalar field.
a5err interp2Dexpl_eval_f(real *f, interp2D_data *str, real x, real y)
Evaluate interpolated value of 2D scalar field.
a5err interp3Dexpl_eval_df(real *f_df, interp3D_data *str, real x, real y, real z)
Evaluate interpolated value of 3D field and 1st and 2nd derivatives.
DECLARE_TARGET_END a5err interp1Dexpl_eval_df(real *f_df, interp1D_data *str, real x)
Evaluate interpolated value of 1D and its 1st and 2nd derivatives.
a5err interp3Dexpl_eval_f(real *f, interp3D_data *str, real x, real y, real z)
Evaluate interpolated value of 3D scalar field.
void interp3Dcomp_init_spline(interp3D_data *str, real *c, int n_x, int n_y, int n_z, int bc_x, int bc_y, int bc_z, real x_min, real x_max, real y_min, real y_max, real z_min, real z_max)
Initialize a tricubic spline.
void interp3Dexpl_init_spline(interp3D_data *str, real *c, int n_x, int n_y, int n_z, int bc_x, int bc_y, int bc_z, real x_min, real x_max, real y_min, real y_max, real z_min, real z_max)
Initialize a tricubic spline.
a5err interp2Dexpl_eval_df(real *f_df, interp2D_data *str, real x, real y)
Evaluate interpolated value and 1st and 2nd derivatives of 2D field.
void interp2Dexpl_init_spline(interp2D_data *str, real *c, int n_x, int n_y, int bc_x, int bc_y, real x_min, real x_max, real y_min, real y_max)
Initialize a bicubic spline.
a5err interp1Dcomp_eval_df(real *f_df, interp1D_data *str, real x)
Evaluate interpolated value of 1D and its 1st and 2nd derivatives.
int interp1Dexpl_init_coeff(real *c, real *f, int n_x, int bc_x, real x_min, real x_max)
Calculate cubic spline interpolation coefficients for scalar 1D data.
DECLARE_TARGET_END a5err interp3Dcomp_eval_df(real *f_df, interp3D_data *str, real x, real y, real z)
Evaluate interpolated value of 3D field and 1st and 2nd derivatives.
void interp2Dcomp_init_spline(interp2D_data *str, real *c, int n_x, int n_y, int bc_x, int bc_y, real x_min, real x_max, real y_min, real y_max)
Initialize a bicubic spline.
DECLARE_TARGET_END a5err interp1Dexpl_eval_f(real *f, interp1D_data *str, real x)
Evaluate interpolated value of 1D scalar field.
int interp2Dexpl_init_coeff(real *c, real *f, int n_x, int n_y, int bc_x, int bc_y, real x_min, real x_max, real y_min, real y_max)
Calculate bicubic spline interpolation coefficients for scalar 2D data.
void interp1Dcomp_init_spline(interp1D_data *str, real *c, int n_x, int bc_x, real x_min, real x_max)
Initialize a cubic spline.
DECLARE_TARGET_END a5err interp2Dcomp_eval_f(real *f, interp2D_data *str, real x, real y)
Evaluate interpolated value of a 2D field.
splinesize
Number of coefficients stored for each data point.
Definition interp.h:44
Cubic interpolation struct.
Definition interp.h:56
real x_min
Definition interp.h:59
real x_max
Definition interp.h:60
real x_grid
Definition interp.h:61
real * c
Definition interp.h:62
Bicubic interpolation struct.
Definition interp.h:68
real y_min
Definition interp.h:76
real y_grid
Definition interp.h:78
real x_grid
Definition interp.h:75
real x_min
Definition interp.h:73
real y_max
Definition interp.h:77
real x_max
Definition interp.h:74
real * c
Definition interp.h:79
Tricubic interpolation struct.
Definition interp.h:85
real z_max
Definition interp.h:99
real z_min
Definition interp.h:98
real z_grid
Definition interp.h:100
real x_min
Definition interp.h:92
real y_max
Definition interp.h:96
real y_grid
Definition interp.h:97
real * c
Definition interp.h:101
real x_grid
Definition interp.h:94
real x_max
Definition interp.h:93
real y_min
Definition interp.h:95