ASCOT5
|
Error module for ASCOT5. More...
Go to the source code of this file.
Typedefs | |
typedef unsigned long int | a5err |
Simulation error flag. | |
typedef enum error_file | error_file |
Enum type for indicating which file error originated from. | |
typedef enum error_type | error_type |
Enum type for indicating type of error. | |
Enumerations | |
enum | error_file { EF_MCCC_WIENER = 1 , EF_MCCC_PUSH = 2 , EF_MCCC_COEFS = 3 , EF_MCCC = 4 , EF_STEP_FO_VPA = 5 , EF_STEP_GC_CASHKARP = 6 , EF_STEP_GC_RK4 = 7 , EF_N0_1D = 8 , EF_N0_3D = 9 , EF_N0_ST = 10 , EF_B_3DS = 11 , EF_B_2DS = 12 , EF_B_STS = 13 , EF_B_GS = 14 , EF_PLASMA_1D = 15 , EF_PLASMA_1DS = 16 , EF_PLASMA = 17 , EF_E_FIELD = 18 , EF_NEUTRAL = 19 , EF_E_1DS = 20 , EF_B_FIELD = 21 , EF_PARTICLE = 22 , EF_BOOZER = 23 , EF_MHD = 24 , EF_ATOMIC = 25 , EF_ASIGMA = 26 , EF_ASIGMA_LOC = 27 , EF_SUZUKI = 28 } |
Enum type for indicating which file error originated from. More... | |
enum | error_type { ERR_INPUT_EVALUATION = 1 , ERR_UNKNOWN_INPUT = 2 , ERR_INPUT_UNPHYSICAL = 3 , ERR_MARKER_UNPHYSICAL = 4 , ERR_INVALID_TIMESTEP = 5 , ERR_WIENER_ARRAY = 6 , ERR_INTEGRATION = 7 , ERR_ATOMIC_EVALUATION = 8 } |
Enum type for indicating type of error. More... | |
Functions | |
static DECLARE_TARGET_SIMD a5err | error_raise (error_type type, int line, error_file file) |
Raise a new error. | |
void | error_parse (a5err err, int *msg, int *line, int *file) |
Retrieve stored data from the error flag. | |
void | error_parse2str (a5err err, char *msg, char *line, char *file) |
Convert error flag in string format. | |
Error module for ASCOT5.
Contains error codes, their interpretation, and a function to raise errors.
Definition in file error.h.
typedef enum error_file error_file |
Enum type for indicating which file error originated from.
Assign unique value for each type just in case. Do not use zero! Please use running numbering and put the latest entry last.
typedef enum error_type error_type |
Enum type for indicating type of error.
Assign unique value for each type just in case. Do not use zero! Please use running numbering and put the latest entry last.
enum error_file |
Enum type for indicating which file error originated from.
Assign unique value for each type just in case. Do not use zero! Please use running numbering and put the latest entry last.
Enumerator | |
---|---|
EF_MCCC_WIENER | Error is from mccc_wiener.c |
EF_MCCC_PUSH | Error is from mccc_push.c |
EF_MCCC_COEFS | Error is from mccc_coefs.c |
EF_MCCC | Error is from mccc.c |
EF_STEP_FO_VPA | Error is from step_fo_vpa.c |
EF_STEP_GC_CASHKARP | Error is from step_gc_cashkarp.c |
EF_STEP_GC_RK4 | Error is from step_gc_rk4.c |
EF_N0_1D | Error is from N0_1D.c |
EF_N0_3D | Error is from N0_3D.c |
EF_N0_ST | Error is from N0_ST.c |
EF_B_3DS | Error is from B_3DS.c |
EF_B_2DS | Error is from B_2DS.c |
EF_B_STS | Error is from B_STS.c |
EF_B_GS | Error is from B_GS.c |
EF_PLASMA_1D | Error is from plasma_1DS.c |
EF_PLASMA_1DS | Error is from plasma_1DS.c |
EF_PLASMA | Error is from plasma.c |
EF_E_FIELD | Error is from E_field.c |
EF_NEUTRAL | Error is from neutral.c |
EF_E_1DS | Error is from E_1DS.c |
EF_B_FIELD | Error is from B_field.c |
EF_PARTICLE | Error is from particle.c |
EF_BOOZER | Error is from boozer.c |
EF_MHD | Error is from mhd.c |
EF_ATOMIC | Error is from atomic.c |
EF_ASIGMA | Error is from asigma.c |
EF_ASIGMA_LOC | Error is from asigma_loc.c |
EF_SUZUKI | Error is from suzuki.c |
enum error_type |
Enum type for indicating type of error.
Assign unique value for each type just in case. Do not use zero! Please use running numbering and put the latest entry last.
|
inlinestatic |
void error_parse | ( | a5err | err, |
int * | msg, | ||
int * | line, | ||
int * | file ) |
Retrieve stored data from the error flag.
The values of type and file corresponds to the ones that were in error_type and error_file enums that were used when error was thrown with error_raise().
This function is host only.
err | the error flag |
msg | pointer for storing type of the error |
line | pointer for storing the line where error originated from |
file | pointer for storing the file where error originated from |
void error_parse2str | ( | a5err | err, |
char * | msg, | ||
char * | line, | ||
char * | file ) |