ASCOT5
Loading...
Searching...
No Matches
Macros | Functions
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_offload_data *offload_data, real **offload_array, char *qid)
 Read stationary MHD data from HDF5 file.
 
int hdf5_mhd_read_nonstat (hid_t f, mhd_nonstat_offload_data *offload_data, real **offload_array, char *qid)
 Read nonstationary MHD data from HDF5 file.
 
int hdf5_mhd_init_offload (hid_t f, mhd_offload_data *offload_data, real **offload_array, char *qid)
 Initialize MHD offload 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_offload_data * offload_data,
real ** offload_array,
char * qid )

Read stationary MHD data from HDF5 file.

Parameters
fHDF5 file from which data is read
offload_datapointer to offload data
offload_arraypointer to offload array
qidQID of the data
Returns
Zero if reading succeeded

Definition at line 74 of file hdf5_mhd.c.

◆ hdf5_mhd_read_nonstat()

int hdf5_mhd_read_nonstat ( hid_t f,
mhd_nonstat_offload_data * offload_data,
real ** offload_array,
char * qid )

Read nonstationary MHD data from HDF5 file.

Parameters
fHDF5 file from which data is read
offload_datapointer to offload data
offload_arraypointer to offload array
qidQID of the data
Returns
Zero if reading succeeded

Definition at line 122 of file hdf5_mhd.c.

◆ hdf5_mhd_init_offload()

int hdf5_mhd_init_offload ( hid_t f,
mhd_offload_data * offload_data,
real ** offload_array,
char * qid )

Initialize MHD offload data from HDF5 file.

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 35 of file hdf5_mhd.c.