ASCOT5
Loading...
Searching...
No Matches
Functions
hdf5_state.h File Reference

Header file for hdf5_state.c. More...

#include <hdf5.h>
#include "../particle.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.
 

Detailed Description

Header file for hdf5_state.c.

Definition in file hdf5_state.h.

Function Documentation

◆ hdf5_state_write()

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.

Parameters
foutput HDF5 file id
runrun group where the state is written
statename of the state
nnumber of markers in state array
parray holding marker states
Returns
Zero on success

Definition at line 36 of file hdf5_state.c.