ASCOT5
|
Module for reading neutral data from HDF5 file. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <hdf5.h>
#include <hdf5_hl.h>
#include "../ascot5.h"
#include "../neutral.h"
#include "../neutral/N0_1D.h"
#include "../neutral/N0_3D.h"
#include "../consts.h"
#include "../math.h"
#include "hdf5_neutral.h"
#include "hdf5_helpers.h"
Go to the source code of this file.
Macros | |
#define | NPATH |
#define | NPATH "/neutral/N0_1D_XXXXXXXXXX/" |
#define | NPATH "/neutral/N0_3D_XXXXXXXXXX/" |
Functions | |
int | hdf5_neutral_read_1D (hid_t f, N0_1D_offload_data *offload_data, real **offload_array, char *qid) |
Load neutral data from HDF5 file and prepare parameters. | |
int | hdf5_neutral_read_3D (hid_t f, N0_3D_offload_data *offload_data, real **offload_array, char *qid) |
Load neutral data from HDF5 file and prepare parameters. | |
int | hdf5_neutral_init_offload (hid_t f, neutral_offload_data *offload_data, real **offload_array, char *qid) |
Initialize neutral data from HDF5 file. | |
Module for reading neutral data from HDF5 file.
Neutral data must be read by calling hdf5_neutral_init_offload() contained in this module. This module contains reading routines for all neutral data types.
Definition in file hdf5_neutral.c.
#define NPATH |
Macro that is used to store paths to data groups
Definition at line 23 of file hdf5_neutral.c.
#define NPATH "/neutral/N0_1D_XXXXXXXXXX/" |
Macro that is used to store paths to data groups
Definition at line 23 of file hdf5_neutral.c.
#define NPATH "/neutral/N0_3D_XXXXXXXXXX/" |
Macro that is used to store paths to data groups
Definition at line 23 of file hdf5_neutral.c.
int hdf5_neutral_read_1D | ( | hid_t | f, |
N0_1D_offload_data * | offload_data, | ||
real ** | offload_array, | ||
char * | qid ) |
Load neutral data from HDF5 file and prepare parameters.
This function reads the 1D neutral data from file f, fills the offload struct with parameters and allocates and fills the offload array.
f | hdf5 file identifier |
offload_data | pointer to offload data struct |
offload_array | pointer to pointer to offload array |
qid | QID of the data that is to be read |
Definition at line 85 of file hdf5_neutral.c.
int hdf5_neutral_read_3D | ( | hid_t | f, |
N0_3D_offload_data * | offload_data, | ||
real ** | offload_array, | ||
char * | qid ) |
Load neutral data from HDF5 file and prepare parameters.
This function reads the 3D neutral data from file f, fills the offload struct with parameters and allocates and fills the offload array.
f | hdf5 file identifier |
offload_data | pointer to offload data struct |
offload_array | pointer to pointer to offload array |
qid | QID of the data that is to be read |
Definition at line 146 of file hdf5_neutral.c.
int hdf5_neutral_init_offload | ( | hid_t | f, |
neutral_offload_data * | offload_data, | ||
real ** | offload_array, | ||
char * | qid ) |
Initialize neutral data from HDF5 file.
f | HDF5 file identifier for a file which is opened and closed outside of this function |
offload_data | pointer to offload data struct which is initialized here |
offload_array | pointer to offload array which is allocated and initialized here |
qid | QID of the data that is to be read |
Definition at line 42 of file hdf5_neutral.c.