Category
Import and Export
Function
Imports time-dependent fixed mesh refinement data from a Carpet HDF5 file
Syntax
result, max_timestep = ImportCarpetHDF5 (filename, origin, thickness, stride, levels, index, reopen, single_precision);
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| filename | string | (none) | filename or URL of the Carpet HDF5 file to import data from |
| origin | integer list or vector | NULL | lower-left corner grid point of the slab to read |
| thickness | integer list or vector | NULL | thickness in grid points of the slab to read |
| stride | integer list or vector | NULL | include every <stride>-th grid point in the slab to read |
| levels | integer list or vector | NULL | refinement levels to include in the imported timestep (starting with 0 for the coarsest level) |
| timestep | integer | 0 | timestep to import |
| reopen | flag | 0 | reopen file on each execution |
| single_precision | flag | 1 | import double precision floating-point datasets as single precision | user | string | (none) | user name for standard Ftp authentification during remote file access | password | string | (none) | password for standard Ftp authentification during remote file access | subject | string | (none) | subject name for GSI authentification during remote file access | num_streams | integer | 1 | number of parallel streams to use during remote file access |
| varnames | string | (none) | variable names to import | invalidate_fine_grid | flag | 1 | shall we invalidate points on finer levels? (if true, this will not show the TRUE gridstructure of finer reflevels, but will avoid overlaps) |
Outputs
| Name | Type | Description |
|---|---|---|
| result | group | the imported timestep |
| bboxes | group | bounding boxes of all active levels of the imported timestep |
| max_timestep | integer | largest possible timestep (total number of timesteps in the HDF5 file, minus 1) |
Functional Details
The ImportCarpetHDF5 module provides the same basic functionality as the ImportHDF5 module. Please refer to the user's reference of ImportHDF5 for a full description about the corresponding functional details.
ImportCarpetHDF5 is able to read time-dependent fixed mesh refinement
datasets from an HDF5 file written in the FlexIO AMR writer file format as
used by the Carpet's IOHDF5 output method.
Each dataset in the data file represents a regular-shaped patch; all patches
of the same timestep but with potentially different refinement levels are
grouped together in a single grid. The ImportCarpetHDF5 module imports one
timestep at a time as a multigrid group, with the individual patches as field
members of that group.
When a data file has been opened successfully, ImportCarpetHDF5 will print in
the message window the number of available timesteps as well as the total
number of patches found in the file. It will also print the dimensions of the
underlying grid (with respect to the finest refinement level over all patches
in the datafile).
All subsequent hyperslab selections (specified via the origin,
thickness, stride parameters) will be based on those grid dimensions.
By default ImportCarpetHDF5 will include the patches of all refinement levels
in the imported timestep. Patches of individual refinement levels may be
selected by setting the levels parameter accordingly
(with 0 denoting the coarsest level, 1 the second-coarsest, etc.).
If the data file contains datasets from multiple variables (as happens when
IOHDF5::out_one_file_per_group was set), individual variables
can be selected by the varnames parameter which can also
be given as a POSIX extended regular expression.
For each pair of nested patches or patches of the same refinement level, the overlapping positions in both patches as well as their corresponding connections will be marked invalid so that they are not processed or rendered by subsequent modules. However, this will not render the true gridstructure when the "ShowConnections" function is used. To force the display of the true gridstructure, set the option "invalidate_fine_grid = 0".
The single bounding box that can be extracted from the result output (using the ShowBox module) will cover all patches included in the imported timestep. The patches' individual bounding boxes can be taken directly from the bboxes output. Displaying both outputs in the same image is especially useful to locate 2-dimensional slabs within a 3D mesh-refined volume.
See Also
Import, Slab, ImportHDF5
Example Visual Programs
CarpetSlabViz.net
The example program is contained in the net/ subdirectory of the OpenDXutils package. Please make sure that you change into this directory before running the program because it uses a Carpet HDF5 sample data file located relative to that directory.
Further Documentation
The ImportCarpetHDF5 data import module is provided by the OpenDXutils package.
More information about this package can be found on the
Cactus Code visualization page for OpenDX.
The FlexIO AMR Writer file format is described in detail
here.
More information on Carpet can be obtained on the Carpet home page.
Last modified: $Header: /cactus/CactusWebSite/VizTools/ImportCarpetHDF5.html,v 1.6 2007/05/23 11:13:00 tradke Exp $