ASCOT5
Loading...
Searching...
No Matches
B_GS.h
Go to the documentation of this file.
1
5#ifndef B_GS_H
6#define B_GS_H
7#include "../offload_acc_omp.h"
8#include "../ascot5.h"
9#include "../error.h"
10
31
51
52int B_GS_init_offload(B_GS_offload_data* offload_data, real** offload_array);
53void B_GS_free_offload(B_GS_offload_data* offload_data, real** offload_array);
54
55void B_GS_init(B_GS_data* Bdata, B_GS_offload_data* offload_data,
56 real* offload_array);
57GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
58a5err B_GS_eval_B(real B[3], real r, real phi, real z, B_GS_data* Bdata);
59DECLARE_TARGET_END
60GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
61a5err B_GS_eval_psi(real* psi, real r, real phi, real z, B_GS_data* Bdata);
62DECLARE_TARGET_END
63GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
64a5err B_GS_eval_psi_dpsi(real psi_dpsi[4], real r, real phi, real z,
65 B_GS_data* Bdata);
66DECLARE_TARGET_END
67GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
68a5err B_GS_eval_rho_drho(real rho_drho[4], real r, real phi, real z,
69 B_GS_data* Bdata);
70DECLARE_TARGET_END
71GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
72a5err B_GS_eval_B_dB(real B_dB[12], real r, real phi, real z, B_GS_data* Bdata);
73DECLARE_TARGET_END
74GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
76DECLARE_TARGET_END
77
78#endif
DECLARE_TARGET_END a5err B_GS_eval_B_dB(real B_dB[12], real r, real phi, real z, B_GS_data *Bdata)
Evaluate magnetic field and its derivatives.
Definition B_GS.c:406
void B_GS_init(B_GS_data *Bdata, B_GS_offload_data *offload_data, real *offload_array)
Initialize magnetic field data struct on target.
Definition B_GS.c:144
a5err B_GS_eval_B(real B[3], real r, real phi, real z, B_GS_data *Bdata)
Evaluate magnetic field.
Definition B_GS.c:327
DECLARE_TARGET_END a5err B_GS_eval_psi_dpsi(real psi_dpsi[4], real r, real phi, real z, B_GS_data *Bdata)
Evaluate poloidal flux psi and its derivatives.
Definition B_GS.c:227
DECLARE_TARGET_END a5err B_GS_eval_rho_drho(real rho_drho[4], real r, real phi, real z, B_GS_data *Bdata)
Evaluate normalized poloidal flux rho and its derivatives.
Definition B_GS.c:296
void B_GS_free_offload(B_GS_offload_data *offload_data, real **offload_array)
Free offload array.
Definition B_GS.c:131
DECLARE_TARGET_END a5err B_GS_eval_psi(real *psi, real r, real phi, real z, B_GS_data *Bdata)
Evaluate poloidal flux psi.
Definition B_GS.c:174
int B_GS_init_offload(B_GS_offload_data *offload_data, real **offload_array)
Initialize magnetic field offload data.
Definition B_GS.c:91
DECLARE_TARGET_END a5err B_GS_get_axis_rz(real rz[2], B_GS_data *Bdata)
Return magnetic axis R-coordinate.
Definition B_GS.c:557
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
Analytic magnetic field parameters on the target.
Definition B_GS.h:35
real psi_mult
Definition B_GS.h:43
real a0
Definition B_GS.h:47
real B_phi0
Definition B_GS.h:40
real delta0
Definition B_GS.h:49
real raxis
Definition B_GS.h:38
real z0
Definition B_GS.h:37
real * psi_coeff
Definition B_GS.h:44
real R0
Definition B_GS.h:36
real psi1
Definition B_GS.h:42
real zaxis
Definition B_GS.h:39
real psi0
Definition B_GS.h:41
real alpha0
Definition B_GS.h:48
int Nripple
Definition B_GS.h:46
Analytic magnetic field parameters that will be offloaded to target.
Definition B_GS.h:14
real psi_mult
Definition B_GS.h:22
int offload_array_length
Definition B_GS.h:29