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

Module for writing orbits diagnostics data to a HDF5 file. More...

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <hdf5.h>
#include <hdf5_hl.h>
#include "hdf5_helpers.h"
#include "../simulate.h"
#include "../particle.h"
#include "../ascot5.h"
#include "../diag/diag_orb.h"
#include "../consts.h"
#include "hdf5_orbit.h"

Go to the source code of this file.

Functions

void hdf5_orbit_writeset (hid_t group, const char *name, const char *unit, int type, int arraylength, real confac, integer *mask, integer size, real *orbits)
 Helper function for writing orbit diagnostic datasets.
 
int hdf5_orbit_write (hid_t f, char *path, diag_orb_offload_data *data, real *orbits)
 Write orbit diagnostics data to a HDF5 file.
 

Detailed Description

Module for writing orbits diagnostics data to a HDF5 file.

Definition in file hdf5_orbit.c.

Function Documentation

◆ hdf5_orbit_writeset()

void hdf5_orbit_writeset ( hid_t group,
const char * name,
const char * unit,
int type,
int arraylength,
real confac,
integer * mask,
integer size,
real * orbits )

Helper function for writing orbit diagnostic datasets.

Parameters
groupHDF5 group where dataset is written
namename the data is wrote with
unitunit the the data is wrote with
typeis data double (0), int (1), or integer (2)
arraylengthlength of the orbit data array
confacunit conversion factor orbits is multiplied before writing
maskflag array indicating which elements in orbits array contain data
sizenumber of data elements
orbitsorbit data array

Definition at line 233 of file hdf5_orbit.c.

◆ hdf5_orbit_write()

int hdf5_orbit_write ( hid_t f,
char * path,
diag_orb_offload_data * data,
real * orbits )

Write orbit diagnostics data to a HDF5 file.

Parameters
fhdf5 file
pathpath to group which is created here and where the data is stored
dataorbit diagnostics offload data
orbitsarray storing the orbit data (format same as in init() in diag_orb.c)
Returns
zero on success

Definition at line 34 of file hdf5_orbit.c.