ASCOT5
Loading...
Searching...
No Matches
Macros | Functions
hdf5_marker.c File Reference

Read markers from HDF5 file. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <hdf5.h>
#include <hdf5_hl.h>
#include "hdf5_helpers.h"
#include "../particle.h"
#include "../math.h"
#include "../print.h"
#include "../consts.h"
#include "hdf5_marker.h"

Go to the source code of this file.

Macros

#define MRKPATH
 
#define MRKPATH   "/marker/prt_XXXXXXXXXX/"
 
#define MRKPATH   "/marker/gc_XXXXXXXXXX/"
 
#define MRKPATH   "/marker/fl_XXXXXXXXXX/"
 

Functions

int hdf5_marker_read_particle (hid_t f, int *nmrk, input_particle **mrk, char *qid)
 Read particle input.
 
int hdf5_marker_read_guiding_center (hid_t f, int *nmrk, input_particle **mrk, char *qid)
 Read guiding center input.
 
int hdf5_marker_read_field_line (hid_t f, int *nmrk, input_particle **mrk, char *qid)
 Read field line input.
 
int hdf5_marker_read (hid_t f, int *n, input_particle **p, char *qid)
 Read marker input.
 
int hdf5_marker_write_particle (hid_t f, int n, input_particle *p, char *qid)
 Write particle input.
 

Detailed Description

Read markers from HDF5 file.

Markers must be read by calling hdf5_marker_init() contained in this module This module contains reading routines for all marker types.

Definition in file hdf5_marker.c.

Macro Definition Documentation

◆ MRKPATH [1/4]

#define MRKPATH

Macro that is used to store paths to data groups

Definition at line 20 of file hdf5_marker.c.

◆ MRKPATH [2/4]

#define MRKPATH   "/marker/prt_XXXXXXXXXX/"

Macro that is used to store paths to data groups

Definition at line 20 of file hdf5_marker.c.

◆ MRKPATH [3/4]

#define MRKPATH   "/marker/gc_XXXXXXXXXX/"

Macro that is used to store paths to data groups

Definition at line 20 of file hdf5_marker.c.

◆ MRKPATH [4/4]

#define MRKPATH   "/marker/fl_XXXXXXXXXX/"

Macro that is used to store paths to data groups

Definition at line 20 of file hdf5_marker.c.

Function Documentation

◆ hdf5_marker_read_particle()

int hdf5_marker_read_particle ( hid_t f,
int * nmrk,
input_particle ** mrk,
char * qid )

Read particle input.

Reads particles and places them on input_particle array.

Parameters
fHDF5 file containing marker input
nmrkpointer where the number of markers that was read will be stored
mrkpointer to array where markers are stored
qidQID of the marker data
Returns
zero on success

Definition at line 87 of file hdf5_marker.c.

◆ hdf5_marker_read_guiding_center()

int hdf5_marker_read_guiding_center ( hid_t f,
int * nmrk,
input_particle ** mrk,
char * qid )

Read guiding center input.

Reads guiding centers and places them on input_particle array.

Parameters
fHDF5 file containing marker input
nmrkpointer where the number of markers that was read will be stored
mrkpointer to array where markers are stored
qidQID of the marker data
Returns
zero on success

Definition at line 189 of file hdf5_marker.c.

◆ hdf5_marker_read_field_line()

int hdf5_marker_read_field_line ( hid_t f,
int * nmrk,
input_particle ** mrk,
char * qid )

Read field line input.

Reads field lines and places them on input_particle array.

Parameters
fHDF5 file containing marker input
nmrkpointer where the number of markers that was read will be stored
mrkpointer to array where markers are stored
qidQID of the marker data
Returns
zero on success

Definition at line 289 of file hdf5_marker.c.

◆ hdf5_marker_read()

int hdf5_marker_read ( hid_t f,
int * n,
input_particle ** p,
char * qid )

Read marker input.

Reads all marker types and places them on input_particle array.

Parameters
fHDF5 file containing marker input
npointer where the number of markers that was read will be stored
ppointer to array where markers are stored
qidQID of the marker data
Returns
zero on success

Definition at line 41 of file hdf5_marker.c.

◆ hdf5_marker_write_particle()

int hdf5_marker_write_particle ( hid_t f,
int n,
input_particle * p,
char * qid )

Write particle input.

Write particles in the input_particle array to hdf5 file.

Parameters
fHDF5 file to be written
nnumber of markers to be stored
ppointer to array where markers are stored
qidQID for the marker data
Returns
zero on success

Definition at line 359 of file hdf5_marker.c.