Silo Library Header File
We include the contents of the Silo header file here including a description of all DBxxx object structs that are returned in DBGetXXX() calls as well as all other constant and symbols defined by the library.
DBtoc
typedef struct DBtoc_ {
char **curve_names;
int ncurve;
char **multimesh_names;
int nmultimesh;
char **multimeshadj_names;
int nmultimeshadj;
char **multivar_names;
int nmultivar;
char **multimat_names;
int nmultimat;
char **multimatspecies_names;
int nmultimatspecies;
char **csgmesh_names;
int ncsgmesh;
char **csgvar_names;
int ncsgvar;
char **defvars_names;
int ndefvars;
char **qmesh_names;
int nqmesh;
char **qvar_names;
int nqvar;
char **ucdmesh_names;
int nucdmesh;
char **ucdvar_names;
int nucdvar;
char **ptmesh_names;
int nptmesh;
char **ptvar_names;
int nptvar;
char **mat_names;
int nmat;
char **matspecies_names;
int nmatspecies;
char **var_names;
int nvar;
char **obj_names;
int nobj;
char **dir_names;
int ndir;
char **array_names;
int narray;
char **mrgtree_names;
int nmrgtree;
char **groupelmap_names;
int ngroupelmap;
char **mrgvar_names;
int nmrgvar;
char **symlink_target_names;
int nsymlink;
char **symlink_names; /* copies of other members; never free'd */
} DBtoc;
DBcurve
typedef struct DBcurve_ {
/*----------- X vs. Y (Curve) Data -----------*/
int id; /* Identifier for this object */
int datatype; /* Datatype for x and y (float, double) */
int origin; /* '0' or '1' */
char *title; /* Title for curve */
char *xvarname; /* Name of domain (x) variable */
char *yvarname; /* Name of range (y) variable */
char *xlabel; /* Label for x-axis */
char *ylabel; /* Label for y-axis */
char *xunits; /* Units for domain */
char *yunits; /* Units for range */
void *x; /* Domain values for curve */
void *y; /* Range values for curve */
int npts; /* Number of points in curve */
int guihide; /* Flag to hide from post-processor's GUI */
char *reference; /* Label to reference object */
int coord_sys; /* To indicate other coordinate systems */
double missing_value; /* Value to indicate var data is invalid/missing */
} DBcurve;
DBdefvars
typedef struct DBdefvars_ {
int ndefs; /* number of definitions */
char **names; /* [ndefs] derived variable names */
int *types; /* [ndefs] derived variable types */
char **defns; /* [ndefs] derived variable definitions */
int *guihides; /* [ndefs] flags to hide from
post-processor's GUI */
} DBdefvars;
DBpointmesh
typedef struct DBpointmesh_ {
/*----------- Point Mesh -----------*/
int id; /* Identifier for this object */
int block_no; /* Block number for this mesh */
int group_no; /* Block group number for this mesh */
char *name; /* Name associated with this mesh */
int cycle; /* Problem cycle number */
char *units[3]; /* Units for each axis */
char *labels[3]; /* Labels for each axis */
char *title; /* Title for curve */
void *coords[3]; /* Coordinate values */
float time; /* Problem time */
double dtime; /* Problem time, double data type */
/*
* The following two fields really only contain 3 elements. However, silo
* contains a bug in PJ_ReadVariable() as called by DBGetPointmesh() which
* can cause three doubles to be stored there instead of three floats.
*/
float min_extents[6]; /* Min mesh extents [ndims] */
float max_extents[6]; /* Max mesh extents [ndims] */
int datatype; /* Datatype for coords (float, double) */
int ndims; /* Number of computational dimensions */
int nels; /* Number of elements in mesh */
int origin; /* '0' or '1' */
int guihide; /* Flag to hide from post-processor's GUI */
void *gnodeno; /* global node ids */
char *mrgtree_name; /* optional name of assoc. mrgtree object */
int gnznodtype; /* datatype for global node/zone ids */
char *ghost_node_labels;
char **alt_nodenum_vars;
} DBpointmesh;
DBmultimesh
typedef struct DBmultimesh_ {
/*----------- Multi-Block Mesh -----------*/
int id; /* Identifier for this object */
int nblocks; /* Number of blocks in mesh */
int ngroups; /* Number of block groups in mesh */
int *meshids; /* Array of mesh-ids which comprise mesh */
char **meshnames; /* Array of mesh-names for meshids */
int *meshtypes; /* Array of mesh-type indicators [nblocks] */
int *dirids; /* Array of directory ID's which contain blk */
int blockorigin; /* Origin (0 or 1) of block numbers */
int grouporigin; /* Origin (0 or 1) of group numbers */
int extentssize; /* size of each extent tuple */
double *extents; /* min/max extents of coords of each block */
int *zonecounts; /* array of zone counts for each block */
int *has_external_zones; /* external flags for each block */
int guihide; /* Flag to hide from post-processor's GUI */
int lgroupings; /* size of groupings array */
int *groupings; /* Array of mesh-ids, group-ids, and counts */
char **groupnames; /* Array of group-names for groupings */
char *mrgtree_name;/* optional name of assoc. mrgtree object */
int tv_connectivity;
int disjoint_mode;
int topo_dim; /* Topological dimension; max of all blocks. */
char *file_ns; /* namescheme for files (in lieu of meshnames) */
char *block_ns; /* namescheme for block objects (in lieu of meshnames) */
int block_type; /* constant block type for all blocks (in lieu of meshtypes) */
int *empty_list; /* list of empty block #'s (option for namescheme) */
int empty_cnt; /* size of empty list */
int repr_block_idx; /* index of a 'representative' block */
char **alt_nodenum_vars;
char **alt_zonenum_vars;
char *meshnames_alloc; /* original alloc of meshnames as string list */
} DBmultimesh;
DBmultimeshadj
typedef struct DBmultimeshadj_ {
/*----------- Multi-Block Mesh Adjacency -----------*/
int nblocks; /* Number of blocks in mesh */
int blockorigin; /* Origin (0 or 1) of block numbers */
int *meshtypes; /* Array of mesh-type indicators [nblocks] */
int *nneighbors; /* Array [nblocks] neighbor counts */
int lneighbors;
int *neighbors; /* Array [lneighbors] neighbor block numbers */
int *back; /* Array [lneighbors] neighbor block back */
int totlnodelists;
int *lnodelists; /* Array [lneighbors] of node counts shared */
int **nodelists; /* Array [lneighbors] nodelists shared */
int totlzonelists;
int *lzonelists; /* Array [lneighbors] of zone counts adjacent */
int **zonelists; /* Array [lneighbors] zonelists adjacent */
} DBmultimeshadj;
DBmultivar
typedef struct DBmultivar_ {
/*----------- Multi-Block Variable -----------*/
int id; /* Identifier for this object */
int nvars; /* Number of variables */
int ngroups; /* Number of block groups in mesh */
char **varnames; /* Variable names */
int *vartypes; /* variable types */
int blockorigin; /* Origin (0 or 1) of block numbers */
int grouporigin; /* Origin (0 or 1) of group numbers */
int extentssize; /* size of each extent tuple */
double *extents; /* min/max extents of each block */
int guihide; /* Flag to hide from post-processor's GUI */
char **region_pnames;
char *mmesh_name;
int tensor_rank; /* DB_VARTYPE_XXX */
int conserved; /* indicates if the variable should be conserved
under various operations such as interp. */
int extensive; /* indicates if the variable reprsents an extensiv
physical property (as opposed to intensive) */
char *file_ns; /* namescheme for files (in lieu of meshnames) */
char *block_ns; /* namescheme for block objects (in lieu of meshnames) */
int block_type; /* constant block type for all blocks (in lieu of meshtypes) */
int *empty_list; /* list of empty block #'s (option for namescheme) */
int empty_cnt; /* size of empty list */
int repr_block_idx; /* index of a 'representative' block */
double missing_value; /* Value to indicate var data is invalid/missing */
char *varnames_alloc; /* original alloc of varnames as string list */
} DBmultivar;
DBmultimat
typedef struct DBmultimat_ {
int id; /* Identifier for this object */
int nmats; /* Number of materials */
int ngroups; /* Number of block groups in mesh */
char **matnames; /* names of constiuent DBmaterial objects */
int blockorigin; /* Origin (0 or 1) of block numbers */
int grouporigin; /* Origin (0 or 1) of group numbers */
int *mixlens; /* array of mixlen values in each mat */
int *matcounts; /* counts of unique materials in each block */
int *matlists; /* list of materials in each block */
int guihide; /* Flag to hide from post-processor's GUI */
int nmatnos; /* global number of materials over all pieces */
int *matnos; /* global list of material numbers */
char **matcolors; /* optional colors for materials */
char **material_names; /* optional names of the materials */
int allowmat0; /* Flag to allow material "0" */
char *mmesh_name;
char *file_ns; /* namescheme for files (in lieu of meshnames) */
char *block_ns; /* namescheme for block objects (in lieu of meshnames) */
int *empty_list; /* list of empty block #'s (option for namescheme) */
int empty_cnt; /* size of empty list */
int repr_block_idx; /* index of a 'representative' block */
char *matnames_alloc; /* original alloc of matnames as string list */
} DBmultimat;
DBmultimatspecies
typedef struct DBmultimatspecies_ {
int id; /* Identifier for this object */
int nspec; /* Number of species */
int ngroups; /* Number of block groups in mesh */
char **specnames; /* Species object names */
int blockorigin; /* Origin (0 or 1) of block numbers */
int grouporigin; /* Origin (0 or 1) of group numbers */
int guihide; /* Flag to hide from post-processor's GUI */
int nmat; /* equiv. to nmatnos of a DBmultimat */
int *nmatspec; /* equiv. to matnos of a DBmultimat */
char **species_names; /* optional names of the species */
char **speccolors; /* optional colors for species */
char *file_ns; /* namescheme for files (in lieu of meshnames) */
char *block_ns; /* namescheme for block objects (in lieu of meshnames) */
int *empty_list; /* list of empty block #'s (option for namescheme) */
int empty_cnt; /* size of empty list */
int repr_block_idx; /* index of a 'representative' block */
char *specnames_alloc; /* original alloc of matnames as string list */
char *matname; /* associated multi-mat object name */
} DBmultimatspecies;
DBzonelist
typedef struct DBzonelist_ {
int ndims; /* Number of dimensions (2,3) */
int nzones; /* Number of zones in list */
int nshapes; /* Number of zone shapes */
int *shapecnt; /* [nshapes] occurences of each shape */
int *shapesize; /* [nshapes] Number of nodes per shape */
int *shapetype; /* [nshapes] Type of shape */
int *nodelist; /* Sequent lst of nodes which comprise zones */
int lnodelist; /* Number of nodes in nodelist */
int origin; /* '0' or '1' */
int min_index; /* Index of first real zone */
int max_index; /* Index of last real zone */
/*--------- Optional zone attributes ---------*/
int *zoneno; /* [nzones] zone number of each zone */
void *gzoneno; /* [nzones] global zone number of each zone */
int gnznodtype; /* datatype for global node/zone ids */
char *ghost_zone_labels;
char **alt_zonenum_vars;
} DBzonelist;
DBphzonelist
typedef struct DBphzonelist_ {
int nfaces; /* Number of faces in facelist (aka "facetable") */
int *nodecnt; /* Count of nodes in each face */
int lnodelist; /* Length of nodelist used to construct faces */
int *nodelist; /* List of nodes used in all faces */
char *extface; /* boolean flag indicating if a face is external */
int nzones; /* Number of zones in this zonelist */
int *facecnt; /* Count of faces in each zone */
int lfacelist; /* Length of facelist used to construct zones */
int *facelist; /* List of faces used in all zones */
int origin; /* '0' or '1' */
int lo_offset; /* Index of first non-ghost zone */
int hi_offset; /* Index of last non-ghost zone */
/*--------- Optional zone attributes ---------*/
int *zoneno; /* [nzones] zone number of each zone */
void *gzoneno; /* [nzones] global zone number of each zone */
int gnznodtype; /* datatype for global node/zone ids */
char *ghost_zone_labels;
char **alt_zonenum_vars;
} DBphzonelist;
DBfacelist
typedef struct DBfacelist_ {
/*----------- Required components ------------*/
int ndims; /* Number of dimensions (2,3) */
int nfaces; /* Number of faces in list */
int origin; /* '0' or '1' */
int *nodelist; /* Sequent list of nodes comprise faces */
int lnodelist; /* Number of nodes in nodelist */
/*----------- 3D components ------------------*/
int nshapes; /* Number of face shapes */
int *shapecnt; /* [nshapes] Num of occurences of each shape */
int *shapesize; /* [nshapes] Number of nodes per shape */
/*----------- Optional type component---------*/
int ntypes; /* Number of face types */
int *typelist; /* [ntypes] Type ID for each type */
int *types; /* [nfaces] Type info for each face */
/*--------- Optional node attributes ---------*/
int *nodeno; /* [lnodelist] node number of each node */
/*----------- Optional zone-reference component---------*/
int *zoneno; /* [nfaces] Zone number for each face */
} DBfacelist;
DBedgelist
typedef struct DBedgelist_ {
int ndims; /* Number of dimensions (2,3) */
int nedges; /* Number of edges */
int *edge_beg; /* [nedges] */
int *edge_end; /* [nedges] */
int origin; /* '0' or '1' */
} DBedgelist;
DBquadmesh
typedef struct DBquadmesh_ {
/*----------- Quad Mesh -----------*/
int id; /* Identifier for this object */
int block_no; /* Block number for this mesh */
int group_no; /* Block group number for this mesh */
char *name; /* Name associated with mesh */
int cycle; /* Problem cycle number */
int coord_sys; /* Cartesian, cylindrical, spherical */
int major_order; /* 1 indicates row-major for multi-d arrays */
int stride[3]; /* Offsets to adjacent elements */
int coordtype; /* Coord array type: collinear,
* non-collinear */
int facetype; /* Zone face type: rect, curv */
int planar; /* Sentinel: zones represent area or volume? */
void *coords[3]; /* Mesh node coordinate ptrs [ndims] */
int datatype; /* Type of coordinate arrays (double,float) */
float time; /* Problem time */
double dtime; /* Problem time, double data type */
/*
* The following two fields really only contain 3 elements. However, silo
* contains a bug in PJ_ReadVariable() as called by DBGetQuadmesh() which
* can cause three doubles to be stored there instead of three floats.
*/
float min_extents[6]; /* Min mesh extents [ndims] */
float max_extents[6]; /* Max mesh extents [ndims] */
char *labels[3]; /* Label associated with each dimension */
char *units[3]; /* Units for variable, e.g, 'mm/ms' */
int ndims; /* Number of computational dimensions */
int nspace; /* Number of physical dimensions */
int nnodes; /* Total number of nodes */
int dims[3]; /* Number of nodes per dimension */
int origin; /* '0' or '1' */
int min_index[3]; /* Index in each dimension of 1st
* non-phoney */
int max_index[3]; /* Index in each dimension of last
* non-phoney */
int base_index[3]; /* Lowest real i,j,k value for this block */
int start_index[3]; /* i,j,k values corresponding to original
* mesh */
int size_index[3]; /* Number of nodes per dimension for
* original mesh */
int guihide; /* Flag to hide from post-processor's GUI */
char *mrgtree_name; /* optional name of assoc. mrgtree object */
char *ghost_node_labels;
char *ghost_zone_labels;
char **alt_nodenum_vars;
char **alt_zonenum_vars;
} DBquadmesh;
DBucdmesh
typedef struct DBucdmesh_ {
/*----------- Unstructured Cell Data (UCD) Mesh -----------*/
int id; /* Identifier for this object */
int block_no; /* Block number for this mesh */
int group_no; /* Block group number for this mesh */
char *name; /* Name associated with mesh */
int cycle; /* Problem cycle number */
int coord_sys; /* Coordinate system */
int topo_dim; /* Topological dimension. */
char *units[3]; /* Units for variable, e.g, 'mm/ms' */
char *labels[3]; /* Label associated with each dimension */
void *coords[3]; /* Mesh node coordinates */
int datatype; /* Type of coordinate arrays (double,float) */
float time; /* Problem time */
double dtime; /* Problem time, double data type */
/*
* The following two fields really only contain 3 elements. However, silo
* contains a bug in PJ_ReadVariable() as called by DBGetUcdmesh() which
* can cause three doubles to be stored there instead of three floats.
*/
float min_extents[6]; /* Min mesh extents [ndims] */
float max_extents[6]; /* Max mesh extents [ndims] */
int ndims; /* Number of computational dimensions */
int nnodes; /* Total number of nodes */
int origin; /* '0' or '1' */
DBfacelist *faces; /* Data structure describing mesh faces */
DBzonelist *zones; /* Data structure describing mesh zones */
DBedgelist *edges; /* Data struct describing mesh edges
* (option) */
/*--------- Optional node attributes ---------*/
void *gnodeno; /* [nnodes] global node number of each node */
/*--------- Optional zone attributes ---------*/
int *nodeno; /* [nnodes] node number of each node */
/*--------- Optional polyhedral zonelist ---------*/
DBphzonelist *phzones; /* Data structure describing mesh zones */
int guihide; /* Flag to hide from post-processor's GUI */
char *mrgtree_name; /* optional name of assoc. mrgtree object */
int tv_connectivity;
int disjoint_mode;
int gnznodtype; /* datatype for global node/zone ids */
char *ghost_node_labels;
char **alt_nodenum_vars;
} DBucdmesh;
DBquadvar
typedef struct DBquadvar_ {
/*----------- Quad Variable -----------*/
int id; /* Identifier for this object */
char *name; /* Name of variable */
char *units; /* Units for variable, e.g, 'mm/ms' */
char *label; /* Label (perhaps for editing purposes) */
int cycle; /* Problem cycle number */
int meshid; /* Identifier for associated mesh (Deprecated Sep2005) */
void **vals; /* Array of pointers to data arrays */
int datatype; /* Type of data pointed to by 'val' */
int nels; /* Number of elements in each array */
int nvals; /* Number of arrays pointed to by 'vals' */
int ndims; /* Rank of variable */
int dims[3]; /* Number of elements in each dimension */
int major_order; /* 1 indicates row-major for multi-d arrays */
int stride[3]; /* Offsets to adjacent elements */
int min_index[3]; /* Index in each dimension of 1st
* non-phoney */
int max_index[3]; /* Index in each dimension of last
* non-phoney */
int origin; /* '0' or '1' */
float time; /* Problem time */
double dtime; /* Problem time, double data type */
/*
* The following field really only contains 3 elements. However, silo
* contains a bug in PJ_ReadVariable() as called by DBGetQuadvar() which
* can cause three doubles to be stored there instead of three floats.
*/
float align[6]; /* Centering and alignment per dimension */
void **mixvals; /* nvals ptrs to data arrays for mixed zones */
int mixlen; /* Num of elmts in each mixed zone data
* array */
int use_specmf; /* Flag indicating whether to apply species
* mass fractions to the variable. */
int ascii_labels;/* Treat variable values as ASCII values
by rounding to the nearest integer in
the range [0, 255] */
char *meshname; /* Name of associated mesh */
int guihide; /* Flag to hide from post-processor's GUI */
char **region_pnames;
int conserved; /* indicates if the variable should be conserved
under various operations such as interp. */
int extensive; /* indicates if the variable reprsents an extensiv
physical property (as opposed to intensive) */
int centering; /* explicit centering knowledge; should agree
with alignment. */
double missing_value; /* Value to indicate var data is invalid/missing */
} DBquadvar;
DBucdvar
typedef struct DBucdvar_ {
/*----------- Unstructured Cell Data (UCD) Variable -----------*/
int id; /* Identifier for this object */
char *name; /* Name of variable */
int cycle; /* Problem cycle number */
char *units; /* Units for variable, e.g, 'mm/ms' */
char *label; /* Label (perhaps for editing purposes) */
float time; /* Problem time */
double dtime; /* Problem time, double data type */
int meshid; /* Identifier for associated mesh (Deprecated Sep2005) */
void **vals; /* Array of pointers to data arrays */
int datatype; /* Type of data pointed to by 'vals' */
int nels; /* Number of elements in each array */
int nvals; /* Number of arrays pointed to by 'vals' */
int ndims; /* Rank of variable */
int origin; /* '0' or '1' */
int centering; /* Centering within mesh (nodal or zonal) */
void **mixvals; /* nvals ptrs to data arrays for mixed zones */
int mixlen; /* Num of elmts in each mixed zone data
* array */
int use_specmf; /* Flag indicating whether to apply species
* mass fractions to the variable. */
int ascii_labels;/* Treat variable values as ASCII values
by rounding to the nearest integer in
the range [0, 255] */
char *meshname; /* Name of associated mesh */
int guihide; /* Flag to hide from post-processor's GUI */
char **region_pnames;
int conserved; /* indicates if the variable should be conserved
under various operations such as interp. */
int extensive; /* indicates if the variable reprsents an extensiv
physical property (as opposed to intensive) */
double missing_value; /* Value to indicate var data is invalid/missing */
} DBucdvar;
DBmeshvar
typedef struct DBmeshvar_ {
/*----------- Generic Mesh-Data Variable -----------*/
int id; /* Identifier for this object */
char *name; /* Name of variable */
char *units; /* Units for variable, e.g, 'mm/ms' */
char *label; /* Label (perhaps for editing purposes) */
int cycle; /* Problem cycle number */
int meshid; /* Identifier for associated mesh (Deprecated Sep2005) */
void **vals; /* Array of pointers to data arrays */
int datatype; /* Type of data pointed to by 'val' */
int nels; /* Number of elements in each array */
int nvals; /* Number of arrays pointed to by 'vals' */
int nspace; /* Spatial rank of variable */
int ndims; /* Rank of 'vals' array(s) (computatnl rank) */
int origin; /* '0' or '1' */
int centering; /* Centering within mesh (nodal,zonal,other) */
float time; /* Problem time */
double dtime; /* Problem time, double data type */
/*
* The following field really only contains 3 elements. However, silo
* contains a bug in PJ_ReadVariable() as called by DBGetPointvar() which
* can cause three doubles to be stored there instead of three floats.
*/
float align[6]; /* Alignmnt per dimension if
* centering==other */
/* Stuff for multi-dimensional arrays (ndims > 1) */
int dims[3]; /* Number of elements in each dimension */
int major_order; /* 1 indicates row-major for multi-d arrays */
int stride[3]; /* Offsets to adjacent elements */
/*
* The following two fields really only contain 3 elements. However, silo
* contains a bug in PJ_ReadVariable() as called by DBGetUcdmesh() which
* can cause three doubles to be stored there instead of three floats.
*/
int min_index[6]; /* Index in each dimension of 1st
* non-phoney */
int max_index[6]; /* Index in each dimension of last
non-phoney */
int ascii_labels;/* Treat variable values as ASCII values
by rounding to the nearest integer in
the range [0, 255] */
char *meshname; /* Name of associated mesh */
int guihide; /* Flag to hide from post-processor's GUI */
char **region_pnames;
int conserved; /* indicates if the variable should be conserved
under various operations such as interp. */
int extensive; /* indicates if the variable reprsents an extensiv
physical property (as opposed to intensive) */
double missing_value; /* Value to indicate var data is invalid/missing */
} DBmeshvar;
DBmaterial
typedef struct DBmaterial_ {
/*----------- Material Information -----------*/
int id; /* Identifier */
char *name; /* Name of this material information block */
int ndims; /* Rank of 'matlist' variable */
int origin; /* '0' or '1' */
int dims[3]; /* Number of elements in each dimension */
int major_order; /* 1 indicates row-major for multi-d arrays */
int stride[3]; /* Offsets to adjacent elements in matlist */
int nmat; /* Number of materials */
int *matnos; /* Array [nmat] of valid material numbers */
char **matnames; /* Array of material names */
int *matlist; /* Array[nzone] w/ mat. number or mix index */
int mixlen; /* Length of mixed data arrays (mix_xxx) */
int datatype; /* Type of volume-fractions (double,float) */
void *mix_vf; /* Array [mixlen] of volume fractions */
int *mix_next; /* Array [mixlen] of mixed data indeces */
int *mix_mat; /* Array [mixlen] of material numbers */
int *mix_zone; /* Array [mixlen] of back pointers to mesh */
char **matcolors; /* Array of material colors */
char *meshname; /* Name of associated mesh */
int allowmat0; /* Flag to allow material "0" */
int guihide; /* Flag to hide from post-processor's GUI */
} DBmaterial;
DBmatspecies
typedef struct DBmatspecies_ {
/*----------- Species Information -----------*/
int id; /* Identifier */
char *name; /* Name of this matspecies information block */
char *matname; /* Name of material object with which the
* material species object is associated. */
int nmat; /* Number of materials */
int *nmatspec; /* Array of lngth nmat of the num of material
* species associated with each material. */
int ndims; /* Rank of 'speclist' variable */
int dims[3]; /* Number of elements in each dimension of the
* 'speclist' variable. */
int major_order; /* 1 indicates row-major for multi-d arrays */
int stride[3]; /* Offsts to adjacent elmts in 'speclist' */
int nspecies_mf; /* Total number of species mass fractions. */
void *species_mf; /* Array of length nspecies_mf of mass
* frations of the material species. */
int *speclist; /* Zone array of dimensions described by ndims
* and dims. Each element of the array is an
* index into one of the species mass fraction
* arrays. A positive value is the index in
* the species_mf array of the mass fractions
* of the clean zone's material species:
* species_mf[speclist[i]] is the mass fraction
* of the first species of material matlist[i]
* in zone i. A negative value means that the
* zone is a mixed zone and that the array
* mix_speclist contains the index to the
* species mas fractions: -speclist[i] is the
* index in the 'mix_speclist' array for zone
* i. */
int mixlen; /* Length of 'mix_speclist' array. */
int *mix_speclist; /* Array of lgth mixlen of 1-orig indices
* into the 'species_mf' array.
* species_mf[mix_speclist[j]] is the index
* in array species_mf' of the first of the
* mass fractions for material
* mix_mat[j]. */
int datatype; /* Datatype of mass fraction data. */
int guihide; /* Flag to hide from post-processor's GUI */
char **specnames; /* Array of species names; length is sum of nmatspec */
char **speccolors; /* Array of species colors; length is sum of nmatspec */
} DBmatspecies;
DBcsgzonelist
typedef struct DBcsgzonelist_ {
/*----------- CSG Zonelist -----------*/
int nregs; /* Number of regions in regionlist */
int origin; /* '0' or '1' */
int *typeflags; /* [nregs] type info about each region */
int *leftids; /* [nregs] left operand region refs */
int *rightids; /* [nregs] right operand region refs */
void *xform; /* [lxforms] transformation coefficients */
int lxform; /* length of xforms array */
int datatype; /* type of data in xforms array */
int nzones; /* number of zones */
int *zonelist; /* [nzones] region ids (complete regions) */
int min_index; /* Index of first real zone */
int max_index; /* Index of last real zone */
/*--------- Optional zone attributes ---------*/
char **regnames; /* [nregs] names of each region */
char **zonenames; /* [nzones] names of each zone */
char **alt_zonenum_vars;
} DBcsgzonelist;
DBcsgmesh
typedef struct DBcsgmesh_ {
/*----------- CSG Mesh -----------*/
int block_no; /* Block number for this mesh */
int group_no; /* Block group number for this mesh */
char *name; /* Name associated with mesh */
int cycle; /* Problem cycle number */
char *units[3]; /* Units for variable, e.g, 'mm/ms' */
char *labels[3]; /* Label associated with each dimension */
int nbounds; /* Total number of boundaries */
int *typeflags; /* nbounds boundary type info flags */
int *bndids; /* optional, nbounds explicit ids */
void *coeffs; /* coefficients in the representation of
each boundary */
int lcoeffs; /* length of coeffs array */
int *coeffidx; /* array of nbounds offsets into coeffs
for each boundary's coefficients */
int datatype; /* data type of coeffs data */
float time; /* Problem time */
double dtime; /* Problem time, double data type */
double min_extents[3]; /* Min mesh extents [ndims] */
double max_extents[3]; /* Max mesh extents [ndims] */
int ndims; /* Number of spatial & topological dimensions */
int origin; /* '0' or '1' */
DBcsgzonelist *zones; /* Data structure describing mesh zones */
/*--------- Optional boundary attributes ---------*/
char **bndnames; /* [nbounds] boundary names */
int guihide; /* Flag to hide from post-processor's GUI */
char *mrgtree_name; /* optional name of assoc. mrgtree object */
int tv_connectivity;
int disjoint_mode;
char **alt_nodenum_vars;
} DBcsgmesh;
DBcsgvar
typedef struct DBcsgvar_ {
/*----------- CSG Variable -----------*/
char *name; /* Name of variable */
int cycle; /* Problem cycle number */
char *units; /* Units for variable, e.g, 'mm/ms' */
char *label; /* Label (perhaps for editing purposes) */
float time; /* Problem time */
double dtime; /* Problem time, double data type */
void **vals; /* Array of pointers to data arrays */
int datatype; /* Type of data pointed to by 'vals' */
int nels; /* Number of elements in each array */
int nvals; /* Number of arrays pointed to by 'vals' */
int centering; /* Centering within mesh (nodal or zonal) */
int use_specmf; /* Flag indicating whether to apply species
* mass fractions to the variable. */
int ascii_labels;/* Treat variable values as ASCII values
by rounding to the nearest integer in
the range [0, 255] */
char *meshname; /* Name of associated mesh */
int guihide; /* Flag to hide from post-processor's GUI */
char **region_pnames;
int conserved; /* indicates if the variable should be conserved
under various operations such as interp. */
int extensive; /* indicates if the variable reprsents an extensiv
physical property (as opposed to intensive) */
double missing_value; /* Value to indicate var data is invalid/missing */
} DBcsgvar;
DBmrgtree
typedef struct _DBmrgtree {
char *name;
char *src_mesh_name;
int src_mesh_type;
int type_info_bits;
int num_nodes;
DBmrgtnode *root;
DBmrgtnode *cwr;
char **mrgvar_onames;
char **mrgvar_rnames;
} DBmrgtree;
DBmrgvar
typedef struct _DBmrgvar {
char *name;
char *mrgt_name;
int ncomps;
char **compnames;
int nregns;
char **reg_pnames;
int datatype;
void **data;
} DBmrgvar ;
DBgroupelmap
typedef struct _DBgroupelmap {
char *name;
int num_segments;
int *groupel_types;
int *segment_lengths;
int *segment_ids;
int **segment_data;
void **segment_fracs;
int fracs_data_type;
} DBgroupelmap;
DBcompoundarray
typedef struct DBcompoundarray_ {
int id; /*identifier of the compound array */
char *name; /*name of te compound array */
char **elemnames; /*names of the simple array elements */
int *elemlengths; /*lengths of the simple arrays */
int nelems; /*number of simple arrays */
void *values; /*simple array values */
int nvalues; /*sum reduction of `elemlengths' vector */
int datatype; /*simple array element data type */
} DBcompoundarray;
DBoptlist
typedef struct DBoptlist_ {
int *options; /* Vector of option identifiers */
void **values; /* Vector of pointers to option values */
int numopts; /* Number of options defined */
int maxopts; /* Total length of option/value arrays */
} DBoptlist;
DBobject
typedef struct DBobject_ {
char *name;
char *type; /* Type of group/object */
char **comp_names; /* Array of component names */
char **pdb_names; /* Array of internal (PDB) variable names */
int ncomponents; /* Number of components */
int maxcomponents; /* Max number of components */
/* fields below are a hack for HDF5 driver to handle
customization of 'standard' objects */
char h5_vals[DB_MAX_H5_OBJ_VALS*3*sizeof(double)];
int h5_offs[DB_MAX_H5_OBJ_VALS];
int h5_sizes[DB_MAX_H5_OBJ_VALS];
int h5_types[DB_MAX_H5_OBJ_VALS];
char *h5_names[DB_MAX_H5_OBJ_VALS];
} DBobject;
DBdatatype
/* Data types */
typedef enum {
DB_INT=16,
DB_SHORT=17,
DB_LONG=18,
DB_FLOAT=19,
DB_DOUBLE=20,
DB_CHAR=21,
DB_LONG_LONG=22,
/* mini-array types for things like dims[3] or min_extents[3] */
DB_INTA=23,
DB_FLOATA=24,
DB_DOUBLEA=25,
DB_NOTYPE=26 /*unknown type */
} DBdatatype;
DBObjectType
/* Objects that can be stored in a data file */
typedef enum {
DB_INVALID_OBJECT= -1, /*causes enum to be signed, do not remove,
space before minus sign necessary for lint*/
DB_QUADRECT = DB_QUAD_RECT,
DB_QUADCURV = DB_QUAD_CURV,
DB_QUADMESH=500,
DB_QUADVAR=501,
DB_UCDMESH=510,
DB_UCDVAR=511,
DB_MULTIMESH=520,
DB_MULTIVAR=521,
DB_MULTIMAT=522,
DB_MULTIMATSPECIES=523,
DB_MULTIBLOCKMESH=DB_MULTIMESH,
DB_MULTIBLOCKVAR=DB_MULTIVAR,
DB_MULTIMESHADJ=524,
DB_MATERIAL=530,
DB_MATSPECIES=531,
DB_FACELIST=550,
DB_ZONELIST=551,
DB_EDGELIST=552,
DB_PHZONELIST=553,
DB_CSGZONELIST=554,
DB_CSGMESH=555,
DB_CSGVAR=556,
DB_CURVE=560,
DB_DEFVARS=565,
DB_POINTMESH=570,
DB_POINTVAR=571,
DB_ARRAY=580,
DB_DIR=600,
DB_SYMLINK=601,
DB_VARIABLE=610,
DB_MRGTREE=611,
DB_GROUPELMAP=612,
DB_MRGVAR=613,
DB_USERDEF=700
} DBObjectType;
Open/Create flags
Optlist options
/* Options */
#define DBOPT_FIRST 260
#define DBOPT_ALIGN 260
#define DBOPT_COORDSYS 262
#define DBOPT_CYCLE 263
#define DBOPT_FACETYPE 264
#define DBOPT_HI_OFFSET 265
#define DBOPT_LO_OFFSET 266
#define DBOPT_LABEL 267
#define DBOPT_XLABEL 268
#define DBOPT_YLABEL 269
#define DBOPT_ZLABEL 270
#define DBOPT_MAJORORDER 271
#define DBOPT_NSPACE 272
#define DBOPT_ORIGIN 273
#define DBOPT_PLANAR 274
#define DBOPT_TIME 275
#define DBOPT_UNITS 276
#define DBOPT_XUNITS 277
#define DBOPT_YUNITS 278
#define DBOPT_ZUNITS 279
#define DBOPT_DTIME 280
#define DBOPT_USESPECMF 281
#define DBOPT_XVARNAME 282
#define DBOPT_YVARNAME 283
#define DBOPT_ZVARNAME 284
#define DBOPT_ASCII_LABEL 285
#define DBOPT_MATNOS 286
#define DBOPT_NMATNOS 287
#define DBOPT_MATNAME 288
#define DBOPT_NMAT 289
#define DBOPT_NMATSPEC 290
#define DBOPT_BASEINDEX 291 /* quad meshes for node and zone */
#define DBOPT_ZONENUM 292 /* ucd meshes for zone */
#define DBOPT_NODENUM 293 /* ucd/point meshes for node */
#define DBOPT_BLOCKORIGIN 294
#define DBOPT_GROUPNUM 295
#define DBOPT_GROUPORIGIN 296
#define DBOPT_NGROUPS 297
#define DBOPT_MATNAMES 298
#define DBOPT_EXTENTS_SIZE 299
#define DBOPT_EXTENTS 300
#define DBOPT_MATCOUNTS 301
#define DBOPT_MATLISTS 302
#define DBOPT_MIXLENS 303
#define DBOPT_ZONECOUNTS 304
#define DBOPT_HAS_EXTERNAL_ZONES 305
#define DBOPT_PHZONELIST 306
#define DBOPT_MATCOLORS 307
#define DBOPT_BNDNAMES 308
#define DBOPT_REGNAMES 309
#define DBOPT_ZONENAMES 310
#define DBOPT_HIDE_FROM_GUI 311
#define DBOPT_TOPO_DIM 312 /* TOPOlogical DIMension */
#define DBOPT_REFERENCE 313 /* reference object */
#define DBOPT_GROUPINGS_SIZE 314 /* size of grouping array */
#define DBOPT_GROUPINGS 315 /* groupings array */
#define DBOPT_GROUPINGNAMES 316 /* array of size determined by
number of groups of names of groups. */
#define DBOPT_ALLOWMAT0 317 /* Turn off material numer "0" warnings*/
#define DBOPT_MRGTREE_NAME 318
#define DBOPT_REGION_PNAMES 319
#define DBOPT_TENSOR_RANK 320
#define DBOPT_MMESH_NAME 321
#define DBOPT_TV_CONNECTIVITY 322
#define DBOPT_DISJOINT_MODE 323
#define DBOPT_MRGV_ONAMES 324
#define DBOPT_MRGV_RNAMES 325
#define DBOPT_SPECNAMES 326
#define DBOPT_SPECCOLORS 327
#define DBOPT_LLONGNZNUM 328
#define DBOPT_CONSERVED 329
#define DBOPT_EXTENSIVE 330
#define DBOPT_MB_FILE_NS 331
#define DBOPT_MB_BLOCK_NS 332
#define DBOPT_MB_BLOCK_TYPE 333
#define DBOPT_MB_EMPTY_LIST 334
#define DBOPT_MB_EMPTY_COUNT 335
#define DBOPT_MB_REPR_BLOCK_IDX 336
#define DBOPT_MISSING_VALUE 337
#define DBOPT_ALT_ZONENUM_VARS 338
#define DBOPT_ALT_NODENUM_VARS 339
#define DBOPT_GHOST_NODE_LABELS 340
#define DBOPT_GHOST_ZONE_LABELS 341
#define DBOPT_LAST 499
VFD options
/* Options relating to virtual file drivers */
#define DBOPT_H5_FIRST 500
#define DBOPT_H5_VFD 500
#define DBOPT_H5_RAW_FILE_OPTS 501
#define DBOPT_H5_RAW_EXTENSION 502
#define DBOPT_H5_META_FILE_OPTS 503
#define DBOPT_H5_META_EXTENSION 504
#define DBOPT_H5_CORE_ALLOC_INC 505
#define DBOPT_H5_CORE_NO_BACK_STORE 506
#define DBOPT_H5_META_BLOCK_SIZE 507
#define DBOPT_H5_SMALL_RAW_SIZE 508
#define DBOPT_H5_ALIGN_MIN 509
#define DBOPT_H5_ALIGN_VAL 510
#define DBOPT_H5_DIRECT_MEM_ALIGN 511
#define DBOPT_H5_DIRECT_BLOCK_SIZE 512
#define DBOPT_H5_DIRECT_BUF_SIZE 513
#define DBOPT_H5_LOG_NAME 514
#define DBOPT_H5_LOG_BUF_SIZE 515
#define DBOPT_H5_MPIO_COMM 516
#define DBOPT_H5_MPIO_INFO 517
#define DBOPT_H5_MPIP_NO_GPFS_HINTS 518
#define DBOPT_H5_SIEVE_BUF_SIZE 519
#define DBOPT_H5_CACHE_NELMTS 520
#define DBOPT_H5_CACHE_NBYTES 521
#define DBOPT_H5_CACHE_POLICY 522
#define DBOPT_H5_FAM_SIZE 523
#define DBOPT_H5_FAM_FILE_OPTS 524
#define DBOPT_H5_USER_DRIVER_ID 525
#define DBOPT_H5_USER_DRIVER_INFO 526
#define DBOPT_H5_SILO_BLOCK_SIZE 527
#define DBOPT_H5_SILO_BLOCK_COUNT 528
#define DBOPT_H5_SILO_LOG_STATS 529
#define DBOPT_H5_SILO_USE_DIRECT 530
#define DBOPT_H5_FIC_SIZE 531
#define DBOPT_H5_FIC_BUF 532
#define DBOPT_H5_FIC_FLAGS 533
#define DBOPT_H5_FCPL_HID_T 597
#define DBOPT_H5_FAPL_HID_T 598
#define DBOPT_H5_LAST 599
Error handling options
/* Error trapping method */
#define DB_TOP 0 /*default--API traps */
#define DB_NONE 1 /*no errors trapped */
#define DB_ALL 2 /*all levels trap (traceback) */
#define DB_ABORT 3 /*abort() is called */
#define DB_SUSPEND 4 /*suspend error reporting temporarily */
#define DB_RESUME 5 /*resume normal error reporting */
#define DB_ALL_AND_DRVR 6 /*DB_ALL + driver error reporting */
Error return codes
/* Errors */
#define E_NOERROR 0 /*No error */
#define E_BADFTYPE 1 /*Bad file type */
#define E_NOTIMP 2 /*Callback not implemented */
#define E_NOFILE 3 /*No data file specified */
#define E_INTERNAL 5 /*Internal error */
#define E_NOMEM 6 /*Not enough memory */
#define E_BADARGS 7 /*Bad argument to function */
#define E_CALLFAIL 8 /*Low-level function failure */
#define E_NOTFOUND 9 /*Object not found */
#define E_TAURSTATE 10 /*Taurus: database state error */
#define E_MSERVER 11 /*SDX: too many connections */
#define E_PROTO 12 /*SDX: protocol error */
#define E_NOTDIR 13 /*Not a directory */
#define E_MAXOPEN 14 /*Too many open files */
#define E_NOTFILTER 15 /*Filter(s) not found */
#define E_MAXFILTERS 16 /*Too many filters */
#define E_FEXIST 17 /*File already exists */
#define E_FILEISDIR 18 /*File is actually a directory */
#define E_FILENOREAD 19 /*File lacks read permission. */
#define E_SYSTEMERR 20 /*System level error occured. */
#define E_FILENOWRITE 21 /*File lacks write permission. */
#define E_INVALIDNAME 22 /* Variable name is invalid */
#define E_NOOVERWRITE 23 /*Overwrite not permitted */
#define E_CHECKSUM 24 /*Checksum failed */
#define E_COMPRESSION 25 /*Compression failed */
#define E_GRABBED 26 /*Low level driver enabled */
#define E_NOTREG 27 /*The dbfile pointer is not resitered. */
#define E_CONCURRENT 28 /*File is opened multiply and not all read-only. */
#define E_DRVRCANTOPEN 29 /*Driver cannot open the file. */
#define E_BADOPTCLASS 30 /*Optlist contains options for wrong class */
#define E_NOTENABLEDINBUILD 31 /*feature not enabled in this build */
#define E_MAXFILEOPTSETS 32 /*Too many file options sets */
#define E_NOHDF5 33 /*HDF5 driver not available */
#define E_EMPTYOBJECT 34 /*Empty object not currently permitted*/
#define E_OBJBUFFULL 35 /*No more temp. buffer space for object */
#define E_NOSILOHDF5 36 /*Not HDF5 file produced by silo */
#define E_FILELOCKING 37 /*File locking prevented operation */
#define E_NERRORS 50
Major order options
/* Definitions for MAJOR_ORDER */
#define DB_ROWMAJOR 0
#define DB_COLMAJOR 1
Variable centering options
/* Definitions for CENTERING */
#define DB_NOTCENT 0
#define DB_NODECENT 110
#define DB_ZONECENT 111
#define DB_FACECENT 112
#define DB_BNDCENT 113 /* for CSG meshes only */
#define DB_EDGECENT 114
#define DB_BLOCKCENT 115 /* for 'block-centered' data on multimeshs */
Coordinate system options
/* Definitions for COORD_SYSTEM */
#define DB_CARTESIAN 120
#define DB_CYLINDRICAL 121 /* x,r; y,theta; z,height; 2D variant is eqiv. to poloar */
#define DB_SPHERICAL 122 /* x,r; y,theta; z,phi; 2D variant is equiv. to polar */
#define DB_NUMERICAL 123
#define DB_OTHER 124
Derived variable types
/* Definitions for derived variable types */
#define DB_VARTYPE_SCALAR 200
#define DB_VARTYPE_VECTOR 201
#define DB_VARTYPE_TENSOR 202
#define DB_VARTYPE_SYMTENSOR 203
#define DB_VARTYPE_ARRAY 204
#define DB_VARTYPE_MATERIAL 205
#define DB_VARTYPE_SPECIES 206
#define DB_VARTYPE_LABEL 207
CSG options
/* Definitions for CSG boundary types
Designed so low-order 16 bits are unused.
The last few characters of the symbol are intended
to indicate the representational form of the surface type
G = generalized form (n values, depends on surface type)
P = point (3 values, x,y,z in 3D, 2 values in 2D x,y)
N = normal (3 values, Nx,Ny,Nz in 3D, 2 values in 2D Nx,Ny)
R = radius (1 value)
A = angle (1 value in degrees)
L = length (1 value)
X = x-intercept (1 value)
Y = y-intercept (1 value)
Z = z-intercept (1 value)
K = arbitrary integer
F = planar face defined by point-normal pair (6 values)
*/
#define DBCSG_QUADRIC_G 0x01000000
#define DBCSG_SPHERE_PR 0x02010000
#define DBCSG_ELLIPSOID_PRRR 0x02020000
#define DBCSG_PLANE_G 0x03000000
#define DBCSG_PLANE_X 0x03010000
#define DBCSG_PLANE_Y 0x03020000
#define DBCSG_PLANE_Z 0x03030000
#define DBCSG_PLANE_PN 0x03040000
#define DBCSG_PLANE_PPP 0x03050000
#define DBCSG_CYLINDER_PNLR 0x04000000
#define DBCSG_CYLINDER_PPR 0x04010000
#define DBCSG_BOX_XYZXYZ 0x05000000
#define DBCSG_CONE_PNLA 0x06000000
#define DBCSG_CONE_PPA 0x06010000
#define DBCSG_POLYHEDRON_KF 0x07000000
#define DBCSG_HEX_6F 0x07010000
#define DBCSG_TET_4F 0x07020000
#define DBCSG_PYRAMID_5F 0x07030000
#define DBCSG_PRISM_5F 0x07040000
/* Definitions for 2D CSG boundary types */
#define DBCSG_QUADRATIC_G 0x08000000
#define DBCSG_CIRCLE_PR 0x09000000
#define DBCSG_ELLIPSE_PRR 0x09010000
#define DBCSG_LINE_G 0x0A000000
#define DBCSG_LINE_X 0x0A010000
#define DBCSG_LINE_Y 0x0A020000
#define DBCSG_LINE_PN 0x0A030000
#define DBCSG_LINE_PP 0x0A040000
#define DBCSG_BOX_XYXY 0x0B000000
#define DBCSG_ANGLE_PNLA 0x0C000000
#define DBCSG_ANGLE_PPA 0x0C010000
#define DBCSG_POLYGON_KP 0x0D000000
#define DBCSG_TRI_3P 0x0D010000
#define DBCSG_QUAD_4P 0x0D020000
/* Definitions for CSG Region operators */
#define DBCSG_INNER 0x7F000000
#define DBCSG_OUTER 0x7F010000
#define DBCSG_ON 0x7F020000
#define DBCSG_UNION 0x7F030000
#define DBCSG_INTERSECT 0x7F040000
#define DBCSG_DIFF 0x7F050000
#define DBCSG_COMPLIMENT 0x7F060000
#define DBCSG_XFORM 0x7F070000
#define DBCSG_SWEEP 0x7F080000