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.h"
10#include "../ascot5.h"
11#include "../error.h"
12
31
32int B_TC_init(B_TC_data* data, real axisr, real axisz, real psival, real rhoval,
33 real B[3], real dB[9]);
34void B_TC_free(B_TC_data* data);
35void B_TC_offload(B_TC_data* data);
36GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
37a5err B_TC_eval_B(real B[3], real r, real phi, real z, B_TC_data* Bdata);
38DECLARE_TARGET_END
39GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
40a5err B_TC_eval_psi(real* psi, real r, real phi, real z, B_TC_data* Bdata);
41DECLARE_TARGET_END
42GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
43a5err B_TC_eval_psi_dpsi(real psi_dpsi[4], real r, real phi, real z,
44 B_TC_data* Bdata);
45DECLARE_TARGET_END
46GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
47a5err B_TC_eval_rho_drho(real rho_drho[4], real r, real phi, real z,
48 B_TC_data* Bdata);
49DECLARE_TARGET_END
50GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
51a5err B_TC_eval_B_dB(real B_dB[12], real r, real phi, real z, B_TC_data* Bdata);
52DECLARE_TARGET_END
53GPU_DECLARE_TARGET_SIMD_UNIFORM(Bdata)
55DECLARE_TARGET_END
56
57#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:125
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:239
void B_TC_offload(B_TC_data *data)
Offload data to the accelerator.
Definition B_TC.c:92
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:146
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:200
int B_TC_init(B_TC_data *data, real axisr, real axisz, real psival, real rhoval, real B[3], real dB[9])
Initialize magnetic field data.
Definition B_TC.c:46
void B_TC_free(B_TC_data *data)
Free allocated resources.
Definition B_TC.c:83
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:107
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:168
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:16
real psival
Definition B_TC.h:21
real axisz
Definition B_TC.h:19
real axisr
Definition B_TC.h:17
real rhoval
Definition B_TC.h:23