|
void | mhd_free (mhd_data *data) |
| Free allocated resources.
|
|
void | mhd_offload (mhd_data *data) |
| Offload data to the accelerator.
|
|
a5err | mhd_eval (real mhd_dmhd[10], real r, real phi, real z, real t, int includemode, boozer_data *boozerdata, mhd_data *mhddata, B_field_data *Bdata) |
| Evaluate the needed quantities from MHD mode for orbit following.
|
|
| DECLARE_TARGET_SIMD_UNIFORM (boozerdata, mhddata, Bdata, pertonly, includemode) a5err mhd_perturbations(real pert_field[7] |
|
int | mhd_get_n_modes (mhd_data *mhddata) |
| Return number of modes.
|
|
const int * | mhd_get_nmode (mhd_data *mhddata) |
| Return mode toroidal numbers.
|
|
const int * | mhd_get_mmode (mhd_data *mhddata) |
| Return mode poloidal numbers.
|
|
const real * | mhd_get_amplitude (mhd_data *mhddata) |
| Return mode amplitudes.
|
|
const real * | mhd_get_frequency (mhd_data *mhddata) |
| Return mode frequencies.
|
|
const real * | mhd_get_phase (mhd_data *mhddata) |
| Return mode phases.
|
|
Header file for mhd.c.
Contains a list declaring all mhd_types, and declaration of mhd_offload_data and mhd_data structs.
Definition in file mhd.h.
Evaluate the needed quantities from MHD mode for orbit following.
The quantities to be evaluated are alpha, phi, grad alpha, grad phi, partial t alpha, partial t phi
The values are stored in the given array as:
- mhd_dmhd[0] = alpha
- mhd_dmhd[1] = dalpha/dt
- mhd_dmhd[2] = grad alpha, r component
- mhd_dmhd[3] = grad alpha, phi component
- mhd_dmhd[4] = grad alpha, z component
- mhd_dmhd[5] = phi
- mhd_dmhd[6] = dphi/dt
- mhd_dmhd[7] = grad phi, r component
- mhd_dmhd[8] = grad phi, phi component
- mhd_dmhd[9] = grad phi, z component
- Parameters
-
mhd_dmhd | |
r | R coordinate [m] |
phi | phi coordinate [rad] |
z | z coordinate [m] |
t | time coordinate [s] |
includemode | mode number to be included or MHD_INCLUDE_ALL |
boozerdata | pointer to boozer data |
mhddata | pointer to mhd data |
Bdata | pointer to magnetic field data |
- Returns
- Non-zero a5err value if evaluation failed, zero otherwise
Definition at line 91 of file mhd.c.