ASCOT5
Loading...
Searching...
No Matches
B_TC.h
Go to the documentation of this file.
1
7#ifndef B_TC_H
8#define B_TC_H
9#include "../offload_acc_omp.h"
10#include "../ascot5.h"
11#include "../error.h"
12
33
52
53int B_TC_init_offload(B_TC_offload_data* offload_data, real** offload_array);
54void B_TC_free_offload(B_TC_offload_data* offload_data, real** offload_array);
55
56void B_TC_init(B_TC_data* Bdata, B_TC_offload_data* offload_data,
57 real* offload_array);
58GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
59a5err B_TC_eval_B(real B[3], real r, real phi, real z, B_TC_data* Bdata);
60DECLARE_TARGET_END
61GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
62a5err B_TC_eval_psi(real* psi, real r, real phi, real z, B_TC_data* Bdata);
63DECLARE_TARGET_END
64GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
65a5err B_TC_eval_psi_dpsi(real psi_dpsi[4], real r, real phi, real z,
66 B_TC_data* Bdata);
67DECLARE_TARGET_END
68GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
69a5err B_TC_eval_rho_drho(real rho_drho[4], real r, real phi, real z,
70 B_TC_data* Bdata);
71DECLARE_TARGET_END
72GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
73a5err B_TC_eval_B_dB(real B_dB[12], real r, real phi, real z, B_TC_data* Bdata);
74DECLARE_TARGET_END
75GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
77DECLARE_TARGET_END
78
79#endif
DECLARE_TARGET_END a5err B_TC_eval_psi_dpsi(real psi_dpsi[4], real r, real phi, real z, B_TC_data *Bdata)
Evaluate poloidal flux psi and its derivatives.
Definition B_TC.c:132
DECLARE_TARGET_END a5err B_TC_get_axis_rz(real rz[2], B_TC_data *Bdata)
Return magnetic axis R-coordinate.
Definition B_TC.c:246
void B_TC_free_offload(B_TC_offload_data *offload_data, real **offload_array)
Free offload array.
Definition B_TC.c:78
DECLARE_TARGET_END a5err B_TC_eval_rho_drho(real rho_drho[4], real r, real phi, real z, B_TC_data *Bdata)
Evaluate normalized poloidal flux rho and its derivatives.
Definition B_TC.c:153
DECLARE_TARGET_END a5err B_TC_eval_B_dB(real B_dB[12], real r, real phi, real z, B_TC_data *Bdata)
Evaluate magnetic field and its derivatives.
Definition B_TC.c:207
void B_TC_init(B_TC_data *Bdata, B_TC_offload_data *offload_data, real *offload_array)
Initialize magnetic field data struct on target.
Definition B_TC.c:91
int B_TC_init_offload(B_TC_offload_data *offload_data, real **offload_array)
Initialize magnetic field offload data.
Definition B_TC.c:47
DECLARE_TARGET_END a5err B_TC_eval_psi(real *psi, real r, real phi, real z, B_TC_data *Bdata)
Evaluate poloidal flux psi.
Definition B_TC.c:114
a5err B_TC_eval_B(real B[3], real r, real phi, real z, B_TC_data *Bdata)
Evaluate magnetic field.
Definition B_TC.c:175
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
TC magnetic field parameters on the target.
Definition B_TC.h:37
real * dB
Definition B_TC.h:47
real psival
Definition B_TC.h:42
real * B
Definition B_TC.h:46
real axisz
Definition B_TC.h:40
real axisr
Definition B_TC.h:38
real rhoval
Definition B_TC.h:44
TC magnetic field parameters that will be offloaded to target.
Definition B_TC.h:16
int offload_array_length
Definition B_TC.h:30