ASCOT5
Loading...
Searching...
No Matches
hdf5_mhd.c File Reference

Module for reading MHD data from HDF5 file. More...

#include <stdlib.h>
#include <hdf5.h>
#include <hdf5_hl.h>
#include "../ascot5.h"
#include "../mhd.h"
#include "../mhd/mhd_stat.h"
#include "../mhd/mhd_nonstat.h"
#include "hdf5_helpers.h"
#include "hdf5_mhd.h"

Go to the source code of this file.

Macros

#define MHDPATH
 
#define MHDPATH   "/mhd/MHD_STAT_XXXXXXXXXX/"
 
#define MHDPATH   "/mhd/MHD_NONSTAT_XXXXXXXXXX/"
 

Functions

int hdf5_mhd_read_stat (hid_t f, mhd_stat_data *data, char *qid)
 Read stationary MHD data from HDF5 file.
 
int hdf5_mhd_read_nonstat (hid_t f, mhd_nonstat_data *data, char *qid)
 Read nonstationary MHD data from HDF5 file.
 
int hdf5_mhd_init (hid_t f, mhd_data *data, char *qid)
 Initialize MHD data from HDF5 file.
 

Detailed Description

Module for reading MHD data from HDF5 file.

Definition in file hdf5_mhd.c.

Macro Definition Documentation

◆ MHDPATH [1/3]

#define MHDPATH

Macro that is used to store paths to data groups

Definition at line 16 of file hdf5_mhd.c.

◆ MHDPATH [2/3]

#define MHDPATH   "/mhd/MHD_STAT_XXXXXXXXXX/"

Macro that is used to store paths to data groups

Definition at line 16 of file hdf5_mhd.c.

◆ MHDPATH [3/3]

#define MHDPATH   "/mhd/MHD_NONSTAT_XXXXXXXXXX/"

Macro that is used to store paths to data groups

Definition at line 16 of file hdf5_mhd.c.

Function Documentation

◆ hdf5_mhd_read_stat()

int hdf5_mhd_read_stat ( hid_t f,
mhd_stat_data * data,
char * qid )

Read stationary MHD data from HDF5 file.

Parameters
fHDF5 file from which data is read
datapointer to the data
qidQID of the data
Returns
Zero if reading succeeded

Definition at line 59 of file hdf5_mhd.c.

◆ hdf5_mhd_read_nonstat()

int hdf5_mhd_read_nonstat ( hid_t f,
mhd_nonstat_data * data,
char * qid )

Read nonstationary MHD data from HDF5 file.

Parameters
fHDF5 file from which data is read
datapointer to the data
qidQID of the data
Returns
Zero if reading succeeded

Definition at line 112 of file hdf5_mhd.c.

◆ hdf5_mhd_init()

int hdf5_mhd_init ( hid_t f,
mhd_data * data,
char * qid )

Initialize MHD data from HDF5 file.

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

Definition at line 31 of file hdf5_mhd.c.