ASCOT5
|
Module for writing marker state to HDF5 file. More...
#include <string.h>
#include <stdlib.h>
#include <hdf5.h>
#include <hdf5_hl.h>
#include "../ascot5.h"
#include "../consts.h"
#include "../physlib.h"
#include "../particle.h"
#include "hdf5_helpers.h"
#include "hdf5_state.h"
Go to the source code of this file.
Functions | |
int | hdf5_state_write (hid_t f, char *run, char *state, integer n, particle_state *p) |
Writes marker state to an ASCOT5 HDF5 file. | |
Module for writing marker state to HDF5 file.
Definition in file hdf5_state.c.
int hdf5_state_write | ( | hid_t | f, |
char * | run, | ||
char * | state, | ||
integer | n, | ||
particle_state * | p ) |
Writes marker state to an ASCOT5 HDF5 file.
Markers are written in ../state/ group.
All fields in particle_state struct are written. Fields are written as they are except some unit conversions. Each field is written as n length array (the order is same between all fields) and each dataset includes string attribute that indicates the unit of the stored quantity.
f | output HDF5 file id |
run | run group where the state is written |
state | name of the state |
n | number of markers in state array |
p | array holding marker states |
Definition at line 36 of file hdf5_state.c.