1 /* 2 * Copyright(C) 1999-2021 National Technology & Engineering Solutions 3 * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with 4 * NTESS, the U.S. Government retains certain rights in this software. 5 * 6 * See packages/seacas/LICENSE for details 7 */ 8 9 /***************************************************************************** 10 * 11 * exodusII.h - Exodus II API include file 12 * 13 *****************************************************************************/ 14 15 #ifndef EXODUSII_H 16 #define EXODUSII_H 17 18 #include "exodus_config.h" 19 #include "exodusII_cfg.h" 20 #include "vtk_exodusII_mangle.h" 21 22 #include "vtk_netcdf.h" 23 24 #if VTK_MODULE_USE_EXTERNAL_vtknetcdf 25 #if defined(NC_HAVE_META_H) 26 #include "netcdf_meta.h" 27 28 /* Bug in some versions of NetCDF where the netcdf_meta.h define of NC_HAS_SZIP_WRITE is bad */ 29 #if !defined(NC_HAS_SZIP_WRITE) 30 #define NC_HAS_SZIP_WRITE 0 31 #elif ~(~NC_HAS_SZIP_WRITE + 0) == 0 && ~(~NC_HAS_SZIP_WRITE + 1) == 1 32 #undef NC_HAS_SZIP_WRITE 33 #define NC_HAS_SZIP_WRITE 0 34 #endif 35 36 #if NC_HAS_PARALLEL 37 #ifndef PARALLEL_AWARE_EXODUS 38 #define PARALLEL_AWARE_EXODUS 39 #endif 40 #else 41 #ifdef PARALLEL_AWARE_EXODUS 42 #error "PARALLEL_AWARE_EXODUS defined, but NetCDF NC_HAS_PARALLEL is false" 43 #endif 44 #endif 45 #endif 46 #endif 47 48 #if defined(PARALLEL_AWARE_EXODUS) 49 #include "netcdf_par.h" 50 #endif 51 52 #include <stddef.h> 53 #include <stdint.h> 54 #include <stdlib.h> 55 56 #ifndef NC_INT64 57 #error "NetCDF version 4.1.2 or later is required." 58 #endif 59 60 /* EXODUS version number */ 61 #define EXODUS_VERSION "8.11" 62 #define EXODUS_VERSION_MAJOR 8 63 #define EXODUS_VERSION_MINOR 11 64 #define EXODUS_RELEASE_DATE "March 15, 2021" 65 66 #define EX_API_VERS 8.11f 67 #define EX_API_VERS_NODOT (100 * EXODUS_VERSION_MAJOR + EXODUS_VERSION_MINOR) 68 #define EX_VERS EX_API_VERS 69 70 /* Retained for backward compatibility */ 71 #define NEMESIS_API_VERSION EX_API_VERS 72 #define NEMESIS_API_VERSION_NODOT EX_API_VERS_NODOT 73 #define NEMESIS_FILE_VERSION 2.6 74 /* 75 * need following extern if this include file is used in a C++ 76 * program, to keep the C++ compiler from mangling the function names. 77 */ 78 #ifdef __cplusplus 79 extern "C" { 80 #endif 81 82 /* 83 * The following are miscellaneous constants used in the EXODUS 84 * API. They should already be defined, but are left over from the 85 * old days... 86 */ 87 #ifndef EX_TRUE 88 #define EX_TRUE -1 89 #endif 90 91 #ifndef EX_FALSE 92 #define EX_FALSE 0 93 #endif 94 95 /** 96 * \defgroup FileVars Variables controlling the file creation mode. 97 *@{ 98 */ 99 /* Modes for ex_open */ 100 #define EX_WRITE 0x0001 /**< ex_open(): open existing file for appending. */ 101 #define EX_READ 0x0002 /**< ex_open(): open file for reading (default) */ 102 103 #define EX_NOCLOBBER 0x0004 /**< Don't overwrite existing database, default */ 104 #define EX_CLOBBER 0x0008 /**< Overwrite existing database if it exists */ 105 #define EX_NORMAL_MODEL 0x0010 /**< disable mods that permit storage of larger models */ 106 #define EX_64BIT_OFFSET 0x0020 /**< enable mods that permit storage of larger models */ 107 #define EX_LARGE_MODEL EX_64BIT_OFFSET /**< enable mods that permit storage of larger models */ 108 #define EX_64BIT_DATA 0x400000 /**< CDF-5 format: classic model but 64 bit dimensions and sizes */ 109 #define EX_NETCDF4 0x0040 /**< use the hdf5-based netcdf4 output */ 110 #define EX_NOSHARE 0x0080 /**< Do not open netcdf file in "share" mode */ 111 #define EX_SHARE 0x0100 /**< Do open netcdf file in "share" mode */ 112 #define EX_NOCLASSIC 0x0200 /**< Do not force netcdf to classic mode in netcdf4 mode */ 113 114 #define EX_DISKLESS 0x100000 /**< Experimental */ 115 #define EX_MMAP 0x200000 /**< Experimental */ 116 117 /* Need to distinguish between storage on database (DB in name) and 118 passed through the API functions (API in name). 119 */ 120 #define EX_MAPS_INT64_DB 0x0400 /**< All maps (id, order, ...) store int64_t values */ 121 #define EX_IDS_INT64_DB 0x0800 /**< All entity ids (sets, blocks, maps) are int64_t values */ 122 #define EX_BULK_INT64_DB \ 123 0x1000 /**< All integer bulk data (local indices, counts, maps); not ids \ 124 */ 125 #define EX_ALL_INT64_DB \ 126 (EX_MAPS_INT64_DB | EX_IDS_INT64_DB | EX_BULK_INT64_DB) /**< All of the above... */ 127 128 #define EX_MAPS_INT64_API 0x2000 /**< All maps (id, order, ...) store int64_t values */ 129 #define EX_IDS_INT64_API 0x4000 /**< All entity ids (sets, blocks, maps) are int64_t values */ 130 #define EX_BULK_INT64_API \ 131 0x8000 /**< All integer bulk data (local indices, counts, maps); not ids */ 132 #define EX_INQ_INT64_API 0x10000 /**< Integers passed to/from ex_inquire() are int64_t */ 133 #define EX_ALL_INT64_API \ 134 (EX_MAPS_INT64_API | EX_IDS_INT64_API | EX_BULK_INT64_API | \ 135 EX_INQ_INT64_API) /**< All of the above... */ 136 137 /* Parallel IO mode flags... */ 138 #define EX_MPIIO 0x20000 139 #define EX_MPIPOSIX 0x40000 /**< \deprecated As of libhdf5 1.8.13. */ 140 #define EX_PNETCDF 0x80000 141 142 /** @}*/ 143 144 /*! \sa ex_inquire() All inquiries return an integer of the current database integer size unless 145 * otherwise noted. */ 146 enum ex_inquiry { 147 EX_INQ_FILE_TYPE = 1, /**< EXODUS file type (deprecated) */ 148 EX_INQ_API_VERS = 2, /**< API version number (float) */ 149 EX_INQ_DB_VERS = 3, /**< database version number (float) */ 150 EX_INQ_TITLE = 4, /**< database title. MAX_LINE_LENGTH+1 char* size */ 151 EX_INQ_DIM = 5, /**< number of dimensions */ 152 EX_INQ_NODES = 6, /**< number of nodes */ 153 EX_INQ_ELEM = 7, /**< number of elements */ 154 EX_INQ_ELEM_BLK = 8, /**< number of element blocks */ 155 EX_INQ_NODE_SETS = 9, /**< number of node sets*/ 156 EX_INQ_NS_NODE_LEN = 10, /**< length of node set node list */ 157 EX_INQ_SIDE_SETS = 11, /**< number of side sets*/ 158 EX_INQ_SS_NODE_LEN = 12, /**< length of side set node list */ 159 EX_INQ_SS_ELEM_LEN = 13, /**< length of side set element list */ 160 EX_INQ_QA = 14, /**< number of QA records */ 161 EX_INQ_INFO = 15, /**< number of info records */ 162 EX_INQ_TIME = 16, /**< number of time steps in the database */ 163 EX_INQ_EB_PROP = 17, /**< number of element block properties */ 164 EX_INQ_NS_PROP = 18, /**< number of node set properties */ 165 EX_INQ_SS_PROP = 19, /**< number of side set properties */ 166 EX_INQ_NS_DF_LEN = 20, /**< length of node set distribution factor list*/ 167 EX_INQ_SS_DF_LEN = 21, /**< length of side set distribution factor list*/ 168 EX_INQ_LIB_VERS = 22, /**< API Lib vers number (float) */ 169 EX_INQ_EM_PROP = 23, /**< number of element map properties */ 170 EX_INQ_NM_PROP = 24, /**< number of node map properties */ 171 EX_INQ_ELEM_MAP = 25, /**< number of element maps */ 172 EX_INQ_NODE_MAP = 26, /**< number of node maps*/ 173 EX_INQ_EDGE = 27, /**< number of edges */ 174 EX_INQ_EDGE_BLK = 28, /**< number of edge blocks */ 175 EX_INQ_EDGE_SETS = 29, /**< number of edge sets */ 176 EX_INQ_ES_LEN = 30, /**< length of concat edge set edge list */ 177 EX_INQ_ES_DF_LEN = 31, /**< length of concat edge set dist factor list*/ 178 EX_INQ_EDGE_PROP = 32, /**< number of properties stored per edge block */ 179 EX_INQ_ES_PROP = 33, /**< number of properties stored per edge set */ 180 EX_INQ_FACE = 34, /**< number of faces */ 181 EX_INQ_FACE_BLK = 35, /**< number of face blocks */ 182 EX_INQ_FACE_SETS = 36, /**< number of face sets */ 183 EX_INQ_FS_LEN = 37, /**< length of concat face set face list */ 184 EX_INQ_FS_DF_LEN = 38, /**< length of concat face set dist factor list*/ 185 EX_INQ_FACE_PROP = 39, /**< number of properties stored per face block */ 186 EX_INQ_FS_PROP = 40, /**< number of properties stored per face set */ 187 EX_INQ_ELEM_SETS = 41, /**< number of element sets */ 188 EX_INQ_ELS_LEN = 42, /**< length of concat element set element list */ 189 EX_INQ_ELS_DF_LEN = 43, /**< length of concat element set dist factor list*/ 190 EX_INQ_ELS_PROP = 44, /**< number of properties stored per elem set */ 191 EX_INQ_EDGE_MAP = 45, /**< number of edge maps */ 192 EX_INQ_FACE_MAP = 46, /**< number of face maps */ 193 EX_INQ_COORD_FRAMES = 47, /**< number of coordinate frames */ 194 EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH = 48, /**< size of MAX_NAME_LENGTH dimension on database */ 195 EX_INQ_DB_MAX_USED_NAME_LENGTH = 49, /**< size of MAX_NAME_LENGTH dimension on database */ 196 EX_INQ_MAX_READ_NAME_LENGTH = 50, /**< client-specified max size of returned names */ 197 198 EX_INQ_DB_FLOAT_SIZE = 51, /**< size of floating-point values stored on database */ 199 EX_INQ_NUM_CHILD_GROUPS = 52, /**< number of groups contained in this (exoid) group */ 200 EX_INQ_GROUP_PARENT = 53, /**< id of parent of this (exoid) group; returns exoid if at root */ 201 EX_INQ_GROUP_ROOT = 202 54, /**< id of root group "/" of this (exoid) group; returns exoid if at root */ 203 EX_INQ_GROUP_NAME_LEN = 55, /**< length of name of group exoid */ 204 EX_INQ_GROUP_NAME = 205 56, /**< name of group exoid. "/" returned for root group (char* GROUP_NAME_LEN+1 size) */ 206 EX_INQ_FULL_GROUP_NAME_LEN = 57, /**< length of full path name of this (exoid) group */ 207 EX_INQ_FULL_GROUP_NAME = 58, /**< full "/"-separated path name of this (exoid) group */ 208 EX_INQ_THREADSAFE = 59, /**< Returns 1 if library is thread-safe; 0 otherwise */ 209 EX_INQ_ASSEMBLY = 60, /**< number of assemblies */ 210 EX_INQ_BLOB = 61, /**< number of blobs */ 211 EX_INQ_NUM_NODE_VAR = 62, /**< number of nodal variables */ 212 EX_INQ_NUM_EDGE_BLOCK_VAR = 63, /**< number of edge block variables */ 213 EX_INQ_NUM_FACE_BLOCK_VAR = 64, /**< number of face block variables */ 214 EX_INQ_NUM_ELEM_BLOCK_VAR = 65, /**< number of element block variables */ 215 EX_INQ_NUM_NODE_SET_VAR = 66, /**< number of node set variables */ 216 EX_INQ_NUM_EDGE_SET_VAR = 67, /**< number of edge set variables */ 217 EX_INQ_NUM_FACE_SET_VAR = 68, /**< number of face set variables */ 218 EX_INQ_NUM_ELEM_SET_VAR = 69, /**< number of element set variables */ 219 EX_INQ_NUM_SIDE_SET_VAR = 70, /**< number of sideset variables */ 220 EX_INQ_NUM_GLOBAL_VAR = 71, /**< number of global variables */ 221 EX_INQ_INVALID = -1 222 }; 223 224 typedef enum ex_inquiry ex_inquiry; 225 226 /* Options */ 227 /** 228 * \defgroup FileOptions Variables controlling the compression, name size, and integer size. 229 *@{ 230 */ 231 /*! Modes for ex_set_option() 232 233 The compression-related options are only available on netcdf-4 files 234 since the underlying hdf5 compression functionality is used for the 235 implementation. The compression level indicates how much effort should 236 be expended in the compression and the computational expense increases 237 with higher levels; in many cases, a compression level of 1 is 238 sufficient. 239 240 SZIP-based compression is typically faster than ZLIB, but may not 241 be as widely available as ZLIB. SZIP is also only supported in 242 NetCDF-4.?.? and later 243 */ 244 245 enum ex_option_type { 246 EX_OPT_MAX_NAME_LENGTH = 247 1, /**< Maximum length of names that will be returned/passed via api call. */ 248 EX_OPT_COMPRESSION_TYPE, /**< Not currently used; default is gzip */ 249 EX_OPT_COMPRESSION_LEVEL, /**< In the range [0..9]. A value of 0 indicates no compression */ 250 EX_OPT_COMPRESSION_SHUFFLE, /**< 1 if enabled, 0 if disabled */ 251 EX_OPT_INTEGER_SIZE_API, /**< 4 or 8 indicating byte size of integers used in api functions. */ 252 EX_OPT_INTEGER_SIZE_DB, /**< Query only, returns 4 or 8 indicating byte size of integers stored 253 on the database. */ 254 }; 255 typedef enum ex_option_type ex_option_type; 256 257 enum ex_compression_type { 258 EX_COMPRESS_ZLIB = 1, /**< Use ZLIB-based compression (if available) */ 259 EX_COMPRESS_GZIP = 1, /**< Same as ZLIB, but typical alias used */ 260 EX_COMPRESS_SZIP, /**< Use SZIP-based compression (if available) */ 261 }; 262 typedef enum ex_compression_type ex_compression_type; 263 /** @}*/ 264 265 enum ex_entity_type { 266 EX_NODAL = 14, /**< nodal "block" for variables*/ 267 EX_NODE_BLOCK = 14, /**< alias for EX_NODAL */ 268 EX_NODE_SET = 2, /**< node set property code */ 269 EX_EDGE_BLOCK = 6, /**< edge block property code */ 270 EX_EDGE_SET = 7, /**< edge set property code */ 271 EX_FACE_BLOCK = 8, /**< face block property code */ 272 EX_FACE_SET = 9, /**< face set property code */ 273 EX_ELEM_BLOCK = 1, /**< element block property code*/ 274 EX_ELEM_SET = 10, /**< face set property code */ 275 276 EX_SIDE_SET = 3, /**< side set property code */ 277 278 EX_ELEM_MAP = 4, /**< element map property code */ 279 EX_NODE_MAP = 5, /**< node map property code */ 280 EX_EDGE_MAP = 11, /**< edge map property code */ 281 EX_FACE_MAP = 12, /**< face map property code */ 282 283 EX_GLOBAL = 13, /**< global "block" for variables*/ 284 EX_COORDINATE = 15, /**< kluge so some internal wrapper functions work */ 285 EX_ASSEMBLY = 16, /**< assembly property code */ 286 EX_BLOB = 17, /**< blob property code */ 287 EX_INVALID = -1 288 }; 289 typedef enum ex_entity_type ex_entity_type; 290 291 /*! 292 * ex_opts() function codes - codes are OR'ed into exopts 293 */ 294 enum ex_options { 295 EX_DEFAULT = 0, 296 EX_VERBOSE = 1, /**< verbose mode message flag */ 297 EX_DEBUG = 2, /**< debug mode def */ 298 EX_ABORT = 4, /**< abort mode flag def */ 299 EX_NULLVERBOSE = 8 /**< verbose mode for null entity detection warning */ 300 }; 301 typedef enum ex_options ex_options; 302 303 /** The value used to indicate that an entity (block, nset, sset) 304 has not had its id set to a valid value 305 */ 306 #define EX_INVALID_ID -1 307 308 /** 309 * \defgroup StringLengths maximum string lengths; 310 * constants that are used as netcdf dimensions must be of type long 311 * @{ 312 */ 313 314 /** Maximum length of name permitted by NetCDF */ 315 #define EX_MAX_NAME NC_MAX_NAME 316 317 /** Maximum length of QA record, element type name */ 318 #define MAX_STR_LENGTH 32L 319 /** Default maximum length of an entity name, attribute name, variable name. 320 Can be changed via a call to ex_set_option() */ 321 #define MAX_NAME_LENGTH MAX_STR_LENGTH 322 323 /** Maximum length of the database title or an information record */ 324 #define MAX_LINE_LENGTH 80L 325 /** Maximum length of an error message passed to ex_err() function. Typically, internal use only */ 326 #define MAX_ERR_LENGTH 512 327 /** @} */ 328 329 /** Specifies that this argument is the id of an entity: element block, nodeset, sideset, ... */ 330 typedef int64_t ex_entity_id; 331 332 /** The mechanism for passing double/float and int/int64_t both use a 333 void*; to avoid some confusion as to whether a function takes an 334 integer or a float/double, the following typedef is used for the 335 integer argument 336 */ 337 typedef void void_int; 338 339 /** 340 * \defgroup APIStructs Structures used by external API functions. 341 * ex_put_init_ext(), ex_get_init_ext(), ex_get_block_param(), ex_put_block_param(), 342 * ex_get_block_params(), ex_put_block_params(), ex_put_concat_all_blocks(), 343 * ex_put_concat_sets(), ex_get_concat_sets(), ex_put_sets(), ex_get_sets() 344 * @{ 345 */ 346 typedef struct ex_init_params 347 { 348 char title[MAX_LINE_LENGTH + 1]; 349 int64_t num_dim; 350 int64_t num_nodes; 351 int64_t num_edge; 352 int64_t num_edge_blk; 353 int64_t num_face; 354 int64_t num_face_blk; 355 int64_t num_elem; 356 int64_t num_elem_blk; 357 int64_t num_node_sets; 358 int64_t num_edge_sets; 359 int64_t num_face_sets; 360 int64_t num_side_sets; 361 int64_t num_elem_sets; 362 int64_t num_node_maps; 363 int64_t num_edge_maps; 364 int64_t num_face_maps; 365 int64_t num_elem_maps; 366 int64_t num_assembly; 367 int64_t num_blob; 368 } ex_init_params; 369 370 enum ex_type { EX_INTEGER = NC_INT, EX_DOUBLE = NC_DOUBLE, EX_CHAR = NC_CHAR }; 371 372 typedef enum ex_type ex_type; 373 374 typedef struct ex_attribute 375 { 376 ex_entity_type entity_type; 377 int64_t entity_id; 378 char name[NC_MAX_NAME]; 379 ex_type type; /* int, double, text */ 380 size_t value_count; 381 void * values; /* not accessed if NULL */ 382 } ex_attribute; 383 384 typedef struct ex_blob 385 { 386 int64_t id; 387 char * name; 388 int64_t num_entry; 389 } ex_blob; 390 391 typedef struct ex_assembly 392 { 393 int64_t id; 394 char * name; 395 ex_entity_type type; /* EX_ELEM_BLOCK or EX_ASSEMBLY */ 396 int entity_count; 397 int64_t * entity_list; 398 } ex_assembly; 399 400 typedef struct ex_block 401 { 402 int64_t id; 403 ex_entity_type type; 404 char topology[MAX_STR_LENGTH + 1]; 405 int64_t num_entry; 406 int64_t num_nodes_per_entry; 407 int64_t num_edges_per_entry; 408 int64_t num_faces_per_entry; 409 int64_t num_attribute; 410 } ex_block; 411 412 typedef struct ex_set 413 { 414 int64_t id; 415 ex_entity_type type; 416 int64_t num_entry; 417 int64_t num_distribution_factor; 418 void_int * entry_list; 419 void_int * extra_list; 420 void * distribution_factor_list; 421 } ex_set; 422 423 typedef struct ex_block_params 424 { 425 void_int *edge_blk_id; 426 char ** edge_type; 427 int * num_edge_this_blk; 428 int * num_nodes_per_edge; 429 int * num_attr_edge; 430 void_int *face_blk_id; 431 char ** face_type; 432 int * num_face_this_blk; 433 int * num_nodes_per_face; 434 int * num_attr_face; 435 void_int *elem_blk_id; 436 char ** elem_type; 437 int * num_elem_this_blk; 438 int * num_nodes_per_elem; 439 int * num_edges_per_elem; 440 int * num_faces_per_elem; 441 int * num_attr_elem; 442 int define_maps; 443 } ex_block_params; 444 445 typedef struct ex_set_specs 446 { 447 void_int *sets_ids; 448 void_int *num_entries_per_set; 449 void_int *num_dist_per_set; 450 void_int *sets_entry_index; 451 void_int *sets_dist_index; 452 void_int *sets_entry_list; 453 void_int *sets_extra_list; 454 void * sets_dist_fact; 455 } ex_set_specs; 456 457 typedef struct ex_var_params 458 { 459 int num_glob; 460 int num_node; 461 int num_edge; 462 int num_face; 463 int num_elem; 464 int num_nset; 465 int num_eset; 466 int num_fset; 467 int num_sset; 468 int num_elset; 469 int *edge_var_tab; 470 int *face_var_tab; 471 int *elem_var_tab; 472 int *nset_var_tab; 473 int *eset_var_tab; 474 int *fset_var_tab; 475 int *sset_var_tab; 476 int *elset_var_tab; 477 } ex_var_params; 478 /** @} */ 479 480 #ifndef EXODUS_EXPORT 481 #define EXODUS_EXPORT extern 482 #endif /* EXODUS_EXPORT */ 483 484 /*! 485 * \addtogroup Utilities 486 * @{ 487 */ 488 /* routines for file initialization i/o */ 489 EXODUS_EXPORT int ex_close(int exoid); 490 491 EXODUS_EXPORT int ex_copy(int in_exoid, int out_exoid); 492 EXODUS_EXPORT int ex_copy_transient(int in_exoid, int out_exoid); 493 494 #define ex_create(path, mode, comp_ws, io_ws) \ 495 ex_create_int(path, mode, comp_ws, io_ws, EX_API_VERS_NODOT) 496 497 EXODUS_EXPORT int ex_create_int(const char *path, int cmode, int *comp_ws, int *io_ws, 498 int run_version); 499 500 #define ex_open(path, mode, comp_ws, io_ws, version) \ 501 ex_open_int(path, mode, comp_ws, io_ws, version, EX_API_VERS_NODOT) 502 503 EXODUS_EXPORT int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *version, 504 int run_version); 505 506 #if defined(PARALLEL_AWARE_EXODUS) 507 #define ex_create_par(path, mode, comp_ws, io_ws, comm, info) \ 508 ex_create_par_int(path, mode, comp_ws, io_ws, comm, info, EX_API_VERS_NODOT) 509 510 EXODUS_EXPORT int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, 511 MPI_Comm comm, MPI_Info info, int my_version); 512 513 #define ex_open_par(path, mode, comp_ws, io_ws, version, comm, info) \ 514 ex_open_par_int(path, mode, comp_ws, io_ws, version, comm, info, EX_API_VERS_NODOT) 515 516 EXODUS_EXPORT int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, 517 float *version, MPI_Comm comm, MPI_Info info, int my_version); 518 #endif 519 520 EXODUS_EXPORT int ex_get_group_id(int parent_id, const char *group_name, int *group_id); 521 522 EXODUS_EXPORT int ex_get_group_ids(int parent_id, int *num_groups, int *group_ids); 523 524 EXODUS_EXPORT int ex_get_info(int exoid, char **info); 525 526 EXODUS_EXPORT int ex_get_qa(int exoid, char *qa_record[][4]); 527 528 EXODUS_EXPORT int ex_put_info(int exoid, int num_info, char *info[]); 529 530 EXODUS_EXPORT int ex_put_qa(int exoid, int num_qa_records, char *qa_record[][4]); 531 532 EXODUS_EXPORT int ex_update(int exoid); 533 EXODUS_EXPORT int ex_get_num_props(int exoid, ex_entity_type obj_type); 534 EXODUS_EXPORT int ex_large_model(int exoid); 535 EXODUS_EXPORT size_t ex_header_size(int exoid); 536 537 EXODUS_EXPORT void ex_err(const char *module_name, const char *message, int err_num); 538 EXODUS_EXPORT void ex_err_fn(int exoid, const char *module_name, const char *message, int err_num); 539 EXODUS_EXPORT void ex_set_err(const char *module_name, const char *message, int err_num); 540 EXODUS_EXPORT const char *ex_strerror(int err_num); 541 EXODUS_EXPORT void ex_get_err(const char **msg, const char **func, int *err_num); 542 EXODUS_EXPORT int ex_opts(int options); 543 EXODUS_EXPORT int ex_inquire(int exoid, ex_inquiry req_info, void_int * /*ret_int*/, 544 float * /*ret_float*/, char * /*ret_char*/); 545 EXODUS_EXPORT int64_t ex_inquire_int(int exoid, ex_inquiry req_info); 546 EXODUS_EXPORT int ex_int64_status(int exoid); 547 EXODUS_EXPORT int ex_set_int64_status(int exoid, int mode); 548 549 EXODUS_EXPORT void ex_print_config(void); 550 EXODUS_EXPORT const char *ex_config(void); 551 552 EXODUS_EXPORT int ex_set_max_name_length(int exoid, int length); 553 554 EXODUS_EXPORT int ex_set_option(int exoid, ex_option_type option, int option_value); 555 556 EXODUS_EXPORT int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, 557 void_int *num_nodes_per_set, void_int *side_sets_elem_index, 558 void_int *side_sets_node_index, 559 void_int *side_sets_elem_list, 560 void_int *side_sets_node_list, 561 void_int *side_sets_side_list); 562 /*! @} */ 563 564 /*! 565 * \addtogroup ResultsData 566 * @{ 567 */ 568 569 EXODUS_EXPORT int ex_get_time(int exoid, int time_step, void *time_value); 570 571 EXODUS_EXPORT int ex_get_variable_names(int exoid, ex_entity_type obj_type, int num_vars, 572 char *var_names[]); 573 EXODUS_EXPORT int ex_get_variable_name(int exoid, ex_entity_type obj_type, int var_num, 574 char *var_name); 575 576 EXODUS_EXPORT int ex_get_variable_param(int exoid, ex_entity_type obj_type, int *num_vars); 577 578 EXODUS_EXPORT int ex_get_reduction_variable_names(int exoid, ex_entity_type obj_type, int num_vars, 579 char *var_names[]); 580 EXODUS_EXPORT int ex_get_reduction_variable_name(int exoid, ex_entity_type obj_type, int var_num, 581 char *var_name); 582 583 EXODUS_EXPORT int ex_get_reduction_variable_param(int exoid, ex_entity_type obj_type, 584 int *num_vars); 585 586 EXODUS_EXPORT int ex_get_object_truth_vector(int exoid, ex_entity_type obj_type, 587 ex_entity_id entity_id, int num_var, int *var_vec); 588 589 EXODUS_EXPORT int ex_get_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_var, 590 int *var_tab); 591 592 EXODUS_EXPORT int ex_put_all_var_param(int exoid, int num_g, int num_n, int num_e, 593 int *elem_var_tab, int num_m, int *nset_var_tab, int num_s, 594 int *sset_var_tab); 595 596 EXODUS_EXPORT int ex_put_time(int exoid, int time_step, const void *time_value); 597 598 EXODUS_EXPORT int ex_get_all_times(int exoid, void *time_values); 599 600 EXODUS_EXPORT int ex_put_variable_name(int exoid, ex_entity_type obj_type, int var_num, 601 const char *var_name); 602 603 EXODUS_EXPORT int ex_put_variable_names(int exoid, ex_entity_type obj_type, int num_vars, 604 char *var_names[]); 605 606 EXODUS_EXPORT int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars); 607 608 EXODUS_EXPORT int ex_put_reduction_variable_name(int exoid, ex_entity_type obj_type, int var_num, 609 const char *var_name); 610 611 EXODUS_EXPORT int ex_put_reduction_variable_names(int exoid, ex_entity_type obj_type, int num_vars, 612 char *var_names[]); 613 614 EXODUS_EXPORT int ex_put_reduction_variable_param(int exoid, ex_entity_type obj_type, int num_vars); 615 616 EXODUS_EXPORT int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_var, 617 int *var_tab); 618 619 /* (MODIFIED) Write All Results Variables Parameters */ 620 EXODUS_EXPORT int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp); 621 622 /* Write Edge Face or Element Variable Values on Blocks or Sets at a Time Step */ 623 EXODUS_EXPORT int ex_put_var(int exoid, int time_step, ex_entity_type var_type, int var_index, 624 ex_entity_id obj_id, int64_t num_entries_this_obj, 625 const void *var_vals); 626 627 /* Write Partial Edge Face or Element Variable Values on Blocks or Sets at a Time Step */ 628 EXODUS_EXPORT int ex_put_partial_var(int exoid, int time_step, ex_entity_type var_type, 629 int var_index, ex_entity_id obj_id, int64_t start_index, 630 int64_t num_entities, const void *var_vals); 631 632 /* Write Edge Face or Element Reduction Variable Values on Blocks or Sets at a Time Step */ 633 EXODUS_EXPORT int ex_put_reduction_vars(int exoid, int time_step, ex_entity_type obj_type, 634 ex_entity_id obj_id, int64_t num_variables, 635 const void *var_vals); 636 637 /* Read Edge Face or Element Variable Values Defined On Blocks or Sets at a Time Step */ 638 EXODUS_EXPORT int ex_get_var(int exoid, int time_step, ex_entity_type var_type, int var_index, 639 ex_entity_id obj_id, int64_t num_entry_this_obj, void *var_vals); 640 641 EXODUS_EXPORT int ex_get_partial_var(int exoid, int time_step, ex_entity_type var_type, 642 int var_index, ex_entity_id obj_id, int64_t start_index, 643 int64_t num_entities, void *var_vals); 644 645 /* Read Edge Face or Element Reduction Variable Values Defined On Blocks or Sets at a Time Step */ 646 EXODUS_EXPORT int ex_get_reduction_vars(int exoid, int time_step, ex_entity_type obj_type, 647 ex_entity_id obj_id, int64_t num_variables, void *var_vals); 648 649 /* Read Edge Face or Element Variable Values Defined On Blocks or Sets Through Time */ 650 EXODUS_EXPORT int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, int64_t id, 651 int beg_time_step, int end_time_step, void *var_vals); 652 653 /*! @} */ 654 655 /* ======================================================================== 656 Functions pulled from nemesis library and incorporated into exodus... 657 */ 658 /*============================================================================= 659 * Initial Information Routines 660 *===========================================================================*/ 661 EXODUS_EXPORT int ex_get_init_info(int exoid, /* NemesisI file ID */ 662 int * num_proc, /* Number of processors */ 663 int * num_proc_in_f, /* Number of procs in this file */ 664 char *ftype); 665 666 EXODUS_EXPORT int ex_put_init_info(int exoid, /* NemesisI file ID */ 667 int num_proc, /* Number of processors */ 668 int num_proc_in_f, /* Number of procs in this file */ 669 char *ftype); 670 671 EXODUS_EXPORT int ex_get_init_global(int exoid, /* NemesisI file ID */ 672 void_int *num_nodes_g, /* Number of global FEM nodes */ 673 void_int *num_elems_g, /* Number of global FEM elements */ 674 void_int *num_elem_blks_g, /* Number of global elem blocks */ 675 void_int *num_node_sets_g, /* Number of global node sets */ 676 void_int *num_side_sets_g /* Number of global side sets */ 677 ); 678 EXODUS_EXPORT int ex_put_init_global(int exoid, /* NemesisI file ID */ 679 int64_t num_nodes_g, /* Number of global FEM nodes */ 680 int64_t num_elems_g, /* Number of global FEM elements */ 681 int64_t num_elem_blks_g, /* Number of global elem blocks */ 682 int64_t num_node_sets_g, /* Number of global node sets */ 683 int64_t num_side_sets_g /* Number of global side sets */ 684 ); 685 686 /*============================================================================= 687 * Loadbalance Parameter Routines 688 *===========================================================================*/ 689 EXODUS_EXPORT int ex_get_loadbal_param(int exoid, /* NetCDF/Exodus file ID */ 690 void_int *num_int_nodes, /* Number of internal FEM nodes */ 691 void_int *num_bor_nodes, /* Number of border FEM nodes */ 692 void_int *num_ext_nodes, /* Number of external FEM nodes */ 693 void_int *num_int_elems, /* Number of internal FEM elems */ 694 void_int *num_bor_elems, /* Number of border FEM elems */ 695 void_int *num_node_cmaps, /* Number of nodal comm maps */ 696 void_int *num_elem_cmaps, /* Number of elemental comm maps */ 697 int processor /* Processor ID */ 698 ); 699 700 EXODUS_EXPORT int ex_put_loadbal_param(int exoid, /* NemesisI file ID */ 701 int64_t num_int_nodes, /* Number of internal FEM nodes */ 702 int64_t num_bor_nodes, /* Number of border FEM nodes */ 703 int64_t num_ext_nodes, /* Number of external FEM nodes */ 704 int64_t num_int_elems, /* Number of internal FEM elems */ 705 int64_t num_bor_elems, /* Number of border FEM elems */ 706 int64_t num_node_cmaps, /* Number of nodal comm maps */ 707 int64_t num_elem_cmaps, /* Number of elemental comm maps */ 708 int processor /* Processor ID */ 709 ); 710 711 EXODUS_EXPORT int ex_put_loadbal_param_cc(int exoid, /* NetCDF/Exodus file ID */ 712 void_int *num_int_nodes, /* Number of internal node IDs */ 713 void_int *num_bor_nodes, /* Number of border node IDs */ 714 void_int *num_ext_nodes, /* Number of external node IDs */ 715 void_int *num_int_elems, /* Number of internal elem IDs */ 716 void_int *num_bor_elems, /* Number of border elem IDs */ 717 void_int *num_node_cmaps, /* Number of nodal comm maps */ 718 void_int *num_elem_cmaps /* Number of elem comm maps */ 719 ); 720 721 /* Utility function to replace strncpy, strcpy -- guarantee null termination */ 722 char *ex_copy_string(char *dest, char const *source, size_t elements); 723 724 /*! 725 * \addtogroup ModelDescription 726 * @{ 727 */ 728 EXODUS_EXPORT int ex_create_group(int parent_id, const char *group_name); 729 730 EXODUS_EXPORT int ex_get_coord_names(int exoid, char **coord_names); 731 732 EXODUS_EXPORT int ex_get_coord(int exoid, void *x_coor, void *y_coor, void *z_coor); 733 734 EXODUS_EXPORT int ex_get_partial_coord_component(int exoid, int64_t start_node_num, 735 int64_t num_nodes, int component, void *coor); 736 737 EXODUS_EXPORT int ex_get_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, 738 void *x_coor, void *y_coor, void *z_coor); 739 740 EXODUS_EXPORT int ex_get_ids(int exoid, ex_entity_type obj_type, void_int *ids); 741 742 EXODUS_EXPORT int ex_get_coordinate_frames(int exoid, int *nframes, void_int *cf_ids, 743 void *pt_coordinates, char *tags); 744 745 EXODUS_EXPORT int ex_put_init_ext(int exoid, const ex_init_params *model); 746 747 EXODUS_EXPORT int ex_get_init_ext(int exoid, ex_init_params *info); 748 749 EXODUS_EXPORT int ex_get_init(int exoid, char *title, void_int *num_dim, void_int *num_nodes, 750 void_int *num_elem, void_int *num_elem_blk, void_int *num_node_sets, 751 void_int *num_side_sets); 752 753 EXODUS_EXPORT int ex_put_init(int exoid, const char *title, int64_t num_dim, int64_t num_nodes, 754 int64_t num_elem, int64_t num_elem_blk, int64_t num_node_sets, 755 int64_t num_side_sets); 756 757 EXODUS_EXPORT int ex_get_map(int exoid, void_int *elem_map); 758 759 EXODUS_EXPORT int ex_get_map_param(int exoid, int *num_node_maps, int *num_elem_maps); 760 761 EXODUS_EXPORT int ex_get_name(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, 762 char *name); 763 764 EXODUS_EXPORT int ex_get_names(int exoid, ex_entity_type obj_type, char **names); 765 766 EXODUS_EXPORT int ex_get_prop_array(int exoid, ex_entity_type obj_type, const char *prop_name, 767 void_int *values); 768 769 EXODUS_EXPORT int ex_get_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 770 const char *prop_name, void_int *value); 771 772 EXODUS_EXPORT int ex_get_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, 773 int64_t ent_start, int64_t ent_count, void_int *map); 774 775 EXODUS_EXPORT int ex_get_prop_names(int exoid, ex_entity_type obj_type, char **prop_names); 776 777 EXODUS_EXPORT int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 778 int64_t num_attr_per_entry); 779 780 EXODUS_EXPORT int ex_put_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 781 int num_attrs); 782 783 EXODUS_EXPORT int ex_get_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 784 int *num_attrs); 785 786 EXODUS_EXPORT int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, 787 char *elem_type[], const void_int *num_elem_this_blk, 788 const void_int *num_nodes_per_elem, 789 const void_int *num_attr_this_blk, int define_maps); 790 791 EXODUS_EXPORT int ex_put_coord_names(int exoid, char *coord_names[]); 792 793 EXODUS_EXPORT int ex_put_coord(int exoid, const void *x_coor, const void *y_coor, 794 const void *z_coor); 795 796 EXODUS_EXPORT int ex_put_partial_coord_component(int exoid, int64_t start_node_num, 797 int64_t num_nodes, int component, 798 const void *coor); 799 800 EXODUS_EXPORT int ex_put_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, 801 const void *x_coor, const void *y_coor, const void *z_coor); 802 803 EXODUS_EXPORT int ex_put_map(int exoid, const void_int *elem_map); 804 805 EXODUS_EXPORT int ex_put_id_map(int exoid, ex_entity_type map_type, const void_int *map); 806 807 EXODUS_EXPORT int ex_put_partial_id_map(int exoid, ex_entity_type map_type, 808 int64_t start_entity_num, int64_t num_entities, 809 const void_int *map); 810 811 EXODUS_EXPORT int ex_get_id_map(int exoid, ex_entity_type map_type, void_int *map); 812 813 EXODUS_EXPORT int ex_get_partial_id_map(int exoid, ex_entity_type map_type, 814 int64_t start_entity_num, int64_t num_entities, 815 void_int *map); 816 817 EXODUS_EXPORT int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids, 818 void *pt_coordinates, const char *tags); 819 820 EXODUS_EXPORT int ex_put_map_param(int exoid, int num_node_maps, int num_elem_maps); 821 822 EXODUS_EXPORT int ex_put_name(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, 823 const char *name); 824 825 EXODUS_EXPORT int ex_put_names(int exoid, ex_entity_type obj_type, char *names[]); 826 827 EXODUS_EXPORT int ex_put_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 828 int64_t start_num, int64_t num_ent, int attrib_index, 829 const void *attrib); 830 831 EXODUS_EXPORT int ex_put_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 832 const char *prop_name, ex_entity_id value); 833 834 EXODUS_EXPORT int ex_put_prop_array(int exoid, ex_entity_type obj_type, const char *prop_name, 835 const void_int *values); 836 837 EXODUS_EXPORT int ex_put_prop_names(int exoid, ex_entity_type obj_type, int num_props, 838 char **prop_names); 839 840 /* Write Node Edge Face or Element Number Map */ 841 EXODUS_EXPORT int ex_put_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, 842 const void_int *map); 843 844 /* Read Number Map */ 845 EXODUS_EXPORT int ex_get_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, 846 void_int *map); 847 848 /* Write Edge Face or Element Block Parameters */ 849 EXODUS_EXPORT int ex_put_block(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, 850 const char *entry_descrip, int64_t num_entries_this_blk, 851 int64_t num_nodes_per_entry, int64_t num_edges_per_entry, 852 int64_t num_faces_per_entry, int64_t num_attr_per_entry); 853 854 EXODUS_EXPORT int ex_get_block(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, 855 char *elem_type, void_int *num_entries_this_blk, 856 void_int *num_nodes_per_entry, void_int *num_edges_per_entry, 857 void_int *num_faces_per_entry, void_int *num_attr_per_entry); 858 859 /* Read Edge Face or Element Block Parameters */ 860 EXODUS_EXPORT int ex_get_block_param(int exoid, ex_block *block); 861 862 EXODUS_EXPORT int ex_put_block_param(int exoid, const ex_block block); 863 864 EXODUS_EXPORT int ex_get_block_params(int exoid, size_t block_count, struct ex_block **blocks); 865 866 EXODUS_EXPORT int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *blocks); 867 868 /* Write All Edge Face and Element Block Parameters */ 869 EXODUS_EXPORT int ex_put_concat_all_blocks(int exoid, const ex_block_params *param); 870 871 EXODUS_EXPORT int ex_put_entity_count_per_polyhedra(int exoid, ex_entity_type blk_type, 872 ex_entity_id blk_id, const int *entity_counts); 873 874 EXODUS_EXPORT int ex_get_entity_count_per_polyhedra(int exoid, ex_entity_type blk_type, 875 ex_entity_id blk_id, int *entity_counts); 876 877 /* Write Edge Face or Element Block Connectivity */ 878 EXODUS_EXPORT int ex_put_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, 879 const void_int *node_conn, const void_int *elem_edge_conn, 880 const void_int *elem_face_conn); 881 882 /* Read Edge Face or Element Block Connectivity */ 883 EXODUS_EXPORT int ex_get_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, 884 void_int *nodeconn, void_int *edgeconn, void_int *faceconn); 885 886 EXODUS_EXPORT int ex_get_partial_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, 887 int64_t start_num, int64_t num_ent, void_int *nodeconn, 888 void_int *edgeconn, void_int *faceconn); 889 890 EXODUS_EXPORT int ex_put_partial_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, 891 int64_t start_num, int64_t num_ent, const void_int *nodeconn, 892 const void_int *edgeconn, const void_int *faceconn); 893 894 /* Write Edge Face or Element Block Attributes */ 895 EXODUS_EXPORT int ex_put_attr(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, 896 const void *attrib); 897 898 EXODUS_EXPORT int ex_put_partial_attr(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, 899 int64_t start_entity, int64_t num_entity, const void *attrib); 900 901 /* Read Edge Face or Element Block Attributes */ 902 EXODUS_EXPORT int ex_get_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 903 void *attrib); 904 905 EXODUS_EXPORT int ex_get_partial_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 906 int64_t start_num, int64_t num_ent, void *attrib); 907 908 /* Write One Edge Face or Element Block Attribute */ 909 EXODUS_EXPORT int ex_put_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 910 int attrib_index, const void *attrib); 911 912 /* Read One Edge Face or Element Block Attribute */ 913 EXODUS_EXPORT int ex_get_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 914 int attrib_index, void *attrib); 915 916 EXODUS_EXPORT int ex_get_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 917 int64_t start_num, int64_t num_ent, int attrib_index, 918 void *attrib); 919 920 /* Write Edge Face or Element Block Attribute Names */ 921 EXODUS_EXPORT int ex_put_attr_names(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, 922 char **names); 923 924 /* Read Edge Face or Element Block Attribute Names */ 925 EXODUS_EXPORT int ex_get_attr_names(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, 926 char **names); 927 928 EXODUS_EXPORT int ex_put_assembly(int exoid, const struct ex_assembly assembly); 929 EXODUS_EXPORT int ex_get_assembly(int exoid, struct ex_assembly *assembly); 930 931 EXODUS_EXPORT int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assemblies); 932 EXODUS_EXPORT int ex_get_assemblies(int exoid, struct ex_assembly *assemblies); 933 934 EXODUS_EXPORT int ex_put_blob(int exoid, const struct ex_blob blob); 935 EXODUS_EXPORT int ex_get_blob(int exoid, struct ex_blob *blob); 936 937 EXODUS_EXPORT int ex_put_blobs(int exoid, size_t count, const struct ex_blob *blobs); 938 EXODUS_EXPORT int ex_get_blobs(int exoid, struct ex_blob *blobs); 939 940 /* Write arbitrary integer, double, or text attributes on an entity */ 941 EXODUS_EXPORT int ex_put_attribute(int exoid, ex_attribute attributes); 942 EXODUS_EXPORT int ex_put_attributes(int exoid, size_t attr_count, ex_attribute *attributes); 943 944 EXODUS_EXPORT int ex_put_double_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, 945 const char *atr_name, int num_values, double *values); 946 EXODUS_EXPORT int ex_put_integer_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, 947 const char *atr_name, int num_values, void_int *values); 948 EXODUS_EXPORT int ex_put_text_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, 949 const char *atr_name, const char *value); 950 951 /* Read attribute values on an entity */ 952 EXODUS_EXPORT int ex_get_attribute(int exoid, ex_attribute *attributes); 953 EXODUS_EXPORT int ex_get_attributes(int exoid, size_t count, ex_attribute *attributes); 954 955 /* Query attributes on an entity */ 956 EXODUS_EXPORT int ex_get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity_id id); 957 EXODUS_EXPORT int ex_get_attribute_param(int exoid, ex_entity_type obj_type, ex_entity_id id, 958 ex_attribute *attributes); 959 960 /* Write Node Edge Face or Side Set Parameters */ 961 EXODUS_EXPORT int ex_put_set_param(int exoid, ex_entity_type set_type, ex_entity_id set_id, 962 int64_t num_entries_in_set, int64_t num_dist_fact_in_set); 963 964 /* Read Node Edge Face or Side Set Parameters */ 965 EXODUS_EXPORT int ex_get_set_param(int exoid, ex_entity_type set_type, ex_entity_id set_id, 966 void_int *num_entry_in_set, void_int *num_dist_fact_in_set); 967 968 /* Write a Node Edge Face or Side Set */ 969 EXODUS_EXPORT int ex_put_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, 970 const void_int *set_entry_list, const void_int *set_extra_list); 971 972 EXODUS_EXPORT int ex_get_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, 973 int64_t offset, int64_t num_to_get, void_int *set_entry_list, 974 void_int *set_extra_list); 975 976 EXODUS_EXPORT int ex_put_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, 977 int64_t offset, int64_t num_to_put, 978 const void_int *set_entry_list, 979 const void_int *set_extra_list); 980 981 /* Read a Node Edge Face or Side Set */ 982 EXODUS_EXPORT int ex_get_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, 983 void_int *set_entry_list, void_int *set_extra_list); 984 985 /* Write Node Edge Face or Side Set Distribution Factors */ 986 EXODUS_EXPORT int ex_put_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_id set_id, 987 const void *set_dist_fact); 988 989 /* Read Node Edge Face or Side Set Distribution Factors */ 990 EXODUS_EXPORT int ex_get_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_id set_id, 991 void *set_dist_fact); 992 993 EXODUS_EXPORT int ex_get_partial_set_dist_fact(int exoid, ex_entity_type set_type, 994 ex_entity_id set_id, int64_t offset, 995 int64_t num_to_put, void *set_dist_fact); 996 997 /* Write Concatenated Node Edge Face or Side Sets */ 998 EXODUS_EXPORT int ex_put_concat_sets(int exoid, ex_entity_type set_type, 999 const struct ex_set_specs *set_specs); 1000 1001 /* Read Concatenated Node Edge Face or Side Sets */ 1002 EXODUS_EXPORT int ex_get_concat_sets(int exoid, ex_entity_type set_type, 1003 struct ex_set_specs *set_specs); 1004 1005 /* Write Concatenated Node Edge Face or Side Sets */ 1006 EXODUS_EXPORT int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets); 1007 1008 /* Read Concatenated Node Edge Face or Side Sets */ 1009 EXODUS_EXPORT int ex_get_sets(int exoid, size_t set_count, struct ex_set *sets); 1010 1011 EXODUS_EXPORT int ex_put_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, 1012 int64_t ent_start, int64_t ent_count, const void_int *map); 1013 1014 EXODUS_EXPORT int ex_put_partial_set_dist_fact(int exoid, ex_entity_type set_type, 1015 ex_entity_id set_id, int64_t offset, 1016 int64_t num_to_put, const void *set_dist_fact); 1017 1018 /* TODO */ 1019 EXODUS_EXPORT int ex_get_concat_side_set_node_count(int exoid, int *side_set_node_cnt_list); 1020 1021 /* TODO */ 1022 EXODUS_EXPORT int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, 1023 void_int *side_set_node_list_len); 1024 1025 /* TODO */ 1026 EXODUS_EXPORT int ex_get_side_set_node_count(int exoid, ex_entity_id side_set_id, 1027 int *side_set_node_cnt_list); 1028 1029 /* TODO */ 1030 EXODUS_EXPORT int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, 1031 void_int *side_set_node_cnt_list, 1032 void_int *side_set_node_list); 1033 1034 /*============================================================================= 1035 * NS, SS & EB Global Parameter Routines 1036 *===========================================================================*/ 1037 EXODUS_EXPORT int ex_get_ns_param_global(int exoid, /**< NetCDF/Exodus file ID */ 1038 void_int *global_ids, /**< Global IDs of node sets */ 1039 void_int *node_cnts, /**< Count of nodes in node sets */ 1040 void_int *df_cnts /**< Count of dist. factors in ns */ 1041 ); 1042 1043 EXODUS_EXPORT int 1044 ex_put_ns_param_global(int exoid, /**< NemesisI file ID */ 1045 void_int *global_ids, /**< Vector of global node-set IDs */ 1046 void_int *node_cnts, /**< Vector of node counts in node-sets */ 1047 void_int *df_cnts /**< Vector of dist factor counts in node-sets */ 1048 ); 1049 1050 EXODUS_EXPORT int ex_get_ss_param_global(int exoid, /**< NetCDF/Exodus file ID */ 1051 void_int *global_ids, /**< Global side-set IDs */ 1052 void_int *side_cnts, /**< Global side count */ 1053 void_int *df_cnts /**< Global dist. factor count */ 1054 ); 1055 1056 EXODUS_EXPORT int 1057 ex_put_ss_param_global(int exoid, /**< NemesisI file ID */ 1058 void_int *global_ids, /**< Vector of global side-set IDs */ 1059 void_int *side_cnts, /**< Vector of element/side counts in each side set */ 1060 void_int *df_cnts /**< Vector of dist. factor */ 1061 /**< counts in each side set */ 1062 ); 1063 1064 EXODUS_EXPORT int 1065 ex_get_eb_info_global(int exoid, /**< NemesisI file ID */ 1066 void_int *el_blk_ids, /**< Vector of global element IDs */ 1067 void_int *el_blk_cnts /**< Vector of global element counts */ 1068 ); 1069 1070 EXODUS_EXPORT int 1071 ex_put_eb_info_global(int exoid, /**< NemesisI file ID */ 1072 void_int *el_blk_ids, /**< Vector of global element IDs */ 1073 void_int *el_blk_cnts /**< Vector of global element counts */ 1074 ); 1075 1076 /*============================================================================= 1077 * NS, SS & EB Subset Routines 1078 *===========================================================================*/ 1079 EXODUS_EXPORT int ex_get_elem_type(int exoid, /**< NetCDF/Exodus file ID */ 1080 ex_entity_id elem_blk_id, /**< Element block ID */ 1081 char * elem_type /**< The name of the element type */ 1082 ); 1083 1084 /*============================================================================= 1085 * Number Map Routines 1086 *===========================================================================*/ 1087 EXODUS_EXPORT int ex_get_processor_node_maps(int exoid, /**< NetCDF/Exodus file ID */ 1088 void_int *node_mapi, /**< Internal FEM node IDs */ 1089 void_int *node_mapb, /**< Border FEM node IDs */ 1090 void_int *node_mape, /**< External FEM node IDs */ 1091 int processor /**< Processor IDs */ 1092 ); 1093 1094 EXODUS_EXPORT int ex_put_processor_node_maps(int exoid, /**< NetCDF/Exodus file ID */ 1095 void_int *node_mapi, /**< Internal FEM node IDs */ 1096 void_int *node_mapb, /**< Border FEM node IDs */ 1097 void_int *node_mape, /**< External FEM node IDs */ 1098 int proc_id /**< This processor ID */ 1099 ); 1100 1101 EXODUS_EXPORT int ex_get_processor_elem_maps(int exoid, /**< NetCDF/Exodus file ID */ 1102 void_int *elem_mapi, /**< Internal element IDs */ 1103 void_int *elem_mapb, /**< Border element IDs */ 1104 int processor /**< Processor ID */ 1105 ); 1106 1107 EXODUS_EXPORT int ex_put_processor_elem_maps(int exoid, /**< NetCDF/Exodus file ID */ 1108 void_int *elem_mapi, /**< Internal FEM element IDs */ 1109 void_int *elem_mapb, /**< Border FEM element IDs */ 1110 int processor /**< This processor ID */ 1111 ); 1112 1113 /*============================================================================= 1114 * Communications Maps Routines 1115 *===========================================================================*/ 1116 1117 EXODUS_EXPORT int 1118 ex_get_cmap_params(int exoid, /**< NetCDF/Exodus file ID */ 1119 void_int *node_cmap_ids, /**< Nodal comm. map IDs */ 1120 void_int *node_cmap_node_cnts, /**< Number of nodes in each map */ 1121 void_int *elem_cmap_ids, /**< Elemental comm. map IDs */ 1122 void_int *elem_cmap_elem_cnts, /**< Number of elems in each map */ 1123 int processor /**< This processor ID */ 1124 ); 1125 1126 EXODUS_EXPORT int ex_put_cmap_params(int exoid, /**< NetCDF/Exodus file ID */ 1127 void_int *node_cmap_ids, /**< Node map IDs */ 1128 void_int *node_cmap_node_cnts, /**< Nodes in nodal comm */ 1129 void_int *elem_cmap_ids, /**< Elem map IDs */ 1130 void_int *elem_cmap_elem_cnts, /**< Elems in elemental comm */ 1131 int64_t processor /**< This processor ID */ 1132 ); 1133 1134 EXODUS_EXPORT int 1135 ex_put_cmap_params_cc(int exoid, /**< NetCDF/Exodus file ID */ 1136 void_int *node_cmap_ids, /**< Node map IDs */ 1137 void_int *node_cmap_node_cnts, /**< Nodes in nodal comm */ 1138 void_int *node_proc_ptrs, /**< Pointer into array for node maps */ 1139 void_int *elem_cmap_ids, /**< Elem map IDs */ 1140 void_int *elem_cmap_elem_cnts, /**< Elems in elemental comm */ 1141 void_int *elem_proc_ptrs /**< Pointer into array for elem maps */ 1142 ); 1143 1144 EXODUS_EXPORT int ex_get_node_cmap(int exoid, /**< NetCDF/Exodus file ID */ 1145 ex_entity_id map_id, /**< Map ID */ 1146 void_int * node_ids, /**< FEM node IDs */ 1147 void_int * proc_ids, /**< Processor IDs */ 1148 int processor /**< This processor ID */ 1149 ); 1150 1151 EXODUS_EXPORT int ex_put_node_cmap(int exoid, /**< NetCDF/Exodus file ID */ 1152 ex_entity_id map_id, /**< Nodal comm map ID */ 1153 void_int * node_ids, /**< FEM node IDs */ 1154 void_int * proc_ids, /**< Processor IDs */ 1155 int processor /**< This processor ID */ 1156 ); 1157 1158 EXODUS_EXPORT int 1159 ex_put_partial_node_cmap(int exoid, /**< NetCDF/Exodus file ID */ 1160 ex_entity_id map_id, /**< Nodal comm map ID */ 1161 int64_t start_entity_num, /**< Starting position to write to */ 1162 int64_t num_entities, /**< Number of nodes to write */ 1163 void_int * node_ids, /**< FEM node IDs */ 1164 void_int * proc_ids, /**< Processor IDs */ 1165 int processor /**< This processor ID */ 1166 ); 1167 1168 EXODUS_EXPORT int ex_get_elem_cmap(int exoid, /**< NetCDF/Exodus file ID */ 1169 ex_entity_id map_id, /**< Elemental comm map ID */ 1170 void_int * elem_ids, /**< Element IDs */ 1171 void_int * side_ids, /**< Element side IDs */ 1172 void_int * proc_ids, /**< Processor IDs */ 1173 int processor /**< This processor ID */ 1174 ); 1175 1176 EXODUS_EXPORT int ex_put_elem_cmap(int exoid, /**< NetCDF/Exodus file ID */ 1177 ex_entity_id map_id, /**< Elemental comm map ID */ 1178 void_int * elem_ids, /**< Vector of element IDs */ 1179 void_int * side_ids, /**< Vector of side IDs */ 1180 void_int * proc_ids, /**< Vector of processor IDs */ 1181 int processor /**< This processor ID */ 1182 ); 1183 1184 /*! @} */ 1185 1186 /* Deprecated Code Handling Options: 1187 * 1. Ignore -- treat deprecated functions as normal non-deprecated functions (default) 1188 * 2. Delete -- the deprecated functions are not defined or compiled (SEACAS_HIDE_DEPRECATED_CODE is 1189 * defined) 1190 * 3. Warn -- if used in client code, issue a warning. (SEACAS_WARN_DEPRECATED_CODE is defined) 1191 * 1192 * The symbols SEACAS_HIDE_DEPRECATED_CODE and SEACAS_DEPRECATED are defined in exodus_config.h 1193 * In a TriBITs-based system, this include file is generated from cmake-variable definitions. 1194 * In other build systems, the exodus_config.h file is hard-wired. 1195 */ 1196 1197 #if !defined(SEACAS_HIDE_DEPRECATED_CODE) 1198 /* ======================================================================== 1199 * Deprecated functiona 1200 */ 1201 1202 #ifndef SEACAS_DEPRECATED 1203 #define SEACAS_DEPRECATED 1204 #endif 1205 1206 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_glob_vars(int exoid, int time_step, int num_glob_vars, 1207 void *glob_var_vals); 1208 1209 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_glob_var_time(int exoid, int glob_var_index, 1210 int beg_time_step, int end_time_step, 1211 void *glob_var_vals); 1212 1213 SEACAS_DEPRECATED EXODUS_EXPORT int 1214 ex_get_concat_node_sets(int exoid, void_int *node_set_ids, void_int *num_nodes_per_set, 1215 void_int *num_df_per_set, void_int *node_sets_node_index, 1216 void_int *node_sets_df_index, void_int *node_sets_node_list, 1217 void *node_sets_dist_fact); 1218 1219 SEACAS_DEPRECATED EXODUS_EXPORT int 1220 ex_get_concat_side_sets(int exoid, void_int *side_set_ids, void_int *num_elem_per_set, 1221 void_int *num_dist_per_set, void_int *side_sets_elem_index, 1222 void_int *side_sets_dist_index, void_int *side_sets_elem_list, 1223 void_int *side_sets_side_list, void *side_sets_dist_fact); 1224 1225 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_attr(int exoid, ex_entity_id elem_blk_id, 1226 void *attrib); 1227 1228 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_attr_names(int exoid, ex_entity_id elem_blk_id, 1229 char **names); 1230 1231 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_blk_ids(int exoid, void_int *ids); 1232 1233 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_block(int exoid, ex_entity_id elem_blk_id, 1234 char *elem_type, void_int *num_elem_this_blk, 1235 void_int *num_nodes_per_elem, 1236 void_int *num_attr); 1237 1238 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_conn(int exoid, ex_entity_id elem_blk_id, 1239 void_int *connect); 1240 1241 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_map(int exoid, ex_entity_id map_id, 1242 void_int *elem_map); 1243 1244 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_num_map(int exoid, void_int *elem_map); 1245 1246 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_nodal_var(int exoid, int time_step, int nodal_var_index, 1247 int64_t num_nodes, void *nodal_var_vals); 1248 1249 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_nodal_var(int exoid, int time_step, int nodal_var_index, 1250 int64_t num_nodes, const void *nodal_var_vals); 1251 1252 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_nodal_var_time(int exoid, int nodal_var_index, 1253 int64_t node_number, int beg_time_step, 1254 int end_time_step, void *nodal_var_vals); 1255 1256 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_partial_nodal_var(int exoid, int time_step, 1257 int nodal_var_index, 1258 int64_t start_node, int64_t num_nodes, 1259 const void *nodal_var_vals); 1260 1261 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_partial_nodal_var(int exoid, int time_step, 1262 int nodal_var_index, 1263 int64_t start_node, int64_t num_nodes, 1264 void *var_vals); 1265 1266 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_var(int exoid, int time_step, int elem_var_index, 1267 ex_entity_id elem_blk_id, 1268 int64_t num_elem_this_blk, void *elem_var_vals); 1269 1270 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_var_tab(int exoid, int num_elem_blk, 1271 int num_elem_var, int *elem_var_tab); 1272 1273 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_elem_var_time(int exoid, int elem_var_index, 1274 int64_t elem_number, int beg_time_step, 1275 int end_time_step, void *elem_var_vals); 1276 1277 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_node_map(int exoid, ex_entity_id map_id, 1278 void_int *node_map); 1279 1280 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_node_num_map(int exoid, void_int *node_map); 1281 1282 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_node_set_param(int exoid, ex_entity_id node_set_id, 1283 void_int *num_nodes_in_set, 1284 void_int *num_df_in_set); 1285 1286 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_node_set(int exoid, ex_entity_id node_set_id, 1287 void_int *node_set_node_list); 1288 1289 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_node_set_dist_fact(int exoid, ex_entity_id node_set_id, 1290 void *node_set_dist_fact); 1291 1292 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_node_set_ids(int exoid, void_int *ids); 1293 1294 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_nset_var_tab(int exoid, int num_nodesets, 1295 int num_nset_var, int *nset_var_tab); 1296 1297 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_nset_var(int exoid, int time_step, int nset_var_index, 1298 ex_entity_id nset_id, 1299 int64_t num_node_this_nset, 1300 void * nset_var_vals); 1301 1302 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_one_elem_attr(int exoid, ex_entity_id elem_blk_id, 1303 int attrib_index, void *attrib); 1304 1305 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_side_set(int exoid, ex_entity_id side_set_id, 1306 void_int *side_set_elem_list, 1307 void_int *side_set_side_list); 1308 1309 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_side_set_dist_fact(int exoid, ex_entity_id side_set_id, 1310 void *side_set_dist_fact); 1311 1312 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_side_set_ids(int exoid, void_int *ids); 1313 1314 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_side_set_param(int exoid, ex_entity_id side_set_id, 1315 void_int *num_side_in_set, 1316 void_int *num_dist_fact_in_set); 1317 1318 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_sset_var(int exoid, int time_step, int sset_var_index, 1319 ex_entity_id sset_id, 1320 int64_t num_side_this_sset, 1321 void * sset_var_vals); 1322 1323 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_sset_var_tab(int exoid, int num_sidesets, 1324 int num_sset_var, int *sset_var_tab); 1325 1326 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_var_names(int exoid, const char *var_type, int num_vars, 1327 char *var_names[]); 1328 1329 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_var_name(int exoid, const char *var_type, int var_num, 1330 char *var_name); 1331 1332 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_var_param(int exoid, const char *var_type, 1333 int *num_vars); 1334 1335 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_var_tab(int exoid, const char *var_type, int num_blk, 1336 int num_var, int *var_tab); 1337 1338 SEACAS_DEPRECATED EXODUS_EXPORT int 1339 ex_put_concat_node_sets(int exoid, void_int *node_set_ids, void_int *num_nodes_per_set, 1340 void_int *num_dist_per_set, void_int *node_sets_node_index, 1341 void_int *node_sets_df_index, void_int *node_sets_node_list, 1342 void *node_sets_dist_fact); 1343 1344 SEACAS_DEPRECATED EXODUS_EXPORT int 1345 ex_put_concat_side_sets(int exoid, void_int *side_set_ids, void_int *num_elem_per_set, 1346 void_int *num_dist_per_set, void_int *side_sets_elem_index, 1347 void_int *side_sets_dist_index, void_int *side_sets_elem_list, 1348 void_int *side_sets_side_list, void *side_sets_dist_fact); 1349 1350 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_concat_var_param(int exoid, int num_g, int num_n, 1351 int num_e, int num_elem_blk, 1352 int *elem_var_tab); 1353 1354 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_attr_names(int exoid, ex_entity_id elem_blk_id, 1355 char *names[]); 1356 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_attr(int exoid, ex_entity_id elem_blk_id, 1357 const void *attrib); 1358 1359 SEACAS_DEPRECATED EXODUS_EXPORT int 1360 ex_put_elem_block(int exoid, ex_entity_id elem_blk_id, const char *elem_type, 1361 int64_t num_elem_this_blk, int64_t num_nodes_per_elem, int64_t num_attr_per_elem); 1362 1363 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_conn(int exoid, ex_entity_id elem_blk_id, 1364 const void_int *connect); 1365 1366 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_map(int exoid, ex_entity_id map_id, 1367 const void_int *elem_map); 1368 1369 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_num_map(int exoid, const void_int *elem_map); 1370 1371 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_var(int exoid, int time_step, int elem_var_index, 1372 ex_entity_id elem_blk_id, 1373 int64_t num_elem_this_blk, 1374 const void * elem_var_vals); 1375 1376 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_var_tab(int exoid, int num_elem_blk, 1377 int num_elem_var, int *elem_var_tab); 1378 1379 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_glob_vars(int exoid, int time_step, int num_glob_vars, 1380 const void *glob_var_vals); 1381 1382 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_node_map(int exoid, ex_entity_id map_id, 1383 const void_int *node_map); 1384 1385 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_node_num_map(int exoid, const void_int *node_map); 1386 1387 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_node_set(int exoid, ex_entity_id node_set_id, 1388 const void_int *node_set_node_list); 1389 1390 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_node_set_dist_fact(int exoid, ex_entity_id node_set_id, 1391 const void *node_set_dist_fact); 1392 1393 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_node_set_param(int exoid, ex_entity_id node_set_id, 1394 int64_t num_nodes_in_set, 1395 int64_t num_dist_in_set); 1396 1397 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_nset_var(int exoid, int time_step, int nset_var_index, 1398 ex_entity_id nset_id, 1399 int64_t num_nodes_this_nset, 1400 const void * nset_var_vals); 1401 1402 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_nset_var_tab(int exoid, int num_nset, int num_nset_var, 1403 int *nset_var_tab); 1404 1405 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_one_elem_attr(int exoid, ex_entity_id elem_blk_id, 1406 int attrib_index, const void *attrib); 1407 1408 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_side_set(int exoid, ex_entity_id side_set_id, 1409 const void_int *side_set_elem_list, 1410 const void_int *side_set_side_list); 1411 1412 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_side_set_dist_fact(int exoid, ex_entity_id side_set_id, 1413 const void *side_set_dist_fact); 1414 1415 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_side_set_param(int exoid, ex_entity_id side_set_id, 1416 int64_t num_side_in_set, 1417 int64_t num_dist_fact_in_set); 1418 1419 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_sset_var(int exoid, int time_step, int sset_var_index, 1420 ex_entity_id sset_id, 1421 int64_t num_faces_this_sset, 1422 const void * sset_var_vals); 1423 1424 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_sset_var_tab(int exoid, int num_sset, int num_sset_var, 1425 int *sset_var_tab); 1426 1427 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_var_name(int exoid, const char *var_type, int var_num, 1428 const char *var_name); 1429 1430 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_var_names(int exoid, const char *var_type, int num_vars, 1431 char *var_names[]); 1432 1433 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_var_param(int exoid, const char *var_type, int num_vars); 1434 1435 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_var_tab(int exoid, const char *var_type, int num_blk, 1436 int num_var, int *var_tab); 1437 1438 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_n_coord(int exoid, int64_t start_node_num, 1439 int64_t num_nodes, void *x_coor, void *y_coor, 1440 void *z_coor); 1441 1442 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_n_nodal_var(int exoid, int time_step, 1443 int nodal_var_index, int64_t start_node, 1444 int64_t num_nodes, void *var_vals); 1445 1446 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_n_conn(int exoid, ex_entity_type blk_type, 1447 ex_entity_id blk_id, int64_t start_num, 1448 int64_t num_ent, void_int *nodeconn, 1449 void_int *edgeconn, void_int *faceconn); 1450 1451 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_n_attr(int exoid, ex_entity_type obj_type, 1452 ex_entity_id obj_id, int64_t start_num, 1453 int64_t num_ent, void *attrib); 1454 1455 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_n_one_attr(int exoid, ex_entity_type obj_type, 1456 ex_entity_id obj_id, int64_t start_num, 1457 int64_t num_ent, int attrib_index, 1458 void *attrib); 1459 1460 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_n_var(int exoid, int time_step, ex_entity_type var_type, 1461 int var_index, ex_entity_id obj_id, 1462 int64_t start_index, int64_t num_entities, 1463 void *var_vals); 1464 1465 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_n_elem_var(int exoid, int time_step, int elem_var_index, 1466 ex_entity_id elem_blk_id, 1467 int64_t num_elem_this_blk, 1468 int64_t start_elem_num, int64_t num_elem, 1469 void *elem_var_vals); 1470 1471 SEACAS_DEPRECATED EXODUS_EXPORT int 1472 ex_get_n_side_set(int exoid, /**< NetCDF/Exodus file ID */ 1473 ex_entity_id side_set_id, /**< Side-set ID to read */ 1474 int64_t start_side_num, /**< Starting element number */ 1475 int64_t num_sides, /**< Number of sides to read */ 1476 void_int * side_set_elem_list, /**< List of element IDs */ 1477 void_int * side_set_side_list /**< List of side IDs */ 1478 ); 1479 1480 SEACAS_DEPRECATED EXODUS_EXPORT int 1481 ex_put_n_side_set(int exoid, /**< NetCDF/Exodus file ID */ 1482 ex_entity_id side_set_id, /**< Side-set ID to write */ 1483 int64_t start_side_num, /**< Starting element number */ 1484 int64_t num_sides, /**< Number of sides to write */ 1485 const void_int *side_set_elem_list, /**< List of element IDs */ 1486 const void_int *side_set_side_list /**< List of side IDs */ 1487 ); 1488 1489 SEACAS_DEPRECATED EXODUS_EXPORT int 1490 ex_get_n_side_set_df(int exoid, /**< NetCDF/Exodus file ID */ 1491 ex_entity_id side_set_id, /**< Side-set ID */ 1492 int64_t start_num, /**< Starting df number */ 1493 int64_t num_df_to_get, /**< Number of df's to read */ 1494 void * side_set_dist_fact /**< Distribution factors */ 1495 ); 1496 1497 SEACAS_DEPRECATED EXODUS_EXPORT int 1498 ex_put_n_side_set_df(int exoid, /**< NetCDF/Exodus file ID */ 1499 ex_entity_id side_set_id, /**< Side-set ID */ 1500 int64_t start_num, /**< Starting df number */ 1501 int64_t num_df_to_get, /**< Number of df's to write */ 1502 void * side_set_dist_fact /**< Distribution factors */ 1503 ); 1504 1505 SEACAS_DEPRECATED EXODUS_EXPORT int 1506 ex_get_n_node_set(int exoid, /**< NetCDF/Exodus file ID */ 1507 ex_entity_id node_set_id, /**< Node set ID */ 1508 int64_t start_node_num, /**< Node index to start reading at */ 1509 int64_t num_nodes, /**< Number of nodes to read */ 1510 void_int * node_set_node_list /**< List of nodes in node set */ 1511 ); 1512 1513 SEACAS_DEPRECATED EXODUS_EXPORT int 1514 ex_put_n_node_set(int exoid, /**< NetCDF/Exodus file ID */ 1515 ex_entity_id node_set_id, /**< Node set ID */ 1516 int64_t start_node_num, /**< Node index to start writing at */ 1517 int64_t num_nodes, /**< Number of nodes to write */ 1518 const void_int *node_set_node_list /**< List of nodes in node set */ 1519 ); 1520 1521 SEACAS_DEPRECATED EXODUS_EXPORT int 1522 ex_get_n_node_set_df(int exoid, /**< NetCDF/Exodus file ID */ 1523 ex_entity_id node_set_id, /**< Node-set ID */ 1524 int64_t start_num, /**< Starting df number */ 1525 int64_t num_df_to_get, /**< Number of df's to read */ 1526 void * node_set_dist_fact /**< Distribution factors */ 1527 ); 1528 1529 SEACAS_DEPRECATED EXODUS_EXPORT int 1530 ex_put_n_node_set_df(int exoid, /**< NetCDF/Exodus file ID */ 1531 ex_entity_id node_set_id, /**< Node-set ID */ 1532 int64_t start_num, /**< Starting df number */ 1533 int64_t num_df_to_get, /**< Number of df's to write */ 1534 void * node_set_dist_fact /**< Distribution factors */ 1535 ); 1536 1537 SEACAS_DEPRECATED EXODUS_EXPORT int 1538 ex_get_n_elem_conn(int exoid, /**< NetCDF/Exodus file ID */ 1539 ex_entity_id elem_blk_id, /**< Element block ID */ 1540 int64_t start_elem_num, /**< Starting position to read from */ 1541 int64_t num_elems, /**< Number of elements to read */ 1542 void_int * connect /**< Connectivity vector */ 1543 ); 1544 1545 SEACAS_DEPRECATED EXODUS_EXPORT int 1546 ex_put_n_elem_conn(int exoid, /**< NetCDF/Exodus file ID */ 1547 ex_entity_id elem_blk_id, /**< Element block ID */ 1548 int64_t start_elem_num, /**< Starting position to write to */ 1549 int64_t num_elems, /**< Number of elements to write */ 1550 const void_int *connect /**< Connectivity vector */ 1551 ); 1552 1553 SEACAS_DEPRECATED EXODUS_EXPORT int 1554 ex_get_n_elem_attr(int exoid, /**< NetCDF/Exodus file ID */ 1555 ex_entity_id elem_blk_id, /**< Element block ID */ 1556 int64_t start_elem_num, /**< Starting position to read from */ 1557 int64_t num_elems, /**< Number of elements to read */ 1558 void * attrib /**< Attribute */ 1559 ); 1560 1561 SEACAS_DEPRECATED EXODUS_EXPORT int 1562 ex_put_n_elem_attr(int exoid, /**< NetCDF/Exodus file ID */ 1563 ex_entity_id elem_blk_id, /**< Element block ID */ 1564 int64_t start_elem_num, /**< Starting position to write to */ 1565 int64_t num_elems, /**< Number of elements to write */ 1566 void * attrib /**< Attribute */ 1567 ); 1568 1569 SEACAS_DEPRECATED EXODUS_EXPORT int 1570 ex_get_n_elem_num_map(int exoid, /**< NetCDF/Exodus file ID */ 1571 int64_t start_ent, /**< Starting position to read from */ 1572 int64_t num_ents, /**< Number of elements to read */ 1573 void_int *elem_map /**< element map numbers */ 1574 ); 1575 1576 SEACAS_DEPRECATED EXODUS_EXPORT int 1577 ex_get_n_node_num_map(int exoid, /**< NetCDF/Exodus file ID */ 1578 int64_t start_ent, /**< starting node number */ 1579 int64_t num_ents, /**< number of nodes to read */ 1580 void_int *node_map /**< vector for node map */ 1581 ); 1582 1583 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_n_coord(int exoid, int64_t start_node_num, 1584 int64_t num_nodes, const void *x_coor, 1585 const void *y_coor, const void *z_coor); 1586 1587 SEACAS_DEPRECATED EXODUS_EXPORT int 1588 ex_put_n_elem_num_map(int exoid, int64_t start_ent, int64_t num_ents, const void_int *elem_map); 1589 1590 SEACAS_DEPRECATED EXODUS_EXPORT int 1591 ex_put_n_node_num_map(int exoid, int64_t start_ent, int64_t num_ents, const void_int *node_map); 1592 1593 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_n_one_attr(int exoid, ex_entity_type obj_type, 1594 ex_entity_id obj_id, int64_t start_num, 1595 int64_t num_ent, int attrib_index, 1596 const void *attrib); 1597 1598 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_n_var(int exoid, int time_step, ex_entity_type var_type, 1599 int var_index, ex_entity_id obj_id, 1600 int64_t start_index, int64_t num_entities, 1601 const void *var_vals); 1602 1603 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_n_nodal_var(int exoid, int time_step, 1604 int nodal_var_index, int64_t start_node, 1605 int64_t num_nodes, 1606 const void *nodal_var_vals); 1607 1608 SEACAS_DEPRECATED EXODUS_EXPORT int 1609 ex_get_partial_elem_var(int exoid, int time_step, int elem_var_index, ex_entity_id elem_blk_id, 1610 int64_t num_elem_this_blk, int64_t start_elem_num, int64_t num_elem, 1611 void *elem_var_vals); 1612 1613 SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_partial_elem_map(int exoid, ex_entity_id map_id, 1614 int64_t ent_start, int64_t ent_count, 1615 void_int *elem_map); 1616 1617 SEACAS_DEPRECATED EXODUS_EXPORT int 1618 ex_get_partial_elem_conn(int exoid, /**< NetCDF/Exodus file ID */ 1619 ex_entity_id elem_blk_id, /**< Element block ID */ 1620 int64_t start_elem_num, /**< Starting position to read from */ 1621 int64_t num_elems, /**< Number of elements to read */ 1622 void_int * connect /**< Connectivity vector */ 1623 ); 1624 1625 SEACAS_DEPRECATED EXODUS_EXPORT int 1626 ex_get_partial_elem_attr(int exoid, /**< NetCDF/Exodus file ID */ 1627 ex_entity_id elem_blk_id, /**< Element block ID */ 1628 int64_t start_elem_num, /**< Starting position to read from */ 1629 int64_t num_elems, /**< Number of elements to read */ 1630 void * attrib /**< Attribute */ 1631 ); 1632 1633 SEACAS_DEPRECATED EXODUS_EXPORT int 1634 ex_get_partial_elem_num_map(int exoid, /**< NetCDF/Exodus file ID */ 1635 int64_t start_ent, /**< Starting position to read from */ 1636 int64_t num_ents, /**< Number of elements to read */ 1637 void_int *elem_map /**< element map numbers */ 1638 ); 1639 1640 SEACAS_DEPRECATED EXODUS_EXPORT int 1641 ex_get_partial_node_num_map(int exoid, /**< NetCDF/Exodus file ID */ 1642 int64_t start_ent, /**< starting node number */ 1643 int64_t num_ents, /**< number of nodes to read */ 1644 void_int *node_map /**< vector for node map */ 1645 ); 1646 1647 SEACAS_DEPRECATED EXODUS_EXPORT int 1648 ex_get_partial_node_set(int exoid, /**< NetCDF/Exodus file ID */ 1649 ex_entity_id node_set_id, /**< Node set ID */ 1650 int64_t start_node_num, /**< Node index to start reading at */ 1651 int64_t num_nodes, /**< Number of nodes to read */ 1652 void_int * node_set_node_list /**< List of nodes in node set */ 1653 ); 1654 1655 SEACAS_DEPRECATED EXODUS_EXPORT int 1656 ex_get_partial_node_set_df(int exoid, /**< NetCDF/Exodus file ID */ 1657 ex_entity_id node_set_id, /**< Node-set ID */ 1658 int64_t start_num, /**< Starting df number */ 1659 int64_t num_df_to_get, /**< Number of df's to read */ 1660 void * node_set_dist_fact /**< Distribution factors */ 1661 ); 1662 1663 SEACAS_DEPRECATED EXODUS_EXPORT int 1664 ex_get_partial_side_set(int exoid, /**< NetCDF/Exodus file ID */ 1665 ex_entity_id side_set_id, /**< Side-set ID to read */ 1666 int64_t start_side_num, /**< Starting element number */ 1667 int64_t num_sides, /**< Number of sides to read */ 1668 void_int * side_set_elem_list, /**< List of element IDs */ 1669 void_int * side_set_side_list /**< List of side IDs */ 1670 ); 1671 1672 SEACAS_DEPRECATED EXODUS_EXPORT int 1673 ex_get_partial_side_set_df(int exoid, /**< NetCDF/Exodus file ID */ 1674 ex_entity_id side_set_id, /**< Side-set ID */ 1675 int64_t start_num, /**< Starting df number */ 1676 int64_t num_df_to_get, /**< Number of df's to read */ 1677 void * side_set_dist_fact /**< Distribution factors */ 1678 ); 1679 1680 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_partial_node_num_map(int exoid, int64_t start_ent, 1681 int64_t num_ents, 1682 const void_int *node_map); 1683 1684 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_partial_elem_num_map(int exoid, int64_t start_ent, 1685 int64_t num_ents, 1686 const void_int *elem_map); 1687 1688 SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_partial_elem_map(int exoid, ex_entity_id map_id, 1689 int64_t ent_start, int64_t ent_count, 1690 const void_int *elem_map); 1691 1692 SEACAS_DEPRECATED EXODUS_EXPORT int 1693 ex_put_partial_side_set(int exoid, /**< NetCDF/Exodus file ID */ 1694 ex_entity_id side_set_id, /**< Side-set ID to write */ 1695 int64_t start_side_num, /**< Starting element number */ 1696 int64_t num_sides, /**< Number of sides to write */ 1697 const void_int *side_set_elem_list, /**< List of element IDs */ 1698 const void_int *side_set_side_list /**< List of side IDs */ 1699 ); 1700 1701 SEACAS_DEPRECATED EXODUS_EXPORT int 1702 ex_put_partial_side_set_df(int exoid, /**< NetCDF/Exodus file ID */ 1703 ex_entity_id side_set_id, /**< Side-set ID */ 1704 int64_t start_num, /**< Starting df number */ 1705 int64_t num_df_to_get, /**< Number of df's to write */ 1706 void * side_set_dist_fact /**< Distribution factors */ 1707 ); 1708 1709 SEACAS_DEPRECATED EXODUS_EXPORT int 1710 ex_put_partial_node_set(int exoid, /**< NetCDF/Exodus file ID */ 1711 ex_entity_id node_set_id, /**< Node set ID */ 1712 int64_t start_node_num, /**< Node index to start writing at */ 1713 int64_t num_nodes, /**< Number of nodes to write */ 1714 const void_int *node_set_node_list /**< List of nodes in node set */ 1715 ); 1716 1717 SEACAS_DEPRECATED EXODUS_EXPORT int 1718 ex_put_partial_node_set_df(int exoid, /**< NetCDF/Exodus file ID */ 1719 ex_entity_id node_set_id, /**< Node-set ID */ 1720 int64_t start_num, /**< Starting df number */ 1721 int64_t num_df_to_get, /**< Number of df's to write */ 1722 void * node_set_dist_fact /**< Distribution factors */ 1723 ); 1724 1725 SEACAS_DEPRECATED EXODUS_EXPORT int 1726 ex_put_partial_elem_conn(int exoid, /**< NetCDF/Exodus file ID */ 1727 ex_entity_id elem_blk_id, /**< Element block ID */ 1728 int64_t start_elem_num, /**< Starting position to write to */ 1729 int64_t num_elems, /**< Number of elements to write */ 1730 const void_int *connect /**< Connectivity vector */ 1731 ); 1732 1733 SEACAS_DEPRECATED EXODUS_EXPORT int 1734 ex_put_partial_elem_attr(int exoid, /**< NetCDF/Exodus file ID */ 1735 ex_entity_id elem_blk_id, /**< Element block ID */ 1736 int64_t start_elem_num, /**< Starting position to write to */ 1737 int64_t num_elems, /**< Number of elements to write */ 1738 void * attrib /**< Attribute */ 1739 ); 1740 1741 SEACAS_DEPRECATED EXODUS_EXPORT int 1742 ex_put_elem_var_slab(int exoid, /**< NetCDF/Exodus file ID */ 1743 int time_step, /**< time index */ 1744 int elem_var_index, /**< elemental variable index */ 1745 ex_entity_id elem_blk_id, /**< elemental block id */ 1746 int64_t start_pos, /**< Starting position to write to */ 1747 int64_t num_vals, /**< Number of elements to write */ 1748 void * elem_var_vals /**< variable values */ 1749 ); 1750 1751 SEACAS_DEPRECATED EXODUS_EXPORT int 1752 ex_put_nodal_var_slab(int exoid, /**< NetCDF/Exodus file ID */ 1753 int time_step, /**< The time step index */ 1754 int nodal_var_index, /**< Nodal variable index */ 1755 int64_t start_pos, /**< Start position for write */ 1756 int64_t num_vals, /**< Number of nodal variables */ 1757 void * nodal_var_vals /**< Nodal variable values */ 1758 ); 1759 1760 #endif 1761 /* End of Deprecated functions and their replacements 1762 * ======================================================================== */ 1763 1764 /* ERROR CODE DEFINITIONS AND STORAGE */ 1765 EXODUS_EXPORT int exoptval; /**< error reporting flag (default is quiet) */ 1766 #if defined(EXODUS_THREADSAFE) 1767 #if !defined(exerrval) 1768 /* In both exodusII.h and exodusII_int.h */ 1769 typedef struct EX_errval 1770 { 1771 int errval; 1772 char last_pname[MAX_ERR_LENGTH]; 1773 char last_errmsg[MAX_ERR_LENGTH]; 1774 int last_err_num; 1775 } EX_errval_t; 1776 1777 EXODUS_EXPORT EX_errval_t *ex_errval; 1778 #define exerrval ex_errval->errval 1779 #endif 1780 #else 1781 EXODUS_EXPORT int exerrval; /**< shared error return value */ 1782 #endif 1783 1784 EXODUS_EXPORT char * ex_name_of_object(ex_entity_type obj_type); 1785 EXODUS_EXPORT ex_entity_type ex_var_type_to_ex_entity_type(char var_type); 1786 EXODUS_EXPORT int ex_set_parallel(int exoid, int is_parallel); 1787 1788 /* Should be internal use only, but was in external include file for 1789 nemesis and some codes are using the function 1790 */ 1791 EXODUS_EXPORT int ex_get_idx(int exoid, /**< NetCDF/Exodus file ID */ 1792 const char *ne_var_name, /**< Nemesis index variable name */ 1793 int64_t * my_index, /**< array of length 2 to hold results */ 1794 int pos /**< position of this proc/cmap in index */ 1795 ); 1796 1797 /** 1798 * \defgroup ErrorReturnCodes Error return codes - #exerrval return values 1799 * @{ 1800 */ 1801 #define EX_MEMFAIL 1000 /**< memory allocation failure flag def */ 1802 #define EX_BADFILEMODE 1001 /**< bad file mode def */ 1803 #define EX_BADFILEID 1002 /**< bad file id def */ 1804 #define EX_WRONGFILETYPE 1003 /**< wrong file type for function */ 1805 #define EX_LOOKUPFAIL 1004 /**< id table lookup failed */ 1806 #define EX_BADPARAM 1005 /**< bad parameter passed */ 1807 #define EX_INTERNAL 1006 /**< internal logic error */ 1808 #define EX_DUPLICATEID 1007 /**< duplicate id found */ 1809 #define EX_DUPLICATEOPEN 1008 /**< duplicate open */ 1810 #define EX_MSG -1000 /**< message print code - no error implied */ 1811 #define EX_PRTLASTMSG -1001 /**< print last error message msg code */ 1812 #define EX_NOTROOTID -1002 /**< file id is not the root id; it is a subgroup id */ 1813 #define EX_LASTERR -1003 /**< in ex_err, use existing err_num value */ 1814 #define EX_NULLENTITY -1006 /**< null entity found */ 1815 #define EX_NOENTITY -1007 /**< no entities of that type on database */ 1816 #define EX_NOTFOUND -1008 /**< could not find requested variable on database */ 1817 1818 #define EX_FATAL -1 /**< fatal error flag def */ 1819 #define EX_NOERR 0 /**< no error flag def */ 1820 #define EX_WARN 1 /**< warning flag def */ 1821 /** @} */ 1822 1823 #ifdef __cplusplus 1824 } /* close brackets on extern "C" declaration */ 1825 #endif 1826 1827 #endif 1828