ASCOT5
Loading...
Searching...
No Matches
Functions
hdf5_asigma.c File Reference

Module for reading atomic reaction cross-section data from HDF5 file. More...

#include <stdio.h>
#include <stdlib.h>
#include <hdf5.h>
#include <hdf5_hl.h>
#include "../ascot5.h"
#include "../asigma.h"
#include "../asigma/asigma_loc.h"
#include "hdf5_helpers.h"
#include "hdf5_asigma.h"

Go to the source code of this file.

Functions

int hdf5_asigma_read_loc (hid_t f, asigma_loc_offload_data *offload_data, real **offload_array, char *qid)
 Read atomic sigma data from HDF5 file.
 
int hdf5_asigma_init_offload (hid_t f, asigma_offload_data *offload_data, real **offload_array, char *qid)
 Read atomic data from HDF5 file.
 

Detailed Description

Module for reading atomic reaction cross-section data from HDF5 file.

Atomic data must be read by calling hdf5_asigma_init_offload() contained in this module. This module contains routines to read atomic reactions data from an ASCOT5 HDF5 file.

Definition in file hdf5_asigma.c.

Function Documentation

◆ hdf5_asigma_read_loc()

int hdf5_asigma_read_loc ( hid_t f,
asigma_loc_offload_data * offload_data,
real ** offload_array,
char * qid )

Read atomic sigma 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 68 of file hdf5_asigma.c.

◆ hdf5_asigma_init_offload()

int hdf5_asigma_init_offload ( hid_t f,
asigma_offload_data * offload_data,
real ** offload_array,
char * qid )

Read atomic data from HDF5 file.

This function reads atomic cross-section (sigma) data with given qid while also initializing offload data and allocating and filling offload array. The file is opened and closed outside this function.

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 and initialization of data succeeded

Definition at line 36 of file hdf5_asigma.c.