ExodusII  6.05
exodusII_int.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
00003  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
00004  * retains certain rights in this software.
00005  * 
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions are
00008  * met:
00009  * 
00010  *     * Redistributions of source code must retain the above copyright
00011  *       notice, this list of conditions and the following disclaimer.
00012  * 
00013  *     * Redistributions in binary form must reproduce the above
00014  *       copyright notice, this list of conditions and the following
00015  *       disclaimer in the documentation and/or other materials provided
00016  *       with the distribution.  
00017  * 
00018  *     * Neither the name of Sandia Corporation nor the names of its
00019  *       contributors may be used to endorse or promote products derived
00020  *       from this software without specific prior written permission.
00021  * 
00022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00025  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00026  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00027  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00028  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00029  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00030  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00031  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00032  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033  * 
00034  */
00035 /*****************************************************************************
00036 *
00037 * exodusII_int.h - ExodusII header file for internal Exodus call use only
00038 *
00039 */
00040 
00041 #ifndef EXODUS_II_INT_HDR
00042 #define EXODUS_II_INT_HDR
00043 
00044 #include "netcdf.h"
00045 
00046 #ifdef _WIN32
00047 #define PRId64 "I64d"
00048 #else
00049 #include <inttypes.h>
00050 #endif
00051 
00052 #ifndef __APPLE__
00053 #if defined __STDC__ || defined __cplusplus
00054 #include <stdlib.h>
00055 #endif
00056 #endif
00057 
00058 #ifdef _MSC_VER
00059 #  pragma warning ( disable : 4127 )
00060 #  pragma warning ( disable : 4706 )
00061 #  pragma warning ( disable : 4701 )
00062 #endif
00063 
00064 #if defined(__BORLANDC__)
00065 #pragma warn -8004 /* "assigned a value that is never used" */
00066 #endif
00067 
00068 
00069 #include <stdio.h>
00070 
00071 /* A format string for outputting size_t ... */
00072 #if defined(__STDC_VERSION__)
00073 #  if (__STDC_VERSION__ >= 199901L)
00074 #    define ST_ZU   "zu"
00075 #  else
00076 #    define ST_ZU   "lu"
00077 #  endif
00078 #else
00079 #  define ST_ZU   "lu"
00080 #endif
00081 
00082 #define MAX_VAR_NAME_LENGTH     32   /**< Internal use only */
00083 
00084 /* this should be defined in ANSI C and C++, but just in case ... */
00085 #ifndef NULL
00086 #define NULL 0
00087 #endif
00088 
00089 /* Default "filesize" for newly created files.
00090  * Set to 0 for normal filesize setting.
00091  * Set to 1 for EXODUS_LARGE_MODEL setting to be the default
00092  */
00093 #define EXODUS_DEFAULT_SIZE 1
00094 
00095 /* Exodus error return codes - function return values:                      */
00096 #define EX_FATAL        -1      /* fatal error flag def                     */
00097 #define EX_NOERR         0      /* no error flag def                        */
00098 #define EX_WARN          1      /* warning flag def                         */
00099 
00100 /* Used to map between root (file id) and group ids when using groups */
00101 #define EX_FILE_ID_MASK (0xffff0000) /* Must match FILE_ID_MASK in netcdf nc4internal.h */
00102 #define EX_GRP_ID_MASK  (0x0000ffff) /* Must match GRP_ID_MASK in netcdf nc4internal.h */
00103 
00104 /*
00105  * This file contains defined constants that are used internally in the
00106  * EXODUS II API.
00107  *
00108  * The first group of constants refer to netCDF variables, attributes, or 
00109  * dimensions in which the EXODUS II data are stored.  Using the defined 
00110  * constants will allow the names of the netCDF entities to be changed easily 
00111  * in the future if needed.  The first three letters of the constant identify 
00112  * the netCDF entity as a variable (VAR), dimension (DIM), or attribute (ATT).
00113  *
00114  * NOTE: The entity name should not have any blanks in it.  Blanks are
00115  *       technically legal but some netcdf utilities (ncgen in particular)
00116  *       fail when they encounter a blank in a name.
00117  *
00118  *      DEFINED CONSTANT        ENTITY NAME     DATA STORED IN ENTITY
00119  */
00120 #define ATT_FILE_TYPE           "type"          /* obsolete                  */
00121 #define ATT_TITLE               "title"         /* the database title        */
00122 #define ATT_API_VERSION         "api_version"   /* the EXODUS II api vers #   */
00123 #define ATT_API_VERSION_BLANK   "api version"   /* the EXODUS II api vers #   */
00124                                                 /*  used for db version 2.01 */
00125                                                 /*  and earlier              */
00126 #define ATT_VERSION             "version"       /* the EXODUS II file vers # */
00127 #define ATT_FILESIZE            "file_size"     /* 1=large, 0=normal */
00128 #define ATT_FLT_WORDSIZE        "floating_point_word_size"
00129                                                 /* word size of floating     */
00130                                                 /* point numbers in file     */
00131 #define ATT_FLT_WORDSIZE_BLANK  "floating point word size"
00132                                                 /* word size of floating     */
00133                                                 /* point numbers in file     */
00134                                                 /* used for db version 2.01  */
00135                                                 /* and earlier               */
00136 #define ATT_MAX_NAME_LENGTH     "maximum_name_length"
00137 #define ATT_INT64_STATUS        "int64_status"
00138 
00139 #define DIM_NUM_NODES           "num_nodes"     /* # of nodes                */
00140 #define DIM_NUM_DIM             "num_dim"       /* # of dimensions; 2- or 3-d*/
00141 #define DIM_NUM_EDGE            "num_edge"      /* # of edges (over all blks)*/
00142 #define DIM_NUM_FACE            "num_face"      /* # of faces (over all blks)*/
00143 #define DIM_NUM_ELEM            "num_elem"      /* # of elements             */
00144 #define DIM_NUM_EL_BLK          "num_el_blk"    /* # of element blocks       */
00145 #define DIM_NUM_ED_BLK          "num_ed_blk"    /* # of edge blocks          */
00146 #define DIM_NUM_FA_BLK          "num_fa_blk"    /* # of face blocks          */
00147 #define VAR_COORD               "coord"         /* nodal coordinates         */
00148 #define VAR_COORD_X             "coordx"        /* X-dimension coordinate    */
00149 #define VAR_COORD_Y             "coordy"        /* Y-dimension coordinate    */
00150 #define VAR_COORD_Z             "coordz"        /* Z-dimension coordinate    */
00151 #define VAR_NAME_COOR           "coor_names"    /* names of coordinates      */
00152 #define VAR_NAME_EL_BLK         "eb_names"      /* names of element blocks   */
00153 #define VAR_NAME_NS             "ns_names"      /* names of node sets        */
00154 #define VAR_NAME_SS             "ss_names"      /* names of side sets        */
00155 #define VAR_NAME_EM             "emap_names"    /* names of element maps     */
00156 #define VAR_NAME_EDM            "edmap_names"   /* names of edge    maps     */
00157 #define VAR_NAME_FAM            "famap_names"   /* names of face    maps     */
00158 #define VAR_NAME_NM             "nmap_names"    /* names of node    maps     */
00159 #define VAR_NAME_ED_BLK         "ed_names"      /* names of edge    blocks   */
00160 #define VAR_NAME_FA_BLK         "fa_names"      /* names of face    blocks   */
00161 #define VAR_NAME_ES             "es_names"      /* names of edge    sets     */
00162 #define VAR_NAME_FS             "fs_names"      /* names of face    sets     */
00163 #define VAR_NAME_ELS            "els_names"     /* names of element sets     */
00164 #define VAR_STAT_EL_BLK         "eb_status"     /* element block status      */
00165 #define VAR_STAT_ECONN          "econn_status"  /* element block edge status */
00166 #define VAR_STAT_FCONN          "fconn_status"  /* element block face status */
00167 #define VAR_STAT_ED_BLK         "ed_status"     /* edge    block status      */
00168 #define VAR_STAT_FA_BLK         "fa_status"     /* face    block status      */
00169 #define VAR_ID_EL_BLK           "eb_prop1"      /* element block ids props   */
00170 #define VAR_ID_ED_BLK           "ed_prop1"      /* edge    block ids props   */
00171 #define VAR_ID_FA_BLK           "fa_prop1"      /* face    block ids props   */
00172 #define ATT_NAME_ELB            "elem_type"     /* element type names for    */
00173                                                 /*   each element block      */
00174 #define DIM_NUM_EL_IN_BLK(num)  ex_catstr("num_el_in_blk",num)
00175                                                 /* # of elements in element  */
00176                                                 /*   block num               */
00177 #define DIM_NUM_NOD_PER_EL(num) ex_catstr("num_nod_per_el",num)
00178                                                 /* # of nodes per element in */
00179                                                 /*   element block num       */
00180 #define DIM_NUM_ATT_IN_BLK(num) ex_catstr("num_att_in_blk",num)
00181                                                 /* # of attributes in element*/
00182                                                 /*   block num               */
00183 #define DIM_NUM_ED_IN_EBLK(num) ex_catstr("num_ed_in_blk",num)
00184                                                 /* # of edges in edge        */
00185                                                 /*   block num               */
00186 #define DIM_NUM_NOD_PER_ED(num)  ex_catstr("num_nod_per_ed",num)
00187                                                 /* # of nodes per edge in    */
00188                                                 /*   edge block num          */
00189 #define DIM_NUM_EDG_PER_EL(num)  ex_catstr("num_edg_per_el",num)
00190                                                 /* # of edges per element in */
00191                                                 /*   element block num       */
00192 #define DIM_NUM_ATT_IN_EBLK(num) ex_catstr("num_att_in_eblk",num)
00193                                                 /* # of attributes in edge   */
00194                                                 /*   block num               */
00195 #define DIM_NUM_FA_IN_FBLK(num)  ex_catstr("num_fa_in_blk",num)
00196                                                 /* # of faces in face        */
00197                                                 /*   block num               */
00198 #define DIM_NUM_NOD_PER_FA(num)  ex_catstr("num_nod_per_fa",num)
00199                                                 /* # of nodes per face in    */
00200                                                 /*   face block num          */
00201 #define DIM_NUM_FAC_PER_EL(num)  ex_catstr("num_fac_per_el",num)
00202                                                 /* # of faces per element in */
00203                                                 /*   element block num       */
00204 #define DIM_NUM_ATT_IN_FBLK(num) ex_catstr("num_att_in_fblk",num)
00205                                                 /* # of attributes in face   */
00206                                                 /*   block num               */
00207 #define VAR_CONN(num)            ex_catstr("connect",num)
00208                                                 /* element connectivity for  */
00209                                                 /*   element block num       */
00210 #define VAR_EBEPEC(num)          ex_catstr("ebepecnt",num)
00211                                                 /* array containing number of entity per */
00212       /*  entity for n-sided face/element blocks */
00213 #define VAR_ATTRIB(num)         ex_catstr("attrib",num)
00214                                                 /* list of attributes for    */
00215                                                 /*   element block num       */
00216 #define VAR_NAME_ATTRIB(num)    ex_catstr("attrib_name",num)
00217                                                 /* list of attribute names   */
00218                                                 /* for element block num     */
00219 #define VAR_EB_PROP(num)        ex_catstr("eb_prop",num)
00220                                                 /* list of the numth property*/
00221                                                 /*   for all element blocks  */
00222 #define VAR_ECONN(num)            ex_catstr("edgconn",num)
00223                                                 /* edge connectivity for     */
00224                                                 /*   element block num       */
00225 #define VAR_EBCONN(num)           ex_catstr("ebconn",num)
00226                                                 /* edge connectivity for     */
00227                                                 /*   edge block num          */
00228 #define VAR_EATTRIB(num)          ex_catstr("eattrb",num)
00229                                                 /* list of attributes for    */
00230                                                 /*   edge block num          */
00231 #define VAR_NAME_EATTRIB(num)    ex_catstr("eattrib_name",num)
00232                                                 /* list of attribute names   */
00233                                                 /* for edge block num        */
00234 #define VAR_NATTRIB              "nattrb"
00235 #define VAR_NAME_NATTRIB         "nattrib_name"
00236 #define DIM_NUM_ATT_IN_NBLK      "num_att_in_nblk"
00237 
00238 #define VAR_NSATTRIB(num)        ex_catstr("nsattrb",num)
00239 #define VAR_NAME_NSATTRIB(num)   ex_catstr("nsattrib_name",num)
00240 #define DIM_NUM_ATT_IN_NS(num)   ex_catstr("num_att_in_ns",num)
00241 
00242 #define VAR_SSATTRIB(num)        ex_catstr("ssattrb",num)
00243 #define VAR_NAME_SSATTRIB(num)   ex_catstr("ssattrib_name",num)
00244 #define DIM_NUM_ATT_IN_SS(num)   ex_catstr("num_att_in_ss",num)
00245 
00246 #define VAR_ESATTRIB(num)        ex_catstr("esattrb",num)
00247 #define VAR_NAME_ESATTRIB(num)   ex_catstr("esattrib_name",num)
00248 #define DIM_NUM_ATT_IN_ES(num)   ex_catstr("num_att_in_es",num)
00249 
00250 #define VAR_FSATTRIB(num)        ex_catstr("fsattrb",num)
00251 #define VAR_NAME_FSATTRIB(num)   ex_catstr("fsattrib_name",num)
00252 #define DIM_NUM_ATT_IN_FS(num)   ex_catstr("num_att_in_fs",num)
00253 
00254 #define VAR_ELSATTRIB(num)       ex_catstr("elsattrb",num)
00255 #define VAR_NAME_ELSATTRIB(num)  ex_catstr("elsattrib_name",num)
00256 #define DIM_NUM_ATT_IN_ELS(num)  ex_catstr("num_att_in_els",num)
00257 
00258 #define VAR_ED_PROP(num)         ex_catstr("ed_prop",num)
00259                                                 /* list of the numth property*/
00260                                                 /*   for all edge blocks     */
00261 #define VAR_FCONN(num)            ex_catstr("facconn",num)
00262                                                 /* face connectivity for     */
00263                                                 /*   element block num       */
00264 #define VAR_FBCONN(num)           ex_catstr("fbconn",num)
00265                                                 /* face connectivity for     */
00266                                                 /*   face block num          */
00267 #define VAR_FBEPEC(num)           ex_catstr("fbepecnt",num)
00268                                                 /* array containing number of entity per */
00269       /*  entity for n-sided face/element blocks */
00270 #define VAR_FATTRIB(num)          ex_catstr("fattrb",num)
00271                                                 /* list of attributes for    */
00272                                                 /*   face block num          */
00273 #define VAR_NAME_FATTRIB(num)    ex_catstr("fattrib_name",num)
00274                                                 /* list of attribute names   */
00275                                                 /* for face block num        */
00276 #define VAR_FA_PROP(num)         ex_catstr("fa_prop",num)
00277                                                 /* list of the numth property*/
00278                                                 /*   for all face blocks     */
00279 #define ATT_PROP_NAME           "name"          /* name attached to element  */
00280                                                 /*   block, node set, side   */
00281                                                 /*   set, element map, or    */
00282                                                 /*   map properties          */
00283 #define VAR_MAP                 "elem_map"      /* element order map         */
00284                                                 /* obsolete, replaced by     */
00285                                                 /* VAR_ELEM_MAP(num)         */
00286 #define DIM_NUM_SS              "num_side_sets" /* # of side sets            */
00287 #define VAR_SS_STAT             "ss_status"     /* side set status           */
00288 #define VAR_SS_IDS              "ss_prop1"      /* side set id properties    */
00289 #define DIM_NUM_SIDE_SS(num)    ex_catstr("num_side_ss",num)
00290                                                 /* # of sides in side set num*/
00291 #define DIM_NUM_DF_SS(num)      ex_catstr("num_df_ss",num)
00292                                                /* # of distribution factors */
00293                                                /* in side set num           */
00294 /*#define DIM_NUM_NOD_SS(num)   ex_catstr("num_nod_ss",num) *** obsolete *** */
00295                                                 /* # of nodes in side set num*/
00296 #define VAR_FACT_SS(num)        ex_catstr("dist_fact_ss",num)
00297                                                 /* the distribution factors  */
00298                                                 /*   for each node in side   */
00299                                                 /*   set num                 */
00300 #define VAR_ELEM_SS(num)        ex_catstr("elem_ss",num)
00301                                                 /* list of elements in side  */
00302                                                 /*   set num                 */
00303 #define VAR_SIDE_SS(num)        ex_catstr("side_ss",num)
00304                                                 /* list of sides in side set */
00305 #define VAR_SS_PROP(num)        ex_catstr("ss_prop",num)
00306                                                 /* list of the numth property*/
00307                                                 /*   for all side sets       */
00308 #define DIM_NUM_ES               "num_edge_sets"/* # of edge sets            */
00309 #define VAR_ES_STAT              "es_status"    /* edge set status           */
00310 #define VAR_ES_IDS               "es_prop1"     /* edge set id properties    */
00311 #define DIM_NUM_EDGE_ES(num)     ex_catstr("num_edge_es",num)
00312                                                 /* # of edges in edge set num*/
00313 #define DIM_NUM_DF_ES(num)       ex_catstr("num_df_es",num)
00314                                                 /* # of distribution factors */
00315                                                 /* in edge set num           */
00316 /*#define DIM_NUM_NOD_ES(num)    ex_catstr("num_nod_es",num) *** obsolete *** */
00317                                                 /* # of nodes in edge set num*/
00318 #define VAR_FACT_ES(num)         ex_catstr("dist_fact_es",num)
00319                                                 /* the distribution factors  */
00320                                                 /*   for each node in edge   */
00321                                                 /*   set num                 */
00322 #define VAR_EDGE_ES(num)         ex_catstr("edge_es",num)
00323                                                 /* list of edges in edge     */
00324                                                 /*   set num                 */
00325 #define VAR_ORNT_ES(num)         ex_catstr("ornt_es",num)
00326                                                 /* list of orientations in   */
00327                                                 /*  the edge set.            */
00328 #define VAR_ES_PROP(num)         ex_catstr("es_prop",num)
00329                                                 /* list of the numth property*/
00330                                                 /*   for all edge sets       */
00331 #define DIM_NUM_FS               "num_face_sets"/* # of face sets            */
00332 #define VAR_FS_STAT              "fs_status"    /* face set status           */
00333 #define VAR_FS_IDS               "fs_prop1"     /* face set id properties    */
00334 #define DIM_NUM_FACE_FS(num)     ex_catstr("num_face_fs",num)
00335                                                 /* # of faces in side set num*/
00336 #define DIM_NUM_DF_FS(num)       ex_catstr("num_df_fs",num)
00337                                                 /* # of distribution factors */
00338                                                 /* in face set num           */
00339 /*#define DIM_NUM_NOD_FS(num)    ex_catstr("num_nod_ss",num) *** obsolete *** */
00340                                                 /* # of nodes in face set num*/
00341 #define VAR_FACT_FS(num)         ex_catstr("dist_fact_fs",num)
00342                                                 /* the distribution factors  */
00343                                                 /*   for each node in face   */
00344                                                 /*   set num                 */
00345 #define VAR_FACE_FS(num)         ex_catstr("face_fs",num)
00346                                                 /* list of elements in face  */
00347                                                 /*   set num                 */
00348 #define VAR_ORNT_FS(num)         ex_catstr("ornt_fs",num)
00349                                                 /* list of sides in side set */
00350 #define VAR_FS_PROP(num)         ex_catstr("fs_prop",num)
00351                                                 /* list of the numth property*/
00352                                                 /*   for all face sets       */
00353 #define DIM_NUM_ELS              "num_elem_sets"/* # of elem sets            */
00354 #define DIM_NUM_ELE_ELS(num)     ex_catstr("num_ele_els",num)
00355                                                 /* # of elements in elem set */
00356                                                 /*   num                     */
00357 #define DIM_NUM_DF_ELS(num)     ex_catstr("num_df_els",num)
00358                                                /* # of distribution factors */
00359                                                /* in element set num        */
00360 #define VAR_ELS_STAT            "els_status"    /* elem set status           */
00361 #define VAR_ELS_IDS             "els_prop1"     /* elem set id properties    */
00362 #define VAR_ELEM_ELS(num)        ex_catstr("elem_els",num)
00363                                                 /* list of elements in elem  */
00364                                                 /*   set num                 */
00365 #define VAR_FACT_ELS(num)       ex_catstr("dist_fact_els",num)
00366                                                 /* list of distribution      */
00367                                                 /*   factors in elem set num */
00368 #define VAR_ELS_PROP(num)       ex_catstr("els_prop",num)
00369                                                 /* list of the numth property*/
00370                                                 /*   for all elem sets       */
00371 #define DIM_NUM_NS               "num_node_sets"/* # of node sets            */
00372 #define DIM_NUM_NOD_NS(num)      ex_catstr("num_nod_ns",num)
00373                                                 /* # of nodes in node set    */
00374                                                 /*   num                     */
00375 #define DIM_NUM_DF_NS(num)      ex_catstr("num_df_ns",num)
00376                                                /* # of distribution factors */
00377                                                /* in node set num           */
00378 #define VAR_NS_STAT             "ns_status"     /* node set status           */
00379 #define VAR_NS_IDS              "ns_prop1"      /* node set id properties    */
00380 #define VAR_NODE_NS(num)        ex_catstr("node_ns",num)
00381                                                 /* list of nodes in node set */
00382                                                 /*   num                     */
00383 #define VAR_FACT_NS(num)        ex_catstr("dist_fact_ns",num)
00384                                                 /* list of distribution      */
00385                                                 /*   factors in node set num */
00386 #define VAR_NS_PROP(num)        ex_catstr("ns_prop",num)
00387                                                 /* list of the numth property*/
00388                                                 /*   for all node sets       */
00389 #define DIM_NUM_QA              "num_qa_rec"    /* # of QA records           */
00390 #define VAR_QA_TITLE            "qa_records"    /* QA records                */
00391 #define DIM_NUM_INFO            "num_info"      /* # of information records  */
00392 #define VAR_INFO                "info_records"  /* information records       */
00393 #define VAR_HIS_TIME            "time_hist"     /* obsolete                  */
00394 #define VAR_WHOLE_TIME          "time_whole"    /* simulation times for whole*/
00395                                                 /*   time steps              */
00396 #define VAR_ELEM_TAB            "elem_var_tab"  /* element variable truth    */
00397                                                 /*   table                   */
00398 #define VAR_EBLK_TAB            "edge_var_tab"  /* edge variable truth table */
00399 #define VAR_FBLK_TAB            "face_var_tab"  /* face variable truth table */
00400 #define VAR_ELSET_TAB           "elset_var_tab" /* elemset variable truth    */
00401                                                 /*   table                   */
00402 #define VAR_SSET_TAB            "sset_var_tab"  /* sideset variable truth    */
00403                                                 /*   table                   */
00404 #define VAR_FSET_TAB            "fset_var_tab"  /* faceset variable truth    */
00405                                                 /*   table                   */
00406 #define VAR_ESET_TAB            "eset_var_tab"  /* edgeset variable truth    */
00407                                                 /*   table                   */
00408 #define VAR_NSET_TAB            "nset_var_tab"  /* nodeset variable truth    */
00409                                                 /*   table                   */
00410 #define DIM_NUM_GLO_VAR         "num_glo_var"   /* # of global variables     */
00411 #define VAR_NAME_GLO_VAR        "name_glo_var"  /* names of global variables */
00412 #define VAR_GLO_VAR             "vals_glo_var"  /* values of global variables*/
00413 #define DIM_NUM_NOD_VAR         "num_nod_var"   /* # of nodal variables      */
00414 #define VAR_NAME_NOD_VAR        "name_nod_var"  /* names of nodal variables  */
00415 #define VAR_NOD_VAR             "vals_nod_var"  /* values of nodal variables */
00416 #define VAR_NOD_VAR_NEW(num)    ex_catstr("vals_nod_var",num)
00417                                                 /* values of nodal variables */
00418 #define DIM_NUM_ELE_VAR         "num_elem_var"  /* # of element variables    */
00419 #define VAR_NAME_ELE_VAR        "name_elem_var" /* names of element variables*/
00420 #define VAR_ELEM_VAR(num1,num2) ex_catstr2("vals_elem_var",num1,"eb",num2)
00421                                                 /* values of element variable*/
00422                                                 /*   num1 in element block   */
00423                                                 /*   num2                    */
00424 #define DIM_NUM_EDG_VAR         "num_edge_var"  /* # of edge variables       */
00425 #define VAR_NAME_EDG_VAR        "name_edge_var" /* names of edge variables   */
00426 #define VAR_EDGE_VAR(num1,num2) ex_catstr2("vals_edge_var",num1,"eb",num2)
00427                                                 /* values of edge variable   */
00428                                                 /*   num1 in edge block num2 */
00429 #define DIM_NUM_FAC_VAR         "num_face_var"  /* # of face variables       */
00430 #define VAR_NAME_FAC_VAR        "name_face_var" /* names of face variables   */
00431 #define VAR_FACE_VAR(num1,num2) ex_catstr2("vals_face_var",num1,"fb",num2)
00432                                                 /* values of face variable   */
00433                                                 /*   num1 in face block num2 */
00434 
00435 #define DIM_NUM_NSET_VAR        "num_nset_var"  /* # of nodeset variables    */
00436 #define VAR_NAME_NSET_VAR       "name_nset_var" /* names of nodeset variables*/
00437 #define VAR_NS_VAR(num1,num2) ex_catstr2("vals_nset_var",num1,"ns",num2)
00438                                                 /* values of nodeset variable*/
00439                                                 /*   num1 in nodeset num2    */
00440 #define DIM_NUM_ESET_VAR        "num_eset_var"  /* # of edgeset variables    */
00441 #define VAR_NAME_ESET_VAR       "name_eset_var" /* names of edgeset variables*/
00442 #define VAR_ES_VAR(num1,num2) ex_catstr2("vals_eset_var",num1,"es",num2)
00443                                                 /* values of edgeset variable*/
00444                                                 /*   num1 in edgeset num2    */
00445 #define DIM_NUM_FSET_VAR        "num_fset_var"  /* # of faceset variables    */
00446 #define VAR_NAME_FSET_VAR       "name_fset_var" /* names of faceset variables*/
00447 #define VAR_FS_VAR(num1,num2) ex_catstr2("vals_fset_var",num1,"fs",num2)
00448                                                 /* values of faceset variable*/
00449                                                 /*   num1 in faceset num2    */
00450 #define DIM_NUM_SSET_VAR        "num_sset_var"  /* # of sideset variables    */
00451 #define VAR_NAME_SSET_VAR       "name_sset_var" /* names of sideset variables*/
00452 #define VAR_SS_VAR(num1,num2) ex_catstr2("vals_sset_var",num1,"ss",num2)
00453                                                 /* values of sideset variable*/
00454                                                 /*   num1 in sideset num2    */
00455 #define DIM_NUM_ELSET_VAR       "num_elset_var" /* # of element set variables*/
00456 #define VAR_NAME_ELSET_VAR      "name_elset_var"/* names of elemset variables*/
00457 #define VAR_ELS_VAR(num1,num2) ex_catstr2("vals_elset_var",num1,"es",num2)
00458                                                 /* values of elemset variable*/
00459                                                 /*   num1 in elemset num2    */
00460 
00461 #define DIM_NUM_HIS_VAR         "num_his_var"   /* obsolete                  */
00462 #define VAR_NAME_HIS_VAR        "name_his_var"  /* obsolete                  */
00463 #define VAR_HIS_VAR             "vals_his_var"  /* obsolete                  */
00464 #define DIM_STR                 "len_string"    /* general dimension of      */
00465                                                 /*   length MAX_STR_LENGTH   */
00466                                                 /*   used for some string lengths   */
00467 #define DIM_STR_NAME            "len_name"      /* general dimension of      */
00468                                                 /*   length MAX_NAME_LENGTH  */
00469                                                 /*   used for name lengths   */
00470 #define DIM_LIN                 "len_line"      /* general dimension of      */
00471                                                 /*   length MAX_LINE_LENGTH  */
00472                                                 /*   used for long strings   */
00473 #define DIM_N4                  "four"          /* general dimension of      */
00474                                                 /*   length 4                */
00475 #define DIM_TIME                "time_step"     /* unlimited (expandable)    */
00476                                                 /*   dimension for time steps*/
00477 #define DIM_HTIME               "hist_time_step"/* obsolete                  */
00478 #define VAR_ELEM_NUM_MAP        "elem_num_map"  /* element numbering map     */
00479                                                 /* obsolete, replaced by     */
00480                                                 /* VAR_ELEM_MAP(num)         */
00481 #define VAR_FACE_NUM_MAP        "face_num_map"  /* face numbering map     */
00482                                                 /* obsolete, replaced by     */
00483                                                 /* VAR_FACE_MAP(num)         */
00484 #define VAR_EDGE_NUM_MAP        "edge_num_map"  /* edge numbering map     */
00485                                                 /* obsolete, replaced by     */
00486                                                 /* VAR_EDGE_MAP(num)         */
00487 #define VAR_NODE_NUM_MAP        "node_num_map"  /* node numbering map        */
00488                                                 /* obsolete, replaced by     */
00489                                                 /* VAR_NODE_MAP(num)         */
00490 #define DIM_NUM_EM              "num_elem_maps" /* # of element maps         */
00491 #define VAR_ELEM_MAP(num)       ex_catstr("elem_map",num)
00492                                                 /* the numth element map     */
00493 #define VAR_EM_PROP(num)        ex_catstr("em_prop",num)
00494                                                 /* list of the numth property*/
00495                                                 /*   for all element maps    */
00496 #define DIM_NUM_EDM             "num_edge_maps" /* # of edge maps            */
00497 #define VAR_EDGE_MAP(num)       ex_catstr("edge_map",num)
00498                                                 /* the numth edge map        */
00499 #define VAR_EDM_PROP(num)       ex_catstr("edm_prop",num)
00500                                                 /* list of the numth property*/
00501                                                 /*   for all edge maps       */
00502 #define DIM_NUM_FAM             "num_face_maps" /* # of face maps            */
00503 #define VAR_FACE_MAP(num)       ex_catstr("face_map",num)
00504                                                 /* the numth face map        */
00505 #define VAR_FAM_PROP(num)       ex_catstr("fam_prop",num)
00506                                                 /* list of the numth property*/
00507                                                 /*   for all face maps       */
00508 #define DIM_NUM_NM              "num_node_maps" /* # of node maps            */
00509 #define VAR_NODE_MAP(num)       ex_catstr("node_map",num)
00510                                                 /* the numth node map        */
00511 #define VAR_NM_PROP(num)        ex_catstr("nm_prop",num)
00512                                                 /* list of the numth property*/
00513                                                 /*   for all node maps       */
00514 
00515 #define DIM_NUM_CFRAMES  "num_cframes"
00516 #define DIM_NUM_CFRAME9  "num_cframes_9"
00517 #define VAR_FRAME_COORDS "frame_coordinates"
00518 #define VAR_FRAME_IDS    "frame_ids"
00519 #define VAR_FRAME_TAGS   "frame_tags"
00520 
00521 #define VAR_ELBLK_IDS_GLOBAL            "el_blk_ids_global"
00522 #define VAR_ELBLK_CNT_GLOBAL            "el_blk_cnt_global"
00523 #define VAR_NS_IDS_GLOBAL               "ns_ids_global"
00524 #define VAR_NS_NODE_CNT_GLOBAL          "ns_node_cnt_global"
00525 #define VAR_NS_DF_CNT_GLOBAL            "ns_df_cnt_global"
00526 #define VAR_SS_IDS_GLOBAL               "ss_ids_global"
00527 #define VAR_SS_SIDE_CNT_GLOBAL          "ss_side_cnt_global"
00528 #define VAR_SS_DF_CNT_GLOBAL            "ss_df_cnt_global"
00529 #define VAR_FILE_TYPE                   "nem_ftype"
00530 #define VAR_COMM_MAP                    "comm_map"
00531 #define VAR_NODE_MAP_INT                "node_mapi"
00532 #define VAR_NODE_MAP_INT_IDX            "node_mapi_idx"
00533 #define VAR_NODE_MAP_BOR                "node_mapb"
00534 #define VAR_NODE_MAP_BOR_IDX            "node_mapb_idx"
00535 #define VAR_NODE_MAP_EXT                "node_mape"
00536 #define VAR_NODE_MAP_EXT_IDX            "node_mape_idx"
00537 #define VAR_ELEM_MAP_INT                "elem_mapi"
00538 #define VAR_ELEM_MAP_INT_IDX            "elem_mapi_idx"
00539 #define VAR_ELEM_MAP_BOR                "elem_mapb"
00540 #define VAR_ELEM_MAP_BOR_IDX            "elem_mapb_idx"
00541 #define VAR_INT_N_STAT                  "int_n_stat"
00542 #define VAR_BOR_N_STAT                  "bor_n_stat"
00543 #define VAR_EXT_N_STAT                  "ext_n_stat"
00544 #define VAR_INT_E_STAT                  "int_e_stat"
00545 #define VAR_BOR_E_STAT                  "bor_e_stat"
00546 #define VAR_N_COMM_IDS                  "n_comm_ids"
00547 #define VAR_N_COMM_STAT                 "n_comm_stat"
00548 #define VAR_N_COMM_INFO_IDX             "n_comm_info_idx"
00549 #define VAR_E_COMM_IDS                  "e_comm_ids"
00550 #define VAR_E_COMM_STAT                 "e_comm_stat"
00551 #define VAR_E_COMM_INFO_IDX             "e_comm_info_idx"
00552 #define VAR_N_COMM_NIDS                 "n_comm_nids"
00553 #define VAR_N_COMM_PROC                 "n_comm_proc"
00554 #define VAR_N_COMM_DATA_IDX             "n_comm_data_idx"
00555 #define VAR_E_COMM_EIDS                 "e_comm_eids"
00556 #define VAR_E_COMM_SIDS                 "e_comm_sids"
00557 #define VAR_E_COMM_PROC                 "e_comm_proc"
00558 #define VAR_E_COMM_DATA_IDX             "e_comm_data_idx"
00559 
00560 #define DIM_NUM_INT_NODES               "num_int_node"
00561 #define DIM_NUM_BOR_NODES               "num_bor_node"
00562 #define DIM_NUM_EXT_NODES               "num_ext_node"
00563 #define DIM_NUM_INT_ELEMS               "num_int_elem"
00564 #define DIM_NUM_BOR_ELEMS               "num_bor_elem"
00565 #define DIM_NUM_PROCS                   "num_processors"
00566 #define DIM_NUM_PROCS_F                 "num_procs_file"
00567 #define DIM_NUM_NODES_GLOBAL            "num_nodes_global"
00568 #define DIM_NUM_ELEMS_GLOBAL            "num_elems_global"
00569 #define DIM_NUM_NS_GLOBAL               "num_ns_global"
00570 #define DIM_NUM_SS_GLOBAL               "num_ss_global"
00571 #define DIM_NUM_ELBLK_GLOBAL            "num_el_blk_global"
00572 #define DIM_NUM_N_CMAPS                 "num_n_cmaps"
00573 #define DIM_NUM_E_CMAPS                 "num_e_cmaps"
00574 #define DIM_NCNT_CMAP                   "ncnt_cmap"
00575 #define DIM_ECNT_CMAP                   "ecnt_cmap"
00576 
00577 enum ex_element_type {
00578   EX_EL_UNK         =  -1,     /**< unknown entity */
00579   EX_EL_NULL_ELEMENT=   0,     
00580   EX_EL_TRIANGLE    =   1,     /**< Triangle entity */
00581   EX_EL_QUAD        =   2,     /**< Quad entity */
00582   EX_EL_HEX         =   3,     /**< Hex entity */
00583   EX_EL_WEDGE       =   4,     /**< Wedge entity */
00584   EX_EL_TETRA       =   5,     /**< Tetra entity */
00585   EX_EL_TRUSS       =   6,     /**< Truss entity */
00586   EX_EL_BEAM        =   7,     /**< Beam entity */
00587   EX_EL_SHELL       =   8,     /**< Shell entity */
00588   EX_EL_SPHERE      =   9,     /**< Sphere entity */
00589   EX_EL_CIRCLE      =  10,     /**< Circle entity */
00590   EX_EL_TRISHELL    =  11,     /**< Triangular Shell entity */
00591   EX_EL_PYRAMID     =  12      /**< Pyramid entity */
00592 }; 
00593 typedef enum ex_element_type ex_element_type;
00594 
00595 enum ex_coordinate_frame_type {
00596   EX_CF_RECTANGULAR =   1,
00597   EX_CF_CYLINDRICAL =   2,
00598   EX_CF_SPHERICAL   =   3
00599 }; 
00600 typedef enum ex_coordinate_frame_type ex_coordinate_frame_type;
00601 
00602 /* Internal structure declarations */
00603 
00604 struct ex_file_item {
00605   int                   file_id;
00606   nc_type               netcdf_type_code;
00607   int                   int64_status;
00608   int                   maximum_name_length;
00609   unsigned int          compression_level:4;     /* 0 (disabled) to 9 (maximum) compression level; netcdf-4 only */
00610   unsigned int          user_compute_wordsize:1; /* 0 for 4 byte or 1 for 8 byte reals */
00611   unsigned int          shuffle:1;               /* 1 true, 0 false */                   
00612   unsigned int          file_type:2;             /* 0 - classic, 1 -- 64 bit classic, 2 --netcdf4,  3 --netcdf4 classic */
00613   unsigned int          is_parallel:1;            /* 1 true, 0 false */
00614   struct ex_file_item*     next;
00615 };
00616 
00617 struct elem_blk_parm
00618 {
00619   char elem_type[33];
00620   int64_t elem_blk_id;
00621   int64_t num_elem_in_blk;
00622   int num_nodes_per_elem;
00623   int num_sides;
00624   int num_nodes_per_side[6];
00625   int num_attr;
00626   int64_t elem_ctr;
00627   ex_element_type elem_type_val;
00628 };
00629 
00630 struct list_item {              /* for use with ex_get_file_item */
00631   int exo_id;
00632   int value;
00633   struct list_item* next;
00634 };
00635 
00636 struct obj_stats {
00637   int64_t *id_vals;
00638   int *stat_vals;
00639   long num;
00640   int exoid;
00641   int valid_ids;
00642   int valid_stat;
00643   struct obj_stats *next;
00644 };
00645 
00646 void  ex_iqsort(int v[], int iv[], int count );
00647 void  ex_iqsort64(int64_t v[], int64_t iv[], int64_t count );
00648 
00649 char* ex_catstr(const char*, int);
00650 char* ex_catstr2(const char*, int, const char*, int);
00651 char* ex_dim_num_entries_in_object(ex_entity_type, int);
00652 char* ex_dim_num_objects(ex_entity_type obj_type);
00653 char* ex_name_var_of_object( ex_entity_type, int, int );
00654 char* ex_name_of_map( ex_entity_type, int );
00655 
00656 int ex_conv_ini  (int exoid, int* comp_wordsize, int* io_wordsize, int file_wordsize, int int64_status, int is_parallel);
00657 void ex_conv_exit  (int exoid);
00658 
00659 nc_type nc_flt_code  (int exoid);
00660 int ex_comp_ws  (int exoid);
00661 int ex_get_cpu_ws(void);
00662 int ex_is_parallel(int exoid);
00663 
00664 struct list_item** ex_get_counter_list(ex_entity_type obj_type);
00665 int ex_get_file_item  (int, struct list_item**);
00666 int ex_inc_file_item  (int, struct list_item**);
00667 void ex_rm_file_item  (int, struct list_item**);
00668 
00669 extern struct obj_stats* exoII_eb;
00670 extern struct obj_stats* exoII_ed;
00671 extern struct obj_stats* exoII_fa;
00672 extern struct obj_stats* exoII_ns;
00673 extern struct obj_stats* exoII_es;
00674 extern struct obj_stats* exoII_fs;
00675 extern struct obj_stats* exoII_ss;
00676 extern struct obj_stats* exoII_els;
00677 extern struct obj_stats* exoII_em;
00678 extern struct obj_stats* exoII_edm;
00679 extern struct obj_stats* exoII_fam;
00680 extern struct obj_stats* exoII_nm;
00681 
00682 
00683 struct ex_file_item* ex_find_file_item(int exoid);
00684 struct ex_file_item* ex_add_file_item(int exoid);
00685 struct obj_stats *ex_get_stat_ptr  ( int exoid, struct obj_stats** obj_ptr);
00686 
00687 void ex_rm_stat_ptr  (int exoid, struct obj_stats** obj_ptr);
00688 
00689 void ex_compress_variable(int exoid, int varid, int type);
00690 int ex_id_lkup  (int exoid, ex_entity_type id_type, ex_entity_id num);
00691 int ex_check_file_type(const char *path, int *type);
00692 int ex_get_dimension(int exoid, const char *dimtype, const char *label,
00693        size_t *count, int *dimid, const char *routine);
00694 
00695 int ex_get_name_internal(int exoid, int varid, size_t index, char *name, int name_size, 
00696     ex_entity_type type, const char *routine);
00697 int ex_get_names_internal(int exoid, int varid, size_t count, char**names,
00698      ex_entity_type type, const char *routine);
00699 int ex_put_name_internal(int exoid, int varid, size_t index, const char *name,
00700      ex_entity_type type, const char *subtype, const char *routine);
00701 int ex_put_names_internal(int exoid, int varid, size_t count, char**names,
00702      ex_entity_type type, const char *subtype, const char *routine);
00703 void ex_trim_internal(char *name);
00704 void ex_update_max_name_length(int exoid, int length);
00705 int  ex_leavedef(int neid,   /* NemesisI file ID         */
00706    const char *func_name /* Name of calling function */
00707    );
00708 
00709 int ex_get_file_type(int neid, /* NetCDF/Exodus file ID */
00710        char *ftype /* Nemesis file type */
00711        );
00712 
00713 int ex_put_nemesis_version(int neid);  /* NetCDF/Exodus file ID */
00714 
00715 int ne_check_file_version(int neid /* NetCDF/Exodus file ID */
00716                       );
00717 
00718 char *ex_catstrn12(char *name, int num1, int num2);
00719 
00720 int ne_id_lkup(int            neid,  /* NetCDF/Exodus file ID */
00721         const char    *var_name, /* Nemesis variable name */
00722         int64_t       *idx,  /* index variable for variable, length 2 */
00723         ex_entity_id   ne_var_id /* NetCDF variable ID */
00724         );
00725 
00726   /**
00727    * For output databases, the maximum length of any entity, variable,
00728    * property, attribute, or coordinate name to be written (not
00729    * including the NULL terminator). If a name is longer than this
00730    * value, a warning message will be output to stderr and the name
00731    * will be truncated.  Must be set (via call to
00732    * 'ex_set_max_name_length(exoid, int len)' prior to calling ex_create.
00733    *
00734    * For input databases, the size of the name arrays that the client
00735    * code will be passing to API routines that retrieve names (not
00736    * including the NULL terminator). This defaults to 32 for
00737    * compatibility with older clients. The value used at the time of
00738    * creation of the database can be queried by ex_inquire with the
00739    * EX_INQ_DB_MAX_NAME_LENGTH argument. The current value for this
00740    * variable can be queried with EX_INQ_CUR_MAX_NAME_LENGTH argument.
00741    *
00742    * Note that this is a global setting for all databases. If you are
00743    * accessing multiple databases, they will all use the same value.
00744    */
00745   extern int ex_default_max_name_length; 
00746         
00747   void *ex_safe_free(void *array);
00748 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines