Functions

Adaptive Hierarchical Meshes

Functions


Function Documentation

F5_API AMRInfo* F5AMRopen ( hid_t  fileID,
const int  rank,
double  rootOrigin[3],
double  rootDelta[3],
const char *  description 
)

Adds AMR data to an HDF5 file.

Parameters:
fileID An HDF5 id as returned by the H5Fopen() or H5Fcreate() calls.
rank Dimensionality of the data.
rootOrigin minimal coordinate of root level bounding box
rootDelta cell-size on root level
description A short description about the data set. It should be short and contain no special characters or spaces. The same rules as for file names apply here. Ie. special characters and long names are possible, but it is better to avoid them.
Returns:
A pointer to an AMRInfo structure, which allows to set further information for each AMR level. The per-level information must be set in the structure. The result must be released by the F5AMRclose() function.
F5_API herr_t F5AMRwrite_block ( AMRInfo AI,
const int  timestep,
const double  physTime,
const char *  fieldname,
const int  level,
int  dimension,
const int *  location,
const int *  size,
hid_t  fieldtype,
const void *  dataPtr,
int  Centering,
const char *  blockname,
const char *  coordinate_system,
hid_t  property_id 
)

Writes out a single AMR data box.

The data layout of non-scalar field is an array of struct.

Parameters:
AI Some AMRInfo data structure which was created by an F5AMROpen() call.
timestep counted in steps on the highest level of resolution
physTime associated physical time of this timestep
level refinement level this box belongs to
dimension The dimensionality of the data.
location Origin of this grid in coordinates given by the cells on this level, must be consistent with the dimension parameter.
size Number of elements of data array in each dimension, must be consistent with the dimension parameter.
dataPtr Pointer to data array, the number of elements must be consistent with the size parameter.
fieldname Some name of the field (density, pressure, ...)
fieldtype HDF5 data type identifier. The caller is responsible for creating a corect HDF5 description of the provided data.
Centering bit array of flags to specify where relative to a uniform cell the data reside.
blockname An (optional) identifier for each block.
property_id An HDF5 dataset property (may specify data chunking, compression etc.). May be F5P_DEFAULT.
F5_API herr_t F5AMRwrite_block_v ( AMRInfo AI,
const int  timestep,
const double  physTime,
const char *  fieldname,
const int  level,
int  dimension,
const int *  location,
const int *  size,
hid_t  fieldtype,
const void **  dataPtr,
int  Centering,
const char *  blockname,
const char *  coordinate_system,
hid_t  property_id 
)

Writes out a single AMR data box.

The data layout of non-scalar field is a struct of arrays, ie. the data fields of each component of eg. some vector field resides in different scalar arrays.

Parameters:
AI Some AMRInfo data structure which was created by an F5AMROpen() call.
timestep counted in steps on the highest level of resolution
physTime associated physical time of this timestep
level refinement level this box belongs to
dimension The dimensionality of the data.
location Origin of this grid in coordinates given by the cells on this level, must be consistent with the dimension parameter.
size Number of elements of data array in each dimension, must be consistent with the dimension parameter.
dataPtr Array of pointer to data arrays, the number of elements must be consistent with the size parameter.
fieldname Some name of the field (density, pressure, ...)
fieldtype HDF5 data type identifier. The caller is responsible for creating a corect HDF5 description of the provided data.
Centering bit array of flags to specify where relative to a uniform cell the data reside.
blockname An (optional) identifier for each block.
property_id An HDF5 dataset property (may specify data chunking, compression etc.). May be F5P_DEFAULT.