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

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_init_1D (hid_t f, N0_1D_data *data, char *qid)
 Load 1D neutral data from HDF5 file and initialize it.
 
int hdf5_neutral_init_3D (hid_t f, N0_3D_data *data, char *qid)
 Load 3D neutral data from HDF5 file and initialize it.
 
int hdf5_neutral_init (hid_t f, neutral_data *data, char *qid)
 Initialize neutral data from HDF5 file.
 

Detailed Description

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.

Macro Definition Documentation

◆ NPATH [1/3]

#define NPATH

Macro that is used to store paths to data groups

Definition at line 23 of file hdf5_neutral.c.

◆ NPATH [2/3]

#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.

◆ NPATH [3/3]

#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.

Function Documentation

◆ hdf5_neutral_init_1D()

int hdf5_neutral_init_1D ( hid_t f,
N0_1D_data * data,
char * qid )

Load 1D neutral data from HDF5 file and initialize it.

Parameters
fhdf5 file identifier
datapointer to the data struct
qidQID of the data that is to be read
Returns
zero on success

Definition at line 66 of file hdf5_neutral.c.

◆ hdf5_neutral_init_3D()

int hdf5_neutral_init_3D ( hid_t f,
N0_3D_data * data,
char * qid )

Load 3D neutral data from HDF5 file and initialize it.

Parameters
fhdf5 file identifier
datapointer to the data struct
qidQID of the data that is to be read
Returns
zero on success

Definition at line 126 of file hdf5_neutral.c.

◆ hdf5_neutral_init()

int hdf5_neutral_init ( hid_t f,
neutral_data * data,
char * qid )

Initialize neutral 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 38 of file hdf5_neutral.c.