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

Header file for hdf5_bfield.c. More...

#include "../ascot5.h"
#include "../B_field.h"
#include "../Bfield/B_2DS.h"
#include "../Bfield/B_3DS.h"
#include "../Bfield/B_STS.h"
#include "../Bfield/B_GS.h"
#include "../Bfield/B_TC.h"
#include "hdf5.h"

Go to the source code of this file.

Functions

int hdf5_bfield_init_offload (hid_t f, B_field_offload_data *offload_data, real **offload_array, char *qid)
 Initialize magnetic field offload data from HDF5 file.
 

Detailed Description

Header file for hdf5_bfield.c.

Definition in file hdf5_bfield.h.

Function Documentation

◆ hdf5_bfield_init_offload()

int hdf5_bfield_init_offload ( hid_t f,
B_field_offload_data * offload_data,
real ** offload_array,
char * qid )

Initialize magnetic field offload data from HDF5 file.

This function determines to which type of magnetic field the given QID corresponds to, and calls the corresponding reading routine. The read data is then used to initialize the offload data by calling B_field_init_offload().

The magnetic field data is stored under /bfield/ group in ASCOT5 HDF5 file. Several magnetic fields of same or different type maybe stored there in their respective groups as long as the group name contains QID as an identifier.

Parameters
fHDF5 file identifier for a file which is opened and closed outside of this function
offload_datapointer to offload data struct which is initialized here
offload_arraypointer to offload array which is allocated and initialized here
qidQID of the data that is to be read
Returns
zero if reading and initialization succeeded

Definition at line 69 of file hdf5_bfield.c.