ASCOT5
|
Header file for boozer.c. More...
Go to the source code of this file.
Data Structures | |
struct | boozer_offload_data |
offload data for maps between boozer and cylindrical coordinates More... | |
struct | boozer_data |
Boozer parameters on the target. More... | |
Functions | |
int | boozer_init_offload (boozer_offload_data *offload_data, real **offload_array) |
Load Boozer data and prepare parameters for offload. | |
void | boozer_free_offload (boozer_offload_data *offload_data, real **offload_array) |
Free offload array. | |
void | boozer_init (boozer_data *boozerdata, boozer_offload_data *offload_data, real *offload_array) |
Initialize boozer data struct on target. | |
a5err | boozer_eval_psithetazeta (real psithetazeta[12], int *isinside, real r, real phi, real z, B_field_data *Bdata, boozer_data *boozerdata) |
Evaluate Boozer coordinates and partial derivatives. | |
int boozer_init_offload | ( | boozer_offload_data * | offload_data, |
real ** | offload_array ) |
Load Boozer data and prepare parameters for offload.
This function fills the boozer offload struct with parameters and allocates and fills the offload array. Sets offload array length in the offload struct.
The offload data struct should be fully initialized before calling this function and offload array should hold the input data in order [psi, nu, theta_bzr]. This function fits splines to input data, reallocates the offload array and stores spline coefficients there.
Multidimensional arrays must be stored as
offload_data | pointer to offload data struct |
offload_array | pointer to pointer to offload array |
void boozer_free_offload | ( | boozer_offload_data * | offload_data, |
real ** | offload_array ) |
void boozer_init | ( | boozer_data * | boozerdata, |
boozer_offload_data * | offload_data, | ||
real * | offload_array ) |
a5err boozer_eval_psithetazeta | ( | real | psithetazeta[12], |
int * | isinside, | ||
real | r, | ||
real | phi, | ||
real | z, | ||
B_field_data * | Bdata, | ||
boozer_data * | boozerdata ) |
Evaluate Boozer coordinates and partial derivatives.
The output vector has the following elements:
psithetazeta | evaluated Boozer coordinates and their gradients. |
isinside | a flag indicating whether the queried point was inside boozer grid |
r | R coordinate |
phi | phi coordinate |
z | z coordinate |
Bdata | pointer to magnetic field data |
boozerdata | pointer to boozerdata |