ASCOT5
Loading...
Searching...
No Matches
mhd.h
Go to the documentation of this file.
1
8#ifndef MHD_H
9#define MHD_H
10
11#include "ascot5.h"
12#include "error.h"
13#include "B_field.h"
14#include "boozer.h"
15#include "mhd/mhd_stat.h"
16#include "mhd/mhd_nonstat.h"
17
19#define MHD_INCLUDE_ALL -1
20
28
40
41void mhd_free(mhd_data* data);
42void mhd_offload(mhd_data* data);
43DECLARE_TARGET_SIMD_UNIFORM(boozerdata, mhddata, Bdata, includemode)
44a5err mhd_eval(real mhd_dmhd[10], real r, real phi, real z, real t,
45 int includemode, boozer_data* boozerdata, mhd_data* mhddata,
46 B_field_data* Bdata);
47DECLARE_TARGET_SIMD_UNIFORM(boozerdata, mhddata, Bdata, pertonly,\
48 includemode)
49a5err mhd_perturbations(real pert_field[7], real r, real phi, real z,
50 real t, int pertonly, int includemode,
51 boozer_data* boozerdata, mhd_data* mhddata,
52 B_field_data* Bdata);
53DECLARE_TARGET_SIMD_UNIFORM(mhddata)
54int mhd_get_n_modes(mhd_data* mhddata);
55DECLARE_TARGET_SIMD_UNIFORM(mhddata)
56const int* mhd_get_nmode(mhd_data* mhddata);
57DECLARE_TARGET_SIMD_UNIFORM(mhddata)
58const int* mhd_get_mmode(mhd_data* mhddata);
59DECLARE_TARGET_SIMD_UNIFORM(mhddata)
60const real* mhd_get_amplitude(mhd_data* mhddata);
61DECLARE_TARGET_SIMD_UNIFORM(mhddata)
62const real* mhd_get_frequency(mhd_data* mhddata);
63DECLARE_TARGET_SIMD_UNIFORM(mhddata)
64const real* mhd_get_phase(mhd_data* mhddata);
65#endif
Header file for B_field.c.
Main header file for ASCOT5.
double real
Definition ascot5.h:85
Header file for boozer.c.
Error module for ASCOT5.
unsigned long int a5err
Simulation error flag.
Definition error.h:17
a5err mhd_perturbations(real pert_field[7], real r, real phi, real z, real t, int pertonly, int includemode, boozer_data *boozerdata, mhd_data *mhddata, B_field_data *Bdata)
Evaluate perturbed fields Btilde, Etilde and potential Phi explicitly.
Definition mhd.c:147
int mhd_get_n_modes(mhd_data *mhddata)
Return number of modes.
Definition mhd.c:183
const real * mhd_get_amplitude(mhd_data *mhddata)
Return mode amplitudes.
Definition mhd.c:243
const int * mhd_get_nmode(mhd_data *mhddata)
Return mode toroidal numbers.
Definition mhd.c:203
void mhd_offload(mhd_data *data)
Offload data to the accelerator.
Definition mhd.c:50
const int * mhd_get_mmode(mhd_data *mhddata)
Return mode poloidal numbers.
Definition mhd.c:223
const real * mhd_get_frequency(mhd_data *mhddata)
Return mode frequencies.
Definition mhd.c:263
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.
Definition mhd.c:91
mhd_type
MHD input types.
Definition mhd.h:24
@ mhd_type_stat
Definition mhd.h:25
@ mhd_type_nonstat
Definition mhd.h:26
void mhd_free(mhd_data *data)
Free allocated resources.
Definition mhd.c:34
const real * mhd_get_phase(mhd_data *mhddata)
Return mode phases.
Definition mhd.c:283
Header file for mhd_nonstat.c.
Header file for mhd_stat.c.
Magnetic field simulation data.
Definition B_field.h:41
Data for mapping between the cylindrical and Boozer coordinates.
Definition boozer.h:16
MHD simulation data.
Definition mhd.h:35
mhd_type type
Definition mhd.h:36
mhd_stat_data stat
Definition mhd.h:37
mhd_nonstat_data nonstat
Definition mhd.h:38
MHD parameters.
Definition mhd_nonstat.h:18
MHD stat parameters on the target.
Definition mhd_stat.h:18