ASCOT5
|
Header file for B_TC.c. More...
Go to the source code of this file.
Data Structures | |
struct | B_TC_offload_data |
TC magnetic field parameters that will be offloaded to target. More... | |
struct | B_TC_data |
TC magnetic field parameters on the target. More... | |
Functions | |
int | B_TC_init_offload (B_TC_offload_data *offload_data, real **offload_array) |
Initialize magnetic field offload data. | |
void | B_TC_free_offload (B_TC_offload_data *offload_data, real **offload_array) |
Free offload array. | |
void | B_TC_init (B_TC_data *Bdata, B_TC_offload_data *offload_data, real *offload_array) |
Initialize magnetic field data struct on target. | |
a5err | B_TC_eval_B (real B[3], real r, real phi, real z, B_TC_data *Bdata) |
Evaluate magnetic field. | |
DECLARE_TARGET_END a5err | B_TC_eval_psi (real *psi, real r, real phi, real z, B_TC_data *Bdata) |
Evaluate poloidal flux psi. | |
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. | |
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. | |
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. | |
DECLARE_TARGET_END a5err | B_TC_get_axis_rz (real rz[2], B_TC_data *Bdata) |
Return magnetic axis R-coordinate. | |
Header file for B_TC.c.
Contains declaration of B_TC_offload_data and B_TC_data structs.
Definition in file B_TC.h.
int B_TC_init_offload | ( | B_TC_offload_data * | offload_data, |
real ** | offload_array ) |
Initialize magnetic field offload data.
The offload data struct is very simple and contains only the necessary fields which are all initialized when the data is read (except B_TC.offload_array_length). The offload array is not required at all. Therefore, this function only sets the offload_array_length to zero, assigns a NULL pointer to offload_array, and prints sanity checks so that user may verify that data was initialized succesfully.
offload_data | pointer to offload data struct |
offload_array | pointer to offload array |
void B_TC_free_offload | ( | B_TC_offload_data * | offload_data, |
real ** | offload_array ) |
void B_TC_init | ( | B_TC_data * | Bdata, |
B_TC_offload_data * | offload_data, | ||
real * | offload_array ) |
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.
rho_drho | pointer where rho and its derivatives will be stored |
r | R coordinate [m] |
phi | phi coordinate [rad] |
z | z coordinate [m] |
Bdata | pointer to magnetic field data struct |