From f334252e4bdf3443de8b8ef1ead1d7bcafb78aa2 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 8 Aug 2025 07:37:30 -0600 Subject: [PATCH] Add patch to support netcdf 4.9.3 --- vtk-netcdf4.9.3.patch | 25525 ++++++++++++++++++++++++++++++++++++++++ vtk.spec | 4 +- 2 files changed, 25528 insertions(+), 1 deletion(-) create mode 100644 vtk-netcdf4.9.3.patch diff --git a/vtk-netcdf4.9.3.patch b/vtk-netcdf4.9.3.patch new file mode 100644 index 0000000..835134a --- /dev/null +++ b/vtk-netcdf4.9.3.patch @@ -0,0 +1,25525 @@ +diff --git a/ThirdParty/exodusII/CMakeLists.txt b/ThirdParty/exodusII/CMakeLists.txt +index 7a0cefbef0..8d1a03caf8 100644 +--- a/ThirdParty/exodusII/CMakeLists.txt ++++ b/ThirdParty/exodusII/CMakeLists.txt +@@ -6,9 +6,9 @@ vtk_module_third_party_internal( + SPDX_COPYRIGHT_TEXT + "Copyright (c) 2005-2017 National Technology & Engineering Solutions of Sandia, LLC (NTESS)" + SPDX_DOWNLOAD_LOCATION +- "git+https://gitlab.kitware.com/third-party/seacas.git@exodus/for/vtk-20220706-v2021-05-12#packages/seacas/libraries/exodus" ++ "git+https://gitlab.kitware.com/third-party/seacas.git@exodus/for/vtk-20250313-v2025-02-27#packages/seacas/libraries/exodus" + VERSION +- "8.11f" ++ "9.0.4" + STANDARD_INCLUDE_DIRS) + + #configure_file( +diff --git a/ThirdParty/exodusII/Testing/CMakeLists.txt b/ThirdParty/exodusII/Testing/CMakeLists.txt +new file mode 100644 +index 0000000000..35f9732a93 +--- /dev/null ++++ b/ThirdParty/exodusII/Testing/CMakeLists.txt +@@ -0,0 +1 @@ ++add_subdirectory(Cxx) +diff --git a/ThirdParty/exodusII/Testing/Cxx/CMakeLists.txt b/ThirdParty/exodusII/Testing/Cxx/CMakeLists.txt +new file mode 100644 +index 0000000000..e281d79fbb +--- /dev/null ++++ b/ThirdParty/exodusII/Testing/Cxx/CMakeLists.txt +@@ -0,0 +1,4 @@ ++vtk_add_test_cxx(vtkexodusIICxxTests tests ++ NO_DATA NO_VALID NO_OUTPUT ++ TestIncludeExodusII.cxx) ++vtk_test_cxx_executable(vtkexodusIICxxTests tests) +diff --git a/ThirdParty/exodusII/Testing/Cxx/TestIncludeExodusII.cxx b/ThirdParty/exodusII/Testing/Cxx/TestIncludeExodusII.cxx +new file mode 100644 +index 0000000000..ff19a55e32 +--- /dev/null ++++ b/ThirdParty/exodusII/Testing/Cxx/TestIncludeExodusII.cxx +@@ -0,0 +1,8 @@ ++#include "vtk_exodusII.h" ++ ++#include ++ ++int TestIncludeExodusII(int /*argc*/, char* /*argv*/[]) ++{ ++ return EXIT_SUCCESS; ++} +diff --git a/ThirdParty/exodusII/update.sh b/ThirdParty/exodusII/update.sh +index b21a8993d0..be847004c6 100755 +--- a/ThirdParty/exodusII/update.sh ++++ b/ThirdParty/exodusII/update.sh +@@ -8,7 +8,7 @@ readonly name="exodusII" + readonly ownership="Seacas Upstream " + readonly subtree="ThirdParty/$name/vtk$name" + readonly repo="https://gitlab.kitware.com/third-party/seacas.git" +-readonly tag="exodus/for/vtk-20220706-v2021-05-12" ++readonly tag="exodus/for/vtk-20250313-v2025-02-27" + readonly paths=" + packages/seacas/libraries/exodus/CMakeLists.vtk.txt + packages/seacas/libraries/exodus/cmake/exodus_config.h.in +diff --git a/ThirdParty/exodusII/vtk.module b/ThirdParty/exodusII/vtk.module +index 9234ddae18..dd40275923 100644 +--- a/ThirdParty/exodusII/vtk.module ++++ b/ThirdParty/exodusII/vtk.module +@@ -11,4 +11,6 @@ DEPENDS + VTK::netcdf + OPTIONAL_DEPENDS + VTK::mpi ++TEST_DEPENDS ++ VTK::TestingCore + THIRD_PARTY +diff --git a/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt b/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt +index cc46acc7c9..e3b10bb915 100644 +--- a/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt ++++ b/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt +@@ -119,7 +119,11 @@ set(sources + src/deprecated/ex_put_var_param.c + src/deprecated/ex_put_var_tab.c + ++ src/ex__get_glob_vars_multi_time.c ++ src/ex__get_nodal_var_multi_time.c + src/ex__put_homogenous_block_params.c ++ src/ex__put_nodal_var_multi_time.c ++ + src/ex_add_attr.c + src/ex_close.c + src/ex_conv.c +@@ -129,6 +133,7 @@ set(sources + src/ex_create_par.c + src/ex_cvt_nodes_to_sides.c + src/ex_err.c ++ src/ex_field_utils.c + src/ex_get_all_times.c + src/ex_get_assemblies.c + src/ex_get_assembly.c +@@ -139,6 +144,7 @@ set(sources + src/ex_get_blob.c + src/ex_get_blobs.c + src/ex_get_block.c ++ src/ex_get_block_id_map.c + src/ex_get_block_param.c + src/ex_get_block_params.c + src/ex_get_cmap_params.c +@@ -152,6 +158,7 @@ set(sources + src/ex_get_elem_cmap.c + src/ex_get_elem_type.c + src/ex_get_entity_count_per_polyhedra.c ++ src/ex_get_field_metadata.c + src/ex_get_glob_var_time_int.c + src/ex_get_glob_vars_int.c + src/ex_get_group_id.c +@@ -168,7 +175,6 @@ set(sources + src/ex_get_map_param.c + src/ex_get_name.c + src/ex_get_names.c +- src/ex_get_nodal_var_int.c + src/ex_get_nodal_var_time_int.c + src/ex_get_node_cmap.c + src/ex_get_ns_param_global.c +@@ -206,6 +212,7 @@ set(sources + src/ex_get_time.c + src/ex_get_truth_table.c + src/ex_get_var.c ++ src/ex_get_var_multi_time.c + src/ex_get_var_time.c + src/ex_get_variable_name.c + src/ex_get_variable_names.c +@@ -239,6 +246,7 @@ set(sources + src/ex_put_eb_info_global.c + src/ex_put_elem_cmap.c + src/ex_put_entity_count_per_polyhedra.c ++ src/ex_put_field_metadata.c + src/ex_put_id_map.c + src/ex_put_info.c + src/ex_put_init.c +@@ -252,7 +260,6 @@ set(sources + src/ex_put_name.c + src/ex_put_names.c + src/ex_put_nodal_var.c +- src/ex_put_nodal_var_int.c + src/ex_put_node_cmap.c + src/ex_put_ns_param_global.c + src/ex_put_num_map.c +@@ -285,6 +292,7 @@ set(sources + src/ex_put_time.c + src/ex_put_truth_table.c + src/ex_put_var.c ++ src/ex_put_var_multi_time.c + src/ex_put_variable_name.c + src/ex_put_variable_names.c + src/ex_put_variable_param.c +@@ -317,9 +325,10 @@ set(headers + vtk_module_find_package(PACKAGE Threads) + + vtk_module_add_module(VTK::exodusII ++ HEADER_DIRECTORIES + SOURCES ${sources} + HEADERS ${headers} +- HEADERS_SUBDIR "vtkexodusII/include") ++ HEADERS_SUBDIR "vtkexodusII") + vtk_module_definitions(VTK::exodusII + PRIVATE + exoIIc_EXPORTS) +diff --git a/ThirdParty/exodusII/vtkexodusII/README b/ThirdParty/exodusII/vtkexodusII/README +index ff04ca7ae8..411da85e3a 100644 +--- a/ThirdParty/exodusII/vtkexodusII/README ++++ b/ThirdParty/exodusII/vtkexodusII/README +@@ -1,3 +1,6 @@ ++ ++See SEACAS (including Exodus) documentation at http://sandialabs.github.io/seacas-docs/ ++ + ======================================================================== + CONTACT: + +@@ -5,23 +8,7 @@ Greg Sjaardema, + Sandia National Laboratories, + gdsjaar@sandia.gov, gsjaardema@gmail.com + +-======================================================================== +-LICENSE: +-The Exodus library is licensed under the terms of the BSD License. +- +-Legal stuff (copyright, licensing restrictions, etc.) can be found in +-the file COPYRIGHT which contains: +- +-1. The NTESS Copyright Notice. +-2. The BSD License. +- + We appreciate feedback from users of this package. Please send + comments, suggestions, and bug reports to Greg Sjaardema + , + +-Please identify the version of the package. +- +-======================================================================== +-BUILDING +- +-See instructions at the top-level of the repository in README.md +diff --git a/ThirdParty/exodusII/vtkexodusII/cmake/exodus_config.h.in b/ThirdParty/exodusII/vtkexodusII/cmake/exodus_config.h.in +index e4dcd51f27..c8e303978d 100644 +--- a/ThirdParty/exodusII/vtkexodusII/cmake/exodus_config.h.in ++++ b/ThirdParty/exodusII/vtkexodusII/cmake/exodus_config.h.in +@@ -1,7 +1,5 @@ +-#ifndef EXODUS_CONFIG_H +-#define EXODUS_CONFIG_H ++#pragma once + #cmakedefine EXODUS_THREADSAFE + + @SEACAS_DEPRECATED_DECLARATIONS@ + +-#endif +diff --git a/ThirdParty/exodusII/vtkexodusII/include/exodusII.h b/ThirdParty/exodusII/vtkexodusII/include/exodusII.h +index b4fa884ab5..051f7ad23d 100644 +--- a/ThirdParty/exodusII/vtkexodusII/include/exodusII.h ++++ b/ThirdParty/exodusII/vtkexodusII/include/exodusII.h +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2021 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2025 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -11,9 +11,7 @@ + * exodusII.h - Exodus II API include file + * + *****************************************************************************/ +- +-#ifndef EXODUSII_H +-#define EXODUSII_H ++#pragma once + + #include "exodus_config.h" + #include "exodusII_cfg.h" +@@ -53,24 +51,27 @@ + #include + #include + ++/** Maximum length of name permitted by NetCDF */ ++#define EX_MAX_NAME NC_MAX_NAME ++ + #ifndef NC_INT64 + #error "NetCDF version 4.1.2 or later is required." + #endif + + /* EXODUS version number */ +-#define EXODUS_VERSION "8.11" +-#define EXODUS_VERSION_MAJOR 8 +-#define EXODUS_VERSION_MINOR 11 +-#define EXODUS_RELEASE_DATE "March 15, 2021" ++#define EXODUS_VERSION "9.04" ++#define EXODUS_VERSION_MAJOR 9 ++#define EXODUS_VERSION_MINOR 4 ++#define EXODUS_RELEASE_DATE "November 5, 2024" + +-#define EX_API_VERS 8.11f ++#define EX_API_VERS 9.04f + #define EX_API_VERS_NODOT (100 * EXODUS_VERSION_MAJOR + EXODUS_VERSION_MINOR) +-#define EX_VERS EX_API_VERS ++#define EX_VERS EX_API_VERS + + /* Retained for backward compatibility */ +-#define NEMESIS_API_VERSION EX_API_VERS ++#define NEMESIS_API_VERSION EX_API_VERS + #define NEMESIS_API_VERSION_NODOT EX_API_VERS_NODOT +-#define NEMESIS_FILE_VERSION 2.6 ++#define NEMESIS_FILE_VERSION 2.6 + /* + * need following extern if this include file is used in a C++ + * program, to keep the C++ compiler from mangling the function names. +@@ -98,27 +99,27 @@ extern "C" { + */ + /* Modes for ex_open */ + #define EX_WRITE 0x0001 /**< ex_open(): open existing file for appending. */ +-#define EX_READ 0x0002 /**< ex_open(): open file for reading (default) */ +- +-#define EX_NOCLOBBER 0x0004 /**< Don't overwrite existing database, default */ +-#define EX_CLOBBER 0x0008 /**< Overwrite existing database if it exists */ +-#define EX_NORMAL_MODEL 0x0010 /**< disable mods that permit storage of larger models */ +-#define EX_64BIT_OFFSET 0x0020 /**< enable mods that permit storage of larger models */ +-#define EX_LARGE_MODEL EX_64BIT_OFFSET /**< enable mods that permit storage of larger models */ +-#define EX_64BIT_DATA 0x400000 /**< CDF-5 format: classic model but 64 bit dimensions and sizes */ +-#define EX_NETCDF4 0x0040 /**< use the hdf5-based netcdf4 output */ +-#define EX_NOSHARE 0x0080 /**< Do not open netcdf file in "share" mode */ +-#define EX_SHARE 0x0100 /**< Do open netcdf file in "share" mode */ +-#define EX_NOCLASSIC 0x0200 /**< Do not force netcdf to classic mode in netcdf4 mode */ ++#define EX_READ 0x0002 /**< ex_open(): open file for reading (default) */ ++ ++#define EX_NOCLOBBER 0x0004 /**< Don't overwrite existing database, default */ ++#define EX_CLOBBER 0x0008 /**< Overwrite existing database if it exists */ ++#define EX_NORMAL_MODEL 0x0010 /**< disable mods that permit storage of larger models */ ++#define EX_64BIT_OFFSET 0x0020 /**< enable mods that permit storage of larger models */ ++#define EX_LARGE_MODEL EX_64BIT_OFFSET /**< enable mods that permit storage of larger models */ ++#define EX_64BIT_DATA 0x400000 /**< CDF-5 format: classic model but 64 bit dimensions and sizes */ ++#define EX_NETCDF4 0x0040 /**< use the hdf5-based netcdf4 output */ ++#define EX_NOSHARE 0x0080 /**< Do not open netcdf file in "share" mode */ ++#define EX_SHARE 0x0100 /**< Do open netcdf file in "share" mode */ ++#define EX_NOCLASSIC 0x0200 /**< Do not force netcdf to classic mode in netcdf4 mode */ + + #define EX_DISKLESS 0x100000 /**< Experimental */ +-#define EX_MMAP 0x200000 /**< Experimental */ ++#define EX_MMAP 0x200000 /**< Experimental */ + + /* Need to distinguish between storage on database (DB in name) and + passed through the API functions (API in name). + */ + #define EX_MAPS_INT64_DB 0x0400 /**< All maps (id, order, ...) store int64_t values */ +-#define EX_IDS_INT64_DB 0x0800 /**< All entity ids (sets, blocks, maps) are int64_t values */ ++#define EX_IDS_INT64_DB 0x0800 /**< All entity ids (sets, blocks, maps) are int64_t values */ + #define EX_BULK_INT64_DB \ + 0x1000 /**< All integer bulk data (local indices, counts, maps); not ids \ + */ +@@ -126,7 +127,7 @@ extern "C" { + (EX_MAPS_INT64_DB | EX_IDS_INT64_DB | EX_BULK_INT64_DB) /**< All of the above... */ + + #define EX_MAPS_INT64_API 0x2000 /**< All maps (id, order, ...) store int64_t values */ +-#define EX_IDS_INT64_API 0x4000 /**< All entity ids (sets, blocks, maps) are int64_t values */ ++#define EX_IDS_INT64_API 0x4000 /**< All entity ids (sets, blocks, maps) are int64_t values */ + #define EX_BULK_INT64_API \ + 0x8000 /**< All integer bulk data (local indices, counts, maps); not ids */ + #define EX_INQ_INT64_API 0x10000 /**< Integers passed to/from ex_inquire() are int64_t */ +@@ -135,9 +136,9 @@ extern "C" { + EX_INQ_INT64_API) /**< All of the above... */ + + /* Parallel IO mode flags... */ +-#define EX_MPIIO 0x20000 ++#define EX_MPIIO 0x20000 + #define EX_MPIPOSIX 0x40000 /**< \deprecated As of libhdf5 1.8.13. */ +-#define EX_PNETCDF 0x80000 ++#define EX_PNETCDF 0x80000 + + /** @}*/ + +@@ -218,6 +219,7 @@ enum ex_inquiry { + EX_INQ_NUM_ELEM_SET_VAR = 69, /**< number of element set variables */ + EX_INQ_NUM_SIDE_SET_VAR = 70, /**< number of sideset variables */ + EX_INQ_NUM_GLOBAL_VAR = 71, /**< number of global variables */ ++ EX_INQ_FILE_FORMAT = 72, /**< netCDF file format */ + EX_INQ_INVALID = -1 + }; + +@@ -245,9 +247,11 @@ NetCDF-4.?.? and later + enum ex_option_type { + EX_OPT_MAX_NAME_LENGTH = + 1, /**< Maximum length of names that will be returned/passed via api call. */ +- EX_OPT_COMPRESSION_TYPE, /**< Not currently used; default is gzip */ +- EX_OPT_COMPRESSION_LEVEL, /**< In the range [0..9]. A value of 0 indicates no compression */ ++ EX_OPT_COMPRESSION_TYPE, /**< Default is gzip */ ++ EX_OPT_COMPRESSION_LEVEL, /**< Range depends on compression type. */ + EX_OPT_COMPRESSION_SHUFFLE, /**< 1 if enabled, 0 if disabled */ ++ EX_OPT_QUANTIZE_NSD, /**< if > 0, Number of significant digits to retain in lossy quantize ++ compression */ + EX_OPT_INTEGER_SIZE_API, /**< 4 or 8 indicating byte size of integers used in api functions. */ + EX_OPT_INTEGER_SIZE_DB, /**< Query only, returns 4 or 8 indicating byte size of integers stored + on the database. */ +@@ -258,6 +262,8 @@ enum ex_compression_type { + EX_COMPRESS_ZLIB = 1, /**< Use ZLIB-based compression (if available) */ + EX_COMPRESS_GZIP = 1, /**< Same as ZLIB, but typical alias used */ + EX_COMPRESS_SZIP, /**< Use SZIP-based compression (if available) */ ++ EX_COMPRESS_ZSTD, /**< Use ZStandard compression (if available) */ ++ EX_COMPRESS_BZ2, /**< Use BZ2 / Bzip2 compression (if available) */ + }; + typedef enum ex_compression_type ex_compression_type; + /** @}*/ +@@ -288,6 +294,98 @@ enum ex_entity_type { + }; + typedef enum ex_entity_type ex_entity_type; + ++enum ex_field_type { ++ EX_FIELD_TYPE_INVALID = 0, ++ EX_FIELD_TYPE_USER_DEFINED, ++ EX_FIELD_TYPE_SEQUENCE, ++ EX_BASIS, ++ EX_QUADRATURE, ++ EX_SCALAR, ++ EX_VECTOR_1D, ++ EX_VECTOR_2D, ++ EX_VECTOR_3D, ++ EX_QUATERNION_2D, ++ EX_QUATERNION_3D, ++ EX_FULL_TENSOR_36, ++ EX_FULL_TENSOR_32, ++ EX_FULL_TENSOR_22, ++ EX_FULL_TENSOR_16, ++ EX_FULL_TENSOR_12, ++ EX_SYM_TENSOR_33, ++ EX_SYM_TENSOR_31, ++ EX_SYM_TENSOR_21, ++ EX_SYM_TENSOR_13, ++ EX_SYM_TENSOR_11, ++ EX_SYM_TENSOR_10, ++ EX_ASYM_TENSOR_03, ++ EX_ASYM_TENSOR_02, ++ EX_ASYM_TENSOR_01, ++ EX_MATRIX_2X2, ++ EX_MATRIX_3X3 ++}; ++typedef enum ex_field_type ex_field_type; ++ ++#define EX_MAX_FIELD_NESTING 2 ++typedef struct ex_field ++{ ++ ex_entity_type entity_type; ++ int64_t entity_id; ++ char name[EX_MAX_NAME + 1]; /* Name of the field */ ++ /* ++ * For basis, user, quadrature -- what is name of the subtype. This ++ * is a comma-separated list of `nesting` names Use two consecutive ++ * commas for an empty type_name. Leave empty if no type_names ++ */ ++ int nesting; /* Number of composite fields (vector at each quadrature point = 2) */ ++ char type_name[EX_MAX_NAME + 1]; ++ ex_field_type type[EX_MAX_FIELD_NESTING]; /* ex_field_type of each nested field */ ++ int cardinality[EX_MAX_FIELD_NESTING]; /* 0 to calculate based on type */ ++ char component_separator[EX_MAX_FIELD_NESTING]; /* empty defaults to '_'; */ ++ char suffices[EX_MAX_NAME + 1]; /* Optional comma-separated list of suffices if type is ++ EX_FIELD_TYPE_USER_DEFINED */ ++} ex_field; ++ ++typedef struct ex_basis ++{ ++ /* ++ clang-format off ++ * ++ * subc_dim: dimension of the subcell associated with the specified DoF ordinal ++ * -- 0 node, 1 edge, 2 face, 3 volume [Range: 0..3] ++ * subc_ordinal: ordinal of the subcell relative to its parent cell ++ * -- 0..n for each ordinal with the same subc dim [Range: <= DoF ordinal] ++ * subc_dof_ordinal: ordinal of the DoF relative to the subcell ++ * subc_num_dof: cardinality of the DoF set associated with this subcell. ++ * xi, eta, mu (ξ, η, ζ): Parametric coordinate location of the DoF ++ * -- (Only first ndim values are valid) ++ * ++ clang-format on ++ */ ++ ++ char name[EX_MAX_NAME + 1]; ++ int cardinality; /* number of `basis` points == dimension of non-null subc_*, xi, eta, mu */ ++ int *subc_dim; ++ int *subc_ordinal; ++ int *subc_dof_ordinal; ++ int *subc_num_dof; ++ double *xi; ++ double *eta; ++ double *zeta; ++} ex_basis; ++ ++typedef struct ex_quadrature ++{ ++ char name[EX_MAX_NAME + 1]; ++ int cardinality; /* Number of quadrature points */ ++ int dimension; /* 1,2,3 -- spatial dimension of points */ ++ double *xi; /* xi (x) coordinate of points; dimension = cardinality or NULL */ ++ double * ++ eta; /* eta (y) coordinate of points; dimension = cardinality if dimension = 2 or 3 or NULL */ ++ double ++ *zeta; /* zeta (z) coordinate of points; dimension = cardinality if dimension == 3. or NULL */ ++ double *weight; /* weights for each point; dimension = cardinality or NULL */ ++} ex_quadrature; ++ + /*! + * ex_opts() function codes - codes are OR'ed into exopts + */ +@@ -311,9 +409,6 @@ typedef enum ex_options ex_options; + * @{ + */ + +-/** Maximum length of name permitted by NetCDF */ +-#define EX_MAX_NAME NC_MAX_NAME +- + /** Maximum length of QA record, element type name */ + #define MAX_STR_LENGTH 32L + /** Default maximum length of an entity name, attribute name, variable name. +@@ -375,31 +470,31 @@ typedef struct ex_attribute + { + ex_entity_type entity_type; + int64_t entity_id; +- char name[NC_MAX_NAME]; ++ char name[EX_MAX_NAME + 1]; + ex_type type; /* int, double, text */ +- size_t value_count; +- void * values; /* not accessed if NULL */ ++ int value_count; ++ void *values; /* not accessed if NULL */ + } ex_attribute; + + typedef struct ex_blob + { +- int64_t id; +- char * name; +- int64_t num_entry; ++ ex_entity_id id; ++ char *name; ++ int64_t num_entry; + } ex_blob; + + typedef struct ex_assembly + { +- int64_t id; +- char * name; ++ ex_entity_id id; ++ char *name; + ex_entity_type type; /* EX_ELEM_BLOCK or EX_ASSEMBLY */ + int entity_count; +- int64_t * entity_list; ++ ex_entity_id *entity_list; + } ex_assembly; + + typedef struct ex_block + { +- int64_t id; ++ ex_entity_id id; + ex_entity_type type; + char topology[MAX_STR_LENGTH + 1]; + int64_t num_entry; +@@ -411,34 +506,34 @@ typedef struct ex_block + + typedef struct ex_set + { +- int64_t id; ++ ex_entity_id id; + ex_entity_type type; + int64_t num_entry; + int64_t num_distribution_factor; +- void_int * entry_list; +- void_int * extra_list; +- void * distribution_factor_list; ++ void_int *entry_list; ++ void_int *extra_list; ++ void *distribution_factor_list; + } ex_set; + + typedef struct ex_block_params + { + void_int *edge_blk_id; +- char ** edge_type; +- int * num_edge_this_blk; +- int * num_nodes_per_edge; +- int * num_attr_edge; ++ char **edge_type; ++ int *num_edge_this_blk; ++ int *num_nodes_per_edge; ++ int *num_attr_edge; + void_int *face_blk_id; +- char ** face_type; +- int * num_face_this_blk; +- int * num_nodes_per_face; +- int * num_attr_face; ++ char **face_type; ++ int *num_face_this_blk; ++ int *num_nodes_per_face; ++ int *num_attr_face; + void_int *elem_blk_id; +- char ** elem_type; +- int * num_elem_this_blk; +- int * num_nodes_per_elem; +- int * num_edges_per_elem; +- int * num_faces_per_elem; +- int * num_attr_elem; ++ char **elem_type; ++ int *num_elem_this_blk; ++ int *num_nodes_per_elem; ++ int *num_edges_per_elem; ++ int *num_faces_per_elem; ++ int *num_attr_elem; + int define_maps; + } ex_block_params; + +@@ -451,7 +546,7 @@ typedef struct ex_set_specs + void_int *sets_dist_index; + void_int *sets_entry_list; + void_int *sets_extra_list; +- void * sets_dist_fact; ++ void *sets_dist_fact; + } ex_set_specs; + + typedef struct ex_var_params +@@ -477,6 +572,12 @@ typedef struct ex_var_params + } ex_var_params; + /** @} */ + ++#ifndef EXODUS_EXPORT ++#if defined(_WIN32) && defined(exodus_shared_EXPORTS) ++#define EXODUS_EXPORT __declspec(dllexport) ++#endif ++#endif /* EXODUS_EXPORT */ ++ + #ifndef EXODUS_EXPORT + #define EXODUS_EXPORT extern + #endif /* EXODUS_EXPORT */ +@@ -494,26 +595,26 @@ EXODUS_EXPORT int ex_copy_transient(int in_exoid, int out_exoid); + #define ex_create(path, mode, comp_ws, io_ws) \ + ex_create_int(path, mode, comp_ws, io_ws, EX_API_VERS_NODOT) + +-EXODUS_EXPORT int ex_create_int(const char *path, int cmode, int *comp_ws, int *io_ws, ++EXODUS_EXPORT int ex_create_int(const char *rel_path, int cmode, int *comp_ws, int *io_ws, + int run_version); + + #define ex_open(path, mode, comp_ws, io_ws, version) \ + ex_open_int(path, mode, comp_ws, io_ws, version, EX_API_VERS_NODOT) + +-EXODUS_EXPORT int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *version, +- int run_version); ++EXODUS_EXPORT int ex_open_int(const char *rel_path, int mode, int *comp_ws, int *io_ws, ++ float *version, int run_version); + + #if defined(PARALLEL_AWARE_EXODUS) + #define ex_create_par(path, mode, comp_ws, io_ws, comm, info) \ + ex_create_par_int(path, mode, comp_ws, io_ws, comm, info, EX_API_VERS_NODOT) + +-EXODUS_EXPORT int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, ++EXODUS_EXPORT int ex_create_par_int(const char *rel_path, int cmode, int *comp_ws, int *io_ws, + MPI_Comm comm, MPI_Info info, int my_version); + + #define ex_open_par(path, mode, comp_ws, io_ws, version, comm, info) \ + ex_open_par_int(path, mode, comp_ws, io_ws, version, comm, info, EX_API_VERS_NODOT) + +-EXODUS_EXPORT int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, ++EXODUS_EXPORT int ex_open_par_int(const char *rel_path, int mode, int *comp_ws, int *io_ws, + float *version, MPI_Comm comm, MPI_Info info, int my_version); + #endif + +@@ -524,8 +625,7 @@ EXODUS_EXPORT int ex_get_group_ids(int parent_id, int *num_groups, int *group_id + EXODUS_EXPORT int ex_get_info(int exoid, char **info); + + EXODUS_EXPORT int ex_get_qa(int exoid, char *qa_record[][4]); +- +-EXODUS_EXPORT int ex_put_info(int exoid, int num_info, char *info[]); ++EXODUS_EXPORT int ex_put_info(int exoid, int num_info, char *const info[]); + + EXODUS_EXPORT int ex_put_qa(int exoid, int num_qa_records, char *qa_record[][4]); + +@@ -540,11 +640,11 @@ EXODUS_EXPORT void ex_set_err(const char *module_name, const char *message, int + EXODUS_EXPORT const char *ex_strerror(int err_num); + EXODUS_EXPORT void ex_get_err(const char **msg, const char **func, int *err_num); + EXODUS_EXPORT int ex_opts(int options); +-EXODUS_EXPORT int ex_inquire(int exoid, ex_inquiry req_info, void_int * /*ret_int*/, +- float * /*ret_float*/, char * /*ret_char*/); +-EXODUS_EXPORT int64_t ex_inquire_int(int exoid, ex_inquiry req_info); +-EXODUS_EXPORT int ex_int64_status(int exoid); +-EXODUS_EXPORT int ex_set_int64_status(int exoid, int mode); ++EXODUS_EXPORT int ex_inquire(int exoid, ex_inquiry req_info, void_int *ret_int, float *ret_float, ++ char *ret_char); ++EXODUS_EXPORT int64_t ex_inquire_int(int exoid, ex_inquiry req_info); ++EXODUS_EXPORT unsigned ex_int64_status(int exoid); ++EXODUS_EXPORT int ex_set_int64_status(int exoid, int mode); + + EXODUS_EXPORT void ex_print_config(void); + EXODUS_EXPORT const char *ex_config(void); +@@ -590,8 +690,8 @@ EXODUS_EXPORT int ex_get_truth_table(int exoid, ex_entity_type obj_type, int num + int *var_tab); + + EXODUS_EXPORT int ex_put_all_var_param(int exoid, int num_g, int num_n, int num_e, +- int *elem_var_tab, int num_m, int *nset_var_tab, int num_s, +- int *sset_var_tab); ++ const int *elem_var_tab, int num_m, const int *nset_var_tab, ++ int num_s, const int *sset_var_tab); + + EXODUS_EXPORT int ex_put_time(int exoid, int time_step, const void *time_value); + +@@ -601,7 +701,7 @@ EXODUS_EXPORT int ex_put_variable_name(int exoid, ex_entity_type obj_type, int v + const char *var_name); + + EXODUS_EXPORT int ex_put_variable_names(int exoid, ex_entity_type obj_type, int num_vars, +- char *var_names[]); ++ char *const var_names[]); + + EXODUS_EXPORT int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars); + +@@ -609,12 +709,12 @@ EXODUS_EXPORT int ex_put_reduction_variable_name(int exoid, ex_entity_type obj_t + const char *var_name); + + EXODUS_EXPORT int ex_put_reduction_variable_names(int exoid, ex_entity_type obj_type, int num_vars, +- char *var_names[]); ++ char *const var_names[]); + + EXODUS_EXPORT int ex_put_reduction_variable_param(int exoid, ex_entity_type obj_type, int num_vars); + + EXODUS_EXPORT int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_var, +- int *var_tab); ++ const int *var_tab); + + /* (MODIFIED) Write All Results Variables Parameters */ + EXODUS_EXPORT int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp); +@@ -624,6 +724,11 @@ EXODUS_EXPORT int ex_put_var(int exoid, int time_step, ex_entity_type var_type, + ex_entity_id obj_id, int64_t num_entries_this_obj, + const void *var_vals); + ++/* Write Edge Face or Element Variable Values Defined On Blocks or Sets Through Time */ ++EXODUS_EXPORT int ex_put_var_multi_time(int exoid, ex_entity_type var_type, int var_index, ++ ex_entity_id obj_id, int64_t num_entries_this_obj, ++ int beg_time_step, int end_time_step, const void *var_vals); ++ + /* Write Partial Edge Face or Element Variable Values on Blocks or Sets at a Time Step */ + EXODUS_EXPORT int ex_put_partial_var(int exoid, int time_step, ex_entity_type var_type, + int var_index, ex_entity_id obj_id, int64_t start_index, +@@ -638,6 +743,17 @@ EXODUS_EXPORT int ex_put_reduction_vars(int exoid, int time_step, ex_entity_type + EXODUS_EXPORT int ex_get_var(int exoid, int time_step, ex_entity_type var_type, int var_index, + ex_entity_id obj_id, int64_t num_entry_this_obj, void *var_vals); + ++/* Read Edge Face or Element Variable Values Defined On Blocks or Sets at a Time Step */ ++EXODUS_EXPORT int ex_get_var_multi_time(int exoid, ex_entity_type var_type, int var_index, ++ ex_entity_id obj_id, int64_t num_entry_this_obj, ++ int beg_time_step, int end_time_step, void *var_vals); ++ ++/* Read Edge Face or Element Variable Values Defined On Blocks or Sets Through Time */ ++EXODUS_EXPORT int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, ++ ex_entity_id id, int beg_time_step, int end_time_step, ++ void *var_vals); ++ ++/* Read Partial Edge Face or Element Variable Values on Blocks or Sets at a Time Step */ + EXODUS_EXPORT int ex_get_partial_var(int exoid, int time_step, ex_entity_type var_type, + int var_index, ex_entity_id obj_id, int64_t start_index, + int64_t num_entities, void *var_vals); +@@ -646,10 +762,6 @@ EXODUS_EXPORT int ex_get_partial_var(int exoid, int time_step, ex_entity_type va + EXODUS_EXPORT int ex_get_reduction_vars(int exoid, int time_step, ex_entity_type obj_type, + ex_entity_id obj_id, int64_t num_variables, void *var_vals); + +-/* Read Edge Face or Element Variable Values Defined On Blocks or Sets Through Time */ +-EXODUS_EXPORT int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, int64_t id, +- int beg_time_step, int end_time_step, void *var_vals); +- + /*! @} */ + + /* ======================================================================== +@@ -659,14 +771,14 @@ EXODUS_EXPORT int ex_get_var_time(int exoid, ex_entity_type var_type, int var_in + * Initial Information Routines + *===========================================================================*/ + EXODUS_EXPORT int ex_get_init_info(int exoid, /* NemesisI file ID */ +- int * num_proc, /* Number of processors */ +- int * num_proc_in_f, /* Number of procs in this file */ ++ int *num_proc, /* Number of processors */ ++ int *num_proc_in_f, /* Number of procs in this file */ + char *ftype); + +-EXODUS_EXPORT int ex_put_init_info(int exoid, /* NemesisI file ID */ +- int num_proc, /* Number of processors */ +- int num_proc_in_f, /* Number of procs in this file */ +- char *ftype); ++EXODUS_EXPORT int ex_put_init_info(int exoid, /* NemesisI file ID */ ++ int num_proc, /* Number of processors */ ++ int num_proc_in_f, /* Number of procs in this file */ ++ const char *ftype); + + EXODUS_EXPORT int ex_get_init_global(int exoid, /* NemesisI file ID */ + void_int *num_nodes_g, /* Number of global FEM nodes */ +@@ -708,14 +820,15 @@ EXODUS_EXPORT int ex_put_loadbal_param(int exoid, /* NemesisI file + int processor /* Processor ID */ + ); + +-EXODUS_EXPORT int ex_put_loadbal_param_cc(int exoid, /* NetCDF/Exodus file ID */ +- void_int *num_int_nodes, /* Number of internal node IDs */ +- void_int *num_bor_nodes, /* Number of border node IDs */ +- void_int *num_ext_nodes, /* Number of external node IDs */ +- void_int *num_int_elems, /* Number of internal elem IDs */ +- void_int *num_bor_elems, /* Number of border elem IDs */ +- void_int *num_node_cmaps, /* Number of nodal comm maps */ +- void_int *num_elem_cmaps /* Number of elem comm maps */ ++EXODUS_EXPORT int ++ex_put_loadbal_param_cc(int exoid, /* NetCDF/Exodus file ID */ ++ const void_int *num_int_nodes, /* Number of internal node IDs */ ++ const void_int *num_bor_nodes, /* Number of border node IDs */ ++ const void_int *num_ext_nodes, /* Number of external node IDs */ ++ const void_int *num_int_elems, /* Number of internal elem IDs */ ++ const void_int *num_bor_elems, /* Number of border elem IDs */ ++ const void_int *num_node_cmaps, /* Number of nodal comm maps */ ++ const void_int *num_elem_cmaps /* Number of elem comm maps */ + ); + + /* Utility function to replace strncpy, strcpy -- guarantee null termination */ +@@ -784,11 +897,12 @@ EXODUS_EXPORT int ex_get_attr_param(int exoid, ex_entity_type obj_type, ex_entit + int *num_attrs); + + EXODUS_EXPORT int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, +- char *elem_type[], const void_int *num_elem_this_blk, ++ char *const elem_type[], ++ const void_int *num_elem_this_blk, + const void_int *num_nodes_per_elem, + const void_int *num_attr_this_blk, int define_maps); + +-EXODUS_EXPORT int ex_put_coord_names(int exoid, char *coord_names[]); ++EXODUS_EXPORT int ex_put_coord_names(int exoid, char *const coord_names[]); + + EXODUS_EXPORT int ex_put_coord(int exoid, const void *x_coor, const void *y_coor, + const void *z_coor); +@@ -814,15 +928,18 @@ EXODUS_EXPORT int ex_get_partial_id_map(int exoid, ex_entity_type map_type, + int64_t start_entity_num, int64_t num_entities, + void_int *map); + ++EXODUS_EXPORT int ex_get_block_id_map(int exoid, ex_entity_type map_type, ex_entity_id entity_id, ++ void_int *map); ++ + EXODUS_EXPORT int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids, +- void *pt_coordinates, const char *tags); ++ const void *pt_coordinates, const char *tags); + + EXODUS_EXPORT int ex_put_map_param(int exoid, int num_node_maps, int num_elem_maps); + + EXODUS_EXPORT int ex_put_name(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, + const char *name); + +-EXODUS_EXPORT int ex_put_names(int exoid, ex_entity_type obj_type, char *names[]); ++EXODUS_EXPORT int ex_put_names(int exoid, ex_entity_type obj_type, char *const names[]); + + EXODUS_EXPORT int ex_put_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, + int64_t start_num, int64_t num_ent, int attrib_index, +@@ -859,7 +976,7 @@ EXODUS_EXPORT int ex_get_block(int exoid, ex_entity_type blk_type, ex_entity_id + /* Read Edge Face or Element Block Parameters */ + EXODUS_EXPORT int ex_get_block_param(int exoid, ex_block *block); + +-EXODUS_EXPORT int ex_put_block_param(int exoid, const ex_block block); ++EXODUS_EXPORT int ex_put_block_param(int exoid, ex_block block); + + EXODUS_EXPORT int ex_get_block_params(int exoid, size_t block_count, struct ex_block **blocks); + +@@ -925,26 +1042,43 @@ EXODUS_EXPORT int ex_put_attr_names(int exoid, ex_entity_type blk_type, ex_entit + EXODUS_EXPORT int ex_get_attr_names(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, + char **names); + +-EXODUS_EXPORT int ex_put_assembly(int exoid, const struct ex_assembly assembly); ++EXODUS_EXPORT int ex_put_assembly(int exoid, struct ex_assembly assembly); + EXODUS_EXPORT int ex_get_assembly(int exoid, struct ex_assembly *assembly); + + EXODUS_EXPORT int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assemblies); + EXODUS_EXPORT int ex_get_assemblies(int exoid, struct ex_assembly *assemblies); + +-EXODUS_EXPORT int ex_put_blob(int exoid, const struct ex_blob blob); ++EXODUS_EXPORT int ex_put_blob(int exoid, struct ex_blob blob); + EXODUS_EXPORT int ex_get_blob(int exoid, struct ex_blob *blob); + + EXODUS_EXPORT int ex_put_blobs(int exoid, size_t count, const struct ex_blob *blobs); + EXODUS_EXPORT int ex_get_blobs(int exoid, struct ex_blob *blobs); + ++EXODUS_EXPORT int ex_put_multi_field_metadata(int exoid, const ex_field *field, int field_count); ++EXODUS_EXPORT int ex_put_field_metadata(int exoid, ex_field field); ++EXODUS_EXPORT int ex_put_field_suffices(int exoid, ex_field field, const char *suffices); ++EXODUS_EXPORT int ex_get_field_metadata(int exoid, ex_field *field); ++EXODUS_EXPORT int ex_get_field_metadata_count(int exoid, ex_entity_type obj_type, ex_entity_id id); ++EXODUS_EXPORT int ex_get_field_suffices(int exoid, ex_field field, char *suffices); ++ ++EXODUS_EXPORT int ex_get_basis_count(int exoid); ++EXODUS_EXPORT int ex_get_basis(int exoid, ex_basis **pbasis, int *num_basis); ++EXODUS_EXPORT int ex_put_basis(int exoid, ex_basis basis); ++ ++EXODUS_EXPORT int ex_get_quadrature_count(int exoid); ++EXODUS_EXPORT int ex_get_quadrature(int exoid, ex_quadrature **pquad, int *num_quad); ++EXODUS_EXPORT int ex_put_quadrature(int exoid, ex_quadrature quad); ++ + /* Write arbitrary integer, double, or text attributes on an entity */ + EXODUS_EXPORT int ex_put_attribute(int exoid, ex_attribute attributes); +-EXODUS_EXPORT int ex_put_attributes(int exoid, size_t attr_count, ex_attribute *attributes); ++EXODUS_EXPORT int ex_put_attributes(int exoid, size_t attr_count, const ex_attribute *attributes); + + EXODUS_EXPORT int ex_put_double_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, +- const char *atr_name, int num_values, double *values); ++ const char *atr_name, int num_values, ++ const double *values); + EXODUS_EXPORT int ex_put_integer_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, +- const char *atr_name, int num_values, void_int *values); ++ const char *atr_name, int num_values, ++ const void_int *values); + EXODUS_EXPORT int ex_put_text_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, + const char *atr_name, const char *value); + +@@ -1041,10 +1175,10 @@ EXODUS_EXPORT int ex_get_ns_param_global(int exoid, /**< NetCDF/Exodu + ); + + EXODUS_EXPORT int +-ex_put_ns_param_global(int exoid, /**< NemesisI file ID */ +- void_int *global_ids, /**< Vector of global node-set IDs */ +- void_int *node_cnts, /**< Vector of node counts in node-sets */ +- void_int *df_cnts /**< Vector of dist factor counts in node-sets */ ++ex_put_ns_param_global(int exoid, /**< NemesisI file ID */ ++ const void_int *global_ids, /**< Vector of global node-set IDs */ ++ const void_int *node_cnts, /**< Vector of node counts in node-sets */ ++ const void_int *df_cnts /**< Vector of dist factor counts in node-sets */ + ); + + EXODUS_EXPORT int ex_get_ss_param_global(int exoid, /**< NetCDF/Exodus file ID */ +@@ -1053,12 +1187,12 @@ EXODUS_EXPORT int ex_get_ss_param_global(int exoid, /**< NetCDF/Exodu + void_int *df_cnts /**< Global dist. factor count */ + ); + +-EXODUS_EXPORT int +-ex_put_ss_param_global(int exoid, /**< NemesisI file ID */ +- void_int *global_ids, /**< Vector of global side-set IDs */ +- void_int *side_cnts, /**< Vector of element/side counts in each side set */ +- void_int *df_cnts /**< Vector of dist. factor */ +- /**< counts in each side set */ ++EXODUS_EXPORT int ex_put_ss_param_global( ++ int exoid, /**< NemesisI file ID */ ++ const void_int *global_ids, /**< Vector of global side-set IDs */ ++ const void_int *side_cnts, /**< Vector of element/side counts in each side set */ ++ const void_int *df_cnts /**< Vector of dist. factor */ ++ /**< counts in each side set */ + ); + + EXODUS_EXPORT int +@@ -1068,9 +1202,9 @@ ex_get_eb_info_global(int exoid, /**< NemesisI file ID + ); + + EXODUS_EXPORT int +-ex_put_eb_info_global(int exoid, /**< NemesisI file ID */ +- void_int *el_blk_ids, /**< Vector of global element IDs */ +- void_int *el_blk_cnts /**< Vector of global element counts */ ++ex_put_eb_info_global(int exoid, /**< NemesisI file ID */ ++ const void_int *el_blk_ids, /**< Vector of global element IDs */ ++ const void_int *el_blk_cnts /**< Vector of global element counts */ + ); + + /*============================================================================= +@@ -1078,7 +1212,7 @@ ex_put_eb_info_global(int exoid, /**< NemesisI file ID */ + *===========================================================================*/ + EXODUS_EXPORT int ex_get_elem_type(int exoid, /**< NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /**< Element block ID */ +- char * elem_type /**< The name of the element type */ ++ char *elem_type /**< The name of the element type */ + ); + + /*============================================================================= +@@ -1091,11 +1225,12 @@ EXODUS_EXPORT int ex_get_processor_node_maps(int exoid, /**< NetCDF/Ex + int processor /**< Processor IDs */ + ); + +-EXODUS_EXPORT int ex_put_processor_node_maps(int exoid, /**< NetCDF/Exodus file ID */ +- void_int *node_mapi, /**< Internal FEM node IDs */ +- void_int *node_mapb, /**< Border FEM node IDs */ +- void_int *node_mape, /**< External FEM node IDs */ +- int proc_id /**< This processor ID */ ++EXODUS_EXPORT int ++ex_put_processor_node_maps(int exoid, /**< NetCDF/Exodus file ID */ ++ const void_int *node_mapi, /**< Internal FEM node IDs */ ++ const void_int *node_mapb, /**< Border FEM node IDs */ ++ const void_int *node_mape, /**< External FEM node IDs */ ++ int proc_id /**< This processor ID */ + ); + + EXODUS_EXPORT int ex_get_processor_elem_maps(int exoid, /**< NetCDF/Exodus file ID */ +@@ -1104,10 +1239,11 @@ EXODUS_EXPORT int ex_get_processor_elem_maps(int exoid, /**< NetCDF/Ex + int processor /**< Processor ID */ + ); + +-EXODUS_EXPORT int ex_put_processor_elem_maps(int exoid, /**< NetCDF/Exodus file ID */ +- void_int *elem_mapi, /**< Internal FEM element IDs */ +- void_int *elem_mapb, /**< Border FEM element IDs */ +- int processor /**< This processor ID */ ++EXODUS_EXPORT int ++ex_put_processor_elem_maps(int exoid, /**< NetCDF/Exodus file ID */ ++ const void_int *elem_mapi, /**< Internal FEM element IDs */ ++ const void_int *elem_mapb, /**< Border FEM element IDs */ ++ int processor /**< This processor ID */ + ); + + /*============================================================================= +@@ -1123,64 +1259,76 @@ ex_get_cmap_params(int exoid, /**< NetCDF/Exodus file ID */ + int processor /**< This processor ID */ + ); + +-EXODUS_EXPORT int ex_put_cmap_params(int exoid, /**< NetCDF/Exodus file ID */ +- void_int *node_cmap_ids, /**< Node map IDs */ +- void_int *node_cmap_node_cnts, /**< Nodes in nodal comm */ +- void_int *elem_cmap_ids, /**< Elem map IDs */ +- void_int *elem_cmap_elem_cnts, /**< Elems in elemental comm */ +- int64_t processor /**< This processor ID */ ++EXODUS_EXPORT int ++ex_put_cmap_params(int exoid, /**< NetCDF/Exodus file ID */ ++ const void_int *node_cmap_ids, /**< Node map IDs */ ++ const void_int *node_cmap_node_cnts, /**< Nodes in nodal comm */ ++ const void_int *elem_cmap_ids, /**< Elem map IDs */ ++ const void_int *elem_cmap_elem_cnts, /**< Elems in elemental comm */ ++ int64_t processor /**< This processor ID */ + ); + + EXODUS_EXPORT int +-ex_put_cmap_params_cc(int exoid, /**< NetCDF/Exodus file ID */ +- void_int *node_cmap_ids, /**< Node map IDs */ +- void_int *node_cmap_node_cnts, /**< Nodes in nodal comm */ +- void_int *node_proc_ptrs, /**< Pointer into array for node maps */ +- void_int *elem_cmap_ids, /**< Elem map IDs */ +- void_int *elem_cmap_elem_cnts, /**< Elems in elemental comm */ +- void_int *elem_proc_ptrs /**< Pointer into array for elem maps */ ++ex_put_cmap_params_cc(int exoid, /**< NetCDF/Exodus file ID */ ++ const void_int *node_cmap_ids, /**< Node map IDs */ ++ const void_int *node_cmap_node_cnts, /**< Nodes in nodal comm */ ++ const void_int *node_proc_ptrs, /**< Pointer into array for node maps */ ++ const void_int *elem_cmap_ids, /**< Elem map IDs */ ++ const void_int *elem_cmap_elem_cnts, /**< Elems in elemental comm */ ++ const void_int *elem_proc_ptrs /**< Pointer into array for elem maps */ + ); + + EXODUS_EXPORT int ex_get_node_cmap(int exoid, /**< NetCDF/Exodus file ID */ + ex_entity_id map_id, /**< Map ID */ +- void_int * node_ids, /**< FEM node IDs */ +- void_int * proc_ids, /**< Processor IDs */ ++ void_int *node_ids, /**< FEM node IDs */ ++ void_int *proc_ids, /**< Processor IDs */ + int processor /**< This processor ID */ + ); + +-EXODUS_EXPORT int ex_put_node_cmap(int exoid, /**< NetCDF/Exodus file ID */ +- ex_entity_id map_id, /**< Nodal comm map ID */ +- void_int * node_ids, /**< FEM node IDs */ +- void_int * proc_ids, /**< Processor IDs */ +- int processor /**< This processor ID */ ++EXODUS_EXPORT int ex_put_node_cmap(int exoid, /**< NetCDF/Exodus file ID */ ++ ex_entity_id map_id, /**< Nodal comm map ID */ ++ const void_int *node_ids, /**< FEM node IDs */ ++ const void_int *proc_ids, /**< Processor IDs */ ++ int processor /**< This processor ID */ + ); + + EXODUS_EXPORT int +-ex_put_partial_node_cmap(int exoid, /**< NetCDF/Exodus file ID */ +- ex_entity_id map_id, /**< Nodal comm map ID */ +- int64_t start_entity_num, /**< Starting position to write to */ +- int64_t num_entities, /**< Number of nodes to write */ +- void_int * node_ids, /**< FEM node IDs */ +- void_int * proc_ids, /**< Processor IDs */ +- int processor /**< This processor ID */ ++ex_put_partial_node_cmap(int exoid, /**< NetCDF/Exodus file ID */ ++ ex_entity_id map_id, /**< Nodal comm map ID */ ++ int64_t start_entity_num, /**< Starting position to write to */ ++ int64_t num_entities, /**< Number of nodes to write */ ++ const void_int *node_ids, /**< FEM node IDs */ ++ const void_int *proc_ids, /**< Processor IDs */ ++ int processor /**< This processor ID */ + ); + + EXODUS_EXPORT int ex_get_elem_cmap(int exoid, /**< NetCDF/Exodus file ID */ + ex_entity_id map_id, /**< Elemental comm map ID */ +- void_int * elem_ids, /**< Element IDs */ +- void_int * side_ids, /**< Element side IDs */ +- void_int * proc_ids, /**< Processor IDs */ ++ void_int *elem_ids, /**< Element IDs */ ++ void_int *side_ids, /**< Element side IDs */ ++ void_int *proc_ids, /**< Processor IDs */ + int processor /**< This processor ID */ + ); + +-EXODUS_EXPORT int ex_put_elem_cmap(int exoid, /**< NetCDF/Exodus file ID */ +- ex_entity_id map_id, /**< Elemental comm map ID */ +- void_int * elem_ids, /**< Vector of element IDs */ +- void_int * side_ids, /**< Vector of side IDs */ +- void_int * proc_ids, /**< Vector of processor IDs */ +- int processor /**< This processor ID */ ++EXODUS_EXPORT int ex_put_elem_cmap(int exoid, /**< NetCDF/Exodus file ID */ ++ ex_entity_id map_id, /**< Elemental comm map ID */ ++ const void_int *elem_ids, /**< Vector of element IDs */ ++ const void_int *side_ids, /**< Vector of side IDs */ ++ const void_int *proc_ids, /**< Vector of processor IDs */ ++ int processor /**< This processor ID */ + ); + ++EXODUS_EXPORT int ex_initialize_basis_struct(ex_basis *basis, size_t num_basis, int mode); ++EXODUS_EXPORT int ex_initialize_quadrature_struct(ex_quadrature *quad, size_t num_quad, int mode); ++ ++EXODUS_EXPORT const char *ex_component_field_name(ex_field *field, ++ int component[EX_MAX_FIELD_NESTING]); ++EXODUS_EXPORT const char *ex_field_component_suffix(ex_field *field, int nest_level, int component); ++EXODUS_EXPORT int ex_field_cardinality(ex_field_type field_type); ++EXODUS_EXPORT const char *ex_field_type_name(ex_field_type field_type); ++EXODUS_EXPORT ex_field_type ex_string_to_field_type_enum(const char *field_name); ++EXODUS_EXPORT const char *ex_field_type_enum_to_string(ex_field_type field_type); ++ + /*! @} */ + + /* Deprecated Code Handling Options: +@@ -1297,7 +1445,7 @@ SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_nset_var_tab(int exoid, int num_nodes + SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_nset_var(int exoid, int time_step, int nset_var_index, + ex_entity_id nset_id, + int64_t num_node_this_nset, +- void * nset_var_vals); ++ void *nset_var_vals); + + SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_one_elem_attr(int exoid, ex_entity_id elem_blk_id, + int attrib_index, void *attrib); +@@ -1318,7 +1466,7 @@ SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_side_set_param(int exoid, ex_entity_i + SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_sset_var(int exoid, int time_step, int sset_var_index, + ex_entity_id sset_id, + int64_t num_side_this_sset, +- void * sset_var_vals); ++ void *sset_var_vals); + + SEACAS_DEPRECATED EXODUS_EXPORT int ex_get_sset_var_tab(int exoid, int num_sidesets, + int num_sset_var, int *sset_var_tab); +@@ -1371,7 +1519,7 @@ SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_num_map(int exoid, const void_in + SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_var(int exoid, int time_step, int elem_var_index, + ex_entity_id elem_blk_id, + int64_t num_elem_this_blk, +- const void * elem_var_vals); ++ const void *elem_var_vals); + + SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_elem_var_tab(int exoid, int num_elem_blk, + int num_elem_var, int *elem_var_tab); +@@ -1397,7 +1545,7 @@ SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_node_set_param(int exoid, ex_entity_i + SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_nset_var(int exoid, int time_step, int nset_var_index, + ex_entity_id nset_id, + int64_t num_nodes_this_nset, +- const void * nset_var_vals); ++ const void *nset_var_vals); + + SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_nset_var_tab(int exoid, int num_nset, int num_nset_var, + int *nset_var_tab); +@@ -1419,7 +1567,7 @@ SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_side_set_param(int exoid, ex_entity_i + SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_sset_var(int exoid, int time_step, int sset_var_index, + ex_entity_id sset_id, + int64_t num_faces_this_sset, +- const void * sset_var_vals); ++ const void *sset_var_vals); + + SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_sset_var_tab(int exoid, int num_sset, int num_sset_var, + int *sset_var_tab); +@@ -1473,8 +1621,8 @@ ex_get_n_side_set(int exoid, /**< NetCDF/Exodus file ID */ + ex_entity_id side_set_id, /**< Side-set ID to read */ + int64_t start_side_num, /**< Starting element number */ + int64_t num_sides, /**< Number of sides to read */ +- void_int * side_set_elem_list, /**< List of element IDs */ +- void_int * side_set_side_list /**< List of side IDs */ ++ void_int *side_set_elem_list, /**< List of element IDs */ ++ void_int *side_set_side_list /**< List of side IDs */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1491,7 +1639,7 @@ ex_get_n_side_set_df(int exoid, /**< NetCDF/Exodus file ID + ex_entity_id side_set_id, /**< Side-set ID */ + int64_t start_num, /**< Starting df number */ + int64_t num_df_to_get, /**< Number of df's to read */ +- void * side_set_dist_fact /**< Distribution factors */ ++ void *side_set_dist_fact /**< Distribution factors */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1499,7 +1647,7 @@ ex_put_n_side_set_df(int exoid, /**< NetCDF/Exodus file ID + ex_entity_id side_set_id, /**< Side-set ID */ + int64_t start_num, /**< Starting df number */ + int64_t num_df_to_get, /**< Number of df's to write */ +- void * side_set_dist_fact /**< Distribution factors */ ++ void *side_set_dist_fact /**< Distribution factors */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1507,7 +1655,7 @@ ex_get_n_node_set(int exoid, /**< NetCDF/Exodus file ID */ + ex_entity_id node_set_id, /**< Node set ID */ + int64_t start_node_num, /**< Node index to start reading at */ + int64_t num_nodes, /**< Number of nodes to read */ +- void_int * node_set_node_list /**< List of nodes in node set */ ++ void_int *node_set_node_list /**< List of nodes in node set */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1523,7 +1671,7 @@ ex_get_n_node_set_df(int exoid, /**< NetCDF/Exodus file ID + ex_entity_id node_set_id, /**< Node-set ID */ + int64_t start_num, /**< Starting df number */ + int64_t num_df_to_get, /**< Number of df's to read */ +- void * node_set_dist_fact /**< Distribution factors */ ++ void *node_set_dist_fact /**< Distribution factors */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1531,7 +1679,7 @@ ex_put_n_node_set_df(int exoid, /**< NetCDF/Exodus file ID + ex_entity_id node_set_id, /**< Node-set ID */ + int64_t start_num, /**< Starting df number */ + int64_t num_df_to_get, /**< Number of df's to write */ +- void * node_set_dist_fact /**< Distribution factors */ ++ void *node_set_dist_fact /**< Distribution factors */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1539,7 +1687,7 @@ ex_get_n_elem_conn(int exoid, /**< NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /**< Element block ID */ + int64_t start_elem_num, /**< Starting position to read from */ + int64_t num_elems, /**< Number of elements to read */ +- void_int * connect /**< Connectivity vector */ ++ void_int *connect /**< Connectivity vector */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1555,7 +1703,7 @@ ex_get_n_elem_attr(int exoid, /**< NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /**< Element block ID */ + int64_t start_elem_num, /**< Starting position to read from */ + int64_t num_elems, /**< Number of elements to read */ +- void * attrib /**< Attribute */ ++ void *attrib /**< Attribute */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1563,7 +1711,7 @@ ex_put_n_elem_attr(int exoid, /**< NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /**< Element block ID */ + int64_t start_elem_num, /**< Starting position to write to */ + int64_t num_elems, /**< Number of elements to write */ +- void * attrib /**< Attribute */ ++ void *attrib /**< Attribute */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1619,7 +1767,7 @@ ex_get_partial_elem_conn(int exoid, /**< NetCDF/Exodus file ID + ex_entity_id elem_blk_id, /**< Element block ID */ + int64_t start_elem_num, /**< Starting position to read from */ + int64_t num_elems, /**< Number of elements to read */ +- void_int * connect /**< Connectivity vector */ ++ void_int *connect /**< Connectivity vector */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1627,7 +1775,7 @@ ex_get_partial_elem_attr(int exoid, /**< NetCDF/Exodus file ID + ex_entity_id elem_blk_id, /**< Element block ID */ + int64_t start_elem_num, /**< Starting position to read from */ + int64_t num_elems, /**< Number of elements to read */ +- void * attrib /**< Attribute */ ++ void *attrib /**< Attribute */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1649,7 +1797,7 @@ ex_get_partial_node_set(int exoid, /**< NetCDF/Exodus file + ex_entity_id node_set_id, /**< Node set ID */ + int64_t start_node_num, /**< Node index to start reading at */ + int64_t num_nodes, /**< Number of nodes to read */ +- void_int * node_set_node_list /**< List of nodes in node set */ ++ void_int *node_set_node_list /**< List of nodes in node set */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1657,7 +1805,7 @@ ex_get_partial_node_set_df(int exoid, /**< NetCDF/Exodus fi + ex_entity_id node_set_id, /**< Node-set ID */ + int64_t start_num, /**< Starting df number */ + int64_t num_df_to_get, /**< Number of df's to read */ +- void * node_set_dist_fact /**< Distribution factors */ ++ void *node_set_dist_fact /**< Distribution factors */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1665,8 +1813,8 @@ ex_get_partial_side_set(int exoid, /**< NetCDF/Exodus file + ex_entity_id side_set_id, /**< Side-set ID to read */ + int64_t start_side_num, /**< Starting element number */ + int64_t num_sides, /**< Number of sides to read */ +- void_int * side_set_elem_list, /**< List of element IDs */ +- void_int * side_set_side_list /**< List of side IDs */ ++ void_int *side_set_elem_list, /**< List of element IDs */ ++ void_int *side_set_side_list /**< List of side IDs */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1674,7 +1822,7 @@ ex_get_partial_side_set_df(int exoid, /**< NetCDF/Exodus fi + ex_entity_id side_set_id, /**< Side-set ID */ + int64_t start_num, /**< Starting df number */ + int64_t num_df_to_get, /**< Number of df's to read */ +- void * side_set_dist_fact /**< Distribution factors */ ++ void *side_set_dist_fact /**< Distribution factors */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int ex_put_partial_node_num_map(int exoid, int64_t start_ent, +@@ -1703,7 +1851,7 @@ ex_put_partial_side_set_df(int exoid, /**< NetCDF/Exodus fi + ex_entity_id side_set_id, /**< Side-set ID */ + int64_t start_num, /**< Starting df number */ + int64_t num_df_to_get, /**< Number of df's to write */ +- void * side_set_dist_fact /**< Distribution factors */ ++ void *side_set_dist_fact /**< Distribution factors */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1719,7 +1867,7 @@ ex_put_partial_node_set_df(int exoid, /**< NetCDF/Exodus fi + ex_entity_id node_set_id, /**< Node-set ID */ + int64_t start_num, /**< Starting df number */ + int64_t num_df_to_get, /**< Number of df's to write */ +- void * node_set_dist_fact /**< Distribution factors */ ++ void *node_set_dist_fact /**< Distribution factors */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1735,7 +1883,7 @@ ex_put_partial_elem_attr(int exoid, /**< NetCDF/Exodus file ID + ex_entity_id elem_blk_id, /**< Element block ID */ + int64_t start_elem_num, /**< Starting position to write to */ + int64_t num_elems, /**< Number of elements to write */ +- void * attrib /**< Attribute */ ++ void *attrib /**< Attribute */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1745,7 +1893,7 @@ ex_put_elem_var_slab(int exoid, /**< NetCDF/Exodus file ID */ + ex_entity_id elem_blk_id, /**< elemental block id */ + int64_t start_pos, /**< Starting position to write to */ + int64_t num_vals, /**< Number of elements to write */ +- void * elem_var_vals /**< variable values */ ++ void *elem_var_vals /**< variable values */ + ); + + SEACAS_DEPRECATED EXODUS_EXPORT int +@@ -1754,7 +1902,7 @@ ex_put_nodal_var_slab(int exoid, /**< NetCDF/Exodus file ID */ + int nodal_var_index, /**< Nodal variable index */ + int64_t start_pos, /**< Start position for write */ + int64_t num_vals, /**< Number of nodal variables */ +- void * nodal_var_vals /**< Nodal variable values */ ++ void *nodal_var_vals /**< Nodal variable values */ + ); + + #endif +@@ -1781,7 +1929,7 @@ EXODUS_EXPORT EX_errval_t *ex_errval; + EXODUS_EXPORT int exerrval; /**< shared error return value */ + #endif + +-EXODUS_EXPORT char * ex_name_of_object(ex_entity_type obj_type); ++EXODUS_EXPORT char *ex_name_of_object(ex_entity_type obj_type); + EXODUS_EXPORT ex_entity_type ex_var_type_to_ex_entity_type(char var_type); + EXODUS_EXPORT int ex_set_parallel(int exoid, int is_parallel); + +@@ -1790,7 +1938,7 @@ EXODUS_EXPORT int ex_set_parallel(int exoid, int is_parallel); + */ + EXODUS_EXPORT int ex_get_idx(int exoid, /**< NetCDF/Exodus file ID */ + const char *ne_var_name, /**< Nemesis index variable name */ +- int64_t * my_index, /**< array of length 2 to hold results */ ++ int64_t *my_index, /**< array of length 2 to hold results */ + int pos /**< position of this proc/cmap in index */ + ); + +@@ -1798,30 +1946,35 @@ EXODUS_EXPORT int ex_get_idx(int exoid, /**< NetCDF/Exodus file ID + * \defgroup ErrorReturnCodes Error return codes - #exerrval return values + * @{ + */ +-#define EX_MEMFAIL 1000 /**< memory allocation failure flag def */ +-#define EX_BADFILEMODE 1001 /**< bad file mode def */ +-#define EX_BADFILEID 1002 /**< bad file id def */ +-#define EX_WRONGFILETYPE 1003 /**< wrong file type for function */ +-#define EX_LOOKUPFAIL 1004 /**< id table lookup failed */ +-#define EX_BADPARAM 1005 /**< bad parameter passed */ +-#define EX_INTERNAL 1006 /**< internal logic error */ +-#define EX_DUPLICATEID 1007 /**< duplicate id found */ +-#define EX_DUPLICATEOPEN 1008 /**< duplicate open */ +-#define EX_MSG -1000 /**< message print code - no error implied */ +-#define EX_PRTLASTMSG -1001 /**< print last error message msg code */ +-#define EX_NOTROOTID -1002 /**< file id is not the root id; it is a subgroup id */ +-#define EX_LASTERR -1003 /**< in ex_err, use existing err_num value */ +-#define EX_NULLENTITY -1006 /**< null entity found */ +-#define EX_NOENTITY -1007 /**< no entities of that type on database */ +-#define EX_NOTFOUND -1008 /**< could not find requested variable on database */ +- +-#define EX_FATAL -1 /**< fatal error flag def */ +-#define EX_NOERR 0 /**< no error flag def */ +-#define EX_WARN 1 /**< warning flag def */ ++enum ex_error_return_code { ++ EX_MEMFAIL = 1000, /**< memory allocation failure flag def */ ++ EX_BADFILEMODE = 1001, /**< bad file mode def */ ++ EX_BADFILEID = 1002, /**< bad file id def */ ++ EX_WRONGFILETYPE = 1003, /**< wrong file type for function */ ++ EX_LOOKUPFAIL = 1004, /**< id table lookup failed */ ++ EX_BADPARAM = 1005, /**< bad parameter passed */ ++ EX_INTERNAL = 1006, /**< internal logic error */ ++ EX_DUPLICATEID = 1007, /**< duplicate id found */ ++ EX_DUPLICATEOPEN = 1008, /**< duplicate open */ ++ EX_BADFILENAME = 1009, /**< empty or null filename specified */ ++ EX_MSG = -1000, /**< message print code - no error implied */ ++ EX_PRTLASTMSG = -1001, /**< print last error message msg code */ ++ EX_NOTROOTID = -1002, /**< file id is not the root id; it is a subgroup id */ ++ EX_LASTERR = -1003, /**< in ex_err, use existing err_num value */ ++ EX_NULLENTITY = -1006, /**< null entity found */ ++ EX_NOENTITY = -1007, /**< no entities of that type on database */ ++ EX_NOTFOUND = -1008, /**< could not find requested variable on database */ ++ EX_INTSIZEMISMATCH = ++ -1009, /**< integer sizes do not match on input/output databases in ex_copy */ ++ ++ EX_FATAL = -1, /**< fatal error flag def */ ++ EX_NOERR = 0, /**< no error flag def */ ++ EX_WARN = 1 /**< warning flag def */ ++}; ++typedef enum ex_error_return_code ex_error_return_code; ++ + /** @} */ + + #ifdef __cplusplus + } /* close brackets on extern "C" declaration */ + #endif +- +-#endif +diff --git a/ThirdParty/exodusII/vtkexodusII/include/exodusII_cfg.h.in b/ThirdParty/exodusII/vtkexodusII/include/exodusII_cfg.h.in +index 659dfc9f76..304c65b4c7 100644 +--- a/ThirdParty/exodusII/vtkexodusII/include/exodusII_cfg.h.in ++++ b/ThirdParty/exodusII/vtkexodusII/include/exodusII_cfg.h.in +@@ -1,26 +1,22 @@ +-// Copyright(C) 1999-2020 National Technology & Engineering Solutions +-// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with +-// NTESS, the U.S. Government retains certain rights in this software. +-// +-// See packages/seacas/LICENSE for details +- +-#ifndef __exodusII_cfg_h +-#define __exodusII_cfg_h +- +-#if defined(_WIN32) && !defined(WIN32) +-# define WIN32 +-#endif ++/* ++ * Copyright(C) 1999-2022 National Technology & Engineering Solutions ++ * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ++ * NTESS, the U.S. Government retains certain rights in this software. ++ * ++ * See packages/seacas/LICENSE for details ++ */ ++#pragma once + + #cmakedefine EXODUSII_BUILD_SHARED_LIBS +-#if defined(WIN32) && defined(EXODUSII_BUILD_SHARED_LIBS) ++#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || \ ++ defined(__MINGW32__) || defined(_WIN64) || defined(__MINGW64__) ++#if defined(EXODUSII_BUILD_SHARED_LIBS) + # if defined(exoIIc_EXPORTS) + # define EXODUS_EXPORT __declspec( dllexport ) extern + # else + # define EXODUS_EXPORT __declspec( dllimport ) extern + # endif ++#endif + #else + # define EXODUS_EXPORT extern + #endif +- +-#endif +- +diff --git a/ThirdParty/exodusII/vtkexodusII/include/exodusII_int.h b/ThirdParty/exodusII/vtkexodusII/include/exodusII_int.h +index da03f8c5a1..70d1c82e18 100644 +--- a/ThirdParty/exodusII/vtkexodusII/include/exodusII_int.h ++++ b/ThirdParty/exodusII/vtkexodusII/include/exodusII_int.h +@@ -1,6 +1,6 @@ + /* + +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -11,9 +11,7 @@ + * exodusII_int.h - ExodusII header file for internal Exodus call use only + * + */ +- +-#ifndef EXODUSII_INT_H +-#define EXODUSII_INT_H ++#pragma once + + #include + +@@ -30,6 +28,18 @@ + #endif + #endif + ++#if NC_HAS_ZSTD == 1 || NC_HAS_BZ2 ++#include "netcdf_filter.h" ++#endif ++ ++#if !defined NC_FillValue ++#if defined _FillValue ++#define NC_FillValue _FillValue ++#else ++#define NC_FillValue "_FillValue" ++#endif ++#endif ++ + #if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1900 + #define PRId64 "I64d" + #else +@@ -69,6 +79,10 @@ + extern "C" { + #endif + ++#if NC_VERSION_MAJOR > 4 || (NC_VERSION_MAJOR == 4 && NC_VERSION_MINOR >= 6) || NC_HAS_HDF5 ++#define EX_CAN_USE_NC_DEF_VAR_FILL 1 ++#endif ++ + /** + * \defgroup Internal Internal Functions and Defines + * \internal +@@ -86,9 +100,12 @@ extern "C" { + + /* Used to map between root (file id) and group ids when using groups */ + #define EX_FILE_ID_MASK (0xffff0000) /**< Must match FILE_ID_MASK in NetCDF nc4internal.h */ +-#define EX_GRP_ID_MASK (0x0000ffff) /**< Must match GRP_ID_MASK in NetCDF nc4internal.h */ ++#define EX_GRP_ID_MASK (0x0000ffff) /**< Must match GRP_ID_MASK in NetCDF nc4internal.h */ + +-EXODUS_EXPORT void ex__reset_error_status(void); ++/* Utility function to find variable to store entity attribute on */ ++int exi_get_varid(int exoid, ex_entity_type obj_type, ex_entity_id id); ++ ++EXODUS_EXPORT void exi_reset_error_status(void); + + #if defined(EXODUS_THREADSAFE) + #if !defined(exerrval) +@@ -114,18 +131,18 @@ typedef struct EX_mutex_struct + } EX_mutex_t; + + extern EX_mutex_t EX_g; +-extern int ex__mutex_lock(EX_mutex_t *mutex); +-extern int ex__mutex_unlock(EX_mutex_t *mutex, const char *func, int line); +-extern void ex__pthread_first_thread_init(void); +-extern EX_errval_t *exerrval_get(); ++extern int exi_mutex_lock(EX_mutex_t *mutex); ++extern int exi_mutex_unlock(EX_mutex_t *mutex, const char *func, int line); ++extern void exi_pthread_first_thread_init(void); ++extern EX_errval_t *exerrval_get(void); + + #define EX_FUNC_ENTER() \ + do { \ + /* Initialize the thread-safe code */ \ +- pthread_once(&EX_first_init_g, ex__pthread_first_thread_init); \ ++ pthread_once(&EX_first_init_g, exi_pthread_first_thread_init); \ + \ + /* Grab the mutex for the library */ \ +- ex__mutex_lock(&EX_g); \ ++ exi_mutex_lock(&EX_g); \ + ex_errval = exerrval_get(); \ + exerrval = 0; \ + ex_errval->last_err_num = 0; \ +@@ -134,28 +151,28 @@ extern EX_errval_t *exerrval_get(); + #define EX_FUNC_ENTER_INT() \ + do { \ + /* Initialize the thread-safe code */ \ +- pthread_once(&EX_first_init_g, ex__pthread_first_thread_init); \ ++ pthread_once(&EX_first_init_g, exi_pthread_first_thread_init); \ + \ + /* Grab the mutex for the library */ \ +- ex__mutex_lock(&EX_g); \ ++ exi_mutex_lock(&EX_g); \ + ex_errval = exerrval_get(); \ + } while (0) + + #define EX_FUNC_LEAVE(error) \ + do { \ +- ex__mutex_unlock(&EX_g, __func__, __LINE__); \ ++ exi_mutex_unlock(&EX_g, __func__, __LINE__); \ + return error; \ + } while (0) + + #define EX_FUNC_VOID() \ + do { \ +- ex__mutex_unlock(&EX_g, __func__, __LINE__); \ ++ exi_mutex_unlock(&EX_g, __func__, __LINE__); \ + return; \ + } while (0) + + #define EX_FUNC_UNLOCK() \ + do { \ +- ex__mutex_unlock(&EX_g, __func__, __LINE__); \ ++ exi_mutex_unlock(&EX_g, __func__, __LINE__); \ + } while (0) + + #else +@@ -165,7 +182,7 @@ extern EX_errval_t *exerrval_get(); + EXODUS_EXPORT int indent; + #define EX_FUNC_ENTER() \ + do { \ +- ex__reset_error_status(); \ ++ exi_reset_error_status(); \ + fprintf(stderr, "%d Enter: %s\n", indent, __func__); \ + indent++; \ + } while (0) +@@ -193,12 +210,12 @@ EXODUS_EXPORT int indent; + } while (0) + #else + #define EX_FUNC_ENTER() \ +- { \ +- ex__reset_error_status(); \ +- } ++ do { \ ++ exi_reset_error_status(); \ ++ } while (0) + #define EX_FUNC_ENTER_INT() + #define EX_FUNC_LEAVE(error) return error +-#define EX_FUNC_VOID() return ++#define EX_FUNC_VOID() return + #define EX_FUNC_UNLOCK() + #endif + #endif +@@ -223,341 +240,341 @@ EXODUS_EXPORT int indent; + * fail when they encounter a blank in a name. + * + */ +-#define ATT_TITLE "title" /**< the database title */ ++#define ATT_TITLE "title" /**< the database title */ + #define ATT_API_VERSION "api_version" /**< the EXODUS api vers number */ + /*! the EXODUS api vers # used for db version 2.01 and earlier */ + #define ATT_API_VERSION_BLANK "api version" +-#define ATT_VERSION "version" /**< the EXODUS file vers number */ +-#define ATT_FILESIZE "file_size" /**< 1=large, 0=normal */ ++#define ATT_VERSION "version" /**< the EXODUS file vers number */ ++#define ATT_FILESIZE "file_size" /**< 1=large, 0=normal */ + /*! word size of floating point numbers in file */ + #define ATT_FLT_WORDSIZE "floating_point_word_size" + /*! word size of floating point numbers in file used for db version + 2.01 and earlier */ + #define ATT_FLT_WORDSIZE_BLANK "floating point word size" +-#define ATT_MAX_NAME_LENGTH "maximum_name_length" +-#define ATT_INT64_STATUS "int64_status" +-#define ATT_NEM_API_VERSION "nemesis_api_version" +-#define ATT_NEM_FILE_VERSION "nemesis_file_version" +-#define ATT_PROCESSOR_INFO "processor_info" +-#define ATT_LAST_WRITTEN_TIME "last_written_time" +- +-#define DIM_NUM_ASSEMBLY "num_assembly" /**< number of assemblies */ +-#define DIM_NUM_BLOB "num_blob" /**< number of blobs */ +-#define DIM_NUM_NODES "num_nodes" /**< number of nodes */ +-#define DIM_NUM_DIM "num_dim" /**< number of dimensions; 2- or 3-d*/ +-#define DIM_NUM_EDGE "num_edge" /**< number of edges (over all blks)*/ +-#define DIM_NUM_FACE "num_face" /**< number of faces (over all blks)*/ +-#define DIM_NUM_ELEM "num_elem" /**< number of elements */ +-#define DIM_NUM_EL_BLK "num_el_blk" /**< number of element blocks */ +-#define DIM_NUM_ED_BLK "num_ed_blk" /**< number of edge blocks */ +-#define DIM_NUM_FA_BLK "num_fa_blk" /**< number of face blocks */ +-#define VAR_COORD "coord" /**< nodal coordinates */ +-#define VAR_COORD_X "coordx" /**< X-dimension coordinate */ +-#define VAR_COORD_Y "coordy" /**< Y-dimension coordinate */ +-#define VAR_COORD_Z "coordz" /**< Z-dimension coordinate */ +-#define VAR_NAME_COOR "coor_names" /**< names of coordinates */ +-#define VAR_NAME_EL_BLK "eb_names" /**< names of element blocks */ +-#define VAR_NAME_NS "ns_names" /**< names of node sets */ +-#define VAR_NAME_SS "ss_names" /**< names of side sets */ +-#define VAR_NAME_EM "emap_names" /**< names of element maps */ +-#define VAR_NAME_EDM "edmap_names" /**< names of edge maps */ +-#define VAR_NAME_FAM "famap_names" /**< names of face maps */ +-#define VAR_NAME_NM "nmap_names" /**< names of node maps */ +-#define VAR_NAME_ED_BLK "ed_names" /**< names of edge blocks */ +-#define VAR_NAME_FA_BLK "fa_names" /**< names of face blocks */ +-#define VAR_NAME_ES "es_names" /**< names of edge sets */ +-#define VAR_NAME_FS "fs_names" /**< names of face sets */ +-#define VAR_NAME_ELS "els_names" /**< names of element sets */ +-#define VAR_STAT_EL_BLK "eb_status" /**< element block status */ +-#define VAR_STAT_ECONN "econn_status" /**< element block edge status */ +-#define VAR_STAT_FCONN "fconn_status" /**< element block face status */ +-#define VAR_STAT_ED_BLK "ed_status" /**< edge block status */ +-#define VAR_STAT_FA_BLK "fa_status" /**< face block status */ +-#define VAR_ID_EL_BLK "eb_prop1" /**< element block ids props */ +-#define VAR_ID_ED_BLK "ed_prop1" /**< edge block ids props */ +-#define VAR_ID_FA_BLK "fa_prop1" /**< face block ids props */ +-#define DIM_NUM_ENTITY_ASSEMBLY(num) ex__catstr("num_entity_assembly", num) +-#define VAR_ENTITY_ASSEMBLY(num) ex__catstr("assembly_entity", num) +-#define DIM_NUM_VALUES_BLOB(num) ex__catstr("num_values_blob", num) +-#define VAR_ENTITY_BLOB(num) ex__catstr("blob_entity", num) +-#define EX_ATTRIBUTE_TYPE "_type" +-#define EX_ATTRIBUTE_TYPENAME "_typename" +-#define EX_ATTRIBUTE_NAME "_name" +-#define EX_ATTRIBUTE_ID "_id" ++#define ATT_MAX_NAME_LENGTH "maximum_name_length" ++#define ATT_INT64_STATUS "int64_status" ++#define ATT_NEM_API_VERSION "nemesis_api_version" ++#define ATT_NEM_FILE_VERSION "nemesis_file_version" ++#define ATT_PROCESSOR_INFO "processor_info" ++#define ATT_LAST_WRITTEN_TIME "last_written_time" ++ ++#define DIM_NUM_ASSEMBLY "num_assembly" /**< number of assemblies */ ++#define DIM_NUM_BLOB "num_blob" /**< number of blobs */ ++#define DIM_NUM_NODES "num_nodes" /**< number of nodes */ ++#define DIM_NUM_DIM "num_dim" /**< number of dimensions; 2- or 3-d*/ ++#define DIM_NUM_EDGE "num_edge" /**< number of edges (over all blks)*/ ++#define DIM_NUM_FACE "num_face" /**< number of faces (over all blks)*/ ++#define DIM_NUM_ELEM "num_elem" /**< number of elements */ ++#define DIM_NUM_EL_BLK "num_el_blk" /**< number of element blocks */ ++#define DIM_NUM_ED_BLK "num_ed_blk" /**< number of edge blocks */ ++#define DIM_NUM_FA_BLK "num_fa_blk" /**< number of face blocks */ ++#define VAR_COORD "coord" /**< nodal coordinates */ ++#define VAR_COORD_X "coordx" /**< X-dimension coordinate */ ++#define VAR_COORD_Y "coordy" /**< Y-dimension coordinate */ ++#define VAR_COORD_Z "coordz" /**< Z-dimension coordinate */ ++#define VAR_NAME_COOR "coor_names" /**< names of coordinates */ ++#define VAR_NAME_EL_BLK "eb_names" /**< names of element blocks */ ++#define VAR_NAME_NS "ns_names" /**< names of node sets */ ++#define VAR_NAME_SS "ss_names" /**< names of side sets */ ++#define VAR_NAME_EM "emap_names" /**< names of element maps */ ++#define VAR_NAME_EDM "edmap_names" /**< names of edge maps */ ++#define VAR_NAME_FAM "famap_names" /**< names of face maps */ ++#define VAR_NAME_NM "nmap_names" /**< names of node maps */ ++#define VAR_NAME_ED_BLK "ed_names" /**< names of edge blocks */ ++#define VAR_NAME_FA_BLK "fa_names" /**< names of face blocks */ ++#define VAR_NAME_ES "es_names" /**< names of edge sets */ ++#define VAR_NAME_FS "fs_names" /**< names of face sets */ ++#define VAR_NAME_ELS "els_names" /**< names of element sets */ ++#define VAR_STAT_EL_BLK "eb_status" /**< element block status */ ++#define VAR_STAT_ECONN "econn_status" /**< element block edge status */ ++#define VAR_STAT_FCONN "fconn_status" /**< element block face status */ ++#define VAR_STAT_ED_BLK "ed_status" /**< edge block status */ ++#define VAR_STAT_FA_BLK "fa_status" /**< face block status */ ++#define VAR_ID_EL_BLK "eb_prop1" /**< element block ids props */ ++#define VAR_ID_ED_BLK "ed_prop1" /**< edge block ids props */ ++#define VAR_ID_FA_BLK "fa_prop1" /**< face block ids props */ ++#define DIM_NUM_ENTITY_ASSEMBLY(num) exi_catstr("num_entity_assembly", num) ++#define VAR_ENTITY_ASSEMBLY(num) exi_catstr("assembly_entity", num) ++#define DIM_NUM_VALUES_BLOB(num) exi_catstr("num_values_blob", num) ++#define VAR_ENTITY_BLOB(num) exi_catstr("blob_entity", num) ++#define EX_ATTRIBUTE_TYPE "_type" ++#define EX_ATTRIBUTE_TYPENAME "_typename" ++#define EX_ATTRIBUTE_NAME "_name" ++#define EX_ATTRIBUTE_ID "_id" + + /*! element type names for each element block */ + #define ATT_NAME_ELB "elem_type" + /*! number of elements in element block num */ +-#define DIM_NUM_EL_IN_BLK(num) ex__catstr("num_el_in_blk", num) ++#define DIM_NUM_EL_IN_BLK(num) exi_catstr("num_el_in_blk", num) + /*! number of nodes per element in element block num */ +-#define DIM_NUM_NOD_PER_EL(num) ex__catstr("num_nod_per_el", num) ++#define DIM_NUM_NOD_PER_EL(num) exi_catstr("num_nod_per_el", num) + /*! number of attributes in element block num */ +-#define DIM_NUM_ATT_IN_BLK(num) ex__catstr("num_att_in_blk", num) ++#define DIM_NUM_ATT_IN_BLK(num) exi_catstr("num_att_in_blk", num) + /*! number of edges in edge block num */ +-#define DIM_NUM_ED_IN_EBLK(num) ex__catstr("num_ed_in_blk", num) ++#define DIM_NUM_ED_IN_EBLK(num) exi_catstr("num_ed_in_blk", num) + /*! number of nodes per edge in edge block num */ +-#define DIM_NUM_NOD_PER_ED(num) ex__catstr("num_nod_per_ed", num) ++#define DIM_NUM_NOD_PER_ED(num) exi_catstr("num_nod_per_ed", num) + /*! number of edges per element in element block num */ +-#define DIM_NUM_EDG_PER_EL(num) ex__catstr("num_edg_per_el", num) ++#define DIM_NUM_EDG_PER_EL(num) exi_catstr("num_edg_per_el", num) + /*! number of attributes in edge block num */ +-#define DIM_NUM_ATT_IN_EBLK(num) ex__catstr("num_att_in_eblk", num) ++#define DIM_NUM_ATT_IN_EBLK(num) exi_catstr("num_att_in_eblk", num) + /*! number of faces in face block num */ +-#define DIM_NUM_FA_IN_FBLK(num) ex__catstr("num_fa_in_blk", num) ++#define DIM_NUM_FA_IN_FBLK(num) exi_catstr("num_fa_in_blk", num) + /*! number of nodes per face in face block num */ +-#define DIM_NUM_NOD_PER_FA(num) ex__catstr("num_nod_per_fa", num) ++#define DIM_NUM_NOD_PER_FA(num) exi_catstr("num_nod_per_fa", num) + /*! number of faces per element in element block num */ +-#define DIM_NUM_FAC_PER_EL(num) ex__catstr("num_fac_per_el", num) ++#define DIM_NUM_FAC_PER_EL(num) exi_catstr("num_fac_per_el", num) + /*! number of attributes in face block num */ +-#define DIM_NUM_ATT_IN_FBLK(num) ex__catstr("num_att_in_fblk", num) ++#define DIM_NUM_ATT_IN_FBLK(num) exi_catstr("num_att_in_fblk", num) + /*! element connectivity for element block num */ +-#define VAR_CONN(num) ex__catstr("connect", num) ++#define VAR_CONN(num) exi_catstr("connect", num) + /*! array containing number of entity per */ + /* entity for n-sided face/element blocks */ +-#define VAR_EBEPEC(num) ex__catstr("ebepecnt", num) ++#define VAR_EBEPEC(num) exi_catstr("ebepecnt", num) + /*! list of attributes for element block num */ +-#define VAR_ATTRIB(num) ex__catstr("attrib", num) ++#define VAR_ATTRIB(num) exi_catstr("attrib", num) + /*! list of attribute names for element block num */ +-#define VAR_NAME_ATTRIB(num) ex__catstr("attrib_name", num) ++#define VAR_NAME_ATTRIB(num) exi_catstr("attrib_name", num) + /*! list of the numth property for all element blocks */ +-#define VAR_EB_PROP(num) ex__catstr("eb_prop", num) ++#define VAR_EB_PROP(num) exi_catstr("eb_prop", num) + /*! edge connectivity for element block num */ +-#define VAR_ECONN(num) ex__catstr("edgconn", num) ++#define VAR_ECONN(num) exi_catstr("edgconn", num) + /*! edge connectivity for edge block num */ +-#define VAR_EBCONN(num) ex__catstr("ebconn", num) ++#define VAR_EBCONN(num) exi_catstr("ebconn", num) + /*! list of attributes for edge block num */ +-#define VAR_EATTRIB(num) ex__catstr("eattrb", num) ++#define VAR_EATTRIB(num) exi_catstr("eattrb", num) + /*! list of attribute names for edge block num */ +-#define VAR_NAME_EATTRIB(num) ex__catstr("eattrib_name", num) +-#define VAR_NATTRIB "nattrb" +-#define VAR_NAME_NATTRIB "nattrib_name" +-#define DIM_NUM_ATT_IN_NBLK "num_att_in_nblk" ++#define VAR_NAME_EATTRIB(num) exi_catstr("eattrib_name", num) ++#define VAR_NATTRIB "nattrb" ++#define VAR_NAME_NATTRIB "nattrib_name" ++#define DIM_NUM_ATT_IN_NBLK "num_att_in_nblk" + +-#define VAR_NSATTRIB(num) ex__catstr("nsattrb", num) +-#define VAR_NAME_NSATTRIB(num) ex__catstr("nsattrib_name", num) +-#define DIM_NUM_ATT_IN_NS(num) ex__catstr("num_att_in_ns", num) ++#define VAR_NSATTRIB(num) exi_catstr("nsattrb", num) ++#define VAR_NAME_NSATTRIB(num) exi_catstr("nsattrib_name", num) ++#define DIM_NUM_ATT_IN_NS(num) exi_catstr("num_att_in_ns", num) + +-#define VAR_SSATTRIB(num) ex__catstr("ssattrb", num) +-#define VAR_NAME_SSATTRIB(num) ex__catstr("ssattrib_name", num) +-#define DIM_NUM_ATT_IN_SS(num) ex__catstr("num_att_in_ss", num) ++#define VAR_SSATTRIB(num) exi_catstr("ssattrb", num) ++#define VAR_NAME_SSATTRIB(num) exi_catstr("ssattrib_name", num) ++#define DIM_NUM_ATT_IN_SS(num) exi_catstr("num_att_in_ss", num) + +-#define VAR_ESATTRIB(num) ex__catstr("esattrb", num) +-#define VAR_NAME_ESATTRIB(num) ex__catstr("esattrib_name", num) +-#define DIM_NUM_ATT_IN_ES(num) ex__catstr("num_att_in_es", num) ++#define VAR_ESATTRIB(num) exi_catstr("esattrb", num) ++#define VAR_NAME_ESATTRIB(num) exi_catstr("esattrib_name", num) ++#define DIM_NUM_ATT_IN_ES(num) exi_catstr("num_att_in_es", num) + +-#define VAR_FSATTRIB(num) ex__catstr("fsattrb", num) +-#define VAR_NAME_FSATTRIB(num) ex__catstr("fsattrib_name", num) +-#define DIM_NUM_ATT_IN_FS(num) ex__catstr("num_att_in_fs", num) ++#define VAR_FSATTRIB(num) exi_catstr("fsattrb", num) ++#define VAR_NAME_FSATTRIB(num) exi_catstr("fsattrib_name", num) ++#define DIM_NUM_ATT_IN_FS(num) exi_catstr("num_att_in_fs", num) + +-#define VAR_ELSATTRIB(num) ex__catstr("elsattrb", num) +-#define VAR_NAME_ELSATTRIB(num) ex__catstr("elsattrib_name", num) +-#define DIM_NUM_ATT_IN_ELS(num) ex__catstr("num_att_in_els", num) ++#define VAR_ELSATTRIB(num) exi_catstr("elsattrb", num) ++#define VAR_NAME_ELSATTRIB(num) exi_catstr("elsattrib_name", num) ++#define DIM_NUM_ATT_IN_ELS(num) exi_catstr("num_att_in_els", num) + + /*! list of the numth property for all edge blocks */ +-#define VAR_ED_PROP(num) ex__catstr("ed_prop", num) ++#define VAR_ED_PROP(num) exi_catstr("ed_prop", num) + /*! face connectivity for element block num */ +-#define VAR_FCONN(num) ex__catstr("facconn", num) ++#define VAR_FCONN(num) exi_catstr("facconn", num) + /*! face connectivity for face block num */ +-#define VAR_FBCONN(num) ex__catstr("fbconn", num) ++#define VAR_FBCONN(num) exi_catstr("fbconn", num) + /*! array containing number of entity per entity for n-sided face/element blocks */ +-#define VAR_FBEPEC(num) ex__catstr("fbepecnt", num) ++#define VAR_FBEPEC(num) exi_catstr("fbepecnt", num) + /*! list of attributes for face block num */ +-#define VAR_FATTRIB(num) ex__catstr("fattrb", num) ++#define VAR_FATTRIB(num) exi_catstr("fattrb", num) + /*! list of attribute names for face block num */ +-#define VAR_NAME_FATTRIB(num) ex__catstr("fattrib_name", num) ++#define VAR_NAME_FATTRIB(num) exi_catstr("fattrib_name", num) + /*! list of the numth property for all face blocks */ +-#define VAR_FA_PROP(num) ex__catstr("fa_prop", num) ++#define VAR_FA_PROP(num) exi_catstr("fa_prop", num) + /*! name attached to element block, node set, side set, element map, + or map properties */ + #define ATT_PROP_NAME "name" +-#define VAR_MAP "elem_map" /**< element order map */ +-#define DIM_NUM_SS "num_side_sets" /**< number of side sets */ +-#define VAR_SS_STAT "ss_status" /**< side set status */ +-#define VAR_SS_IDS "ss_prop1" /**< side set id properties */ ++#define VAR_MAP "elem_map" /**< element order map */ ++#define DIM_NUM_SS "num_side_sets" /**< number of side sets */ ++#define VAR_SS_STAT "ss_status" /**< side set status */ ++#define VAR_SS_IDS "ss_prop1" /**< side set id properties */ + /*! number of sides in side set num*/ +-#define DIM_NUM_SIDE_SS(num) ex__catstr("num_side_ss", num) ++#define DIM_NUM_SIDE_SS(num) exi_catstr("num_side_ss", num) + /*! number of distribution factors in side set num */ +-#define DIM_NUM_DF_SS(num) ex__catstr("num_df_ss", num) ++#define DIM_NUM_DF_SS(num) exi_catstr("num_df_ss", num) + /*! the distribution factors for each node in side set num */ +-#define VAR_FACT_SS(num) ex__catstr("dist_fact_ss", num) ++#define VAR_FACT_SS(num) exi_catstr("dist_fact_ss", num) + /*! list of elements in side set num */ +-#define VAR_ELEM_SS(num) ex__catstr("elem_ss", num) ++#define VAR_ELEM_SS(num) exi_catstr("elem_ss", num) + /*! list of sides in side set */ +-#define VAR_SIDE_SS(num) ex__catstr("side_ss", num) ++#define VAR_SIDE_SS(num) exi_catstr("side_ss", num) + /*! list of the numth property for all side sets */ +-#define VAR_SS_PROP(num) ex__catstr("ss_prop", num) +-#define DIM_NUM_ES "num_edge_sets" /**< number of edge sets */ +-#define VAR_ES_STAT "es_status" /**< edge set status */ +-#define VAR_ES_IDS "es_prop1" /**< edge set id properties */ ++#define VAR_SS_PROP(num) exi_catstr("ss_prop", num) ++#define DIM_NUM_ES "num_edge_sets" /**< number of edge sets */ ++#define VAR_ES_STAT "es_status" /**< edge set status */ ++#define VAR_ES_IDS "es_prop1" /**< edge set id properties */ + /*! number of edges in edge set num*/ +-#define DIM_NUM_EDGE_ES(num) ex__catstr("num_edge_es", num) ++#define DIM_NUM_EDGE_ES(num) exi_catstr("num_edge_es", num) + /*! number of distribution factors in edge set num */ +-#define DIM_NUM_DF_ES(num) ex__catstr("num_df_es", num) ++#define DIM_NUM_DF_ES(num) exi_catstr("num_df_es", num) + /*! the distribution factors for each node in edge set num */ +-#define VAR_FACT_ES(num) ex__catstr("dist_fact_es", num) ++#define VAR_FACT_ES(num) exi_catstr("dist_fact_es", num) + /*! list of edges in edge set num */ +-#define VAR_EDGE_ES(num) ex__catstr("edge_es", num) ++#define VAR_EDGE_ES(num) exi_catstr("edge_es", num) + /*! list of orientations in the edge set. */ +-#define VAR_ORNT_ES(num) ex__catstr("ornt_es", num) ++#define VAR_ORNT_ES(num) exi_catstr("ornt_es", num) + /*! list of the numth property for all edge sets */ +-#define VAR_ES_PROP(num) ex__catstr("es_prop", num) +-#define DIM_NUM_FS "num_face_sets" /**< number of face sets */ +-#define VAR_FS_STAT "fs_status" /**< face set status */ +-#define VAR_FS_IDS "fs_prop1" /**< face set id properties */ ++#define VAR_ES_PROP(num) exi_catstr("es_prop", num) ++#define DIM_NUM_FS "num_face_sets" /**< number of face sets */ ++#define VAR_FS_STAT "fs_status" /**< face set status */ ++#define VAR_FS_IDS "fs_prop1" /**< face set id properties */ + /*! number of faces in side set num*/ +-#define DIM_NUM_FACE_FS(num) ex__catstr("num_face_fs", num) ++#define DIM_NUM_FACE_FS(num) exi_catstr("num_face_fs", num) + /*! number of distribution factors in face set num */ +-#define DIM_NUM_DF_FS(num) ex__catstr("num_df_fs", num) ++#define DIM_NUM_DF_FS(num) exi_catstr("num_df_fs", num) + /*! the distribution factors for each node in face set num */ +-#define VAR_FACT_FS(num) ex__catstr("dist_fact_fs", num) ++#define VAR_FACT_FS(num) exi_catstr("dist_fact_fs", num) + /*! list of elements in face set num */ +-#define VAR_FACE_FS(num) ex__catstr("face_fs", num) ++#define VAR_FACE_FS(num) exi_catstr("face_fs", num) + /*! list of sides in side set */ +-#define VAR_ORNT_FS(num) ex__catstr("ornt_fs", num) ++#define VAR_ORNT_FS(num) exi_catstr("ornt_fs", num) + /*! list of the numth property for all face sets */ +-#define VAR_FS_PROP(num) ex__catstr("fs_prop", num) +-#define DIM_NUM_ELS "num_elem_sets" /**< number of elem sets */ ++#define VAR_FS_PROP(num) exi_catstr("fs_prop", num) ++#define DIM_NUM_ELS "num_elem_sets" /**< number of elem sets */ + /*! number of elements in elem set num */ +-#define DIM_NUM_ELE_ELS(num) ex__catstr("num_ele_els", num) ++#define DIM_NUM_ELE_ELS(num) exi_catstr("num_ele_els", num) + /*! number of distribution factors in element set num */ +-#define DIM_NUM_DF_ELS(num) ex__catstr("num_df_els", num) +-#define VAR_ELS_STAT "els_status" /**< elem set status */ +-#define VAR_ELS_IDS "els_prop1" /**< elem set id properties */ ++#define DIM_NUM_DF_ELS(num) exi_catstr("num_df_els", num) ++#define VAR_ELS_STAT "els_status" /**< elem set status */ ++#define VAR_ELS_IDS "els_prop1" /**< elem set id properties */ + /*! list of elements in elem set num */ +-#define VAR_ELEM_ELS(num) ex__catstr("elem_els", num) ++#define VAR_ELEM_ELS(num) exi_catstr("elem_els", num) + /*! list of distribution factors in elem set num */ +-#define VAR_FACT_ELS(num) ex__catstr("dist_fact_els", num) ++#define VAR_FACT_ELS(num) exi_catstr("dist_fact_els", num) + /*! list of the numth property for all elem sets */ +-#define VAR_ELS_PROP(num) ex__catstr("els_prop", num) +-#define DIM_NUM_NS "num_node_sets" /**< number of node sets */ ++#define VAR_ELS_PROP(num) exi_catstr("els_prop", num) ++#define DIM_NUM_NS "num_node_sets" /**< number of node sets */ + /*! number of nodes in node set num */ +-#define DIM_NUM_NOD_NS(num) ex__catstr("num_nod_ns", num) ++#define DIM_NUM_NOD_NS(num) exi_catstr("num_nod_ns", num) + /*! number of distribution factors in node set num */ +-#define DIM_NUM_DF_NS(num) ex__catstr("num_df_ns", num) +-#define VAR_NS_STAT "ns_status" /**< node set status */ +-#define VAR_NS_IDS "ns_prop1" /**< node set id properties */ ++#define DIM_NUM_DF_NS(num) exi_catstr("num_df_ns", num) ++#define VAR_NS_STAT "ns_status" /**< node set status */ ++#define VAR_NS_IDS "ns_prop1" /**< node set id properties */ + /*! list of nodes in node set num */ +-#define VAR_NODE_NS(num) ex__catstr("node_ns", num) ++#define VAR_NODE_NS(num) exi_catstr("node_ns", num) + /*! list of distribution factors in node set num */ +-#define VAR_FACT_NS(num) ex__catstr("dist_fact_ns", num) ++#define VAR_FACT_NS(num) exi_catstr("dist_fact_ns", num) + /*! list of the numth property for all node sets */ +-#define VAR_NS_PROP(num) ex__catstr("ns_prop", num) +-#define DIM_NUM_QA "num_qa_rec" /**< number of QA records */ +-#define VAR_QA_TITLE "qa_records" /**< QA records */ +-#define DIM_NUM_INFO "num_info" /**< number of information records */ +-#define VAR_INFO "info_records" /**< information records */ +-#define VAR_WHOLE_TIME "time_whole" /**< simulation times for whole time steps */ ++#define VAR_NS_PROP(num) exi_catstr("ns_prop", num) ++#define DIM_NUM_QA "num_qa_rec" /**< number of QA records */ ++#define VAR_QA_TITLE "qa_records" /**< QA records */ ++#define DIM_NUM_INFO "num_info" /**< number of information records */ ++#define VAR_INFO "info_records" /**< information records */ ++#define VAR_WHOLE_TIME "time_whole" /**< simulation times for whole time steps */ + #define VAR_ASSEMBLY_TAB "assembly_var_tab" /**< assembly variable truth table */ +-#define VAR_BLOB_TAB "blob_var_tab" /**< blob variable truth table */ +-#define VAR_ELEM_TAB "elem_var_tab" /**< element variable truth table */ +-#define VAR_EBLK_TAB "edge_var_tab" /**< edge variable truth table */ +-#define VAR_FBLK_TAB "face_var_tab" /**< face variable truth table */ +-#define VAR_ELSET_TAB "elset_var_tab" /**< elemset variable truth table */ +-#define VAR_SSET_TAB "sset_var_tab" /**< sideset variable truth table */ +-#define VAR_FSET_TAB "fset_var_tab" /**< faceset variable truth table */ +-#define VAR_ESET_TAB "eset_var_tab" /**< edgeset variable truth table */ +-#define VAR_NSET_TAB "nset_var_tab" /**< nodeset variable truth table */ +-#define DIM_NUM_GLO_VAR "num_glo_var" /**< number of global variables */ +-#define VAR_NAME_GLO_VAR "name_glo_var" /**< names of global variables */ +-#define VAR_GLO_VAR "vals_glo_var" /**< values of global variables*/ +-#define DIM_NUM_NOD_VAR "num_nod_var" /**< number of nodal variables */ +-#define VAR_NAME_NOD_VAR "name_nod_var" /**< names of nodal variables */ +-#define VAR_NOD_VAR "vals_nod_var" /**< values of nodal variables \deprecated */ ++#define VAR_BLOB_TAB "blob_var_tab" /**< blob variable truth table */ ++#define VAR_ELEM_TAB "elem_var_tab" /**< element variable truth table */ ++#define VAR_EBLK_TAB "edge_var_tab" /**< edge variable truth table */ ++#define VAR_FBLK_TAB "face_var_tab" /**< face variable truth table */ ++#define VAR_ELSET_TAB "elset_var_tab" /**< elemset variable truth table */ ++#define VAR_SSET_TAB "sset_var_tab" /**< sideset variable truth table */ ++#define VAR_FSET_TAB "fset_var_tab" /**< faceset variable truth table */ ++#define VAR_ESET_TAB "eset_var_tab" /**< edgeset variable truth table */ ++#define VAR_NSET_TAB "nset_var_tab" /**< nodeset variable truth table */ ++#define DIM_NUM_GLO_VAR "num_glo_var" /**< number of global variables */ ++#define VAR_NAME_GLO_VAR "name_glo_var" /**< names of global variables */ ++#define VAR_GLO_VAR "vals_glo_var" /**< values of global variables*/ ++#define DIM_NUM_NOD_VAR "num_nod_var" /**< number of nodal variables */ ++#define VAR_NAME_NOD_VAR "name_nod_var" /**< names of nodal variables */ ++#define VAR_NOD_VAR "vals_nod_var" /**< values of nodal variables \deprecated */ + /*! values of nodal variables */ +-#define VAR_NOD_VAR_NEW(num) ex__catstr("vals_nod_var", num) ++#define VAR_NOD_VAR_NEW(num) exi_catstr("vals_nod_var", num) + +-#define DIM_NUM_ASSEMBLY_VAR "num_assembly_var" /**< number of assembly variables */ +-#define VAR_NAME_ASSEMBLY_VAR "name_assembly_var" /**< names of assembly variables*/ +-#define VAR_ASSEMBLY_VAR(num1, num2) ex__catstr2("vals_assembly_var", num1, "assembly", num2) ++#define DIM_NUM_ASSEMBLY_VAR "num_assembly_var" /**< number of assembly variables */ ++#define VAR_NAME_ASSEMBLY_VAR "name_assembly_var" /**< names of assembly variables*/ ++#define VAR_ASSEMBLY_VAR(num1, num2) exi_catstr2("vals_assembly_var", num1, "assembly", num2) + +-#define DIM_NUM_BLOB_VAR "num_blob_var" /**< number of blob variables */ +-#define VAR_NAME_BLOB_VAR "name_blob_var" /**< names of blob variables*/ +-#define VAR_BLOB_VAR(num1, num2) ex__catstr2("vals_blob_var", num1, "blob", num2) ++#define DIM_NUM_BLOB_VAR "num_blob_var" /**< number of blob variables */ ++#define VAR_NAME_BLOB_VAR "name_blob_var" /**< names of blob variables*/ ++#define VAR_BLOB_VAR(num1, num2) exi_catstr2("vals_blob_var", num1, "blob", num2) + +-#define DIM_NUM_ELE_VAR "num_elem_var" /**< number of element variables */ ++#define DIM_NUM_ELE_VAR "num_elem_var" /**< number of element variables */ + #define VAR_NAME_ELE_VAR "name_elem_var" /**< names of element variables*/ + /*! values of element variable num1 in element block num2 */ +-#define VAR_ELEM_VAR(num1, num2) ex__catstr2("vals_elem_var", num1, "eb", num2) +-#define DIM_NUM_EDG_VAR "num_edge_var" /**< number of edge variables */ +-#define VAR_NAME_EDG_VAR "name_edge_var" /**< names of edge variables */ ++#define VAR_ELEM_VAR(num1, num2) exi_catstr2("vals_elem_var", num1, "eb", num2) ++#define DIM_NUM_EDG_VAR "num_edge_var" /**< number of edge variables */ ++#define VAR_NAME_EDG_VAR "name_edge_var" /**< names of edge variables */ + /*! values of edge variable num1 in edge block num2 */ +-#define VAR_EDGE_VAR(num1, num2) ex__catstr2("vals_edge_var", num1, "eb", num2) +-#define DIM_NUM_FAC_VAR "num_face_var" /**< number of face variables */ +-#define VAR_NAME_FAC_VAR "name_face_var" /**< names of face variables */ ++#define VAR_EDGE_VAR(num1, num2) exi_catstr2("vals_edge_var", num1, "eb", num2) ++#define DIM_NUM_FAC_VAR "num_face_var" /**< number of face variables */ ++#define VAR_NAME_FAC_VAR "name_face_var" /**< names of face variables */ + /*! values of face variable num1 in face block num2 */ +-#define VAR_FACE_VAR(num1, num2) ex__catstr2("vals_face_var", num1, "fb", num2) ++#define VAR_FACE_VAR(num1, num2) exi_catstr2("vals_face_var", num1, "fb", num2) + +-#define DIM_NUM_NSET_VAR "num_nset_var" /**< number of nodeset variables */ ++#define DIM_NUM_NSET_VAR "num_nset_var" /**< number of nodeset variables */ + #define VAR_NAME_NSET_VAR "name_nset_var" /**< names of nodeset variables*/ + /*! values of nodeset variable num1 in nodeset num2 */ +-#define VAR_NS_VAR(num1, num2) ex__catstr2("vals_nset_var", num1, "ns", num2) +-#define DIM_NUM_ESET_VAR "num_eset_var" /**< number of edgeset variables */ ++#define VAR_NS_VAR(num1, num2) exi_catstr2("vals_nset_var", num1, "ns", num2) ++#define DIM_NUM_ESET_VAR "num_eset_var" /**< number of edgeset variables */ + /*! values of edgeset variable num1 in edgeset num2 */ +-#define VAR_NAME_ESET_VAR "name_eset_var" /**< names of edgeset variables*/ +-#define VAR_ES_VAR(num1, num2) ex__catstr2("vals_eset_var", num1, "es", num2) +-#define DIM_NUM_FSET_VAR "num_fset_var" /**< number of faceset variables */ +-#define VAR_NAME_FSET_VAR "name_fset_var" /**< names of faceset variables*/ ++#define VAR_NAME_ESET_VAR "name_eset_var" /**< names of edgeset variables*/ ++#define VAR_ES_VAR(num1, num2) exi_catstr2("vals_eset_var", num1, "es", num2) ++#define DIM_NUM_FSET_VAR "num_fset_var" /**< number of faceset variables */ ++#define VAR_NAME_FSET_VAR "name_fset_var" /**< names of faceset variables*/ + /*! values of faceset variable num1 in faceset num2 */ +-#define VAR_FS_VAR(num1, num2) ex__catstr2("vals_fset_var", num1, "fs", num2) +-#define DIM_NUM_SSET_VAR "num_sset_var" /**< number of sideset variables */ +-#define VAR_NAME_SSET_VAR "name_sset_var" /**< names of sideset variables*/ ++#define VAR_FS_VAR(num1, num2) exi_catstr2("vals_fset_var", num1, "fs", num2) ++#define DIM_NUM_SSET_VAR "num_sset_var" /**< number of sideset variables */ ++#define VAR_NAME_SSET_VAR "name_sset_var" /**< names of sideset variables*/ + /*! values of sideset variable num1 in sideset num2 */ +-#define VAR_SS_VAR(num1, num2) ex__catstr2("vals_sset_var", num1, "ss", num2) +-#define DIM_NUM_ELSET_VAR "num_elset_var" /**< number of element set variables*/ +-#define VAR_NAME_ELSET_VAR "name_elset_var" /**< names of elemset variables*/ ++#define VAR_SS_VAR(num1, num2) exi_catstr2("vals_sset_var", num1, "ss", num2) ++#define DIM_NUM_ELSET_VAR "num_elset_var" /**< number of element set variables*/ ++#define VAR_NAME_ELSET_VAR "name_elset_var" /**< names of elemset variables*/ + /*! values of elemset variable num1 in elemset num2 */ +-#define VAR_ELS_VAR(num1, num2) ex__catstr2("vals_elset_var", num1, "es", num2) ++#define VAR_ELS_VAR(num1, num2) exi_catstr2("vals_elset_var", num1, "es", num2) + + /** + * \defgroup ReductionVariables Variables controlling storage of reduction variables + *@{ + */ +-#define DIM_NUM_ASSEMBLY_RED_VAR "num_assembly_red_var" /**< number of assembly variables */ ++#define DIM_NUM_ASSEMBLY_RED_VAR "num_assembly_red_var" /**< number of assembly variables */ + #define VAR_NAME_ASSEMBLY_RED_VAR "name_assembly_red_var" /**< names of assembly variables*/ +-#define VAR_ASSEMBLY_RED_VAR(num) ex__catstr("vals_red_var_assembly", num) ++#define VAR_ASSEMBLY_RED_VAR(num) exi_catstr("vals_red_var_assembly", num) + +-#define DIM_NUM_BLOB_RED_VAR "num_blob_red_var" /**< number of blob variables */ ++#define DIM_NUM_BLOB_RED_VAR "num_blob_red_var" /**< number of blob variables */ + #define VAR_NAME_BLOB_RED_VAR "name_blob_red_var" /**< names of blob variables*/ +-#define VAR_BLOB_RED_VAR(num) ex__catstr("vals_red_var_blob", num) ++#define VAR_BLOB_RED_VAR(num) exi_catstr("vals_red_var_blob", num) + +-#define DIM_NUM_ELE_RED_VAR "num_elem_red_var" /**< number of element variables */ ++#define DIM_NUM_ELE_RED_VAR "num_elem_red_var" /**< number of element variables */ + #define VAR_NAME_ELE_RED_VAR "name_elem_red_var" /**< names of element variables*/ + /*! values of element variable num in element block num */ +-#define VAR_ELEM_RED_VAR(num) ex__catstr("vals_red_var_eb", num) ++#define VAR_ELEM_RED_VAR(num) exi_catstr("vals_red_var_eb", num) + +-#define DIM_NUM_EDG_RED_VAR "num_edge_red_var" /**< number of edge variables */ ++#define DIM_NUM_EDG_RED_VAR "num_edge_red_var" /**< number of edge variables */ + #define VAR_NAME_EDG_RED_VAR "name_edge_red_var" /**< names of edge variables */ + /*! values of edge variable num in edge block num */ +-#define VAR_EDGE_RED_VAR(num) ex__catstr("vals_red_var_edb", num) ++#define VAR_EDGE_RED_VAR(num) exi_catstr("vals_red_var_edb", num) + +-#define DIM_NUM_FAC_RED_VAR "num_face_red_var" /**< number of face variables */ ++#define DIM_NUM_FAC_RED_VAR "num_face_red_var" /**< number of face variables */ + #define VAR_NAME_FAC_RED_VAR "name_face_red_var" /**< names of face variables */ + /*! values of face variable num in face block num */ +-#define VAR_FACE_RED_VAR(num) ex__catstr("vals_red_var_fb", num) ++#define VAR_FACE_RED_VAR(num) exi_catstr("vals_red_var_fb", num) + +-#define DIM_NUM_NSET_RED_VAR "num_nset_red_var" /**< number of nodeset variables */ ++#define DIM_NUM_NSET_RED_VAR "num_nset_red_var" /**< number of nodeset variables */ + #define VAR_NAME_NSET_RED_VAR "name_nset_red_var" /**< names of nodeset variables*/ + /*! values of nodeset variable num in nodeset num */ +-#define VAR_NS_RED_VAR(num) ex__catstr("vals_red_var_nset", num) ++#define VAR_NS_RED_VAR(num) exi_catstr("vals_red_var_nset", num) + + #define DIM_NUM_ESET_RED_VAR "num_eset_red_var" /**< number of edgeset variables */ + /*! values of edgeset variable num in edgeset num */ + #define VAR_NAME_ESET_RED_VAR "name_eset_red_var" /**< names of edgeset variables*/ +-#define VAR_ES_RED_VAR(num) ex__catstr("vals_red_var_eset", num) ++#define VAR_ES_RED_VAR(num) exi_catstr("vals_red_var_eset", num) + +-#define DIM_NUM_FSET_RED_VAR "num_fset_red_var" /**< number of faceset variables */ ++#define DIM_NUM_FSET_RED_VAR "num_fset_red_var" /**< number of faceset variables */ + #define VAR_NAME_FSET_RED_VAR "name_fset_red_var" /**< names of faceset variables*/ + /*! values of faceset variable num in faceset num */ +-#define VAR_FS_RED_VAR(num) ex__catstr("vals_red_var_fset", num) ++#define VAR_FS_RED_VAR(num) exi_catstr("vals_red_var_fset", num) + +-#define DIM_NUM_SSET_RED_VAR "num_sset_red_var" /**< number of sideset variables */ ++#define DIM_NUM_SSET_RED_VAR "num_sset_red_var" /**< number of sideset variables */ + #define VAR_NAME_SSET_RED_VAR "name_sset_red_var" /**< names of sideset variables*/ + /*! values of sideset variable num in sideset num */ +-#define VAR_SS_RED_VAR(num) ex__catstr("vals_red_var_sset", num) ++#define VAR_SS_RED_VAR(num) exi_catstr("vals_red_var_sset", num) + +-#define DIM_NUM_ELSET_RED_VAR "num_elset_red_var" /**< number of element set variables*/ ++#define DIM_NUM_ELSET_RED_VAR "num_elset_red_var" /**< number of element set variables*/ + #define VAR_NAME_ELSET_RED_VAR "name_elset_red_var" /**< names of elemset variables*/ + /*! values of elemset variable num in elemset num */ +-#define VAR_ELS_RED_VAR(num) ex__catstr("vals_red_var_elset", num) ++#define VAR_ELS_RED_VAR(num) exi_catstr("vals_red_var_elset", num) + /** @}*/ + + /*! general dimension of length MAX_STR_LENGTH used for some string lengths */ +@@ -566,101 +583,101 @@ EXODUS_EXPORT int indent; + #define DIM_STR_NAME "len_name" + /*! general dimension of length MAX_LINE_LENGTH used for long strings */ + #define DIM_LIN "len_line" +-#define DIM_N4 "four" +-#define DIM_N1 "blob_entity" ++#define DIM_N4 "four" ++#define DIM_N1 "blob_entity" + /*! unlimited (expandable) dimension for time steps*/ +-#define DIM_TIME "time_step" +-#define VAR_ELEM_NUM_MAP "elem_num_map" /**< element numbering map */ +-#define VAR_FACE_NUM_MAP "face_num_map" /**< face numbering map */ +-#define VAR_EDGE_NUM_MAP "edge_num_map" /**< edge numbering map */ +-#define VAR_NODE_NUM_MAP "node_num_map" /**< node numbering map */ +-#define DIM_NUM_EM "num_elem_maps" /**< number of element maps */ ++#define DIM_TIME "time_step" ++#define VAR_ELEM_NUM_MAP "elem_num_map" /**< element numbering map */ ++#define VAR_FACE_NUM_MAP "face_num_map" /**< face numbering map */ ++#define VAR_EDGE_NUM_MAP "edge_num_map" /**< edge numbering map */ ++#define VAR_NODE_NUM_MAP "node_num_map" /**< node numbering map */ ++#define DIM_NUM_EM "num_elem_maps" /**< number of element maps */ + /*! the numth element map */ +-#define VAR_ELEM_MAP(num) ex__catstr("elem_map", num) ++#define VAR_ELEM_MAP(num) exi_catstr("elem_map", num) + /*! list of the numth property for all element maps */ +-#define VAR_EM_PROP(num) ex__catstr("em_prop", num) +-#define DIM_NUM_EDM "num_edge_maps" /**< number of edge maps */ ++#define VAR_EM_PROP(num) exi_catstr("em_prop", num) ++#define DIM_NUM_EDM "num_edge_maps" /**< number of edge maps */ + /*! the numth edge map */ +-#define VAR_EDGE_MAP(num) ex__catstr("edge_map", num) ++#define VAR_EDGE_MAP(num) exi_catstr("edge_map", num) + /* list of the numth property for all edge maps */ +-#define VAR_EDM_PROP(num) ex__catstr("edm_prop", num) +-#define DIM_NUM_FAM "num_face_maps" /**< number of face maps */ ++#define VAR_EDM_PROP(num) exi_catstr("edm_prop", num) ++#define DIM_NUM_FAM "num_face_maps" /**< number of face maps */ + /*! the numth face map */ +-#define VAR_FACE_MAP(num) ex__catstr("face_map", num) ++#define VAR_FACE_MAP(num) exi_catstr("face_map", num) + /*! list of the numth property for all face maps */ +-#define VAR_FAM_PROP(num) ex__catstr("fam_prop", num) +-#define DIM_NUM_NM "num_node_maps" /**< number of node maps */ ++#define VAR_FAM_PROP(num) exi_catstr("fam_prop", num) ++#define DIM_NUM_NM "num_node_maps" /**< number of node maps */ + /*! the numth node map */ +-#define VAR_NODE_MAP(num) ex__catstr("node_map", num) ++#define VAR_NODE_MAP(num) exi_catstr("node_map", num) + /*! list of the numth property for all node maps */ +-#define VAR_NM_PROP(num) ex__catstr("nm_prop", num) ++#define VAR_NM_PROP(num) exi_catstr("nm_prop", num) + /*! list of the numth property for all assemblies */ +-#define VAR_ASSEMBLY_PROP(num) ex__catstr("assembly_prop", num) +-#define VAR_BLOB_PROP(num) ex__catstr("blob_prop", num) ++#define VAR_ASSEMBLY_PROP(num) exi_catstr("assembly_prop", num) ++#define VAR_BLOB_PROP(num) exi_catstr("blob_prop", num) + +-#define DIM_NUM_CFRAMES "num_cframes" +-#define DIM_NUM_CFRAME9 "num_cframes_9" ++#define DIM_NUM_CFRAMES "num_cframes" ++#define DIM_NUM_CFRAME9 "num_cframes_9" + #define VAR_FRAME_COORDS "frame_coordinates" +-#define VAR_FRAME_IDS "frame_ids" +-#define VAR_FRAME_TAGS "frame_tags" ++#define VAR_FRAME_IDS "frame_ids" ++#define VAR_FRAME_TAGS "frame_tags" + +-#define VAR_ELBLK_IDS_GLOBAL "el_blk_ids_global" +-#define VAR_ELBLK_CNT_GLOBAL "el_blk_cnt_global" +-#define VAR_NS_IDS_GLOBAL "ns_ids_global" ++#define VAR_ELBLK_IDS_GLOBAL "el_blk_ids_global" ++#define VAR_ELBLK_CNT_GLOBAL "el_blk_cnt_global" ++#define VAR_NS_IDS_GLOBAL "ns_ids_global" + #define VAR_NS_NODE_CNT_GLOBAL "ns_node_cnt_global" +-#define VAR_NS_DF_CNT_GLOBAL "ns_df_cnt_global" +-#define VAR_SS_IDS_GLOBAL "ss_ids_global" ++#define VAR_NS_DF_CNT_GLOBAL "ns_df_cnt_global" ++#define VAR_SS_IDS_GLOBAL "ss_ids_global" + #define VAR_SS_SIDE_CNT_GLOBAL "ss_side_cnt_global" +-#define VAR_SS_DF_CNT_GLOBAL "ss_df_cnt_global" +-#define VAR_FILE_TYPE "nem_ftype" +-#define VAR_COMM_MAP "comm_map" +-#define VAR_NODE_MAP_INT "node_mapi" +-#define VAR_NODE_MAP_INT_IDX "node_mapi_idx" +-#define VAR_NODE_MAP_BOR "node_mapb" +-#define VAR_NODE_MAP_BOR_IDX "node_mapb_idx" +-#define VAR_NODE_MAP_EXT "node_mape" +-#define VAR_NODE_MAP_EXT_IDX "node_mape_idx" +-#define VAR_ELEM_MAP_INT "elem_mapi" +-#define VAR_ELEM_MAP_INT_IDX "elem_mapi_idx" +-#define VAR_ELEM_MAP_BOR "elem_mapb" +-#define VAR_ELEM_MAP_BOR_IDX "elem_mapb_idx" +-#define VAR_INT_N_STAT "int_n_stat" +-#define VAR_BOR_N_STAT "bor_n_stat" +-#define VAR_EXT_N_STAT "ext_n_stat" +-#define VAR_INT_E_STAT "int_e_stat" +-#define VAR_BOR_E_STAT "bor_e_stat" +-#define VAR_N_COMM_IDS "n_comm_ids" +-#define VAR_N_COMM_STAT "n_comm_stat" +-#define VAR_N_COMM_INFO_IDX "n_comm_info_idx" +-#define VAR_E_COMM_IDS "e_comm_ids" +-#define VAR_E_COMM_STAT "e_comm_stat" +-#define VAR_E_COMM_INFO_IDX "e_comm_info_idx" +-#define VAR_N_COMM_NIDS "n_comm_nids" +-#define VAR_N_COMM_PROC "n_comm_proc" +-#define VAR_N_COMM_DATA_IDX "n_comm_data_idx" +-#define VAR_E_COMM_EIDS "e_comm_eids" +-#define VAR_E_COMM_SIDS "e_comm_sids" +-#define VAR_E_COMM_PROC "e_comm_proc" +-#define VAR_E_COMM_DATA_IDX "e_comm_data_idx" +- +-#define DIM_NUM_INT_NODES "num_int_node" +-#define DIM_NUM_BOR_NODES "num_bor_node" +-#define DIM_NUM_EXT_NODES "num_ext_node" +-#define DIM_NUM_INT_ELEMS "num_int_elem" +-#define DIM_NUM_BOR_ELEMS "num_bor_elem" +-#define DIM_NUM_PROCS "num_processors" +-#define DIM_NUM_PROCS_F "num_procs_file" ++#define VAR_SS_DF_CNT_GLOBAL "ss_df_cnt_global" ++#define VAR_FILE_TYPE "nem_ftype" ++#define VAR_COMM_MAP "comm_map" ++#define VAR_NODE_MAP_INT "node_mapi" ++#define VAR_NODE_MAP_INT_IDX "node_mapi_idx" ++#define VAR_NODE_MAP_BOR "node_mapb" ++#define VAR_NODE_MAP_BOR_IDX "node_mapb_idx" ++#define VAR_NODE_MAP_EXT "node_mape" ++#define VAR_NODE_MAP_EXT_IDX "node_mape_idx" ++#define VAR_ELEM_MAP_INT "elem_mapi" ++#define VAR_ELEM_MAP_INT_IDX "elem_mapi_idx" ++#define VAR_ELEM_MAP_BOR "elem_mapb" ++#define VAR_ELEM_MAP_BOR_IDX "elem_mapb_idx" ++#define VAR_INT_N_STAT "int_n_stat" ++#define VAR_BOR_N_STAT "bor_n_stat" ++#define VAR_EXT_N_STAT "ext_n_stat" ++#define VAR_INT_E_STAT "int_e_stat" ++#define VAR_BOR_E_STAT "bor_e_stat" ++#define VAR_N_COMM_IDS "n_comm_ids" ++#define VAR_N_COMM_STAT "n_comm_stat" ++#define VAR_N_COMM_INFO_IDX "n_comm_info_idx" ++#define VAR_E_COMM_IDS "e_comm_ids" ++#define VAR_E_COMM_STAT "e_comm_stat" ++#define VAR_E_COMM_INFO_IDX "e_comm_info_idx" ++#define VAR_N_COMM_NIDS "n_comm_nids" ++#define VAR_N_COMM_PROC "n_comm_proc" ++#define VAR_N_COMM_DATA_IDX "n_comm_data_idx" ++#define VAR_E_COMM_EIDS "e_comm_eids" ++#define VAR_E_COMM_SIDS "e_comm_sids" ++#define VAR_E_COMM_PROC "e_comm_proc" ++#define VAR_E_COMM_DATA_IDX "e_comm_data_idx" ++ ++#define DIM_NUM_INT_NODES "num_int_node" ++#define DIM_NUM_BOR_NODES "num_bor_node" ++#define DIM_NUM_EXT_NODES "num_ext_node" ++#define DIM_NUM_INT_ELEMS "num_int_elem" ++#define DIM_NUM_BOR_ELEMS "num_bor_elem" ++#define DIM_NUM_PROCS "num_processors" ++#define DIM_NUM_PROCS_F "num_procs_file" + #define DIM_NUM_NODES_GLOBAL "num_nodes_global" + #define DIM_NUM_ELEMS_GLOBAL "num_elems_global" +-#define DIM_NUM_NS_GLOBAL "num_ns_global" +-#define DIM_NUM_SS_GLOBAL "num_ss_global" ++#define DIM_NUM_NS_GLOBAL "num_ns_global" ++#define DIM_NUM_SS_GLOBAL "num_ss_global" + #define DIM_NUM_ELBLK_GLOBAL "num_el_blk_global" +-#define DIM_NUM_N_CMAPS "num_n_cmaps" +-#define DIM_NUM_E_CMAPS "num_e_cmaps" +-#define DIM_NCNT_CMAP "ncnt_cmap" +-#define DIM_ECNT_CMAP "ecnt_cmap" ++#define DIM_NUM_N_CMAPS "num_n_cmaps" ++#define DIM_NUM_E_CMAPS "num_e_cmaps" ++#define DIM_NCNT_CMAP "ncnt_cmap" ++#define DIM_ECNT_CMAP "ecnt_cmap" + +-enum ex__element_type { ++enum exi_element_type { + EX_EL_UNK = -1, /**< unknown entity */ + EX_EL_NULL_ELEMENT = 0, + EX_EL_TRIANGLE = 1, /**< Triangle entity */ +@@ -676,39 +693,45 @@ enum ex__element_type { + EX_EL_TRISHELL = 11, /**< Triangular Shell entity */ + EX_EL_PYRAMID = 12 /**< Pyramid entity */ + }; +-typedef enum ex__element_type ex__element_type; ++typedef enum exi_element_type exi_element_type; + + /* Internal structure declarations */ + +-struct ex__file_item ++struct exi_file_item + { +- int file_id; +- nc_type netcdf_type_code; +- int int64_status; +- int maximum_name_length; +- int time_varid; /* Store to avoid lookup each timestep */ ++ int file_id; ++ nc_type netcdf_type_code; ++ int int64_status; ++ int maximum_name_length; ++ int time_varid; /* Store to avoid lookup each timestep */ ++ int compression_level; /**< 0 (disabled) to 9 (maximum) compression level for ++ gzip, 4..32 and even for szip; -131072..22 for zstd, NetCDF-4 only */ + unsigned int assembly_count; + unsigned int blob_count; ++ ++ unsigned int persist_define_mode : 10; /**< Stay in define mode until exi_persist_leavedef is ++ called. Set by exi_persist_redef... */ + unsigned int +- compression_algorithm : 2; /**< GZIP/ZLIB, SZIP, more may be supported by NetCDF soon */ +- unsigned int compression_level : 6; /**< 0 (disabled) to 9 (maximum) compression level for +- gzip, 4..32 and even for szip; NetCDF-4 only */ ++ compression_algorithm : 4; /**< GZIP/ZLIB, SZIP, more may be supported by NetCDF soon */ ++ unsigned int quantize_nsd : 4; /**< 0 (disabled) to 15 (maximum) number of significant digits ++ retained for lossy quanitzation compression */ ++ unsigned int shuffle : 1; /**< 1 true, 0 false */ + unsigned int user_compute_wordsize : 1; /**< 0 for 4 byte or 1 for 8 byte reals */ +- unsigned int shuffle : 1; /**< 1 true, 0 false */ + unsigned int + file_type : 2; /**< 0 - classic, 1 -- 64 bit classic, 2 --NetCDF4, 3 --NetCDF4 classic */ +- unsigned int is_write : 1; /**< for output or append */ +- unsigned int is_parallel : 1; /**< 1 true, 0 false */ +- unsigned int is_hdf5 : 1; /**< 1 true, 0 false */ +- unsigned int is_pnetcdf : 1; /**< 1 true, 0 false */ +- unsigned int has_nodes : 1; /**< for input only at this time */ +- unsigned int has_edges : 1; /**< for input only at this time */ +- unsigned int has_faces : 1; /**< for input only at this time */ +- unsigned int has_elems : 1; /**< for input only at this time */ +- struct ex__file_item *next; ++ unsigned int is_write : 1; /**< for output or append */ ++ unsigned int is_parallel : 1; /**< 1 true, 0 false */ ++ unsigned int is_hdf5 : 1; /**< 1 true, 0 false */ ++ unsigned int is_pnetcdf : 1; /**< 1 true, 0 false */ ++ unsigned int has_nodes : 1; /**< for input only at this time */ ++ unsigned int has_edges : 1; /**< for input only at this time */ ++ unsigned int has_faces : 1; /**< for input only at this time */ ++ unsigned int has_elems : 1; /**< for input only at this time */ ++ unsigned int in_define_mode : 1; /**< Is the file in nc define mode... */ ++ struct exi_file_item *next; + }; + +-struct ex__elem_blk_parm ++struct exi_elem_blk_parm + { + char elem_type[33]; + int64_t elem_blk_id; +@@ -718,153 +741,168 @@ struct ex__elem_blk_parm + int num_nodes_per_side[6]; + int num_attr; + int64_t elem_ctr; +- ex__element_type elem_type_val; ++ exi_element_type elem_type_val; + }; + + /* Used in exo_jack.c for fortran interface */ +-enum ex__coordinate_frame_type { ++enum exi_coordinate_frame_type { + EX_CF_RECTANGULAR = 1, + EX_CF_CYLINDRICAL = 2, + EX_CF_SPHERICAL = 3 + }; +-typedef enum ex__coordinate_frame_type ex__coordinate_frame_type; ++typedef enum exi_coordinate_frame_type exi_coordinate_frame_type; + +-struct ex__list_item ++struct exi_list_item + { /* for use with ex_get_file_item */ + int exo_id; + int value; +- struct ex__list_item *next; ++ struct exi_list_item *next; + }; + +-struct ex__obj_stats ++struct exi_obj_stats + { +- int64_t * id_vals; +- int * stat_vals; ++ int64_t *id_vals; ++ int *stat_vals; + size_t num; + int exoid; + char valid_ids; + char valid_stat; + char sequential; +- struct ex__obj_stats *next; ++ struct exi_obj_stats *next; + }; + + #ifndef EXODUS_EXPORT + #define EXODUS_EXPORT extern + #endif /* EXODUS_EXPORT */ + +-EXODUS_EXPORT void ex__iqsort(int v[], int iv[], int N); +-EXODUS_EXPORT void ex__iqsort64(int64_t v[], int64_t iv[], int64_t N); ++EXODUS_EXPORT void exi_iqsort(int v[], int iv[], size_t N); ++EXODUS_EXPORT void exi_iqsort64(int64_t v[], int64_t iv[], int64_t N); + +-EXODUS_EXPORT char *ex__catstr(const char * /*string*/, int /*num*/); +-EXODUS_EXPORT char *ex__catstr2(const char * /*string1*/, int /*num1*/, const char * /*string2*/, ++EXODUS_EXPORT char *exi_catstr(const char * /*string*/, int /*num*/); ++EXODUS_EXPORT char *exi_catstr2(const char * /*string1*/, int /*num1*/, const char * /*string2*/, + int /*num2*/); +-EXODUS_EXPORT char *ex__dim_num_entries_in_object(ex_entity_type /*obj_type*/, int /*idx*/); +-EXODUS_EXPORT char *ex__dim_num_objects(ex_entity_type obj_type); +-EXODUS_EXPORT char *ex__name_var_of_object(ex_entity_type /*obj_type*/, int /*i*/, int /*j*/); +-EXODUS_EXPORT char *ex__name_red_var_of_object(ex_entity_type /*obj_type*/, int /*indx*/); +-EXODUS_EXPORT char *ex__name_of_map(ex_entity_type /*map_type*/, int /*map_index*/); ++EXODUS_EXPORT char *exi_dim_num_entries_in_object(ex_entity_type /*obj_type*/, int /*idx*/); ++EXODUS_EXPORT char *exi_dim_num_objects(ex_entity_type obj_type); ++EXODUS_EXPORT char *exi_name_var_of_object(ex_entity_type /*obj_type*/, int /*i*/, int /*j*/); ++EXODUS_EXPORT char *exi_name_red_var_of_object(ex_entity_type /*obj_type*/, int /*indx*/); ++EXODUS_EXPORT char *exi_name_of_map(ex_entity_type /*map_type*/, int /*map_index*/); + +-EXODUS_EXPORT int ex__conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_wordsize, ++EXODUS_EXPORT int exi_conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_wordsize, + int int64_status, bool is_parallel, bool is_hdf5, bool is_pnetcdf, + bool is_write); + +-EXODUS_EXPORT void ex__conv_exit(int exoid); ++EXODUS_EXPORT void exi_conv_exit(int exoid); + + EXODUS_EXPORT nc_type nc_flt_code(int exoid); +-EXODUS_EXPORT int ex__comp_ws(int exoid); +-EXODUS_EXPORT int ex__get_cpu_ws(void); +-EXODUS_EXPORT int ex__is_parallel(int exoid); +- +-EXODUS_EXPORT struct ex__list_item **ex__get_counter_list(ex_entity_type obj_type); +-EXODUS_EXPORT int ex__get_file_item(int /*exoid*/, struct ex__list_item ** /*list_ptr*/); +-EXODUS_EXPORT int ex__inc_file_item(int /*exoid*/, struct ex__list_item ** /*list_ptr*/); +-EXODUS_EXPORT void ex__rm_file_item(int /*exoid*/, struct ex__list_item ** /*list_ptr*/); +- +-extern struct ex__obj_stats *exoII_eb; +-extern struct ex__obj_stats *exoII_ed; +-extern struct ex__obj_stats *exoII_fa; +-extern struct ex__obj_stats *exoII_ns; +-extern struct ex__obj_stats *exoII_es; +-extern struct ex__obj_stats *exoII_fs; +-extern struct ex__obj_stats *exoII_ss; +-extern struct ex__obj_stats *exoII_els; +-extern struct ex__obj_stats *exoII_em; +-extern struct ex__obj_stats *exoII_edm; +-extern struct ex__obj_stats *exoII_fam; +-extern struct ex__obj_stats *exoII_nm; +- +-EXODUS_EXPORT struct ex__file_item *ex__find_file_item(int exoid); +-struct ex__file_item *ex__add_file_item(int exoid); +-struct ex__obj_stats *ex__get_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr); +- +-EXODUS_EXPORT void ex__rm_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr); +- +-EXODUS_EXPORT void ex__set_compact_storage(int exoid, int varid); +-EXODUS_EXPORT void ex__compress_variable(int exoid, int varid, int type); +-EXODUS_EXPORT int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num); +-EXODUS_EXPORT int ex__check_valid_file_id( ++EXODUS_EXPORT int exi_comp_ws(int exoid); ++EXODUS_EXPORT int exi_get_cpu_ws(void); ++EXODUS_EXPORT int exi_is_parallel(int exoid); ++ ++EXODUS_EXPORT struct exi_list_item **exi_get_counter_list(ex_entity_type obj_type); ++EXODUS_EXPORT int exi_get_file_item(int /*exoid*/, struct exi_list_item **/*list_ptr*/); ++EXODUS_EXPORT int exi_inc_file_item(int /*exoid*/, struct exi_list_item **/*list_ptr*/); ++EXODUS_EXPORT void exi_rm_file_item(int /*exoid*/, struct exi_list_item ** /*list_ptr*/); ++ ++extern struct exi_obj_stats *exoII_eb; ++extern struct exi_obj_stats *exoII_ed; ++extern struct exi_obj_stats *exoII_fa; ++extern struct exi_obj_stats *exoII_ns; ++extern struct exi_obj_stats *exoII_es; ++extern struct exi_obj_stats *exoII_fs; ++extern struct exi_obj_stats *exoII_ss; ++extern struct exi_obj_stats *exoII_els; ++extern struct exi_obj_stats *exoII_em; ++extern struct exi_obj_stats *exoII_edm; ++extern struct exi_obj_stats *exoII_fam; ++extern struct exi_obj_stats *exoII_nm; ++ ++EXODUS_EXPORT struct exi_file_item *exi_find_file_item(int exoid); ++struct exi_file_item *exi_add_file_item(int exoid); ++struct exi_obj_stats *exi_get_stat_ptr(int exoid, struct exi_obj_stats **obj_ptr); ++ ++EXODUS_EXPORT void exi_rm_stat_ptr(int exoid, struct exi_obj_stats **obj_ptr); ++ ++EXODUS_EXPORT void exi_set_compact_storage(int exoid, int varid); ++EXODUS_EXPORT void exi_compress_variable(int exoid, int varid, int type); ++EXODUS_EXPORT int exi_id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num); ++EXODUS_EXPORT int exi_check_valid_file_id( + int exoid, const char *func); /** Return fatal error if exoid does not refer to valid file */ +-EXODUS_EXPORT int ex__check_multiple_open(const char *path, int mode, const char *func); +-EXODUS_EXPORT int ex__check_file_type(const char *path, int *type); +-EXODUS_EXPORT int ex__get_dimension(int exoid, const char *DIMENSION, const char *label, +- size_t *count, int *dimid, const char *routine); ++EXODUS_EXPORT int exi_check_multiple_open(const char *path, int mode, const char *func); ++EXODUS_EXPORT int exi_check_file_type(const char *path, int *type); ++EXODUS_EXPORT char *exi_canonicalize_filename(const char *path); ++EXODUS_EXPORT int exi_get_dimension(int exoid, const char *DIMENSION, const char *label, ++ size_t *count, int *dimid, const char *routine); ++ ++EXODUS_EXPORT int exi_get_nodal_var_time(int exoid, int nodal_var_index, int64_t node_number, ++ int beg_time_step, int end_time_step, ++ void *nodal_var_vals); + +-EXODUS_EXPORT int ex__get_nodal_var(int exoid, int time_step, int nodal_var_index, +- int64_t num_nodes, void *nodal_var_vals); ++EXODUS_EXPORT int exi_put_nodal_var_multi_time(int exoid, int nodal_var_index, int64_t num_nodes, ++ int beg_time_step, int end_time_step, ++ const void *nodal_var_vals); + +-EXODUS_EXPORT int ex__put_nodal_var(int exoid, int time_step, int nodal_var_index, +- int64_t num_nodes, const void *nodal_var_vals); ++EXODUS_EXPORT int exi_get_nodal_var_multi_time(int exoid, int nodal_var_index, int64_t node_number, ++ int beg_time_step, int end_time_step, ++ void *nodal_var_vals); + +-EXODUS_EXPORT int ex__get_nodal_var_time(int exoid, int nodal_var_index, int64_t node_number, ++EXODUS_EXPORT int exi_put_nodal_var_time(int exoid, int nodal_var_index, int64_t num_nodes, + int beg_time_step, int end_time_step, +- void *nodal_var_vals); ++ const void *nodal_var_vals); + +-EXODUS_EXPORT int ex__get_partial_nodal_var(int exoid, int time_step, int nodal_var_index, ++EXODUS_EXPORT int exi_get_partial_nodal_var(int exoid, int time_step, int nodal_var_index, + int64_t start_node, int64_t num_nodes, void *var_vals); + +-EXODUS_EXPORT int ex__put_partial_nodal_var(int exoid, int time_step, int nodal_var_index, ++EXODUS_EXPORT int exi_put_partial_nodal_var(int exoid, int time_step, int nodal_var_index, + int64_t start_node, int64_t num_nodes, + const void *nodal_var_vals); +-EXODUS_EXPORT int ex__get_glob_vars(int exoid, int time_step, int num_glob_vars, ++EXODUS_EXPORT int exi_get_glob_vars(int exoid, int time_step, int num_glob_vars, + void *glob_var_vals); + +-EXODUS_EXPORT int ex__get_glob_var_time(int exoid, int glob_var_index, int beg_time_step, ++EXODUS_EXPORT int exi_get_glob_vars_multi_time(int exoid, int num_glob_vars, int beg_time_step, ++ int end_time_step, void *glob_var_vals); ++ ++EXODUS_EXPORT int exi_get_glob_var_time(int exoid, int glob_var_index, int beg_time_step, + int end_time_step, void *glob_var_vals); + +-EXODUS_EXPORT int ex__get_name(int exoid, int varid, size_t index, char *name, int name_size, ++EXODUS_EXPORT int exi_get_name(int exoid, int varid, size_t index, char *name, int name_size, + ex_entity_type obj_type, const char *routine); +-EXODUS_EXPORT int ex__get_names(int exoid, int varid, size_t num_entity, char **names, ++EXODUS_EXPORT int exi_get_names(int exoid, int varid, size_t num_entity, char **names, + ex_entity_type obj_type, const char *routine); +-EXODUS_EXPORT int ex__put_name(int exoid, int varid, size_t index, const char *name, ++EXODUS_EXPORT int exi_put_name(int exoid, int varid, size_t index, const char *name, + ex_entity_type obj_type, const char *subtype, const char *routine); +-EXODUS_EXPORT int ex__put_names(int exoid, int varid, size_t num_entity, char **names, ++EXODUS_EXPORT int exi_put_names(int exoid, int varid, size_t num_entity, char *const *names, + ex_entity_type obj_type, const char *subtype, const char *routine); +-EXODUS_EXPORT void ex__trim(char *name); +-EXODUS_EXPORT void ex__update_max_name_length(int exoid, int length); +-EXODUS_EXPORT int ex__leavedef(int exoid, /* NemesisI file ID */ ++EXODUS_EXPORT void exi_trim(char *name); ++EXODUS_EXPORT void exi_update_max_name_length(int exoid, int length); ++EXODUS_EXPORT int exi_redef(int exoid, const char *call_func); ++EXODUS_EXPORT int exi_persist_redef(int exoid, const char *call_func); ++EXODUS_EXPORT int exi_leavedef(int exoid, /* NemesisI file ID */ + const char *call_rout /* Name of calling function */ + ); ++EXODUS_EXPORT int exi_persist_leavedef(int exoid, /* NemesisI file ID */ ++ const char *call_rout /* Name of calling function */ ++ ); + +-EXODUS_EXPORT int ex__check_version(int run_version); +-EXODUS_EXPORT int ex__handle_mode(unsigned int my_mode, int is_parallel, int run_version); +-EXODUS_EXPORT int ex__populate_header(int exoid, const char *path, int my_mode, int is_parallel, ++EXODUS_EXPORT int exi_check_version(int run_version); ++EXODUS_EXPORT int exi_handle_mode(unsigned int my_mode, int is_parallel, int run_version); ++EXODUS_EXPORT int exi_populate_header(int exoid, const char *path, int my_mode, int is_parallel, + int *comp_ws, int *io_ws); + +-EXODUS_EXPORT int ex__get_block_param(int exoid, ex_entity_id id, int ndim, +- struct ex__elem_blk_parm *elem_blk_parm); ++EXODUS_EXPORT int exi_get_block_param(int exoid, ex_entity_id id, int ndim, ++ struct exi_elem_blk_parm *elem_blk_parm); + +-EXODUS_EXPORT int ex__get_file_type(int exoid, char *ftype); ++EXODUS_EXPORT int exi_get_file_type(int exoid, char *ftype); + +-EXODUS_EXPORT int ex__put_nemesis_version(int exoid); ++EXODUS_EXPORT int exi_put_nemesis_version(int exoid); + +-EXODUS_EXPORT int ex__put_homogenous_block_params(int exoid, size_t block_count, ++EXODUS_EXPORT int exi_put_homogenous_block_params(int exoid, size_t block_count, + const struct ex_block *blocks); + +-EXODUS_EXPORT int ne__check_file_version(int exoid); ++EXODUS_EXPORT int nei_check_file_version(int exoid); + +-EXODUS_EXPORT int ne__id_lkup(int exoid, /* NetCDF/Exodus file ID */ +- const char * ne_var_name, /* Nemesis variable name */ +- int64_t * idx, /* index variable for variable, length 2 */ ++EXODUS_EXPORT int nei_id_lkup(int exoid, /* NetCDF/Exodus file ID */ ++ const char *ne_var_name, /* Nemesis variable name */ ++ int64_t *idx, /* index variable for variable, length 2 */ + ex_entity_id ne_var_id /* NetCDF variable ID */ + ); + +@@ -887,11 +925,9 @@ EXODUS_EXPORT int ne__id_lkup(int exoid, /* NetCDF/Exodus file ID + * Note that this is a global setting for all databases. If you are + * accessing multiple databases, they will all use the same value. + */ +-EXODUS_EXPORT int ex__default_max_name_length; ++EXODUS_EXPORT int exi_default_max_name_length; + /*! @} */ + + #ifdef __cplusplus + } + #endif +- +-#endif +diff --git a/ThirdParty/exodusII/vtkexodusII/include/vtk_exodusII_mangle.h b/ThirdParty/exodusII/vtkexodusII/include/vtk_exodusII_mangle.h +index f6d90dfa3e..6ebba4dcce 100644 +--- a/ThirdParty/exodusII/vtkexodusII/include/vtk_exodusII_mangle.h ++++ b/ThirdParty/exodusII/vtkexodusII/include/vtk_exodusII_mangle.h +@@ -4,39 +4,30 @@ + /** + * Generated using: + * +- * nm -g lib/libvtkexodusII-9.0.so | grep -e ' [TDRSB] ' |\ ++ * nm -g lib/libvtkexodusII-9.4.so | grep -e ' [TDRSB] ' |\ + * cut -d' ' -f3 | grep -v -e '^_init$' -e '^_fini$' -e '^_edata$' -e '^__bss_start$' -e 'vtkexodusII_' | \ + * sort | sed -e 's/\(.*\)/#define \1 vtkexodusII_\1/' > /tmp/vtk_exodusII_mangle.h + */ + + #define ex_add_attr vtkexodusII_ex_add_attr +-#define ex__catstr vtkexodusII_ex__catstr +-#define ex__catstr2 vtkexodusII_ex__catstr2 +-#define ex__check_file_type vtkexodusII_ex__check_file_type +-#define ex__check_multiple_open vtkexodusII_ex__check_multiple_open +-#define ex__check_valid_file_id vtkexodusII_ex__check_valid_file_id +-#define ex__check_version vtkexodusII_ex__check_version + #define ex_close vtkexodusII_ex_close +-#define ex__compress_variable vtkexodusII_ex__compress_variable +-#define ex__comp_ws vtkexodusII_ex__comp_ws ++#define ex_component_field_name vtkexodusII_ex_component_field_name + #define ex_config vtkexodusII_ex_config +-#define ex__conv_exit vtkexodusII_ex__conv_exit +-#define ex__conv_init vtkexodusII_ex__conv_init + #define ex_copy vtkexodusII_ex_copy + #define ex_copy_string vtkexodusII_ex_copy_string + #define ex_copy_transient vtkexodusII_ex_copy_transient + #define ex_create_group vtkexodusII_ex_create_group + #define ex_create_int vtkexodusII_ex_create_int + #define ex_cvt_nodes_to_sides vtkexodusII_ex_cvt_nodes_to_sides +-#define ex__default_max_name_length vtkexodusII_ex__default_max_name_length +-#define ex__dim_num_entries_in_object vtkexodusII_ex__dim_num_entries_in_object +-#define ex__dim_num_objects vtkexodusII_ex__dim_num_objects + #define ex_err vtkexodusII_ex_err + #define ex_err_fn vtkexodusII_ex_err_fn + #define ex_errval vtkexodusII_ex_errval + #define exerrval_get vtkexodusII_exerrval_get + #define EX_errval_key_g vtkexodusII_EX_errval_key_g +-#define ex__find_file_item vtkexodusII_ex__find_file_item ++#define ex_field_cardinality vtkexodusII_ex_field_cardinality ++#define ex_field_component_suffix vtkexodusII_ex_field_component_suffix ++#define ex_field_type_enum_to_string vtkexodusII_ex_field_type_enum_to_string ++#define ex_field_type_name vtkexodusII_ex_field_type_name + #define EX_first_init_g vtkexodusII_EX_first_init_g + #define EX_g vtkexodusII_EX_g + #define ex_get_all_times vtkexodusII_ex_get_all_times +@@ -49,10 +40,12 @@ + #define ex_get_attributes vtkexodusII_ex_get_attributes + #define ex_get_attr_names vtkexodusII_ex_get_attr_names + #define ex_get_attr_param vtkexodusII_ex_get_attr_param ++#define ex_get_basis vtkexodusII_ex_get_basis ++#define ex_get_basis_count vtkexodusII_ex_get_basis_count + #define ex_get_blob vtkexodusII_ex_get_blob + #define ex_get_blobs vtkexodusII_ex_get_blobs + #define ex_get_block vtkexodusII_ex_get_block +-#define ex__get_block_param vtkexodusII_ex__get_block_param ++#define ex_get_block_id_map vtkexodusII_ex_get_block_id_map + #define ex_get_block_param vtkexodusII_ex_get_block_param + #define ex_get_block_params vtkexodusII_ex_get_block_params + #define ex_get_cmap_params vtkexodusII_ex_get_cmap_params +@@ -64,9 +57,6 @@ + #define ex_get_coord vtkexodusII_ex_get_coord + #define ex_get_coordinate_frames vtkexodusII_ex_get_coordinate_frames + #define ex_get_coord_names vtkexodusII_ex_get_coord_names +-#define ex__get_counter_list vtkexodusII_ex__get_counter_list +-#define ex__get_cpu_ws vtkexodusII_ex__get_cpu_ws +-#define ex__get_dimension vtkexodusII_ex__get_dimension + #define ex_get_eb_info_global vtkexodusII_ex_get_eb_info_global + #define ex_get_elem_attr vtkexodusII_ex_get_elem_attr + #define ex_get_elem_attr_names vtkexodusII_ex_get_elem_attr_names +@@ -82,11 +72,9 @@ + #define ex_get_elem_var_time vtkexodusII_ex_get_elem_var_time + #define ex_get_entity_count_per_polyhedra vtkexodusII_ex_get_entity_count_per_polyhedra + #define ex_get_err vtkexodusII_ex_get_err +-#define ex__get_file_item vtkexodusII_ex__get_file_item +-#define ex__get_file_type vtkexodusII_ex__get_file_type +-#define ex__get_glob_vars vtkexodusII_ex__get_glob_vars ++#define ex_get_field_metadata vtkexodusII_ex_get_field_metadata ++#define ex_get_field_metadata_count vtkexodusII_ex_get_field_metadata_count + #define ex_get_glob_vars vtkexodusII_ex_get_glob_vars +-#define ex__get_glob_var_time vtkexodusII_ex__get_glob_var_time + #define ex_get_glob_var_time vtkexodusII_ex_get_glob_var_time + #define ex_get_group_id vtkexodusII_ex_get_group_id + #define ex_get_group_ids vtkexodusII_ex_get_group_ids +@@ -101,9 +89,7 @@ + #define ex_get_loadbal_param vtkexodusII_ex_get_loadbal_param + #define ex_get_map vtkexodusII_ex_get_map + #define ex_get_map_param vtkexodusII_ex_get_map_param +-#define ex__get_name vtkexodusII_ex__get_name + #define ex_get_name vtkexodusII_ex_get_name +-#define ex__get_names vtkexodusII_ex__get_names + #define ex_get_names vtkexodusII_ex_get_names + #define ex_get_n_attr vtkexodusII_ex_get_n_attr + #define ex_get_n_conn vtkexodusII_ex_get_n_conn +@@ -116,9 +102,7 @@ + #define ex_get_n_node_num_map vtkexodusII_ex_get_n_node_num_map + #define ex_get_n_node_set vtkexodusII_ex_get_n_node_set + #define ex_get_n_node_set_df vtkexodusII_ex_get_n_node_set_df +-#define ex__get_nodal_var vtkexodusII_ex__get_nodal_var + #define ex_get_nodal_var vtkexodusII_ex_get_nodal_var +-#define ex__get_nodal_var_time vtkexodusII_ex__get_nodal_var_time + #define ex_get_nodal_var_time vtkexodusII_ex_get_nodal_var_time + #define ex_get_node_cmap vtkexodusII_ex_get_node_cmap + #define ex_get_node_map vtkexodusII_ex_get_node_map +@@ -149,7 +133,6 @@ + #define ex_get_partial_elem_num_map vtkexodusII_ex_get_partial_elem_num_map + #define ex_get_partial_elem_var vtkexodusII_ex_get_partial_elem_var + #define ex_get_partial_id_map vtkexodusII_ex_get_partial_id_map +-#define ex__get_partial_nodal_var vtkexodusII_ex__get_partial_nodal_var + #define ex_get_partial_nodal_var vtkexodusII_ex_get_partial_nodal_var + #define ex_get_partial_node_num_map vtkexodusII_ex_get_partial_node_num_map + #define ex_get_partial_node_set vtkexodusII_ex_get_partial_node_set +@@ -167,6 +150,8 @@ + #define ex_get_prop_array vtkexodusII_ex_get_prop_array + #define ex_get_prop_names vtkexodusII_ex_get_prop_names + #define ex_get_qa vtkexodusII_ex_get_qa ++#define ex_get_quadrature vtkexodusII_ex_get_quadrature ++#define ex_get_quadrature_count vtkexodusII_ex_get_quadrature_count + #define ex_get_reduction_variable_names vtkexodusII_ex_get_reduction_variable_names + #define ex_get_reduction_variable_param vtkexodusII_ex_get_reduction_variable_param + #define ex_get_reduction_vars vtkexodusII_ex_get_reduction_vars +@@ -184,39 +169,92 @@ + #define ex_get_sset_var vtkexodusII_ex_get_sset_var + #define ex_get_sset_var_tab vtkexodusII_ex_get_sset_var_tab + #define ex_get_ss_param_global vtkexodusII_ex_get_ss_param_global +-#define ex__get_stat_ptr vtkexodusII_ex__get_stat_ptr + #define ex_get_time vtkexodusII_ex_get_time + #define ex_get_truth_table vtkexodusII_ex_get_truth_table + #define ex_get_var vtkexodusII_ex_get_var + #define ex_get_variable_name vtkexodusII_ex_get_variable_name + #define ex_get_variable_names vtkexodusII_ex_get_variable_names + #define ex_get_variable_param vtkexodusII_ex_get_variable_param ++#define ex_get_var_multi_time vtkexodusII_ex_get_var_multi_time + #define ex_get_var_name vtkexodusII_ex_get_var_name + #define ex_get_var_names vtkexodusII_ex_get_var_names + #define ex_get_var_param vtkexodusII_ex_get_var_param + #define ex_get_var_tab vtkexodusII_ex_get_var_tab + #define ex_get_var_time vtkexodusII_ex_get_var_time +-#define ex__handle_mode vtkexodusII_ex__handle_mode + #define ex_header_size vtkexodusII_ex_header_size +-#define ex__id_lkup vtkexodusII_ex__id_lkup +-#define ex__inc_file_item vtkexodusII_ex__inc_file_item ++#define exi_canonicalize_filename vtkexodusII_exi_canonicalize_filename ++#define exi_catstr vtkexodusII_exi_catstr ++#define exi_catstr2 vtkexodusII_exi_catstr2 ++#define exi_check_file_type vtkexodusII_exi_check_file_type ++#define exi_check_multiple_open vtkexodusII_exi_check_multiple_open ++#define exi_check_valid_file_id vtkexodusII_exi_check_valid_file_id ++#define exi_check_version vtkexodusII_exi_check_version ++#define exi_compress_variable vtkexodusII_exi_compress_variable ++#define exi_comp_ws vtkexodusII_exi_comp_ws ++#define exi_conv_exit vtkexodusII_exi_conv_exit ++#define exi_conv_init vtkexodusII_exi_conv_init ++#define exi_default_max_name_length vtkexodusII_exi_default_max_name_length ++#define exi_dim_num_entries_in_object vtkexodusII_exi_dim_num_entries_in_object ++#define exi_dim_num_objects vtkexodusII_exi_dim_num_objects ++#define exi_find_file_item vtkexodusII_exi_find_file_item ++#define exi_get_block_param vtkexodusII_exi_get_block_param ++#define exi_get_counter_list vtkexodusII_exi_get_counter_list ++#define exi_get_cpu_ws vtkexodusII_exi_get_cpu_ws ++#define exi_get_dimension vtkexodusII_exi_get_dimension ++#define exi_get_file_item vtkexodusII_exi_get_file_item ++#define exi_get_file_type vtkexodusII_exi_get_file_type ++#define exi_get_glob_vars vtkexodusII_exi_get_glob_vars ++#define exi_get_glob_vars_multi_time vtkexodusII_exi_get_glob_vars_multi_time ++#define exi_get_glob_var_time vtkexodusII_exi_get_glob_var_time ++#define exi_get_metadata_count vtkexodusII_exi_get_metadata_count ++#define exi_get_name vtkexodusII_exi_get_name ++#define exi_get_names vtkexodusII_exi_get_names ++#define exi_get_nodal_var_multi_time vtkexodusII_exi_get_nodal_var_multi_time ++#define exi_get_nodal_var_time vtkexodusII_exi_get_nodal_var_time ++#define exi_get_partial_nodal_var vtkexodusII_exi_get_partial_nodal_var ++#define exi_get_stat_ptr vtkexodusII_exi_get_stat_ptr ++#define exi_get_varid vtkexodusII_exi_get_varid ++#define exi_handle_mode vtkexodusII_exi_handle_mode ++#define exi_id_lkup vtkexodusII_exi_id_lkup ++#define exi_inc_file_item vtkexodusII_exi_inc_file_item ++#define exi_iqsort vtkexodusII_exi_iqsort ++#define exi_iqsort64 vtkexodusII_exi_iqsort64 ++#define exi_is_parallel vtkexodusII_exi_is_parallel ++#define exi_leavedef vtkexodusII_exi_leavedef ++#define exi_mutex_lock vtkexodusII_exi_mutex_lock ++#define exi_mutex_unlock vtkexodusII_exi_mutex_unlock ++#define exi_name_of_map vtkexodusII_exi_name_of_map ++#define exi_name_red_var_of_object vtkexodusII_exi_name_red_var_of_object ++#define exi_name_var_of_object vtkexodusII_exi_name_var_of_object ++#define ex_initialize_basis_struct vtkexodusII_ex_initialize_basis_struct ++#define ex_initialize_quadrature_struct vtkexodusII_ex_initialize_quadrature_struct + #define ex_inquire vtkexodusII_ex_inquire + #define ex_inquire_int vtkexodusII_ex_inquire_int + #define ex_int64_status vtkexodusII_ex_int64_status + #define ex_int_write_conn vtkexodusII_ex_int_write_conn +-#define ex__iqsort vtkexodusII_ex__iqsort +-#define ex__iqsort64 vtkexodusII_ex__iqsort64 +-#define ex__is_parallel vtkexodusII_ex__is_parallel ++#define exi_persist_leavedef vtkexodusII_exi_persist_leavedef ++#define exi_persist_redef vtkexodusII_exi_persist_redef ++#define exi_populate_header vtkexodusII_exi_populate_header ++#define exi_pthread_first_thread_init vtkexodusII_exi_pthread_first_thread_init ++#define exi_put_assembly_name vtkexodusII_exi_put_assembly_name ++#define exi_put_basis_attribute vtkexodusII_exi_put_basis_attribute ++#define exi_put_homogenous_block_params vtkexodusII_exi_put_homogenous_block_params ++#define exi_put_name vtkexodusII_exi_put_name ++#define exi_put_names vtkexodusII_exi_put_names ++#define exi_put_nemesis_version vtkexodusII_exi_put_nemesis_version ++#define exi_put_nodal_var_time vtkexodusII_exi_put_nodal_var_time ++#define exi_put_partial_nodal_var vtkexodusII_exi_put_partial_nodal_var ++#define exi_put_quad_attribute vtkexodusII_exi_put_quad_attribute ++#define exi_put_type_attribute vtkexodusII_exi_put_type_attribute ++#define exi_redef vtkexodusII_exi_redef ++#define exi_reset_error_status vtkexodusII_exi_reset_error_status ++#define exi_rm_file_item vtkexodusII_exi_rm_file_item ++#define exi_rm_stat_ptr vtkexodusII_exi_rm_stat_ptr ++#define exi_set_compact_storage vtkexodusII_exi_set_compact_storage ++#define exi_trim vtkexodusII_exi_trim ++#define exi_update_max_name_length vtkexodusII_exi_update_max_name_length + #define ex_large_model vtkexodusII_ex_large_model +-#define ex__leavedef vtkexodusII_ex__leavedef +-#define ex__mutex_lock vtkexodusII_ex__mutex_lock +-#define ex__mutex_unlock vtkexodusII_ex__mutex_unlock +-#define ex__name_of_map vtkexodusII_ex__name_of_map + #define ex_name_of_object vtkexodusII_ex_name_of_object +-#define ex__name_red_var_of_object vtkexodusII_ex__name_red_var_of_object +-#define ex__name_var_of_object vtkexodusII_ex__name_var_of_object +-#define exodus_unused_symbol_dummy_ex_create_par vtkexodusII_exodus_unused_symbol_dummy_ex_create_par +-#define exodus_unused_symbol_dummy_ex_open_par vtkexodusII_exodus_unused_symbol_dummy_ex_open_par + #define exoII_ass vtkexodusII_exoII_ass + #define exoII_eb vtkexodusII_exoII_eb + #define exoII_ed vtkexodusII_exoII_ed +@@ -233,9 +271,7 @@ + #define ex_open_int vtkexodusII_ex_open_int + #define ex_opts vtkexodusII_ex_opts + #define exoptval vtkexodusII_exoptval +-#define ex__populate_header vtkexodusII_ex__populate_header + #define ex_print_config vtkexodusII_ex_print_config +-#define ex__pthread_first_thread_init vtkexodusII_ex__pthread_first_thread_init + #define ex_put_all_var_param vtkexodusII_ex_put_all_var_param + #define ex_put_all_var_param_ext vtkexodusII_ex_put_all_var_param_ext + #define ex_put_assemblies vtkexodusII_ex_put_assemblies +@@ -244,6 +280,7 @@ + #define ex_put_attributes vtkexodusII_ex_put_attributes + #define ex_put_attr_names vtkexodusII_ex_put_attr_names + #define ex_put_attr_param vtkexodusII_ex_put_attr_param ++#define ex_put_basis vtkexodusII_ex_put_basis + #define ex_put_blobs vtkexodusII_ex_put_blobs + #define ex_put_block vtkexodusII_ex_put_block + #define ex_put_block_param vtkexodusII_ex_put_block_param +@@ -273,8 +310,9 @@ + #define ex_put_elem_var_slab vtkexodusII_ex_put_elem_var_slab + #define ex_put_elem_var_tab vtkexodusII_ex_put_elem_var_tab + #define ex_put_entity_count_per_polyhedra vtkexodusII_ex_put_entity_count_per_polyhedra ++#define ex_put_field_metadata vtkexodusII_ex_put_field_metadata ++#define ex_put_field_suffices vtkexodusII_ex_put_field_suffices + #define ex_put_glob_vars vtkexodusII_ex_put_glob_vars +-#define ex__put_homogenous_block_params vtkexodusII_ex__put_homogenous_block_params + #define ex_put_id_map vtkexodusII_ex_put_id_map + #define ex_put_info vtkexodusII_ex_put_info + #define ex_put_init vtkexodusII_ex_put_init +@@ -286,21 +324,18 @@ + #define ex_put_loadbal_param_cc vtkexodusII_ex_put_loadbal_param_cc + #define ex_put_map vtkexodusII_ex_put_map + #define ex_put_map_param vtkexodusII_ex_put_map_param +-#define ex__put_name vtkexodusII_ex__put_name ++#define ex_put_multi_field_metadata vtkexodusII_ex_put_multi_field_metadata + #define ex_put_name vtkexodusII_ex_put_name +-#define ex__put_names vtkexodusII_ex__put_names + #define ex_put_names vtkexodusII_ex_put_names + #define ex_put_n_attr vtkexodusII_ex_put_n_attr + #define ex_put_n_coord vtkexodusII_ex_put_n_coord + #define ex_put_n_elem_attr vtkexodusII_ex_put_n_elem_attr + #define ex_put_n_elem_conn vtkexodusII_ex_put_n_elem_conn + #define ex_put_n_elem_num_map vtkexodusII_ex_put_n_elem_num_map +-#define ex__put_nemesis_version vtkexodusII_ex__put_nemesis_version + #define ex_put_n_nodal_var vtkexodusII_ex_put_n_nodal_var + #define ex_put_n_node_num_map vtkexodusII_ex_put_n_node_num_map + #define ex_put_n_node_set vtkexodusII_ex_put_n_node_set + #define ex_put_n_node_set_df vtkexodusII_ex_put_n_node_set_df +-#define ex__put_nodal_var vtkexodusII_ex__put_nodal_var + #define ex_put_nodal_var vtkexodusII_ex_put_nodal_var + #define ex_put_nodal_var_slab vtkexodusII_ex_put_nodal_var_slab + #define ex_put_node_cmap vtkexodusII_ex_put_node_cmap +@@ -328,7 +363,6 @@ + #define ex_put_partial_elem_map vtkexodusII_ex_put_partial_elem_map + #define ex_put_partial_elem_num_map vtkexodusII_ex_put_partial_elem_num_map + #define ex_put_partial_id_map vtkexodusII_ex_put_partial_id_map +-#define ex__put_partial_nodal_var vtkexodusII_ex__put_partial_nodal_var + #define ex_put_partial_nodal_var vtkexodusII_ex_put_partial_nodal_var + #define ex_put_partial_node_num_map vtkexodusII_ex_put_partial_node_num_map + #define ex_put_partial_node_set vtkexodusII_ex_put_partial_node_set +@@ -346,6 +380,7 @@ + #define ex_put_prop_array vtkexodusII_ex_put_prop_array + #define ex_put_prop_names vtkexodusII_ex_put_prop_names + #define ex_put_qa vtkexodusII_ex_put_qa ++#define ex_put_quadrature vtkexodusII_ex_put_quadrature + #define ex_put_reduction_variable_names vtkexodusII_ex_put_reduction_variable_names + #define ex_put_reduction_variable_param vtkexodusII_ex_put_reduction_variable_param + #define ex_put_reduction_vars vtkexodusII_ex_put_reduction_vars +@@ -366,27 +401,23 @@ + #define ex_put_variable_name vtkexodusII_ex_put_variable_name + #define ex_put_variable_names vtkexodusII_ex_put_variable_names + #define ex_put_variable_param vtkexodusII_ex_put_variable_param ++#define ex_put_var_multi_time vtkexodusII_ex_put_var_multi_time + #define ex_put_var_name vtkexodusII_ex_put_var_name + #define ex_put_var_names vtkexodusII_ex_put_var_names + #define ex_put_var_param vtkexodusII_ex_put_var_param + #define ex_put_var_tab vtkexodusII_ex_put_var_tab +-#define ex__reset_error_status vtkexodusII_ex__reset_error_status +-#define ex__rm_file_item vtkexodusII_ex__rm_file_item +-#define ex__rm_stat_ptr vtkexodusII_ex__rm_stat_ptr +-#define ex__set_compact_storage vtkexodusII_ex__set_compact_storage + #define ex_set_err vtkexodusII_ex_set_err + #define ex_set_int64_status vtkexodusII_ex_set_int64_status + #define ex_set_max_name_length vtkexodusII_ex_set_max_name_length + #define ex_set_option vtkexodusII_ex_set_option + #define ex_set_parallel vtkexodusII_ex_set_parallel + #define ex_strerror vtkexodusII_ex_strerror +-#define ex__trim vtkexodusII_ex__trim ++#define ex_string_to_field_type_enum vtkexodusII_ex_string_to_field_type_enum + #define ex_update vtkexodusII_ex_update +-#define ex__update_max_name_length vtkexodusII_ex__update_max_name_length + #define ex_var_type_to_ex_entity_type vtkexodusII_ex_var_type_to_ex_entity_type + #define nc_flt_code vtkexodusII_nc_flt_code +-#define ne__check_file_version vtkexodusII_ne__check_file_version +-#define ne__id_lkup vtkexodusII_ne__id_lkup ++#define nei_check_file_version vtkexodusII_nei_check_file_version ++#define nei_id_lkup vtkexodusII_nei_id_lkup + #define ne_ret_string vtkexodusII_ne_ret_string + + #endif +diff --git a/ThirdParty/exodusII/vtkexodusII/src/deprecated/ex_get_var_param.c b/ThirdParty/exodusII/vtkexodusII/src/deprecated/ex_get_var_param.c +index e53efc947f..43f5e8e6bd 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/deprecated/ex_get_var_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/deprecated/ex_get_var_param.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -36,5 +36,5 @@ int ex_get_var_param(int exoid, const char *var_type, int *num_vars) + { + ex_entity_type obj_type; + obj_type = ex_var_type_to_ex_entity_type(*var_type); +- return (ex_get_variable_param(exoid, obj_type, num_vars)); ++ return ex_get_variable_param(exoid, obj_type, num_vars); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/deprecated/ex_put_var_param.c b/ThirdParty/exodusII/vtkexodusII/src/deprecated/ex_put_var_param.c +index d503fc9f4a..a942db88c2 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/deprecated/ex_put_var_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/deprecated/ex_put_var_param.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -39,5 +39,5 @@ int ex_put_var_param(int exoid, const char *var_type, int num_vars) + { + ex_entity_type obj_type; + obj_type = ex_var_type_to_ex_entity_type(*var_type); +- return (ex_put_variable_param(exoid, obj_type, num_vars)); ++ return ex_put_variable_param(exoid, obj_type, num_vars); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex__get_glob_vars_multi_time.c b/ThirdParty/exodusII/vtkexodusII/src/ex__get_glob_vars_multi_time.c +new file mode 100644 +index 0000000000..1a1886985e +--- /dev/null ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex__get_glob_vars_multi_time.c +@@ -0,0 +1,71 @@ ++/* ++ * Copyright(C) 2023 National Technology & Engineering Solutions ++ * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ++ * NTESS, the U.S. Government retains certain rights in this software. ++ * ++ * See packages/seacas/LICENSE for details ++ */ ++/***************************************************************************** ++ * ++ * exggv - ex_get_glob_vars ++ * ++ * entry conditions - ++ * input parameters: ++ * int exoid exodus file id ++ * int time_step time step number ++ * int num_glob_vars number of global vars in file ++ * ++ * exit conditions - ++ * float* glob_var_vals array of global variable values ++ * ++ * revision history - ++ * ++ * ++ *****************************************************************************/ ++ ++#include "exodusII.h" // for ex_err, etc ++#include "exodusII_int.h" // for exi_comp_ws, EX_FATAL, etc ++ ++/*! ++ Internal function. Do not use in client code. ++ */ ++ ++int exi_get_glob_vars_multi_time(int exoid, int num_glob_vars, int beg_time_step, int end_time_step, ++ void *glob_var_vals) ++{ ++ EX_FUNC_ENTER(); ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ /* inquire previously defined variable */ ++ int varid; ++ int status; ++ if ((status = nc_inq_varid(exoid, VAR_GLO_VAR, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "Warning: failed to locate global variables in file id %d", ++ exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_WARN); ++ } ++ ++ /* read values of global variables */ ++ size_t start[] = {--beg_time_step, 0}; ++ size_t count[] = {end_time_step - beg_time_step, num_glob_vars}; ++ ++ if (exi_comp_ws(exoid) == 4) { ++ status = nc_get_vara_float(exoid, varid, start, count, glob_var_vals); ++ } ++ else { ++ status = nc_get_vara_double(exoid, varid, start, count, glob_var_vals); ++ } ++ ++ if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get global variable values from file id %d", ++ exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ EX_FUNC_LEAVE(EX_NOERR); ++} +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_nodal_var_int.c b/ThirdParty/exodusII/vtkexodusII/src/ex__get_nodal_var_multi_time.c +similarity index 66% +rename from ThirdParty/exodusII/vtkexodusII/src/ex_get_nodal_var_int.c +rename to ThirdParty/exodusII/vtkexodusII/src/ex__get_nodal_var_multi_time.c +index adaf133f99..9bb94d1fe2 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_nodal_var_int.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex__get_nodal_var_multi_time.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -12,11 +12,11 @@ + /*! + \internal + \ingroup ResultsData +-\note This function is called internally by ex_get_var() to handle ++\note This function is called internally by ex_get_var_multi_time() to handle + the reading of nodal variable values. + +-The function ex__get_nodal_var() reads the values of a single nodal +-variable for a single time step. Memory must be allocated for the ++The function exi_get_nodal_var_multi_time() reads the values of a single nodal ++variable for a one or more time steps. Memory must be allocated for the + nodal variable values array before this function is invoked. + + Because nodal variables are floating point values, the application +@@ -24,7 +24,7 @@ code must declare the array passed to be the appropriate type + (float or double) to match the compute word size passed in + ex_create() or ex_open(). + +-\return In case of an error, ex__get_nodal_var() returns a negative ++\return In case of an error, exi_get_nodal_var_multi_time() returns a negative + number; a warning will return a positive number. Possible causes of + errors include: + - data file not properly opened with call to ex_create() or ex_open() +@@ -35,24 +35,16 @@ errors include: + ex_create() + or ex_open(). + +-\param[in] time_step The time step, as described under ex_put_time(), +-at which the +-nodal variable values are desired. This is +-essentially an index (in +-the time dimension) into the nodal variable +-values array stored in +-the database. The first time step is 1. +- + \param[in] nodal_var_index The index of the desired nodal variable. The +-first variable +-has an index of 1. ++ first variable has an index of 1. + + \param[in] num_nodes The number of nodal points. + ++\param[in] beg_time_step The first time step to get values for. ++\param[in] end_time_step The last time step to get values for. + \param[out] nodal_var_vals Returned array of num_nodes values of the +-nodal_var_index-th +-nodal variable for the time_step-th time +-step. ++ nodal_var_index-th nodal variable for the ++ desired timesteps. + + For example, the following demonstrates how this function would be + used: +@@ -66,45 +58,44 @@ time_step = 1; + var_index = 2; + + var_values = (float *) calloc (num_nodes, sizeof(float)); +-error = ex_get_nodal_var(exoid, time_step, var_index, num_nodes, +-var_values); ++error = exi_get_nodal_var_multi_time(exoid, var_index, num_nodes, ++ time_step, time_step, var_values); + ~~~ + + */ + +-int ex__get_nodal_var(int exoid, int time_step, int nodal_var_index, int64_t num_nodes, +- void *nodal_var_vals) ++int exi_get_nodal_var_multi_time(int exoid, int nodal_var_index, int64_t num_nodes, ++ int beg_time_step, int end_time_step, void *nodal_var_vals) + { +- int varid; +- int status; +- size_t start[3], count[3]; +- char errmsg[MAX_ERR_LENGTH]; +- +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire previously defined variable */ +- + /* Need to see how this works in the parallel-aware exodus... */ + if (num_nodes == 0) { +- return (EX_NOERR); ++ return EX_NOERR; + } + ++ size_t start[3]; ++ size_t count[3]; ++ int status; ++ int varid; + if (ex_large_model(exoid) == 0) { + /* read values of the nodal variable */ + if ((status = nc_inq_varid(exoid, VAR_NOD_VAR, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: could not find nodal variables in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_WARN); ++ return EX_WARN; + } + +- start[0] = --time_step; ++ start[0] = --beg_time_step; + start[1] = --nodal_var_index; + start[2] = 0; + +- count[0] = 1; ++ count[0] = end_time_step - beg_time_step; + count[1] = 1; + count[2] = num_nodes; + } +@@ -112,20 +103,21 @@ int ex__get_nodal_var(int exoid, int time_step, int nodal_var_index, int64_t num + /* read values of the nodal variable -- stored as separate variables... */ + /* Get the varid.... */ + if ((status = nc_inq_varid(exoid, VAR_NOD_VAR_NEW(nodal_var_index), &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: could not find nodal variable %d in file id %d", + nodal_var_index, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_WARN); ++ return EX_WARN; + } + +- start[0] = --time_step; ++ start[0] = --beg_time_step; + start[1] = 0; + +- count[0] = 1; ++ count[0] = end_time_step - beg_time_step; + count[1] = num_nodes; + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, varid, start, count, nodal_var_vals); + } + else { +@@ -133,9 +125,10 @@ int ex__get_nodal_var(int exoid, int time_step, int nodal_var_index, int64_t num + } + + if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get nodal variables in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } +- return (EX_NOERR); ++ return EX_NOERR; + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex__put_homogenous_block_params.c b/ThirdParty/exodusII/vtkexodusII/src/ex__put_homogenous_block_params.c +index bae09a8b63..7fad13f258 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex__put_homogenous_block_params.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex__put_homogenous_block_params.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -15,14 +15,14 @@ + * Permits some optimizations and safer for N->1 parallel. + * Arbitrary polyhedra are handled in more general routine; not here. + */ +-int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct ex_block *blocks) ++int exi_put_homogenous_block_params(int exoid, size_t block_count, const struct ex_block *blocks) + { + + int status; + int varid, dims[2]; + char errmsg[MAX_ERR_LENGTH]; + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -47,7 +47,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + "ERROR: Bad block type (%d) specified for all blocks file id %d", blocks[0].type, + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } + + { /* Output ids for this block */ +@@ -58,7 +58,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + "array in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (EX_FATAL); ++ return EX_FATAL; + } + + for (size_t i = 0; i < block_count; i++) { +@@ -70,7 +70,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + ex_name_of_object(blocks[0].type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(ids); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if ((status = nc_put_var_longlong(exoid, varid, ids)) != NC_NOERR) { +@@ -78,7 +78,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + ex_name_of_object(blocks[0].type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(ids); +- return (EX_FATAL); ++ return EX_FATAL; + } + free(ids); + } +@@ -91,7 +91,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + "array in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (EX_FATAL); ++ return EX_FATAL; + } + + for (size_t i = 0; i < block_count; i++) { +@@ -103,7 +103,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + ex_name_of_object(blocks[0].type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(stat); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if ((status = nc_put_var_int(exoid, varid, stat)) != NC_NOERR) { +@@ -111,17 +111,17 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + ex_name_of_object(blocks[0].type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(stat); +- return (EX_FATAL); ++ return EX_FATAL; + } + free(stat); + } + + /* ======================================================================== */ + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* inquire previously defined dimensions */ +@@ -133,7 +133,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + } + + for (size_t i = 0; i < block_count; i++) { +- int blk_id_ndx = 1 + ex__inc_file_item(exoid, ex__get_counter_list(blocks[i].type)); ++ int blk_id_ndx = 1 + exi_inc_file_item(exoid, exi_get_counter_list(blocks[i].type)); + + if (blocks[i].num_entry == 0) { /* Is this a NULL element block? */ + continue; +@@ -154,26 +154,26 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + case EX_EDGE_BLOCK: + dneblk = DIM_NUM_ED_IN_EBLK(blk_id_ndx); + dnnpe = DIM_NUM_NOD_PER_ED(blk_id_ndx); +- dnepe = 0; +- dnfpe = 0; ++ dnepe = NULL; ++ dnfpe = NULL; + dnape = DIM_NUM_ATT_IN_EBLK(blk_id_ndx); + vblkatt = VAR_EATTRIB(blk_id_ndx); + vattnam = VAR_NAME_EATTRIB(blk_id_ndx); + vnodcon = VAR_EBCONN(blk_id_ndx); +- vedgcon = 0; +- vfaccon = 0; ++ vedgcon = NULL; ++ vfaccon = NULL; + break; + case EX_FACE_BLOCK: + dneblk = DIM_NUM_FA_IN_FBLK(blk_id_ndx); + dnnpe = DIM_NUM_NOD_PER_FA(blk_id_ndx); +- dnepe = 0; +- dnfpe = 0; ++ dnepe = NULL; ++ dnfpe = NULL; + dnape = DIM_NUM_ATT_IN_FBLK(blk_id_ndx); + vblkatt = VAR_FATTRIB(blk_id_ndx); + vattnam = VAR_NAME_FATTRIB(blk_id_ndx); + vnodcon = VAR_FBCONN(blk_id_ndx); +- vedgcon = 0; +- vfaccon = 0; ++ vedgcon = NULL; ++ vfaccon = NULL; + break; + case EX_ELEM_BLOCK: + dneblk = DIM_NUM_EL_IN_BLK(blk_id_ndx); +@@ -266,22 +266,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); +- +-#if defined(PARALLEL_AWARE_EXODUS) +- /* +- * There is currently a bug in netcdf-4.5.1-devel and earlier +- * for partial parallel output of strided arrays in collective +- * mode for netcdf-4-based output. If the number of attributes > +- * 1 and in parallel mode, set the mode to independent. +- */ +- if (blocks[i].num_attribute > 1) { +- struct ex__file_item *file = ex__find_file_item(exoid); +- if (file->is_parallel && file->is_hdf5) { +- nc_var_par_access(exoid, varid, NC_INDEPENDENT); +- } +- } +-#endif ++ exi_compress_variable(exoid, varid, 2); + + /* Attribute names... */ + dims[0] = numattrdim; +@@ -295,7 +280,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +-#if NC_HAS_HDF5 ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) + int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, att_name_varid, 0, &fill); + #endif +@@ -320,7 +305,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, connid, 1); ++ exi_compress_variable(exoid, connid, 1); + + /* store element type as attribute of connectivity variable */ + if ((status = nc_put_att_text(exoid, connid, ATT_NAME_ELB, strlen(blocks[i].topology) + 1, +@@ -360,8 +345,10 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { +- return (EX_FATAL); ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; + } + + /* ======================================================================== */ +@@ -370,7 +357,7 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + case EX_EDGE_BLOCK: vblkids = VAR_ID_ED_BLK; break; + case EX_FACE_BLOCK: vblkids = VAR_ID_FA_BLK; break; + case EX_ELEM_BLOCK: vblkids = VAR_ID_EL_BLK; break; +- default: return (EX_FATAL); /* should have been handled earlier; quiet compiler here */ ++ default: return EX_FATAL; /* should have been handled earlier; quiet compiler here */ + } + + int att_name_varid = -1; +@@ -382,23 +369,23 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct + */ + size_t count[2]; + size_t start[2]; +- char * text = ""; ++ char *text = ""; + + count[0] = 1; + start[1] = 0; + count[1] = strlen(text) + 1; + +- for (size_t j = 0; j < blocks[i].num_attribute; j++) { ++ for (int64_t j = 0; j < blocks[i].num_attribute; j++) { + start[0] = j; + nc_put_vara_text(exoid, att_name_varid, start, count, text); + } + } + } + +- return (EX_NOERR); ++ return EX_NOERR; + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); +- return (EX_FATAL); ++ exi_leavedef(exoid, __func__); ++ return EX_FATAL; + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_nodal_var_int.c b/ThirdParty/exodusII/vtkexodusII/src/ex__put_nodal_var_multi_time.c +similarity index 67% +rename from ThirdParty/exodusII/vtkexodusII/src/ex_put_nodal_var_int.c +rename to ThirdParty/exodusII/vtkexodusII/src/ex__put_nodal_var_multi_time.c +index 12bbde56d2..c2d2500954 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_nodal_var_int.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex__put_nodal_var_multi_time.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,16 +7,16 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_WARN, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_WARN, exi_comp_ws, etc + + /*! + \internal + \ingroup ResultsData +-\note This function is called internally by ex_put_var() to handle ++\note This function is called internally by ex_put_var_time() to handle + the writing of nodal variable values. + +-The function ex__put_nodal_var() writes the values of a single nodal +-variable for a single time step. The function ex_put_variable_param() ++The function exi_put_nodal_var_time() writes the values of a single nodal ++variable for multiple time steps. The function ex_put_variable_param() + must be invoked before this call is made. + + Because nodal variables are floating point values, the application +@@ -24,7 +24,7 @@ code must declare the array passed to be the appropriate type + (float or double) to match the compute word size passed in + ex_create() or ex_open(). + +-\return In case of an error, ex__put_nodal_var() returns a negative number; a ++\return In case of an error, exi_put_nodal_var() returns a negative number; a + warning will return a positive number. Possible causes of errors + include: + - data file not properly opened with call to ex_create() or ex_open() +@@ -37,17 +37,19 @@ nodal variables. + ex_create() or + ex_open(). + +-\param[in] time_step The time step number, as described under +-ex_put_time(). This +- is essentially a counter that is incremented when +-results variables +- are output. The first time step is 1. +- + \param[in] nodal_var_index The index of the nodal variable. The first + variable has an index of 1. + + \param[in] num_nodes The number of nodal points. + ++\param[in] beg_time_step The beginning time step number, as described under ex_put_time(). ++ This is counter that is incremented when results variables ++ are output. The first time step is 1. ++ ++\param[in] end_time_step The ending time step number, as described under ex_put_time(). ++ This is counter that is incremented when results variables ++ are output. The first time step is 1. ++ + \param[in] nodal_var_vals Array of num_nodes values of the + nodal_var_index-th nodal + variable for the time_step-th time step. +@@ -66,37 +68,35 @@ for (k=1; k <= num_nod_vars; k++) { + \comment{application code fills in this array} + nodal_var_vals[j] = 10.0; + } +- error = ex_put_nodal_var(exoid, time_step, k, num_nodes, ++ error = ex_put_var_time(exoid, EX_NODAL, k, 0, num_nodes, beg_time_step, end_time_step + nodal_var_vals); + } + ~~~ + + */ + +-int ex__put_nodal_var(int exoid, int time_step, int nodal_var_index, int64_t num_nodes, +- const void *nodal_var_vals) ++int exi_put_nodal_var_time(int exoid, int nodal_var_index, int64_t num_nodes, int beg_time_step, ++ int end_time_step, const void *nodal_var_vals) + + { + int status; + int varid; +- size_t start[3], count[3]; ++ size_t start[2], count[2]; + char errmsg[MAX_ERR_LENGTH]; + + if ((status = nc_inq_varid(exoid, VAR_NOD_VAR_NEW(nodal_var_index), &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: could not find nodal variable %d in file id %d", + nodal_var_index, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_WARN); ++ return EX_WARN; + } +- start[0] = --time_step; ++ start[0] = --beg_time_step; + start[1] = 0; +- start[2] = 0; + +- count[0] = 1; ++ count[0] = end_time_step - beg_time_step; + count[1] = num_nodes; +- count[2] = 0; + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vara_float(exoid, varid, start, count, nodal_var_vals); + } + else { +@@ -106,7 +106,7 @@ int ex__put_nodal_var(int exoid, int time_step, int nodal_var_index, int64_t num + if (status != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to store nodal variables in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } +- return (EX_NOERR); ++ return EX_NOERR; + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_add_attr.c b/ThirdParty/exodusII/vtkexodusII/src/ex_add_attr.c +index b2d1388e3f..a0f0e94776 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_add_attr.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_add_attr.c +@@ -25,7 +25,7 @@ int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t + int numattrdim; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -38,7 +38,7 @@ int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t + obj_id_ndx = 0; + } + else { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -123,7 +123,7 @@ int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t + + /* element attribute array */ + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -137,7 +137,7 @@ int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t + goto error_ret; /* exit define mode and return */ + } + +- ex__get_dimension(exoid, dnumobjent, ex_name_of_object(obj_type), &num_obj, &numobjentdim, ++ exi_get_dimension(exoid, dnumobjent, ex_name_of_object(obj_type), &num_obj, &numobjentdim, + __func__); + dims[0] = numobjentdim; + dims[1] = numattrdim; +@@ -149,7 +149,7 @@ int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + + /* inquire previously defined dimensions */ + if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &strdim)) != NC_NOERR) { +@@ -172,7 +172,7 @@ int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t + + /* leave define mode */ + +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -182,7 +182,7 @@ int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t + if (att_name_varid >= 0) { + size_t count[2]; + size_t start[2]; +- char * text = ""; ++ char *text = ""; + size_t i; + + count[0] = 1; +@@ -199,6 +199,6 @@ int ex_add_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_close.c b/ThirdParty/exodusII/vtkexodusII/src/ex_close.c +index 1e1de7f313..27716f27dd 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_close.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_close.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -21,7 +21,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__get_counter_list, etc ++#include "exodusII_int.h" // for exi_get_counter_list, etc + + /*! + \ingroup Utilities +@@ -50,76 +50,72 @@ int ex_close(int exoid) + int status; + int status1; + int status2; +-#if NC_HAS_HDF5 +- int parent_id = 0; +-#endif + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++#ifndef NDEBUG ++ struct exi_file_item *file = exi_find_file_item(exoid); ++ assert(!file->in_define_mode && file->persist_define_mode == 0); ++#endif ++ + /* + * NOTE: If using netcdf-4, exoid must refer to the root group. + * Need to determine whether there are any groups and if so, +- * call ex__rm_file_item and ex__rm_stat_ptr on each group. ++ * call exi_rm_file_item and exi_rm_stat_ptr on each group. + */ + +-#if NC_HAS_HDF5 +- /* nc_inq_grp_parent() will return NC_ENOGRP error if exoid +- * refers to the root group (which is what we want) ++ /* ++ * Get exoid of root group + */ +- if ((status = nc_inq_grp_parent(exoid, &parent_id)) != NC_ENOGRP) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file id %d does not refer to root group.", exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_NOTROOTID); +- EX_FUNC_LEAVE(EX_FATAL); +- } +-#endif + + if ((status1 = nc_sync(exoid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to update file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status1); + } + +- if ((status2 = nc_close(exoid)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to close file id %d", exoid); +- ex_err_fn(exoid, __func__, errmsg, status2); ++ int root_id = exoid & EX_FILE_ID_MASK; ++ if ((status2 = nc_close(root_id)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to close file id %d", root_id); ++ ex_err_fn(root_id, __func__, errmsg, status2); + } + + /* Even if we have failures above due to nc_sync() or nc_close(), we still need to clean up our + * internal datastructures. + */ + +- ex__rm_file_item(exoid, ex__get_counter_list(EX_ELEM_BLOCK)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_FACE_BLOCK)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_EDGE_BLOCK)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_NODE_SET)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_EDGE_SET)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_FACE_SET)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_SIDE_SET)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_ELEM_SET)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_NODE_MAP)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_EDGE_MAP)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_FACE_MAP)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_ELEM_MAP)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_ASSEMBLY)); +- ex__rm_file_item(exoid, ex__get_counter_list(EX_BLOB)); +- +- ex__rm_stat_ptr(exoid, &exoII_ed); +- ex__rm_stat_ptr(exoid, &exoII_fa); +- ex__rm_stat_ptr(exoid, &exoII_eb); +- ex__rm_stat_ptr(exoid, &exoII_ns); +- ex__rm_stat_ptr(exoid, &exoII_es); +- ex__rm_stat_ptr(exoid, &exoII_fs); +- ex__rm_stat_ptr(exoid, &exoII_ss); +- ex__rm_stat_ptr(exoid, &exoII_els); +- ex__rm_stat_ptr(exoid, &exoII_nm); +- ex__rm_stat_ptr(exoid, &exoII_edm); +- ex__rm_stat_ptr(exoid, &exoII_fam); +- ex__rm_stat_ptr(exoid, &exoII_em); +- +- ex__conv_exit(exoid); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_ELEM_BLOCK)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_FACE_BLOCK)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_EDGE_BLOCK)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_NODE_SET)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_EDGE_SET)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_FACE_SET)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_SIDE_SET)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_ELEM_SET)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_NODE_MAP)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_EDGE_MAP)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_FACE_MAP)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_ELEM_MAP)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_ASSEMBLY)); ++ exi_rm_file_item(exoid, exi_get_counter_list(EX_BLOB)); ++ ++ exi_rm_stat_ptr(exoid, &exoII_ed); ++ exi_rm_stat_ptr(exoid, &exoII_fa); ++ exi_rm_stat_ptr(exoid, &exoII_eb); ++ exi_rm_stat_ptr(exoid, &exoII_ns); ++ exi_rm_stat_ptr(exoid, &exoII_es); ++ exi_rm_stat_ptr(exoid, &exoII_fs); ++ exi_rm_stat_ptr(exoid, &exoII_ss); ++ exi_rm_stat_ptr(exoid, &exoII_els); ++ exi_rm_stat_ptr(exoid, &exoII_nm); ++ exi_rm_stat_ptr(exoid, &exoII_edm); ++ exi_rm_stat_ptr(exoid, &exoII_fam); ++ exi_rm_stat_ptr(exoid, &exoII_em); ++ ++ exi_conv_exit(exoid); + + status = EX_NOERR; + if (status1 != NC_NOERR || status2 != NC_NOERR) { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_conv.c b/ThirdParty/exodusII/vtkexodusII/src/ex_conv.c +index 596172c17e..d2e21b4ae6 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_conv.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_conv.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__file_item, EX_FATAL, etc ++#include "exodusII_int.h" // for exi_file_item, EX_FATAL, etc + #include "stdbool.h" + + /*! \file +@@ -24,30 +24,30 @@ + + #define NC_FLOAT_WORDSIZE 4 + +-static struct ex__file_item *file_list = NULL; ++static struct exi_file_item *file_list = NULL; + +-struct ex__file_item *ex__find_file_item(int exoid) ++struct exi_file_item *exi_find_file_item(int exoid) + { + /* Find base filename in case exoid refers to a group */ + int base_exoid = (unsigned)exoid & EX_FILE_ID_MASK; +- struct ex__file_item *ptr = file_list; ++ struct exi_file_item *ptr = file_list; + while (ptr) { + if (ptr->file_id == base_exoid) { + break; + } + ptr = ptr->next; + } +- return (ptr); ++ return ptr; + } + + #define EX__MAX_PATHLEN 8192 +-int ex__check_multiple_open(const char *path, int mode, const char *func) ++int exi_check_multiple_open(const char *path, int mode, const char *func) + { + EX_FUNC_ENTER(); + bool is_write = mode & EX_WRITE; + char tmp[EX__MAX_PATHLEN]; + size_t pathlen; +- struct ex__file_item *ptr = file_list; ++ struct exi_file_item *ptr = file_list; + while (ptr) { + nc_inq_path(ptr->file_id, &pathlen, tmp); + /* If path is too long, assume it is ok... */ +@@ -72,7 +72,7 @@ int ex__check_multiple_open(const char *path, int mode, const char *func) + EX_FUNC_LEAVE(EX_NOERR); + } + +-int ex__check_valid_file_id(int exoid, const char *func) ++int exi_check_valid_file_id(int exoid, const char *func) + { + bool error = false; + if (exoid <= 0) { +@@ -80,7 +80,8 @@ int ex__check_valid_file_id(int exoid, const char *func) + } + #if !defined BUILT_IN_SIERRA + else { +- struct ex__file_item *file = ex__find_file_item(exoid); ++ int rootid = exoid & EX_FILE_ID_MASK; ++ struct exi_file_item *file = exi_find_file_item(rootid); + + if (!file) { + error = true; +@@ -93,13 +94,14 @@ int ex__check_valid_file_id(int exoid, const char *func) + if (old_opt & EX_ABORT) { + ex_opts(EX_VERBOSE | EX_ABORT); + } ++ int rootid = exoid & EX_FILE_ID_MASK; + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: In \"%s\", the file id %d was not obtained via a call " + "to \"ex_open\" or \"ex_create\".\n\t\tIt does not refer to a " + "valid open exodus file.\n\t\tAborting to avoid file " + "corruption or data loss or other potential problems.", +- func, exoid); ++ func, rootid); + ex_err(__func__, errmsg, EX_BADFILEID); + ex_opts(old_opt); + return EX_FATAL; +@@ -107,14 +109,13 @@ int ex__check_valid_file_id(int exoid, const char *func) + return EX_NOERR; + } + +-int ex__conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_wordsize, ++int exi_conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_wordsize, + int int64_status, bool is_parallel, bool is_hdf5, bool is_pnetcdf, bool is_write) + { + char errmsg[MAX_ERR_LENGTH]; +- struct ex__file_item *new_file; +- int filetype = 0; ++ struct exi_file_item *new_file = NULL; + +- /*! ex__conv_init() initializes the floating point conversion process. ++ /*! exi_conv_init() initializes the floating point conversion process. + * + * \param exoid an integer uniquely identifying the file of interest. + * +@@ -161,7 +162,7 @@ int ex__conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_word + /* If the following line causes a compile-time error, then there is a problem + * which will cause exodus to not work correctly on this platform. + * +- * Contact Greg Sjaardema, gdsjaar@sandia.gov for asisstance. ++ * Contact Greg Sjaardema, gdsjaar@sandia.gov for assistance. + */ + #define CT_ASSERT(e) extern char(*ct_assert(void))[sizeof(char[1 - 2 * !(e)])] + CT_ASSERT((sizeof(float) == 4 || sizeof(float) == 8) && +@@ -220,9 +221,10 @@ int ex__conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_word + * 3 -- netcdf4 classic (NC_FORMAT_NETCDF4_CLASSIC -1) + */ + ++ int filetype = 0; + nc_inq_format(exoid, &filetype); + +- if (!(new_file = malloc(sizeof(struct ex__file_item)))) { ++ if (!(new_file = malloc(sizeof(struct exi_file_item)))) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate memory for internal file " + "structure storage file id %d", +@@ -231,15 +233,16 @@ int ex__conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_word + EX_FUNC_LEAVE(EX_FATAL); + } + +- new_file->file_id = exoid; ++ new_file->file_id = (unsigned)exoid & EX_FILE_ID_MASK; + new_file->user_compute_wordsize = *comp_wordsize == 4 ? 0 : 1; + new_file->int64_status = int64_status; +- new_file->maximum_name_length = ex__default_max_name_length; ++ new_file->maximum_name_length = exi_default_max_name_length; + new_file->time_varid = -1; + new_file->compression_algorithm = EX_COMPRESS_GZIP; + new_file->assembly_count = 0; + new_file->blob_count = 0; + new_file->compression_level = 0; ++ new_file->quantize_nsd = 0; + new_file->shuffle = 0; + new_file->file_type = filetype - 1; + new_file->is_parallel = is_parallel; +@@ -249,6 +252,8 @@ int ex__conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_word + new_file->has_edges = 1; + new_file->has_faces = 1; + new_file->has_elems = 1; ++ new_file->in_define_mode = 0; ++ new_file->persist_define_mode = 0; + new_file->is_write = is_write; + + new_file->next = file_list; +@@ -267,26 +272,26 @@ int ex__conv_init(int exoid, int *comp_wordsize, int *io_wordsize, int file_word + /*............................................................................*/ + /*............................................................................*/ + +-/*! ex__conv_exit() takes the structure identified by "exoid" out of the linked ++/*! exi_conv_exit() takes the structure identified by "exoid" out of the linked + * list which describes the files that ex_conv_array() knows how to convert. + * +- * \note it is absolutely necessary for ex__conv_exit() to be called after ++ * \note it is absolutely necessary for exi_conv_exit() to be called after + * ncclose(), if the parameter used as "exoid" is the id returned from + * an ncopen() or nccreate() call, as netCDF reuses file ids! + * the best place to do this is ex_close(), which is where I did it. + * + * \param exoid integer which uniquely identifies the file of interest. + */ +-void ex__conv_exit(int exoid) ++void exi_conv_exit(int exoid) + { ++ struct exi_file_item *file = file_list; ++ struct exi_file_item *prev = NULL; + +- char errmsg[MAX_ERR_LENGTH]; +- struct ex__file_item *file = file_list; +- struct ex__file_item *prev = NULL; ++ int root_id = (unsigned)exoid & EX_FILE_ID_MASK; + + EX_FUNC_ENTER(); + while (file) { +- if (file->file_id == exoid) { ++ if (file->file_id == root_id) { + break; + } + +@@ -295,6 +300,7 @@ void ex__conv_exit(int exoid) + } + + if (!file) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: failure to clear file id %d - not in list.", exoid); + ex_err(__func__, errmsg, -EX_BADFILEID); + EX_FUNC_VOID(); +@@ -319,13 +325,13 @@ nc_type nc_flt_code(int exoid) + /*! + * \ingroup Utilities + * nc_flt_code() returns either NC_FLOAT or NC_DOUBLE, based on the parameters +- * with which ex__conv_init() was called. nc_flt_code() is used as the nc_type ++ * with which exi_conv_init() was called. nc_flt_code() is used as the nc_type + * parameter on ncvardef() calls that define floating point variables. + * + * "exoid" is some integer which uniquely identifies the file of interest. + */ + EX_FUNC_ENTER(); +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + + if (!file) { + char errmsg[MAX_ERR_LENGTH]; +@@ -336,7 +342,7 @@ nc_type nc_flt_code(int exoid) + EX_FUNC_LEAVE(file->netcdf_type_code); + } + +-int ex_int64_status(int exoid) ++unsigned ex_int64_status(int exoid) + { + /*! + * \ingroup Utilities +@@ -359,7 +365,7 @@ int ex_int64_status(int exoid) + #EX_INQ_INT64_API) | + */ + EX_FUNC_ENTER(); +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + + if (!file) { + char errmsg[MAX_ERR_LENGTH]; +@@ -389,12 +395,8 @@ int ex_set_int64_status(int exoid, int mode) + | #EX_ALL_INT64_API | (#EX_MAPS_INT64_API \| #EX_IDS_INT64_API \| #EX_BULK_INT64_API \| + #EX_INQ_INT64_API) | + */ +- +- int api_mode = 0; +- int db_mode = 0; +- + EX_FUNC_ENTER(); +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + + if (!file) { + char errmsg[MAX_ERR_LENGTH]; +@@ -404,8 +406,8 @@ int ex_set_int64_status(int exoid, int mode) + } + + /* Strip of all non-INT64_API values */ +- api_mode = mode & EX_ALL_INT64_API; +- db_mode = file->int64_status & EX_ALL_INT64_DB; ++ int api_mode = mode & EX_ALL_INT64_API; ++ int db_mode = file->int64_status & EX_ALL_INT64_DB; + + file->int64_status = api_mode | db_mode; + EX_FUNC_LEAVE(file->int64_status); +@@ -418,7 +420,7 @@ int ex_set_int64_status(int exoid, int mode) + int ex_set_option(int exoid, ex_option_type option, int option_value) + { + EX_FUNC_ENTER(); +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (!file) { + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d for ex_set_option().", exoid); +@@ -446,19 +448,76 @@ int ex_set_option(int exoid, ex_option_type option, int option_value) + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: invalid value %d for SZIP Compression. Must be even and 4 <= value <= " +- "32. Ignoring.", ++ "32. Setting value to 4.", ++ value); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ value = 4; ++ } ++ } ++ else if (file->compression_algorithm == EX_COMPRESS_ZSTD) { ++#if NC_HAS_ZSTD == 1 ++ if (value < -131072 || value > 22) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: invalid value %d for ZSTD Compression. Must be between -131072 and 22. " ++ "Setting value to 4", ++ value); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ value = 4; ++ } ++#else ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf( ++ errmsg, MAX_ERR_LENGTH, ++ "ERROR: Zstandard compression is not supported in this version of netCDF library."); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++#endif ++ } ++ else if (file->compression_algorithm == EX_COMPRESS_BZ2) { ++#if NC_HAS_BZ2 == 1 ++ if (value < 0 || value > 9) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: invalid value %d for BZIP2 Compression. Must be between 0 and 9 " ++ "inclusive. Setting value to 1.", + value); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- EX_FUNC_LEAVE(EX_FATAL); ++ value = 1; + } ++#else ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Bzip2 compression is not supported in this version of netCDF library."); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++#endif + } + file->compression_level = value; +- assert(value == file->compression_level); + } + else { + file->compression_level = 0; + } + break; ++ case EX_OPT_QUANTIZE_NSD: ++#if NC_HAS_QUANTIZE == 1 ++ if (option_value > 15) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: invalid value %d for Quantize NSD. Must be less than or equal to 15. " ++ "Setting value to 15.", ++ option_value); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ option_value = 15; ++ } ++ file->quantize_nsd = option_value; ++#else ++ { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Quanitzation is not supported in this version of netCDF library."); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ } ++#endif ++ break; + case EX_OPT_COMPRESSION_SHUFFLE: /* 0 (disabled); 1 (enabled) */ + file->shuffle = option_value != 0 ? 1 : 0; + break; +@@ -478,37 +537,37 @@ int ex_set_option(int exoid, ex_option_type option, int option_value) + + /*! + * \ingroup Utilities +- * ex__comp_ws() returns 4 (i.e. sizeof(float)) or 8 (i.e. sizeof(double)), ++ * exi_comp_ws() returns 4 (i.e. sizeof(float)) or 8 (i.e. sizeof(double)), + * depending on the value of floating point word size used to initialize + * the conversion facility for this file id (exoid). + * \param exoid integer which uniquely identifies the file of interest. + */ +-int ex__comp_ws(int exoid) ++int exi_comp_ws(int exoid) + { +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + + if (!file) { + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d", exoid); + ex_err(__func__, errmsg, EX_BADFILEID); +- return (EX_FATAL); ++ return EX_FATAL; + } + /* Stored as 0 for 4-byte; 1 for 8-byte */ +- return ((file->user_compute_wordsize + 1) * 4); ++ return (file->user_compute_wordsize + 1) * 4; + } + + /*! + * \ingroup Utilities +- * ex__is_parallel() returns 1 (true) or 0 (false) depending on whether ++ * exi_is_parallel() returns 1 (true) or 0 (false) depending on whether + * the file was opened in parallel or serial/file-per-processor mode. + * Note that in this case parallel assumes the output of a single file, + * not a parallel run using file-per-processor. + * \param exoid integer which uniquely identifies the file of interest. + */ +-int ex__is_parallel(int exoid) ++int exi_is_parallel(int exoid) + { + EX_FUNC_ENTER(); +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + + if (!file) { + char errmsg[MAX_ERR_LENGTH]; +@@ -537,8 +596,7 @@ int ex__is_parallel(int exoid) + int ex_set_parallel(int exoid, int is_parallel) + { + EX_FUNC_ENTER(); +- int old_value = 0; +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + + if (!file) { + char errmsg[MAX_ERR_LENGTH]; +@@ -547,7 +605,7 @@ int ex_set_parallel(int exoid, int is_parallel) + EX_FUNC_LEAVE(EX_FATAL); + } + +- old_value = file->is_parallel; ++ int old_value = file->is_parallel; + file->is_parallel = is_parallel; + /* Stored as 1 for parallel, 0 for serial or file-per-processor */ + EX_FUNC_LEAVE(old_value); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_copy.c b/ThirdParty/exodusII/vtkexodusII/src/ex_copy.c +index 9b691962dc..97ea864869 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_copy.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_copy.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,10 +7,10 @@ + */ + + #include "exodusII.h" // for EX_FATAL, exerrval, ex_err, etc +-#include "exodusII_int.h" // for ex__get_counter_list, etc ++#include "exodusII_int.h" // for exi_get_counter_list, etc + + #define STRINGIFY(x) #x +-#define TOSTRING(x) STRINGIFY(x) ++#define TOSTRING(x) STRINGIFY(x) + + #define EXCHECK(funcall) \ + if ((funcall) != NC_NOERR) { \ +@@ -21,7 +21,7 @@ + #define EXCHECKI(funcall) \ + if ((funcall) != NC_NOERR) { \ + fprintf(stderr, "Error calling %s\n", TOSTRING(funcall)); \ +- return (EX_FATAL); \ ++ return EX_FATAL; \ + } + + #define EXCHECKF(funcall) \ +@@ -31,12 +31,6 @@ + } + + /*! \cond INTERNAL */ +-struct ncdim +-{ /* dimension */ +- char name[MAX_VAR_NAME_LENGTH]; +- size_t size; +-}; +- + struct ncvar + { /* variable */ + char name[MAX_VAR_NAME_LENGTH]; +@@ -48,11 +42,9 @@ struct ncvar + + struct ncatt + { /* attribute */ +- int var; + char name[MAX_VAR_NAME_LENGTH]; + nc_type type; + size_t len; +- void * val; + }; + + static size_t type_size(nc_type type); +@@ -67,14 +59,14 @@ static int cpy_coord_def(int in_id, int out_id, int rec_dim_id, char *var_nm, + static int cpy_coord_val(int in_id, int out_id, char *var_nm, int in_large); + static void update_structs(int out_exoid); + static void update_internal_structs(int out_exoid, ex_inquiry inqcode, +- struct ex__list_item **ctr_list); ++ struct exi_list_item **ctr_list); + + static int is_truth_table_variable(const char *var_name) + { + /* If copying just the "mesh" or "non-transient" portion of the + * input DB, these are the variables that won't be copied: + */ +- return (strstr(var_name, "_var_tab") != NULL); ++ return strstr(var_name, "_var_tab") != NULL; + } + + static int is_non_mesh_variable(const char *var_name) +@@ -89,15 +81,11 @@ static int is_non_mesh_variable(const char *var_name) + /*! \cond INTERNAL */ + static int ex_copy_internal(int in_exoid, int out_exoid, int mesh_only) + { +- int status; +- int in_large; +- char errmsg[MAX_ERR_LENGTH]; +- + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(in_exoid, __func__) != EX_NOERR) { ++ if (exi_check_valid_file_id(in_exoid, __func__) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +- if (ex__check_valid_file_id(out_exoid, __func__) != EX_NOERR) { ++ if (exi_check_valid_file_id(out_exoid, __func__) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -105,13 +93,14 @@ static int ex_copy_internal(int in_exoid, int out_exoid, int mesh_only) + * Get exodus_large_model setting on both input and output + * databases so know how to handle coordinates. + */ +- in_large = ex_large_model(in_exoid); ++ int in_large = ex_large_model(in_exoid); + + /* + * Get integer sizes for both input and output databases. + * Currently they should both match or there will be an error. + */ + if (ex_int64_status(in_exoid) != ex_int64_status(out_exoid)) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf_nowarn(errmsg, MAX_ERR_LENGTH, + "ERROR: integer sizes do not match for input and output databases."); + ex_err_fn(in_exoid, __func__, errmsg, EX_WRONGFILETYPE); +@@ -119,7 +108,7 @@ static int ex_copy_internal(int in_exoid, int out_exoid, int mesh_only) + } + + /* put output file into define mode */ +- EXCHECK(nc_redef(out_exoid)); ++ EXCHECK(exi_redef(out_exoid, __func__)); + + /* copy global attributes */ + EXCHECK(cpy_global_att(in_exoid, out_exoid)); +@@ -131,7 +120,7 @@ static int ex_copy_internal(int in_exoid, int out_exoid, int mesh_only) + EXCHECK(cpy_variables(in_exoid, out_exoid, in_large, mesh_only)); + + /* take the output file out of define mode */ +- if ((status = ex__leavedef(out_exoid, __func__)) != NC_NOERR) { ++ if (exi_leavedef(out_exoid, __func__) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -145,6 +134,7 @@ static int ex_copy_internal(int in_exoid, int out_exoid, int mesh_only) + + EX_FUNC_LEAVE(EX_NOERR); + } ++/*! \endcond */ + + /*! + \ingroup Utilities +@@ -183,32 +173,31 @@ int ex_copy_transient(int in_exoid, int out_exoid) + } + + /*! \cond INTERNAL */ +-int cpy_variable_data(int in_exoid, int out_exoid, int in_large, int mesh_only) ++static int cpy_variable_data(int in_exoid, int out_exoid, int in_large, int mesh_only) + { +- int nvars; /* number of variables */ +- int varid; /* variable id */ +- int is_filtered = 0; +- struct ncvar var; /* variable */ +- ++ int nvars; /* number of variables */ ++ /* NOTE: This is incorrect for files containing groups */ + EXCHECKI(nc_inq(in_exoid, NULL, &nvars, NULL, NULL)); +- for (varid = 0; varid < nvars; varid++) { ++ for (int varid = 0; varid < nvars; varid++) { ++ bool is_filtered; ++ struct ncvar var; /* variable */ + EXCHECKI(nc_inq_var(in_exoid, varid, var.name, &var.type, &var.ndims, var.dims, &var.natts)); + if ((strcmp(var.name, VAR_QA_TITLE) == 0) || (strcmp(var.name, VAR_INFO) == 0)) { +- is_filtered = 1; ++ is_filtered = true; + } + else if (is_truth_table_variable(var.name)) { +- is_filtered = 1; ++ is_filtered = true; + } + else if (mesh_only == 1 && + (is_non_mesh_variable(var.name) || (strcmp(var.name, VAR_WHOLE_TIME) == 0))) { +- is_filtered = 1; ++ is_filtered = true; + } + else if (mesh_only == 0 && + (!is_non_mesh_variable(var.name) && strcmp(var.name, VAR_WHOLE_TIME) != 0)) { +- is_filtered = 1; ++ is_filtered = true; + } + else { +- is_filtered = 0; ++ is_filtered = false; + } + + if (!is_filtered) { +@@ -224,34 +213,32 @@ int cpy_variable_data(int in_exoid, int out_exoid, int in_large, int mesh_only) + } + + /*! \cond INTERNAL */ +-int cpy_variables(int in_exoid, int out_exoid, int in_large, int mesh_only) ++static int cpy_variables(int in_exoid, int out_exoid, int in_large, int mesh_only) + { +- int nvars; /* number of variables */ +- int recdimid; /* id of unlimited dimension */ +- int varid; /* variable id */ +- int var_out_id; /* variable id */ +- int is_filtered = 0; +- struct ncvar var; /* variable */ +- ++ int recdimid; /* id of unlimited dimension */ ++ int nvars; /* number of variables */ ++ /* NOTE: This is incorrect for files containing groups */ + EXCHECKI(nc_inq(in_exoid, NULL, &nvars, NULL, &recdimid)); +- for (varid = 0; varid < nvars; varid++) { +- ++ for (int varid = 0; varid < nvars; varid++) { ++ struct ncvar var; /* variable */ + EXCHECKI(nc_inq_var(in_exoid, varid, var.name, &var.type, &var.ndims, var.dims, &var.natts)); + ++ bool is_filtered; + if ((strcmp(var.name, VAR_QA_TITLE) == 0) || (strcmp(var.name, VAR_INFO) == 0)) { +- is_filtered = 1; ++ is_filtered = true; + } + else if (is_truth_table_variable(var.name)) { +- is_filtered = 1; ++ is_filtered = true; + } + else if (mesh_only == 1 && is_non_mesh_variable(var.name)) { +- is_filtered = 1; ++ is_filtered = true; + } + else { +- is_filtered = 0; ++ is_filtered = false; + } + + if (!is_filtered) { ++ int var_out_id; /* variable id */ + if (strncmp(var.name, VAR_COORD, 5) == 0) { + var_out_id = cpy_coord_def(in_exoid, out_exoid, recdimid, var.name, in_large); + } +@@ -265,32 +252,31 @@ int cpy_variables(int in_exoid, int out_exoid, int in_large, int mesh_only) + } + return EX_NOERR; + } ++/*! \endcond */ + + /*! \cond INTERNAL */ +-int cpy_dimension(int in_exoid, int out_exoid, int mesh_only) ++static int cpy_dimension(int in_exoid, int out_exoid, int mesh_only) + { +- int status; +- int ndims; /* number of dimensions */ +- int recdimid; /* id of unlimited dimension */ +- int dimid; /* dimension id */ +- int dim_out_id; /* dimension id */ +- int is_filtered = 0; +- char dim_nm[NC_MAX_NAME]; +- size_t dim_sz; +- char errmsg[MAX_ERR_LENGTH]; ++ int dim_out_id; /* dimension id */ + ++ int ndims; /* number of dimensions */ ++ int recdimid; /* id of unlimited dimension */ ++ /* NOTE: This is incorrect for files containing groups */ + EXCHECKI(nc_inq(in_exoid, &ndims, NULL, NULL, &recdimid)); +- for (dimid = 0; dimid < ndims; dimid++) { ++ for (int dimid = 0; dimid < ndims; dimid++) { + ++ char dim_nm[EX_MAX_NAME + 1]; ++ size_t dim_sz; + EXCHECK(nc_inq_dim(in_exoid, dimid, dim_nm, &dim_sz)); + + /* If the dimension isn't one we specifically don't want + * to copy (ie, number of QA or INFO records) and it + * hasn't been defined, copy it */ ++ bool is_filtered; + if (strcmp(dim_nm, DIM_NUM_QA) == 0 || strcmp(dim_nm, DIM_NUM_INFO) == 0 || + strcmp(dim_nm, DIM_N4) == 0 || strcmp(dim_nm, DIM_STR) == 0 || + strcmp(dim_nm, DIM_LIN) == 0) { +- is_filtered = 1; ++ is_filtered = true; + } + else if (mesh_only == 1 && + ((strcmp(dim_nm, DIM_NUM_NOD_VAR) == 0) || (strcmp(dim_nm, DIM_NUM_EDG_VAR) == 0) || +@@ -300,15 +286,15 @@ int cpy_dimension(int in_exoid, int out_exoid, int mesh_only) + (strcmp(dim_nm, DIM_NUM_ELSET_VAR) == 0) || (strcmp(dim_nm, DIM_NUM_GLO_VAR) == 0) || + (strcmp(dim_nm, DIM_NUM_ASSEMBLY_VAR) == 0) || + (strcmp(dim_nm, DIM_NUM_BLOB_VAR) == 0) || (strstr(dim_nm, "_red_var") != NULL))) { +- is_filtered = 1; ++ is_filtered = true; + } + else { +- is_filtered = 0; ++ is_filtered = false; + } + + if (!is_filtered) { + /* See if the dimension has already been defined */ +- status = nc_inq_dimid(out_exoid, dim_nm, &dim_out_id); ++ int status = nc_inq_dimid(out_exoid, dim_nm, &dim_out_id); + + if (status != NC_NOERR) { + if (dimid != recdimid) { +@@ -318,6 +304,7 @@ int cpy_dimension(int in_exoid, int out_exoid, int mesh_only) + status = nc_def_dim(out_exoid, dim_nm, NC_UNLIMITED, &dim_out_id); + } + if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf_nowarn(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define %s dimension in file id %d", dim_nm, out_exoid); + ex_err_fn(out_exoid, __func__, errmsg, status); +@@ -331,7 +318,7 @@ int cpy_dimension(int in_exoid, int out_exoid, int mesh_only) + * If it doesn't exist on the source database, we need to add it to + * the target... + */ +- status = nc_inq_dimid(in_exoid, DIM_STR_NAME, &dim_out_id); ++ int status = nc_inq_dimid(in_exoid, DIM_STR_NAME, &dim_out_id); + if (status != NC_NOERR) { + /* + * See if it already exists in the output file +@@ -343,6 +330,7 @@ int cpy_dimension(int in_exoid, int out_exoid, int mesh_only) + /* Not found; set to default value of 32+1. */ + + if ((status = nc_def_dim(out_exoid, DIM_STR_NAME, 33, &dim_out_id)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf_nowarn(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define string name dimension in file id %d", out_exoid); + ex_err_fn(out_exoid, __func__, errmsg, status); +@@ -354,17 +342,16 @@ int cpy_dimension(int in_exoid, int out_exoid, int mesh_only) + } + + /*! \cond INTERNAL */ +-int cpy_global_att(int in_exoid, int out_exoid) ++static int cpy_global_att(int in_exoid, int out_exoid) + { +- int status; +- int ngatts; +- size_t i; + struct ncatt att; /* attribute */ + ++ int ngatts; ++ /* NOTE: This is incorrect for files containing groups */ + EXCHECKI(nc_inq(in_exoid, NULL, NULL, &ngatts, NULL)); + + /* copy global attributes */ +- for (i = 0; i < (size_t)ngatts; i++) { ++ for (int i = 0; i < ngatts; i++) { + + EXCHECKI(nc_inq_attname(in_exoid, NC_GLOBAL, i, att.name)); + +@@ -372,7 +359,7 @@ int cpy_global_att(int in_exoid, int out_exoid) + * word size, I/O word size etc. are global attributes stored when + * file is created with ex_create; we don't want to overwrite those + */ +- if ((status = nc_inq_att(out_exoid, NC_GLOBAL, att.name, &att.type, &att.len)) != NC_NOERR) { ++ if (nc_inq_att(out_exoid, NC_GLOBAL, att.name, &att.type, &att.len) != NC_NOERR) { + + /* The "last_written_time" attribute is a special attribute used + by the IOSS library to determine whether a timestep has been +@@ -395,7 +382,7 @@ int cpy_global_att(int in_exoid, int out_exoid) + { + nc_type att_type = NC_NAT; + size_t att_len = 0; +- status = nc_inq_att(in_exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &att_type, &att_len); ++ int status = nc_inq_att(in_exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &att_type, &att_len); + if (status == NC_NOERR) { + EXCHECKI(nc_copy_att(in_exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, out_exoid, NC_GLOBAL)); + } +@@ -403,16 +390,16 @@ int cpy_global_att(int in_exoid, int out_exoid) + + return EX_NOERR; + } ++/*! \endcond */ + + /*! \cond INTERNAL */ +-int cpy_att(int in_id, int out_id, int var_in_id, int var_out_id) ++static int cpy_att(int in_id, int out_id, int var_in_id, int var_out_id) + { + /* Routine to copy all the attributes from the input netCDF + file to the output netCDF file. If var_in_id == NC_GLOBAL, + then the global attributes are copied. Otherwise the variable's + attributes are copied. */ + +- int idx; + int nbr_att; + + if (var_in_id == NC_GLOBAL) { +@@ -423,27 +410,20 @@ int cpy_att(int in_id, int out_id, int var_in_id, int var_out_id) + } + + /* Get the attributes names, types, lengths, and values */ +- for (idx = 0; idx < nbr_att; idx++) { ++ for (int idx = 0; idx < nbr_att; idx++) { + char att_nm[MAX_VAR_NAME_LENGTH]; + + EXCHECKI(nc_inq_attname(in_id, var_in_id, idx, att_nm)); + nc_copy_att(in_id, var_in_id, att_nm, out_id, var_out_id); + } + +- return (EX_NOERR); ++ return EX_NOERR; + } ++/*! \endcond */ + + /*! \internal */ +-int cpy_coord_def(int in_id, int out_id, int rec_dim_id, char *var_nm, int in_large) ++static int cpy_coord_def(int in_id, int out_id, int rec_dim_id, char *var_nm, int in_large) + { +- const char *routine = NULL; +- size_t spatial_dim; +- int nbr_dim; +- int temp; +- +- int dim_out_id[2]; +- int var_out_id = -1; +- + /* Handle easiest situation first: in_large matches out_large (1) */ + if (in_large == 1) { + return cpy_var_def(in_id, out_id, rec_dim_id, var_nm); /* OK */ +@@ -453,7 +433,10 @@ int cpy_coord_def(int in_id, int out_id, int rec_dim_id, char *var_nm, int in_la + option is that in_large == 0 and out_large == 1. Also will need + the spatial dimension, so get that now. + */ +- ex__get_dimension(in_id, DIM_NUM_DIM, "dimension", &spatial_dim, &temp, routine); ++ int temp; ++ size_t spatial_dim; ++ const char *routine = NULL; ++ exi_get_dimension(in_id, DIM_NUM_DIM, "dimension", &spatial_dim, &temp, routine); + + /* output file will have coordx, coordy, coordz (if 3d). See if + they are already defined in output file. Assume either all or +@@ -471,56 +454,53 @@ int cpy_coord_def(int in_id, int out_id, int rec_dim_id, char *var_nm, int in_la + } + + /* Get dimid of the num_nodes dimension in output file... */ ++ int dim_out_id[2]; + EXCHECKI(nc_inq_dimid(out_id, DIM_NUM_NODES, &dim_out_id[0])); + + /* Define the variables in the output file */ + + /* Define according to the EXODUS file's IO_word_size */ +- nbr_dim = 1; ++ int nbr_dim = 1; ++ int var_out_id = -1; + EXCHECKI(nc_def_var(out_id, VAR_COORD_X, nc_flt_code(out_id), nbr_dim, dim_out_id, &var_out_id)); +- ex__compress_variable(out_id, var_out_id, 2); ++ exi_compress_variable(out_id, var_out_id, 2); + if (spatial_dim > 1) { + EXCHECKI( + nc_def_var(out_id, VAR_COORD_Y, nc_flt_code(out_id), nbr_dim, dim_out_id, &var_out_id)); +- ex__compress_variable(out_id, var_out_id, 2); ++ exi_compress_variable(out_id, var_out_id, 2); + } + if (spatial_dim > 2) { + EXCHECKI( + nc_def_var(out_id, VAR_COORD_Z, nc_flt_code(out_id), nbr_dim, dim_out_id, &var_out_id)); +- ex__compress_variable(out_id, var_out_id, 2); ++ exi_compress_variable(out_id, var_out_id, 2); + } + + return var_out_id; /* OK */ + } ++/*! \endcond */ + + /*! \internal */ +-int cpy_var_def(int in_id, int out_id, int rec_dim_id, char *var_nm) ++static int cpy_var_def(int in_id, int out_id, int rec_dim_id, char *var_nm) + { + /* Routine to copy the variable metadata from an input netCDF file + * to an output netCDF file. + */ + +- int status; +- int dim_in_id[NC_MAX_VAR_DIMS]; +- int dim_out_id[NC_MAX_VAR_DIMS]; +- int idx; +- int nbr_dim; +- int var_in_id; +- int var_out_id; +- +- nc_type var_type; +- + /* See if the requested variable is already in the output file. */ +- status = nc_inq_varid(out_id, var_nm, &var_out_id); ++ int var_out_id; ++ int status = nc_inq_varid(out_id, var_nm, &var_out_id); + if (status == NC_NOERR) { + return var_out_id; /* OK */ + } + + /* See if the requested variable is in the input file. */ ++ int var_in_id; + EXCHECKI(nc_inq_varid(in_id, var_nm, &var_in_id)); + + /* Get the type of the variable and the number of dimensions. */ ++ nc_type var_type; + EXCHECKI(nc_inq_vartype(in_id, var_in_id, &var_type)); ++ int nbr_dim; + EXCHECKI(nc_inq_varndims(in_id, var_in_id, &nbr_dim)); + + /* Recall: +@@ -528,11 +508,13 @@ int cpy_var_def(int in_id, int out_id, int rec_dim_id, char *var_nm) + 2. The variable must be defined before the attributes. */ + + /* Get the dimension IDs */ ++ int dim_in_id[NC_MAX_VAR_DIMS]; + EXCHECKI(nc_inq_vardimid(in_id, var_in_id, dim_in_id)); + + /* Get the dimension sizes and names */ +- for (idx = 0; idx < nbr_dim; idx++) { +- char dim_nm[NC_MAX_NAME]; ++ int dim_out_id[NC_MAX_VAR_DIMS]; ++ for (int idx = 0; idx < nbr_dim; idx++) { ++ char dim_nm[EX_MAX_NAME + 1]; + size_t dim_sz; + + EXCHECKI(nc_inq_dim(in_id, dim_in_id[idx], dim_nm, &dim_sz)); +@@ -558,53 +540,52 @@ int cpy_var_def(int in_id, int out_id, int rec_dim_id, char *var_nm) + + if ((var_type == NC_FLOAT) || (var_type == NC_DOUBLE)) { + EXCHECKI(nc_def_var(out_id, var_nm, nc_flt_code(out_id), nbr_dim, dim_out_id, &var_out_id)); +- ex__compress_variable(out_id, var_out_id, 2); ++ exi_compress_variable(out_id, var_out_id, 2); + } + else { + EXCHECKI(nc_def_var(out_id, var_nm, var_type, nbr_dim, dim_out_id, &var_out_id)); +- ex__compress_variable(out_id, var_out_id, 1); ++ exi_compress_variable(out_id, var_out_id, 1); + } + return var_out_id; /* OK */ + + } /* end cpy_var_def() */ + + /*! \internal */ +-int cpy_var_val(int in_id, int out_id, char *var_nm) ++static int cpy_var_val(int in_id, int out_id, char *var_nm) + { ++ void *void_ptr = NULL; + /* Routine to copy the variable data from an input netCDF file + * to an output netCDF file. + */ + +- int dim_id_in[NC_MAX_VAR_DIMS]; +- int dim_id_out[NC_MAX_VAR_DIMS]; +- int idx; +- int nbr_dim; +- int var_in_id; +- int var_out_id; +- size_t dim_max; +- size_t dim_str[NC_MAX_VAR_DIMS]; +- size_t dim_cnt[NC_MAX_VAR_DIMS]; +- size_t var_sz = 1L; +- nc_type var_type_in, var_type_out; +- +- void *void_ptr = NULL; +- + /* Get the var_id for the requested variable from both files. */ ++ int var_in_id; + EXCHECKI(nc_inq_varid(in_id, var_nm, &var_in_id)); ++ int var_out_id; + EXCHECKI(nc_inq_varid(out_id, var_nm, &var_out_id)); + + /* Get the number of dimensions for the variable. */ ++ nc_type var_type_out; + EXCHECKI(nc_inq_vartype(out_id, var_out_id, &var_type_out)); + ++ nc_type var_type_in; + EXCHECKI(nc_inq_vartype(in_id, var_in_id, &var_type_in)); ++ int nbr_dim; + EXCHECKI(nc_inq_varndims(in_id, var_in_id, &nbr_dim)); + + /* Get the dimension IDs from the input file */ ++ int dim_id_in[NC_MAX_VAR_DIMS]; + EXCHECKF(nc_inq_vardimid(in_id, var_in_id, dim_id_in)); ++ int dim_id_out[NC_MAX_VAR_DIMS]; + EXCHECKF(nc_inq_vardimid(out_id, var_out_id, dim_id_out)); + + /* Get the dimension sizes and names from the input file */ +- for (idx = 0; idx < nbr_dim; idx++) { ++ size_t dim_str[NC_MAX_VAR_DIMS]; ++ size_t dim_cnt[NC_MAX_VAR_DIMS]; ++ size_t var_sz = 1L; ++ bool string_len_same = true; ++ ++ for (int idx = 0; idx < nbr_dim; idx++) { + /* NB: For the unlimited dimension, ncdiminq() returns the maximum + value used so far in writing data for that dimension. + Thus if you read the dimension sizes from the output file, then +@@ -621,7 +602,12 @@ int cpy_var_val(int in_id, int out_id, char *var_nm) + EXCHECKF(nc_inq_dimlen(out_id, dim_id_out[idx], &dim_out)); + + /* Initialize the indicial offset and stride arrays */ +- dim_max = dim_in > dim_out ? dim_in : dim_out; ++ size_t dim_max = dim_in > dim_out ? dim_in : dim_out; ++ ++ /* Need to know if input and output have different size strings. */ ++ if (var_type_in == NC_CHAR && idx == 1 && dim_in != dim_out) { ++ string_len_same = false; ++ } + var_sz *= dim_max; + + /* Handle case where output variable is smaller than input (rare, but happens) */ +@@ -693,8 +679,39 @@ int cpy_var_val(int in_id, int out_id, char *var_nm) + } + + else if (var_type_in == NC_CHAR) { +- EXCHECKF(nc_get_var_text(in_id, var_in_id, void_ptr)); +- EXCHECKF(nc_put_vara_text(out_id, var_out_id, dim_str, dim_cnt, void_ptr)); ++ ++ if (string_len_same) { ++ EXCHECKF(nc_get_var_text(in_id, var_in_id, void_ptr)); ++ EXCHECKF(nc_put_vara_text(out_id, var_out_id, dim_str, dim_cnt, void_ptr)); ++ } ++ else { ++ /* Use void_ptr for the input read; alloc new space for output... */ ++ EXCHECKF(nc_get_var_text(in_id, var_in_id, void_ptr)); ++ ++ if (void_ptr != NULL) { ++ size_t num_string = 0; ++ size_t in_size = 0; ++ size_t out_size = 0; ++ EXCHECKF(nc_inq_dimlen(in_id, dim_id_in[0], &num_string)); ++ EXCHECKF(nc_inq_dimlen(in_id, dim_id_in[1], &in_size)); ++ EXCHECKF(nc_inq_dimlen(out_id, dim_id_out[1], &out_size)); ++ size_t min_size = in_size < out_size ? in_size : out_size; ++ char *out_strings = calloc(num_string * out_size, 1); ++ /* Read the input strings...*/ ++ ++ /* Copy to the output strings...*/ ++ const char *in_strings = void_ptr; ++ for (size_t i = 0; i < num_string; i++) { ++ size_t in_off = i * in_size; ++ size_t out_off = i * out_size; ++ ex_copy_string(&out_strings[out_off], &in_strings[in_off], min_size); ++ out_strings[out_off + out_size - 1] = '\0'; ++ } ++ dim_cnt[1] = out_size; ++ EXCHECKF(nc_put_vara_text(out_id, var_out_id, dim_str, dim_cnt, out_strings)); ++ free(out_strings); ++ } ++ } + } + + else { +@@ -705,30 +722,21 @@ int cpy_var_val(int in_id, int out_id, char *var_nm) + /* Free the space that held the variable */ + free(void_ptr); + +- return (EX_NOERR); ++ return EX_NOERR; + + err_ret: + free(void_ptr); +- return (EX_FATAL); ++ return EX_FATAL; + + } /* end cpy_var_val() */ + + /*! \internal */ +-int cpy_coord_val(int in_id, int out_id, char *var_nm, int in_large) ++static int cpy_coord_val(int in_id, int out_id, char *var_nm, int in_large) + { + /* Routine to copy the coordinate data from an input netCDF file + * to an output netCDF file. + */ + +- const char *routine = NULL; +- int temp; +- size_t i; +- size_t spatial_dim, num_nodes; +- size_t start[2], count[2]; +- nc_type var_type_in, var_type_out; +- +- void *void_ptr = NULL; +- + /* Handle easiest situation first: in_large matches out_large (1) */ + if (in_large == 1) { + return cpy_var_val(in_id, out_id, var_nm); /* OK */ +@@ -737,8 +745,11 @@ int cpy_coord_val(int in_id, int out_id, char *var_nm, int in_large) + /* At this point, know that in_large == 0, so will need to + copy a vector to multiple scalars. Also + will need a couple dimensions, so get them now.*/ +- ex__get_dimension(in_id, DIM_NUM_DIM, "dimension", &spatial_dim, &temp, routine); +- ex__get_dimension(in_id, DIM_NUM_NODES, "nodes", &num_nodes, &temp, routine); ++ const char *routine = NULL; ++ int temp; ++ size_t spatial_dim, num_nodes; ++ exi_get_dimension(in_id, DIM_NUM_DIM, "dimension", &spatial_dim, &temp, routine); ++ exi_get_dimension(in_id, DIM_NUM_NODES, "nodes", &num_nodes, &temp, routine); + + /* output file will have coordx, coordy, coordz (if 3d). */ + /* Get the var_id for the requested variable from both files. */ +@@ -753,15 +764,18 @@ int cpy_coord_val(int in_id, int out_id, char *var_nm, int in_large) + EXCHECKI(nc_inq_varid(out_id, VAR_COORD_Z, &var_out_id[2])); + } + ++ nc_type var_type_in, var_type_out; + EXCHECKI(nc_inq_vartype(in_id, var_in_id, &var_type_in)); + EXCHECKI(nc_inq_vartype(out_id, var_out_id[0], &var_type_out)); + ++ void *void_ptr = NULL; + if (num_nodes > 0) { + void_ptr = malloc(num_nodes * type_size(var_type_in)); + } + + /* Copy each component of the variable... */ +- for (i = 0; i < spatial_dim; i++) { ++ size_t start[2], count[2]; ++ for (size_t i = 0; i < spatial_dim; i++) { + start[0] = i; + start[1] = 0; + count[0] = 1; +@@ -779,44 +793,44 @@ int cpy_coord_val(int in_id, int out_id, char *var_nm, int in_large) + + /* Free the space that held the variable */ + free(void_ptr); +- return (EX_NOERR); ++ return EX_NOERR; + + } /* end cpy_coord_val() */ + + /*! \internal */ +-void update_structs(int out_exoid) ++static void update_structs(int out_exoid) + { +- update_internal_structs(out_exoid, EX_INQ_EDGE_BLK, ex__get_counter_list(EX_EDGE_BLOCK)); +- update_internal_structs(out_exoid, EX_INQ_FACE_BLK, ex__get_counter_list(EX_FACE_BLOCK)); +- update_internal_structs(out_exoid, EX_INQ_ELEM_BLK, ex__get_counter_list(EX_ELEM_BLOCK)); +- update_internal_structs(out_exoid, EX_INQ_ASSEMBLY, ex__get_counter_list(EX_ASSEMBLY)); +- update_internal_structs(out_exoid, EX_INQ_BLOB, ex__get_counter_list(EX_BLOB)); +- +- update_internal_structs(out_exoid, EX_INQ_NODE_SETS, ex__get_counter_list(EX_NODE_SET)); +- update_internal_structs(out_exoid, EX_INQ_EDGE_SETS, ex__get_counter_list(EX_EDGE_SET)); +- update_internal_structs(out_exoid, EX_INQ_FACE_SETS, ex__get_counter_list(EX_FACE_SET)); +- update_internal_structs(out_exoid, EX_INQ_SIDE_SETS, ex__get_counter_list(EX_SIDE_SET)); +- update_internal_structs(out_exoid, EX_INQ_ELEM_SETS, ex__get_counter_list(EX_ELEM_SET)); +- +- update_internal_structs(out_exoid, EX_INQ_NODE_MAP, ex__get_counter_list(EX_NODE_MAP)); +- update_internal_structs(out_exoid, EX_INQ_EDGE_MAP, ex__get_counter_list(EX_EDGE_MAP)); +- update_internal_structs(out_exoid, EX_INQ_FACE_MAP, ex__get_counter_list(EX_FACE_MAP)); +- update_internal_structs(out_exoid, EX_INQ_ELEM_MAP, ex__get_counter_list(EX_ELEM_MAP)); ++ update_internal_structs(out_exoid, EX_INQ_EDGE_BLK, exi_get_counter_list(EX_EDGE_BLOCK)); ++ update_internal_structs(out_exoid, EX_INQ_FACE_BLK, exi_get_counter_list(EX_FACE_BLOCK)); ++ update_internal_structs(out_exoid, EX_INQ_ELEM_BLK, exi_get_counter_list(EX_ELEM_BLOCK)); ++ update_internal_structs(out_exoid, EX_INQ_ASSEMBLY, exi_get_counter_list(EX_ASSEMBLY)); ++ update_internal_structs(out_exoid, EX_INQ_BLOB, exi_get_counter_list(EX_BLOB)); ++ ++ update_internal_structs(out_exoid, EX_INQ_NODE_SETS, exi_get_counter_list(EX_NODE_SET)); ++ update_internal_structs(out_exoid, EX_INQ_EDGE_SETS, exi_get_counter_list(EX_EDGE_SET)); ++ update_internal_structs(out_exoid, EX_INQ_FACE_SETS, exi_get_counter_list(EX_FACE_SET)); ++ update_internal_structs(out_exoid, EX_INQ_SIDE_SETS, exi_get_counter_list(EX_SIDE_SET)); ++ update_internal_structs(out_exoid, EX_INQ_ELEM_SETS, exi_get_counter_list(EX_ELEM_SET)); ++ ++ update_internal_structs(out_exoid, EX_INQ_NODE_MAP, exi_get_counter_list(EX_NODE_MAP)); ++ update_internal_structs(out_exoid, EX_INQ_EDGE_MAP, exi_get_counter_list(EX_EDGE_MAP)); ++ update_internal_structs(out_exoid, EX_INQ_FACE_MAP, exi_get_counter_list(EX_FACE_MAP)); ++ update_internal_structs(out_exoid, EX_INQ_ELEM_MAP, exi_get_counter_list(EX_ELEM_MAP)); + } + + /*! \internal */ +-void update_internal_structs(int out_exoid, ex_inquiry inqcode, struct ex__list_item **ctr_list) ++static void update_internal_structs(int out_exoid, ex_inquiry inqcode, ++ struct exi_list_item **ctr_list) + { +- int64_t i; + int64_t number = ex_inquire_int(out_exoid, inqcode); + if (number > 0) { +- for (i = 0; i < number; i++) { +- ex__inc_file_item(out_exoid, ctr_list); ++ for (int64_t i = 0; i < number; i++) { ++ exi_inc_file_item(out_exoid, ctr_list); + } + } + } + +-size_t type_size(nc_type type) ++static size_t type_size(nc_type type) + { + if (type == NC_CHAR) { + return sizeof(char); /* OK */ +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create.c +index 7589adc7a2..bca2d8b5b7 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_create.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -123,6 +123,7 @@ exoid = ex_create ("test.exo" \comment{filename path} + */ + #include "exodusII.h" + #include "exodusII_int.h" ++#include + + /* NOTE: Do *not* call `ex_create_int()` directly. The public API + * function name is `ex_create()` which is a wrapper that calls +@@ -141,39 +142,61 @@ int ex_create_int(const char *path, int cmode, int *comp_ws, int *io_ws, int run + + EX_FUNC_ENTER(); + +- nc_mode = ex__handle_mode(my_mode, is_parallel, run_version); ++ nc_mode = exi_handle_mode(my_mode, is_parallel, run_version); ++ ++ if (!path || strlen(path) == 0) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Filename is not specified."); ++ ex_err(__func__, errmsg, EX_BADFILEMODE); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ char *canon_path = exi_canonicalize_filename(path); + + /* Verify that this file is not already open for read or write... + In theory, should be ok for the file to be open multiple times + for read, but bad things can happen if being read and written + at the same time... + */ +- if (ex__check_multiple_open(path, EX_WRITE, __func__)) { ++ if (exi_check_multiple_open(canon_path, EX_WRITE, __func__)) { ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + ++#if defined NC_NOATTCREORD ++ /* Disable attribute creation order tracking if available... */ ++ nc_mode |= NC_NOATTCREORD; ++#endif ++ ++#if defined NC_NODIMSCALE_ATTACH ++ /* Disable attaching dimscales to variables (netcdf-c issue #2128) if available */ ++ nc_mode |= NC_NODIMSCALE_ATTACH; ++#endif ++ + if ((status = nc_create(path, nc_mode, &exoid)) != NC_NOERR) { + #if NC_HAS_HDF5 +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file create failed for %s", path); ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file create failed for %s", canon_path); + #else + if (my_mode & EX_NETCDF4) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: file create failed for %s in NETCDF4 " + "mode.\n\tThis library does not support netcdf-4 files.", +- path); ++ canon_path); + } + else { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file create failed for %s", path); ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file create failed for %s", canon_path); + } + #endif + ex_err(__func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +- status = ex__populate_header(exoid, path, my_mode, is_parallel, comp_ws, io_ws); ++ status = exi_populate_header(exoid, canon_path, my_mode, is_parallel, comp_ws, io_ws); + if (status != EX_NOERR) { ++ free(canon_path); + EX_FUNC_LEAVE(status); + } + ++ free(canon_path); + EX_FUNC_LEAVE(exoid); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create_group.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create_group.c +index 953d2328f6..0adc0c3595 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_create_group.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create_group.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -22,11 +22,11 @@ int ex_create_group(int parent_id, const char *group_name) + int status; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(parent_id, __func__) != EX_NOERR) { ++ if (exi_check_valid_file_id(parent_id, __func__) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- if ((status = nc_redef(parent_id)) != NC_NOERR) { ++ if ((status = exi_redef(parent_id, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", parent_id); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -39,7 +39,9 @@ int ex_create_group(int parent_id, const char *group_name) + EX_FUNC_LEAVE(EX_FATAL); + } + +- if ((status = ex__leavedef(parent_id, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(parent_id, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + EX_FUNC_LEAVE(exoid); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c +index fadc832cc5..c39af763a4 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -128,6 +128,7 @@ exoid = ex_create ("test.exo" \comment{filename path} + + #include "exodusII_int.h" + #include ++#include + + /* NOTE: Do *not* call `ex_create_par_int()` directly. The public API + * function name is `ex_create_par()` which is a wrapper that calls +@@ -157,46 +158,97 @@ int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, MPI + EX_FUNC_LEAVE(EX_FATAL); + #endif + ++ if (!path || strlen(path) == 0) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Filename is not specified."); ++ ex_err(__func__, errmsg, EX_BADFILEMODE); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ char *canon_path = exi_canonicalize_filename(path); ++ + /* Verify that this file is not already open for read or write... + In theory, should be ok for the file to be open multiple times + for read, but bad things can happen if being read and written + at the same time... + */ +- if (ex__check_multiple_open(path, EX_WRITE, __func__)) { ++ if (exi_check_multiple_open(canon_path, EX_WRITE, __func__)) { ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +- nc_mode = ex__handle_mode(my_mode, is_parallel, run_version); ++ nc_mode = exi_handle_mode(my_mode, is_parallel, run_version); ++ ++#if defined NC_NOATTCREORD ++ /* Disable attribute creation order tracking if available... */ ++ if (my_mode & EX_NETCDF4) { ++ nc_mode |= NC_NOATTCREORD; ++ } ++#endif ++ ++#if defined NC_NODIMSCALE_ATTACH ++ /* Disable attaching dimscales to variables (netcdf-c issue #2128) if available */ ++ if (my_mode & EX_NETCDF4) { ++ nc_mode |= NC_NODIMSCALE_ATTACH; ++ } ++#endif ++ ++#if NC_HAS_PNETCDF ++ bool i_created_info = false; ++ if (info == MPI_INFO_NULL) { ++ MPI_Info_create(&info); ++ i_created_info = true; ++ } ++ MPI_Info_set(info, "nc_header_align_size", "1048576"); ++#endif ++ /* There is an issue on some versions of mpi that limit the length of the path to <250 characters ++ * Check for that here and use `path` if `canon_path` is >=250 characters... ++ */ ++ ++ if (strlen(canon_path) >= 250) { ++ status = nc_create_par(path, nc_mode, comm, info, &exoid); ++ } ++ else { ++ status = nc_create_par(canon_path, nc_mode, comm, info, &exoid); ++ } ++ ++#if NC_HAS_PNETCDF ++ if (i_created_info) { ++ MPI_Info_free(&info); ++ } ++#endif + +- if ((status = nc_create_par(path, nc_mode, comm, info, &exoid)) != NC_NOERR) { ++ if (status != NC_NOERR) { + if (my_mode & EX_NETCDF4) { + #if NC_HAS_PARALLEL4 +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file create failed for %s.", path); ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file create failed for %s.", canon_path); + #else + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: file create failed for %s in NetCDF-4 " + "mode.\n\tThis library does not support parallel NetCDF-4 files (HDF5-based).", +- path); ++ canon_path); + #endif + } + else { + #if NC_HAS_PNETCDF +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file create failed for %s", path); ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file create failed for %s", canon_path); + #else + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: file create failed for %s in PnetCDF " + "mode.\n\tThis library does not provide PnetCDF support.", +- path); ++ canon_path); + #endif + } + ex_err(__func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +- status = ex__populate_header(exoid, path, my_mode, is_parallel, comp_ws, io_ws); ++ status = exi_populate_header(exoid, canon_path, my_mode, is_parallel, comp_ws, io_ws); + if (status != EX_NOERR) { ++ free(canon_path); + EX_FUNC_LEAVE(status); + } ++ free(canon_path); + EX_FUNC_LEAVE(exoid); + } + #else +@@ -204,5 +256,5 @@ int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, MPI + * Prevent warning in some versions of ranlib(1) because the object + * file has no symbols. + */ +-const char exodus_unused_symbol_dummy_ex_create_par; ++extern const char exodus_unused_symbol_dummy_ex_create_par; + #endif +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_cvt_nodes_to_sides.c b/ThirdParty/exodusII/vtkexodusII/src/ex_cvt_nodes_to_sides.c +index 33692338f6..0d0a552c3e 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_cvt_nodes_to_sides.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_cvt_nodes_to_sides.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -8,6 +8,7 @@ + + #include "exodusII.h" // for ex_err, ex_block, etc + #include "exodusII_int.h" // for elem_blk_parm, EX_FATAL, etc ++#include + #include + + static int64_t get_node(void_int *connect, size_t index, size_t int_size) +@@ -170,7 +171,6 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + void_int *side_sets_elem_list, void_int *side_sets_node_list, + void_int *side_sets_side_list) + { +- size_t i, j, k, n; + int num_side_sets, num_elem_blks; + int64_t tot_num_elem = 0, tot_num_ss_elem = 0, elem_num = 0, ndim; + void_int *elem_blk_ids = NULL; +@@ -178,7 +178,7 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + void_int *ss_elem_ndx = NULL; + void_int *ss_elem_node_ndx = NULL; + void_int *ss_parm_ndx = NULL; +- size_t elem_ctr, node_ctr, elem_num_pos; ++ int64_t elem_ctr, node_ctr, elem_num_pos; + int num_nodes_per_elem, num_node_per_side; + + int *same_elem_type = NULL; +@@ -187,7 +187,7 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + int int_size; + int ids_size; + +- struct ex__elem_blk_parm *elem_blk_parms = NULL; ++ struct exi_elem_blk_parm *elem_blk_parms = NULL; + + int err_stat = EX_NOERR; + +@@ -202,48 +202,10 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + is also the side number. + */ + +- /* 1 2 3 4 node 1 */ +- static int shell_table[2][8] = { +- {2, 4, 3, 1, 4, 2, 1, 3}, /* node 2 */ +- {1, 2, 1, 2, 1, 2, 1, 2} /* side # */ +- }; +- +- /* 1 2 3 4 node 1 */ +- static int shell_edge_table[2][8] = { +- {2, 4, 3, 1, 4, 2, 1, 3}, /* node 2 */ +- {3, 6, 4, 3, 5, 4, 6, 5} /* side # */ +- }; +- +- /* 1 2 3 node 1 */ +- static int trishell_table[2][6] = { +- {2, 3, 3, 1, 1, 2}, /* node 2 */ +- {1, 2, 1, 2, 1, 2} /* side # */ +- }; +- +- /* 1 2 3 4 node 1 */ +- static int tetra_table[2][12] = { +- {2, 3, 4, 1, 3, 4, 4, 1, 2, 1, 2, 3}, /* node 2 */ +- {1, 4, 3, 4, 2, 1, 2, 3, 4, 1, 2, 3} /* side # */ +- }; +- +-#if 0 +- static int wedge_table[2][18] = { +- /* 1 2 3 4 5 6 node 1 */ +- {2,4,3, 5,1,3, 6,1,2, 1,6,5, 6,2,4, 4,3,5}, /* node 2 */ +- {1,3,4, 1,4,2, 2,3,4, 1,3,5, 5,2,1, 5,3,2} /* side # */ +- }; +-#endif +- +- static int hex_table[2][24] = { +- /* 1 2 3 4 5 6 7 8 node 1 */ +- {4, 2, 5, 1, 3, 6, 7, 4, 2, 3, 1, 8, 6, 8, 1, 5, 2, 7, 8, 6, 3, 7, 5, 4}, /* node 2 */ +- {5, 1, 4, 5, 2, 1, 2, 3, 5, 5, 4, 3, 6, 4, 1, 1, 2, 6, 6, 2, 3, 3, 6, 4} /* side # */ +- }; +- + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -287,19 +249,17 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + distinguish between 2d TRIs and 3d TRIs */ + ndim = ex_inquire_int(exoid, EX_INQ_DIM); + +- int_size = sizeof(int); +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +- int_size = sizeof(int64_t); +- } ++ bool ints_64 = ex_int64_status(exoid) & EX_BULK_INT64_API; ++ int_size = ints_64 ? sizeof(int64_t) : sizeof(int); + + /* First count up # of elements in the side sets*/ +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +- for (i = 0; i < num_side_sets; i++) { ++ if (ints_64) { ++ for (int i = 0; i < num_side_sets; i++) { + tot_num_ss_elem += ((int64_t *)num_elem_per_set)[i]; + } + } + else { +- for (i = 0; i < num_side_sets; i++) { ++ for (int i = 0; i < num_side_sets; i++) { + tot_num_ss_elem += ((int *)num_elem_per_set)[i]; + } + } +@@ -318,23 +278,23 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + if (int_size == sizeof(int64_t)) { + /* Sort side set element list into index array - non-destructive */ + int64_t *elems = (int64_t *)ss_elem_ndx; +- for (i = 0; i < tot_num_ss_elem; i++) { ++ for (int i = 0; i < tot_num_ss_elem; i++) { + elems[i] = i; /* init index array to current position */ + } +- ex__iqsort64(side_sets_elem_list, elems, tot_num_ss_elem); ++ exi_iqsort64(side_sets_elem_list, elems, tot_num_ss_elem); + } + else { + /* Sort side set element list into index array - non-destructive */ + int *elems = (int *)ss_elem_ndx; +- for (i = 0; i < tot_num_ss_elem; i++) { ++ for (int i = 0; i < tot_num_ss_elem; i++) { + elems[i] = i; /* init index array to current position */ + } +- ex__iqsort(side_sets_elem_list, elems, tot_num_ss_elem); ++ exi_iqsort(side_sets_elem_list, elems, tot_num_ss_elem); + } + + /* Allocate space for the element block ids */ + ids_size = sizeof(int); +- if (ex_int64_status(exoid) & EX_IDS_INT64_API) { ++ if (ints_64) { + ids_size = sizeof(int64_t); + } + +@@ -354,7 +314,7 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + } + + /* Allocate space for the element block params */ +- if (!(elem_blk_parms = malloc(num_elem_blks * sizeof(struct ex__elem_blk_parm)))) { ++ if (!(elem_blk_parms = malloc(num_elem_blks * sizeof(struct exi_elem_blk_parm)))) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate space for element block params " + "for file id %d", +@@ -364,16 +324,16 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + goto cleanup; + } + elem_ctr = 0; +- for (i = 0; i < num_elem_blks; i++) { ++ for (int i = 0; i < num_elem_blks; i++) { + ex_entity_id id; +- if (ex_int64_status(exoid) & EX_IDS_INT64_API) { ++ if (ints_64) { + id = ((int64_t *)elem_blk_ids)[i]; + } + else { + id = ((int *)elem_blk_ids)[i]; + } + +- err_stat = ex__get_block_param(exoid, id, ndim, &elem_blk_parms[i]); ++ err_stat = exi_get_block_param(exoid, id, ndim, &elem_blk_parms[i]); + if (err_stat != EX_NOERR) { + goto cleanup; + } +@@ -420,11 +380,12 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + } + + same_elem_type[0] = true; +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { ++ if (ints_64) { + elem_ctr = ((int64_t *)num_elem_per_set)[0]; +- for (i = 0, k = 0; i < tot_num_ss_elem; i++) { ++ for (int64_t i = 0, k = 0; i < tot_num_ss_elem; i++) { + int64_t elem = ((int64_t *)side_sets_elem_list)[i]; +- for (j = 0; j < num_elem_blks; j++) { ++ int j = 0; ++ for (; j < num_elem_blks; j++) { + if (elem <= elem_blk_parms[j].elem_ctr) { + break; + } +@@ -459,10 +420,12 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + */ + node_ctr = 0; + elem_ctr = ((int64_t *)num_elem_per_set)[0]; +- for (i = 0, k = 0; i < tot_num_ss_elem; i++) { ++ int i = 0; ++ for (int k = 0; i < tot_num_ss_elem; i++) { + int64_t elem = ((int64_t *)side_sets_elem_list)[i]; + +- for (j = 0; j < num_elem_blks; j++) { ++ int j = 0; ++ for (; j < num_elem_blks; j++) { + if (elem <= elem_blk_parms[j].elem_ctr) { + break; + } +@@ -499,10 +462,11 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + } + else { + elem_ctr = ((int *)num_elem_per_set)[0]; +- for (i = 0, k = 0; i < tot_num_ss_elem; i++) { ++ for (int i = 0, k = 0; i < tot_num_ss_elem; i++) { + int elem = ((int *)side_sets_elem_list)[i]; + +- for (j = 0; j < num_elem_blks; j++) { ++ int j = 0; ++ for (; j < num_elem_blks; j++) { + if (elem <= elem_blk_parms[j].elem_ctr) { + break; + } +@@ -537,10 +501,12 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + */ + node_ctr = 0; + elem_ctr = ((int *)num_elem_per_set)[0]; +- for (i = 0, k = 0; i < tot_num_ss_elem; i++) { ++ int i = 0; ++ for (int k = 0; i < tot_num_ss_elem; i++) { + int elem = ((int *)side_sets_elem_list)[i]; + +- for (j = 0; j < num_elem_blks; j++) { ++ int j = 0; ++ for (; j < num_elem_blks; j++) { + if (elem <= elem_blk_parms[j].elem_ctr) { + break; + } +@@ -580,7 +546,7 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + + elem_ctr = 0; + +- for (j = 0; j < tot_num_ss_elem; j++) { ++ for (int j = 0; j < tot_num_ss_elem; j++) { + int64_t elem; + int64_t idx; + int64_t ss_node0, ss_node1; +@@ -656,7 +622,8 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + + num_nodes_per_elem = elem_blk_parms[p_ndx].num_nodes_per_elem; + +- for (n = 0; n < num_nodes_per_elem; n++) { ++ int n = 0; ++ for (; n < num_nodes_per_elem; n++) { + /* find node in connectivity array that matches first node in side set */ + if (((int_size == sizeof(int64_t)) && + (ss_node0 == ((int64_t *)connect)[num_nodes_per_elem * (elem_num_pos) + n])) || +@@ -679,6 +646,13 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + } + case EX_EL_TRISHELL: { + /* use table to find which node to compare to next */ ++ /* 1 2 3 node 1 */ ++ static const int trishell_table[2][6] = { ++ {2, 3, 3, 1, 1, 2}, /* node 2 */ ++ {1, 2, 1, 2, 1, 2} /* side # */ ++ }; ++ ++ assert(n < 3); + if (ss_node1 == + get_node(connect, + num_nodes_per_elem * (elem_num_pos) + (trishell_table[0][2 * n] - 1), +@@ -693,13 +667,6 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + /* Assume only front or back, no edges... */ + put_side(side_sets_side_list, idx, trishell_table[1][2 * n + 1], int_size); + } +- else if (ss_node1 == get_node(connect, +- num_nodes_per_elem * (elem_num_pos) + +- (trishell_table[0][2 * n + 2] - 1), +- int_size)) { +- /* Assume only front or back, no edges... */ +- put_side(side_sets_side_list, idx, trishell_table[1][2 * n + 2], int_size); +- } + else { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find TRIANGULAR SHELL element %" PRId64 ", node %" PRId64 +@@ -713,8 +680,9 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + } + case EX_EL_SHELL: { + /* use table to find which node to compare to next */ ++ assert(n < 4); + +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { ++ if (ints_64) { + num_node_per_side = + ((int64_t *)ss_elem_node_ndx)[idx + 1] - ((int64_t *)ss_elem_node_ndx)[idx]; + } +@@ -722,57 +690,81 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + num_node_per_side = ((int *)ss_elem_node_ndx)[idx + 1] - ((int *)ss_elem_node_ndx)[idx]; + } + +- if (ss_node1 == +- get_node(connect, num_nodes_per_elem * (elem_num_pos) + (shell_table[0][2 * n] - 1), +- int_size)) { +- if (num_node_per_side >= 4) { ++ if (num_node_per_side >= 4) { ++ /* 1 2 3 4 node 1 */ ++ static const int shell_table[2][8] = { ++ {2, 4, 3, 1, 4, 2, 1, 3}, /* node 2 */ ++ {1, 2, 1, 2, 1, 2, 1, 2} /* side # */ ++ }; ++ ++ /* Front or Back side of shell */ ++ if (ss_node1 == ++ get_node(connect, num_nodes_per_elem * (elem_num_pos) + (shell_table[0][2 * n] - 1), ++ int_size)) { + /* 4- or 8-node side (front or back face) */ + put_side(side_sets_side_list, idx, shell_table[1][2 * n], int_size); + } +- else { +- /* 2- or 3-node side (edge of shell) */ +- put_side(side_sets_side_list, idx, shell_edge_table[1][2 * n], int_size); +- } +- } +- else if (ss_node1 == +- get_node(connect, +- num_nodes_per_elem * (elem_num_pos) + (shell_table[0][2 * n + 1] - 1), +- int_size)) { +- if (num_node_per_side >= 4) { ++ else if (ss_node1 == ++ get_node(connect, ++ num_nodes_per_elem * (elem_num_pos) + (shell_table[0][2 * n + 1] - 1), ++ int_size)) { + /* 4- or 8-node side (front or back face) */ + put_side(side_sets_side_list, idx, shell_table[1][2 * n + 1], int_size); + } + else { +- /* 2- or 3-node side (edge of shell) */ +- put_side(side_sets_side_list, idx, shell_edge_table[1][2 * n + 1], int_size); ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to find SHELL element %" PRId64 ", node %" PRId64 ++ " in connectivity array %" PRId64 " for file id %d", ++ elem_num + 1, ss_node1, elem_blk_parms[p_ndx].elem_blk_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ err_stat = EX_FATAL; ++ goto cleanup; + } + } +- else if (ss_node1 == +- get_node(connect, +- num_nodes_per_elem * (elem_num_pos) + (shell_table[0][2 * n + 2] - 1), +- int_size)) { +- if (num_node_per_side >= 4) { +- /* 4- or 8-node side (front or back face) */ +- put_side(side_sets_side_list, idx, shell_table[1][2 * n + 2], int_size); ++ else { ++ /* Edge sides of shell */ ++ /* 1 2 3 4 node 1 */ ++ static const int shell_edge_table[2][8] = { ++ {2, 4, 3, 1, 4, 2, 1, 3}, /* node 2 */ ++ {3, 6, 4, 3, 5, 4, 6, 5} /* side # */ ++ }; ++ ++ if (ss_node1 == ++ get_node(connect, ++ num_nodes_per_elem * (elem_num_pos) + (shell_edge_table[0][2 * n] - 1), ++ int_size)) { ++ /* 2- or 3-node side (edge of shell) */ ++ put_side(side_sets_side_list, idx, shell_edge_table[1][2 * n], int_size); + } +- else { ++ else if (ss_node1 == get_node(connect, ++ num_nodes_per_elem * (elem_num_pos) + ++ (shell_edge_table[0][2 * n + 1] - 1), ++ int_size)) { + /* 2- or 3-node side (edge of shell) */ +- put_side(side_sets_side_list, idx, shell_edge_table[1][2 * n + 2], int_size); ++ put_side(side_sets_side_list, idx, shell_edge_table[1][2 * n + 1], int_size); ++ } ++ else { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to find SHELL element %" PRId64 ", node %" PRId64 ++ " in connectivity array %" PRId64 " for file id %d", ++ elem_num + 1, ss_node1, elem_blk_parms[p_ndx].elem_blk_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ err_stat = EX_FATAL; ++ goto cleanup; + } +- } +- else { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to find SHELL element %" PRId64 ", node %" PRId64 +- " in connectivity array %" PRId64 " for file id %d", +- elem_num + 1, ss_node1, elem_blk_parms[p_ndx].elem_blk_id, exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- err_stat = EX_FATAL; +- goto cleanup; + } + break; + } + case EX_EL_HEX: { + /* use table to find which node to compare to next */ ++ static const int hex_table[2][24] = { ++ /* 1 2 3 4 5 6 7 8 node 1 ++ */ ++ {4, 2, 5, 1, 3, 6, 7, 4, 2, 3, 1, 8, 6, 8, 1, 5, 2, 7, 8, 6, 3, 7, 5, 4}, /* node 2 */ ++ {5, 1, 4, 5, 2, 1, 2, 3, 5, 5, 4, 3, 6, 4, 1, 1, 2, 6, 6, 2, 3, 3, 6, 4} /* side # */ ++ }; ++ ++ assert(n < 8); + + if (ss_node1 == get_node(connect, + num_nodes_per_elem * (elem_num_pos) + (hex_table[0][3 * n] - 1), +@@ -804,6 +796,13 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + } + case EX_EL_TETRA: { + /* use table to find which node to compare to next */ ++ /* 1 2 3 4 node 1 */ ++ static const int tetra_table[2][12] = { ++ {2, 3, 4, 1, 3, 4, 4, 1, 2, 1, 2, 3}, /* node 2 */ ++ {1, 4, 3, 4, 2, 1, 2, 3, 4, 1, 2, 3} /* side # */ ++ }; ++ ++ assert(n < 4); + + if (ss_node1 == + get_node(connect, num_nodes_per_elem * (elem_num_pos) + (tetra_table[0][3 * n] - 1), +@@ -847,6 +846,14 @@ int ex_cvt_nodes_to_sides(int exoid, void_int *num_elem_per_set, void_int *num_n + case EX_EL_WEDGE: { + /* NOTE: WEDGE elements in side set node lists are currently not + * supported */ ++#if 0 ++ static const int wedge_table[2][18] = { ++ /* 1 2 3 4 5 6 node 1 */ ++ {2,4,3, 5,1,3, 6,1,2, 1,6,5, 6,2,4, 4,3,5}, /* node 2 */ ++ {1,3,4, 1,4,2, 2,3,4, 1,3,5, 5,2,1, 5,3,2} /* side # */ ++ }; ++#endif ++ + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: unsupported WEDGE element found in side set " + "node list in file id %d", +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_err.c b/ThirdParty/exodusII/vtkexodusII/src/ex_err.c +index f02083b162..ae8dd1d73c 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_err.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_err.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2025 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -9,42 +9,62 @@ + #include "exodusII.h" // for exoptval, MAX_ERR_LENGTH, etc + #include "exodusII_int.h" + ++#if defined(EXODUS_THREADSAFE) ++EX_errval_t *ex_errval = NULL; ++#define EX_PNAME ex_errval->last_pname ++#define EX_ERRMSG ex_errval->last_errmsg ++#define EX_ERR_NUM ex_errval->last_err_num ++#else ++int exerrval = 0; /* clear initial global error code value */ ++ ++static char last_pname[MAX_ERR_LENGTH + 1]; ++static char last_errmsg[MAX_ERR_LENGTH + 1]; ++static int last_err_num; ++ ++#define EX_PNAME last_pname ++#define EX_ERRMSG last_errmsg ++#define EX_ERR_NUM last_err_num ++#endif ++ + /*! +-\ingroup Utilities +-\fn{void ex_err_fn(exoid, const char *module_name, const char *message, int err_num)} ++ \ingroup Utilities ++ \undoc ++*/ ++void exi_reset_error_status(void) ++{ ++#if !defined(EXODUS_THREADSAFE) ++ exerrval = 0; ++ EX_ERR_NUM = 0; ++#endif ++} + +-The function ex_err_fn(exoid, ) logs an error to stderr. It is intended ++/*! ++\ingroup Utilities ++The function ex_err(exoid, ...) logs an error to stderr. It is intended + to provide explanatory messages for error codes returned from other + exodus routines. + + The passed in error codes and corresponding messages are listed in +-???. The programmer may supplement the error message printed ++\file{exodusII.h}. The programmer may supplement the error message printed + for standard errors by providing an error message. If the error code + is provided with no error message, the predefined message will be +-used. The error code EX_MSG is available to log application ++used. The error code \c EX_MSG is available to log application + specific messages. + +-\param[in] module_name This is a string containing the name of the calling +-function. +-\param[in] message This is a string containing a message explaining the +-error +- or problem. If EX_VERBOSE (see ex_opts()) is true, ++\param[in] module_name This is a string containing the name of the calling function. ++\param[in] message This is a string containing a message explaining the error ++ or problem. If \c EX_VERBOSE (see ex_opts()) is true, + this message will be printed to stderr. Otherwise, +- nothing will be printed. Maximum length is \c +-MAX_ERR_LENGTH. ++ nothing will be printed. Maximum length is \c MAX_ERR_LENGTH. + + \param[in] err_num This is an integer code identifying the error. exodus C +-functions +- place an error code value in exerrval, an external +-int. Negative +- values are considered fatal errors while positive +-values are +- warnings. There is a set of predefined values defined +-in +- \file{exodusII.h}. The predefined constant \c +-EX_PRTLASTMSG will +- cause the last error message to be output, regardless +-of the setting ++ functions place an error code value in exerrval, ++ an external integer. Negative values are considered ++ fatal errors while positive values are warnings. ++ There is a set of predefined values defined in ++ \file{exodusII.h}. The predefined constant ++ \c EX_PRTLASTMSG will cause the last error message ++ to be output, regardless of the setting + of the error reporting level (see ex_opts()). + + The following is an example of the use of this function: +@@ -62,45 +82,11 @@ if (exoid = ex_open ("test.exo", EX_READ, &CPU_word_size, + &IO_word_size, &version)) { + errval = 999; + snprintf(errmsg, MAX_ERR_LENGTH,"ERROR: cannot open file test.exo"); +- ex_err_fn(exoid, __func__, errmsg, errval); ++ ex_err(__func__, errmsg, errval); + } + ~~~ + + */ +- +-#if defined(EXODUS_THREADSAFE) +-EX_errval_t *ex_errval = NULL; +-#define EX_PNAME ex_errval->last_pname +-#define EX_ERRMSG ex_errval->last_errmsg +-#define EX_ERR_NUM ex_errval->last_err_num +-#else +-int exerrval = 0; /* clear initial global error code value */ +- +-static char last_pname[MAX_ERR_LENGTH + 1]; +-static char last_errmsg[MAX_ERR_LENGTH + 1]; +-static int last_err_num; +- +-#define EX_PNAME last_pname +-#define EX_ERRMSG last_errmsg +-#define EX_ERR_NUM last_err_num +-#endif +- +-/*! +- \ingroup Utilities +- \undoc +-*/ +-void ex__reset_error_status() +-{ +-#if !defined(EXODUS_THREADSAFE) +- exerrval = 0; +- EX_ERR_NUM = 0; +-#endif +-} +- +-/*! +- \ingroup Utilities +- \undoc +-*/ + void ex_err(const char *module_name, const char *message, int err_num) + { + EX_FUNC_ENTER_INT(); +@@ -120,9 +106,7 @@ void ex_err(const char *module_name, const char *message, int err_num) + if (err_num == EX_PRTLASTMSG) { + fprintf(stderr, "\n[%s] %s\n", EX_PNAME, EX_ERRMSG); + fprintf(stderr, " exerrval = %d\n", EX_ERR_NUM); +- if (EX_ERR_NUM < 0) { +- fprintf(stderr, "\t%s\n", ex_strerror(EX_ERR_NUM)); +- } ++ fprintf(stderr, "\t%s\n", ex_strerror(EX_ERR_NUM)); + EX_FUNC_VOID(); + } + +@@ -142,9 +126,7 @@ void ex_err(const char *module_name, const char *message, int err_num) + + else if (exoptval & EX_VERBOSE) { /* check see if we really want to hear this */ + fprintf(stderr, "\nExodus Library Warning/Error: [%s]\n\t%s\n", module_name, message); +- if (err_num < 0) { +- fprintf(stderr, "\t%s\n", ex_strerror(err_num)); +- } ++ fprintf(stderr, "\t%s\n", ex_strerror(err_num)); + } + fflush(stderr); + +@@ -157,8 +139,55 @@ void ex_err(const char *module_name, const char *message, int err_num) + } + + /*! +- \ingroup Utilities +- \undoc ++\ingroup Utilities ++The function ex_err_fn() logs an error to stderr. It is intended ++to provide explanatory messages for error codes returned from other ++exodus routines. The main difference between ex_err_fn() and ex_err() is ++that ex_err_fn() will print the name of the exodus file that the error occurred on. ++ ++The passed in error codes and corresponding messages are listed in ++\file{exodusII.h}. The programmer may supplement the error message printed ++for standard errors by providing an error message. If the error code ++is provided with no error message, the predefined message will be ++used. The error code \c EX_MSG is available to log application ++specific messages. ++ ++\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open(). ++\param[in] module_name This is a string containing the name of the calling function. ++\param[in] message This is a string containing a message explaining the error ++ or problem. If \c EX_VERBOSE (see ex_opts()) is true, ++ this message will be printed to stderr. Otherwise, ++ nothing will be printed. Maximum length is \c MAX_ERR_LENGTH. ++ ++\param[in] err_num This is an integer code identifying the error. exodus C ++ functions place an error code value in exerrval, ++ an external integer. Negative values are considered ++ fatal errors while positive values are warnings. ++ There is a set of predefined values defined in ++ \file{exodusII.h}. The predefined constant ++ \c EX_PRTLASTMSG will cause the last error message ++ to be output, regardless of the setting ++ of the error reporting level (see ex_opts()). ++ ++The following is an example of the use of this function: ++ ++~~~{.c} ++int exoid, CPU_word_size, IO_word_size, errval; ++float version; ++char errmsg[MAX_ERR_LENGTH]; ++ ++CPU_word_size = sizeof(float); ++IO_word_size = 0; ++ ++\comment{open exodus file} ++if (exoid = ex_open ("test.exo", EX_READ, &CPU_word_size, ++ &IO_word_size, &version)) { ++ errval = 999; ++ snprintf(errmsg, MAX_ERR_LENGTH,"ERROR: cannot open file test.exo"); ++ ex_err_fn(exoid, __func__, errmsg, errval); ++} ++~~~ ++ + */ + void ex_err_fn(int exoid, const char *module_name, const char *message, int err_num) + { +@@ -179,7 +208,7 @@ void ex_err_fn(int exoid, const char *module_name, const char *message, int err_ + if (err_num == EX_PRTLASTMSG) { + fprintf(stderr, "\n[%s] %s\n", EX_PNAME, EX_ERRMSG); + +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (file) { + size_t pathlen = 0; + nc_inq_path(exoid, &pathlen, NULL); +@@ -195,10 +224,8 @@ void ex_err_fn(int exoid, const char *module_name, const char *message, int err_ + } + + fprintf(stderr, " exerrval = %d\n", EX_ERR_NUM); +- +- if (EX_ERR_NUM < 0) { +- fprintf(stderr, "\t%s\n", ex_strerror(EX_ERR_NUM)); +- } ++ fprintf(stderr, "\t%s\n", ex_strerror(EX_ERR_NUM)); ++ fflush(stderr); + EX_FUNC_VOID(); + } + +@@ -213,12 +240,13 @@ void ex_err_fn(int exoid, const char *module_name, const char *message, int err_ + if (err_num == EX_NULLENTITY) { + if (exoptval & EX_NULLVERBOSE) { + fprintf(stderr, "\nExodus Library Warning: [%s]\n\t%s\n", module_name, message); ++ fflush(stderr); + } + } + + else if (exoptval & EX_VERBOSE) { /* check see if we really want to hear this */ +- char * path = NULL; +- struct ex__file_item *file = ex__find_file_item(exoid); ++ char *path = NULL; ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (file) { + size_t pathlen = 0; + nc_inq_path(exoid, &pathlen, NULL); +@@ -235,11 +263,9 @@ void ex_err_fn(int exoid, const char *module_name, const char *message, int err_ + else { + fprintf(stderr, "\nExodus Library Warning/Error: [%s]\n\t%s\n", module_name, message); + } +- if (err_num < 0) { +- fprintf(stderr, "\t%s\n", ex_strerror(err_num)); +- } ++ fprintf(stderr, "\t%s\n", ex_strerror(err_num)); ++ fflush(stderr); + } +- fflush(stderr); + + /* with netCDF 3.4, (fatal) system error codes are > 0; + so all EXODUS fatal error codes are > 0 */ +@@ -309,16 +335,20 @@ const char *ex_strerror(int err_num) + case EX_MEMFAIL: return "Memory allocation failure"; + case EX_BADFILEMODE: return "Bad file mode -- cannot specify both EX_READ and EX_WRITE"; + case EX_BADFILEID: return "Bad file id. Could not find exodus file associated with file id."; +- case EX_WRONGFILETYPE: return "Integer sizes must match for input and output file in ex_copy."; ++ case EX_WRONGFILETYPE: ++ return "File does not exist or is not of a supported type (netcdf3, netcdf4, netcdf5)."; + case EX_LOOKUPFAIL: + return "Id lookup failed for specified entity type. Could not find entity with specified id."; ++ case EX_BADFILENAME: return "Empty or null filename specified."; ++ case EX_DUPLICATEID: return "Duplicate entity id found."; ++ case EX_DUPLICATEOPEN: return "File is open multiple times for both read and write."; + case EX_BADPARAM: return "Bad parameter."; + case -EX_BADPARAM: return "Bad parameter."; + case EX_INTERNAL: return "Internal logic error in exodus library."; + case EX_NOTROOTID: return "File id is not the root id; it is a subgroup id."; + case EX_NULLENTITY: return "Null entity found."; +- case EX_DUPLICATEID: return "Duplicate entity id found."; +- case EX_DUPLICATEOPEN: return "File is open multiple times for both read and write."; ++ case EX_NOTFOUND: return "Could not find requested variable on database."; ++ case EX_INTSIZEMISMATCH: return "Integer sizes must match for input and output file in ex_copy."; + case EX_MSG: return "Message printed; no error implied."; + default: return nc_strerror(err_num); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_field_utils.c b/ThirdParty/exodusII/vtkexodusII/src/ex_field_utils.c +new file mode 100644 +index 0000000000..2d6bb345d4 +--- /dev/null ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_field_utils.c +@@ -0,0 +1,559 @@ ++/* ++ * Copyright(C) 1999-2024 National Technology & Engineering Solutions ++ * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ++ * NTESS, the U.S. Government retains certain rights in this software. ++ * ++ * See packages/seacas/LICENSE for details ++ */ ++ ++#include "exodusII.h" // for ex_err, etc ++#include "exodusII_int.h" // for EX_FATAL, etc ++#include ++#define _GNU_SOURCE ++#include ++ ++#define SIZE(X) sizeof(X) / sizeof(X[0]) ++ ++static char *my_strsep(char **stringp, const char *delim) ++{ ++ char *rv = *stringp; ++ if (rv) { ++ *stringp += strcspn(*stringp, delim); ++ if (**stringp) ++ *(*stringp)++ = '\0'; ++ else ++ *stringp = NULL; ++ } ++ return rv; ++} ++static size_t my_strlcat(char *dst, const char *src, size_t maxlen) ++{ ++ const size_t srclen = strlen(src); ++ const size_t dstlen = strlen(dst); ++ if (dstlen == maxlen) ++ return maxlen + srclen; ++ if (srclen < maxlen - dstlen) { ++ memcpy(dst + dstlen, src, srclen + 1); ++ } ++ else { ++ memcpy(dst + dstlen, src, maxlen - 1); ++ dst[dstlen + maxlen - 1] = '\0'; ++ } ++ return dstlen + srclen; ++} ++ ++static int number_width(size_t number) ++{ ++ /* Could use `(int)floor(log10(number)) + 1`, but that requires math library... */ ++ if (number == 0) { ++ return 1; ++ } ++ int count = 0; ++ // Iterate till n has digits remaining ++ while (number != 0) { ++ number /= 10; ++ ++count; ++ } ++ return count; ++} ++ ++static void verify_valid_component(int component, size_t cardinality, size_t suffix_size) ++{ ++ assert(cardinality == suffix_size); ++ assert(component - 1 < (int)suffix_size); ++} ++ ++const char *ex_component_field_name(ex_field *field, int component[EX_MAX_FIELD_NESTING]) ++{ ++ // NOTE: This is not thread-safe. Return value is pointer to static `field_name` ++ // For thread-safety, it is up to calling code. ++ ++ // Return the name of the field corresponding to the specified 1-based component(s) ++ static char field_name[EX_MAX_NAME + 1]; ++ const char *suffices[EX_MAX_FIELD_NESTING] = {NULL}; ++ for (int i = 0; i < field->nesting; i++) { ++ suffices[i] = ex_field_component_suffix(field, i, component[i]); ++ } ++ ++ // Build up name incrementally which makes it easier to handle an empty component_separator... ++ snprintf(field_name, EX_MAX_NAME + 1, "%s", field->name); ++ ++ for (int i = 0; i < field->nesting; i++) { ++ if (field->component_separator[i]) { ++ size_t fnl = strlen(field_name); ++ field_name[fnl] = field->component_separator[i]; ++ field_name[fnl + 1] = '\0'; ++ } ++ if (suffices[i] != NULL) { ++ my_strlcat(field_name, suffices[i], EX_MAX_NAME); ++ } ++ } ++ return field_name; ++} ++ ++int ex_initialize_basis_struct(ex_basis *basis, size_t num_basis, int mode) ++{ ++ // Mode - 0 -- initialize struct to empty ++ // Mode > 0 -- allocate memory for dynamically sized fields. ++ // Mode < 0 -- deallocate memory for dynamically sized fields. ++ if (mode > 0) { ++ for (size_t i = 0; i < num_basis; i++) { ++ basis[i].subc_dim = calloc(basis[i].cardinality, sizeof(int)); ++ basis[i].subc_ordinal = calloc(basis[i].cardinality, sizeof(int)); ++ basis[i].subc_dof_ordinal = calloc(basis[i].cardinality, sizeof(int)); ++ basis[i].subc_num_dof = calloc(basis[i].cardinality, sizeof(int)); ++ basis[i].xi = calloc(basis[i].cardinality, sizeof(double)); ++ basis[i].eta = calloc(basis[i].cardinality, sizeof(double)); ++ basis[i].zeta = calloc(basis[i].cardinality, sizeof(double)); ++ if (basis[i].subc_dim == NULL || basis[i].subc_ordinal == NULL || ++ basis[i].subc_dof_ordinal == NULL || basis[i].subc_num_dof == NULL || ++ basis[i].xi == NULL || basis[i].eta == NULL || basis[i].zeta == NULL) { ++ return EX_FATAL; ++ } ++ } ++ } ++ if (mode < 0) { ++ for (size_t i = 0; i < num_basis; i++) { ++ free(basis[i].subc_dim); ++ free(basis[i].subc_ordinal); ++ free(basis[i].subc_dof_ordinal); ++ free(basis[i].subc_num_dof); ++ free(basis[i].xi); ++ free(basis[i].eta); ++ free(basis[i].zeta); ++ } ++ } ++ /* Fall through if `cardinality < 0` */ ++ if (mode <= 0) { ++ for (size_t i = 0; i < num_basis; i++) { ++ basis[i].name[0] = '\0'; ++ basis[i].cardinality = 0; ++ basis[i].subc_dim = NULL; ++ basis[i].subc_ordinal = NULL; ++ basis[i].subc_dof_ordinal = NULL; ++ basis[i].subc_num_dof = NULL; ++ basis[i].xi = NULL; ++ basis[i].eta = NULL; ++ basis[i].zeta = NULL; ++ } ++ } ++ return EX_NOERR; ++} ++ ++int ex_initialize_quadrature_struct(ex_quadrature *quad, size_t num_quad, int mode) ++{ ++ // Mode - 0 -- initialize struct to empty ++ // Mode > 0 -- allocate memory for dynamically sized fields. ++ // Mode < 0 -- deallocate memory for dynamically sized fields. ++ if (mode > 0) { ++ for (size_t i = 0; i < num_quad; i++) { ++ quad[i].xi = calloc(quad[i].cardinality, sizeof(double)); ++ quad[i].eta = calloc(quad[i].cardinality, sizeof(double)); ++ quad[i].zeta = calloc(quad[i].cardinality, sizeof(double)); ++ quad[i].weight = calloc(quad[i].cardinality, sizeof(double)); ++ if (quad[i].xi == NULL || quad[i].eta == NULL || quad[i].zeta == NULL || ++ quad[i].weight == NULL) { ++ return EX_FATAL; ++ } ++ } ++ } ++ if (mode < 0) { ++ for (size_t i = 0; i < num_quad; i++) { ++ free(quad[i].xi); ++ free(quad[i].eta); ++ free(quad[i].zeta); ++ free(quad[i].weight); ++ } ++ } ++ if (mode <= 0) { ++ for (size_t i = 0; i < num_quad; i++) { ++ quad[i].name[0] = '\0'; ++ quad[i].cardinality = 0; ++ quad[i].xi = NULL; ++ quad[i].eta = NULL; ++ quad[i].zeta = NULL; ++ quad[i].weight = NULL; ++ } ++ } ++ return EX_NOERR; ++} ++ ++const char *ex_field_component_suffix(ex_field *field, int nest_level, int component) ++{ ++#define X "X" ++#define Y "Y" ++#define Z "Z" ++#define Q "Q" ++#define S "S" ++ ++#define XX "XX" ++#define YY "YY" ++#define ZZ "ZZ" ++#define XY "XY" ++#define YZ "YZ" ++#define ZX "ZC" ++#define YX "YX" ++#define ZY "ZY" ++#define XZ "XZ" ++ ++ switch (field->type[nest_level]) { ++ case EX_VECTOR_1D: { ++ static const char *suffix[] = {X}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_VECTOR_2D: { ++ static const char *suffix[] = {X, Y}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_VECTOR_3D: { ++ static const char *suffix[] = {X, Y, Z}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ ++ case EX_QUATERNION_2D: { ++ static const char *suffix[] = {S, Q}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_QUATERNION_3D: { ++ static const char *suffix[] = {X, Y, Z, Q}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ ++ case EX_FULL_TENSOR_12: { ++ static const char *suffix[] = {XX, XY, YX}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_FULL_TENSOR_16: { ++ static const char *suffix[] = {XX, XY, YZ, ZX, YX, ZY, XZ}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_FULL_TENSOR_22: { ++ static const char *suffix[] = {XX, YY, XY, YX}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_FULL_TENSOR_32: { ++ static const char *suffix[] = {XX, YY, ZZ, XY, YX}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_FULL_TENSOR_36: { ++ static const char *suffix[] = {XX, YY, ZZ, XY, YZ, ZX, YX, ZY, XZ}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ ++ case EX_SYM_TENSOR_10: { ++ static const char *suffix[] = {XX}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_SYM_TENSOR_11: { ++ static const char *suffix[] = {XX, XY}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_SYM_TENSOR_13: { ++ static const char *suffix[] = {XX, XY, YZ, ZX}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_SYM_TENSOR_21: { ++ static const char *suffix[] = {XX, YY, XY}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_SYM_TENSOR_31: { ++ static const char *suffix[] = {XX, YY, ZZ, XY}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_SYM_TENSOR_33: { ++ static const char *suffix[] = {XX, YY, ZZ, XY, YZ, ZX}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ ++ case EX_ASYM_TENSOR_01: { ++ static const char *suffix[] = {XY}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_ASYM_TENSOR_02: { ++ static const char *suffix[] = {XY, YZ}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_ASYM_TENSOR_03: { ++ static const char *suffix[] = {XY, YZ, ZX}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ ++ case EX_MATRIX_2X2: { ++ static const char *suffix[] = {"11", "12", "21", "22"}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ case EX_MATRIX_3X3: { ++ static const char *suffix[] = {"11", "12", "13", "21", "22", "23", "31", "32", "33"}; ++ verify_valid_component(component, ex_field_cardinality(field->type[nest_level]), SIZE(suffix)); ++ return suffix[component - 1]; ++ } ++ ++ case EX_FIELD_TYPE_USER_DEFINED: { ++ if (field->suffices[0] != '\0') { ++ // `user_suffices` is a comma-separated string. Assume component is valid. ++ char *string = strdup(field->suffices); ++ char *tofree = string; ++ char *token = my_strsep(&string, ","); ++ for (int i = 0; i < component - 1; i++) { ++ token = my_strsep(&string, ","); ++ } ++ if (token != NULL) { ++ static char user_suffix[32 + 1]; ++ ex_copy_string(user_suffix, token, 32); ++ free(tofree); ++ return user_suffix; ++ } ++ free(tofree); ++ } ++ return "invalid"; ++ } ++ case EX_FIELD_TYPE_SEQUENCE: { ++ // Suffices are just 1...#components. ++ static char user_suffix[32]; ++ static char format[8]; ++ int width = number_width(field->cardinality[nest_level]); ++ snprintf(format, 8, "%c%d%dd", '%', 0, width); ++ snprintf(user_suffix, 32, format, component); ++ return user_suffix; ++ } ++ ++ case EX_BASIS: ++ case EX_QUADRATURE: { ++ // Suffices are just 0...#components-1. ++ static char user_suffix[32]; ++ static char format[8]; ++ int width = number_width(field->cardinality[nest_level]); ++ snprintf(format, 8, "%c%d%dd", '%', 0, width); ++ snprintf(user_suffix, 32, format, component - 1); ++ return user_suffix; ++ } ++ ++ case EX_SCALAR: ++ case EX_FIELD_TYPE_INVALID: ++ default: return "invalid"; ++ } ++} ++ ++int ex_field_cardinality(const ex_field_type field_type) ++{ ++ switch (field_type) { ++ case EX_FIELD_TYPE_USER_DEFINED: return -1; ++ case EX_FIELD_TYPE_SEQUENCE: return -1; ++ case EX_QUADRATURE: return -1; ++ case EX_BASIS: return -1; ++ case EX_SCALAR: return 1; ++ ++ case EX_VECTOR_1D: return 1; ++ case EX_VECTOR_2D: return 2; ++ case EX_VECTOR_3D: return 3; ++ ++ case EX_QUATERNION_2D: return 2; ++ case EX_QUATERNION_3D: return 4; ++ ++ case EX_FULL_TENSOR_12: return 3; ++ case EX_FULL_TENSOR_16: return 7; ++ case EX_FULL_TENSOR_22: return 4; ++ case EX_FULL_TENSOR_32: return 5; ++ case EX_FULL_TENSOR_36: return 9; ++ ++ case EX_SYM_TENSOR_10: return 1; ++ case EX_SYM_TENSOR_11: return 2; ++ case EX_SYM_TENSOR_13: return 4; ++ case EX_SYM_TENSOR_21: return 3; ++ case EX_SYM_TENSOR_31: return 4; ++ case EX_SYM_TENSOR_33: return 6; ++ ++ case EX_ASYM_TENSOR_01: return 1; ++ case EX_ASYM_TENSOR_02: return 2; ++ case EX_ASYM_TENSOR_03: return 3; ++ ++ case EX_MATRIX_2X2: return 4; ++ case EX_MATRIX_3X3: return 9; ++ ++ case EX_FIELD_TYPE_INVALID: return -1; ++ } ++ return -1; ++} ++ ++/** The reverse of `field_type_enum_to_string` Used to convert the ++ * string into a `field_type` enum. The string is parsed from the ++ * database as a user-readable attribute. For example, EX_VECTOR_2D ++ * is on the database instead of a raw number 2 ++ */ ++ex_field_type ex_string_to_field_type_enum(const char *field_name) ++{ ++ if (strcmp(field_name, "EX_FIELD_TYPE_USER_DEFINED") == 0) { ++ return EX_FIELD_TYPE_USER_DEFINED; ++ } ++ if (strcmp(field_name, "EX_FIELD_TYPE_SEQUENCE") == 0) { ++ return EX_FIELD_TYPE_SEQUENCE; ++ } ++ if (strcmp(field_name, "EX_BASIS") == 0) { ++ return EX_BASIS; ++ } ++ if (strcmp(field_name, "EX_QUADRATURE") == 0) { ++ return EX_QUADRATURE; ++ } ++ if (strcmp(field_name, "EX_SCALAR") == 0) { ++ return EX_SCALAR; ++ } ++ if (strcmp(field_name, "EX_VECTOR_1D") == 0) { ++ return EX_VECTOR_1D; ++ } ++ if (strcmp(field_name, "EX_VECTOR_2D") == 0) { ++ return EX_VECTOR_2D; ++ } ++ if (strcmp(field_name, "EX_VECTOR_3D") == 0) { ++ return EX_VECTOR_3D; ++ } ++ if (strcmp(field_name, "EX_QUATERNION_2D") == 0) { ++ return EX_QUATERNION_2D; ++ } ++ if (strcmp(field_name, "EX_QUATERNION_3D") == 0) { ++ return EX_QUATERNION_3D; ++ } ++ if (strcmp(field_name, "EX_FULL_TENSOR_36") == 0) { ++ return EX_FULL_TENSOR_36; ++ } ++ if (strcmp(field_name, "EX_FULL_TENSOR_32") == 0) { ++ return EX_FULL_TENSOR_32; ++ } ++ if (strcmp(field_name, "EX_FULL_TENSOR_22") == 0) { ++ return EX_FULL_TENSOR_22; ++ } ++ if (strcmp(field_name, "EX_FULL_TENSOR_16") == 0) { ++ return EX_FULL_TENSOR_16; ++ } ++ if (strcmp(field_name, "EX_FULL_TENSOR_12") == 0) { ++ return EX_FULL_TENSOR_12; ++ } ++ if (strcmp(field_name, "EX_SYMMETRIC_TENSOR_33") == 0) { ++ return EX_SYM_TENSOR_33; ++ } ++ if (strcmp(field_name, "EX_SYMMETRIC_TENSOR_31") == 0) { ++ return EX_SYM_TENSOR_31; ++ } ++ if (strcmp(field_name, "EX_SYMMETRIC_TENSOR_21") == 0) { ++ return EX_SYM_TENSOR_21; ++ } ++ if (strcmp(field_name, "EX_SYMMETRIC_TENSOR_13") == 0) { ++ return EX_SYM_TENSOR_13; ++ } ++ if (strcmp(field_name, "EX_SYMMETRIC_TENSOR_11") == 0) { ++ return EX_SYM_TENSOR_11; ++ } ++ if (strcmp(field_name, "EX_SYMMETRIC_TENSOR_10") == 0) { ++ return EX_SYM_TENSOR_10; ++ } ++ if (strcmp(field_name, "EX_ASYMMETRIC_TENSOR_03") == 0) { ++ return EX_ASYM_TENSOR_03; ++ } ++ if (strcmp(field_name, "EX_ASYMMETRIC_TENSOR_02") == 0) { ++ return EX_ASYM_TENSOR_02; ++ } ++ if (strcmp(field_name, "EX_ASYMMETRIC_TENSOR_01") == 0) { ++ return EX_ASYM_TENSOR_01; ++ } ++ if (strcmp(field_name, "EX_MATRIX_2X2") == 0) { ++ return EX_MATRIX_2X2; ++ } ++ if (strcmp(field_name, "EX_MATRIX_3X3") == 0) { ++ return EX_MATRIX_3X3; ++ } ++ if (strcmp(field_name, "EX_FIELD_TYPE_INVALID") == 0) { ++ return EX_FIELD_TYPE_INVALID; ++ } ++ return EX_FIELD_TYPE_INVALID; ++} ++ ++/** Used to convert a `field_type` enum to a string so it can be ++ * written to the database as a user-readable attribute. For ++ * example, EX_VECTOR_2D would appear instead of a raw number 2 ++ */ ++const char *ex_field_type_enum_to_string(const ex_field_type field_type) ++{ ++ switch (field_type) { ++ case EX_FIELD_TYPE_USER_DEFINED: return "EX_FIELD_TYPE_USER_DEFINED"; ++ case EX_FIELD_TYPE_SEQUENCE: return "EX_FIELD_TYPE_SEQUENCE"; ++ case EX_BASIS: return "EX_BASIS"; ++ case EX_QUADRATURE: return "EX_QUADRATURE"; ++ case EX_SCALAR: return "EX_SCALAR"; ++ case EX_VECTOR_1D: return "EX_VECTOR_1D"; ++ case EX_VECTOR_2D: return "EX_VECTOR_2D"; ++ case EX_VECTOR_3D: return "EX_VECTOR_3D"; ++ case EX_QUATERNION_2D: return "EX_QUATERNION_2D"; ++ case EX_QUATERNION_3D: return "EX_QUATERNION_3D"; ++ case EX_FULL_TENSOR_36: return "EX_FULL_TENSOR_36"; ++ case EX_FULL_TENSOR_32: return "EX_FULL_TENSOR_32"; ++ case EX_FULL_TENSOR_22: return "EX_FULL_TENSOR_22"; ++ case EX_FULL_TENSOR_16: return "EX_FULL_TENSOR_16"; ++ case EX_FULL_TENSOR_12: return "EX_FULL_TENSOR_12"; ++ case EX_SYM_TENSOR_33: return "EX_SYMMETRIC_TENSOR_33"; ++ case EX_SYM_TENSOR_31: return "EX_SYMMETRIC_TENSOR_31"; ++ case EX_SYM_TENSOR_21: return "EX_SYMMETRIC_TENSOR_21"; ++ case EX_SYM_TENSOR_13: return "EX_SYMMETRIC_TENSOR_13"; ++ case EX_SYM_TENSOR_11: return "EX_SYMMETRIC_TENSOR_11"; ++ case EX_SYM_TENSOR_10: return "EX_SYMMETRIC_TENSOR_10"; ++ case EX_ASYM_TENSOR_03: return "EX_ASYMMETRIC_TENSOR_03"; ++ case EX_ASYM_TENSOR_02: return "EX_ASYMMETRIC_TENSOR_02"; ++ case EX_ASYM_TENSOR_01: return "EX_ASYMMETRIC_TENSOR_01"; ++ case EX_MATRIX_2X2: return "EX_MATRIX_2X2"; ++ case EX_MATRIX_3X3: return "EX_MATRIX_3X3"; ++ case EX_FIELD_TYPE_INVALID: return "EX_FIELD_TYPE_INVALID"; ++ } ++ return "EX_FIELD_TYPE_INVALID"; ++} ++ ++const char *ex_field_type_name(const ex_field_type field_type) ++{ ++ switch (field_type) { ++ case EX_FIELD_TYPE_USER_DEFINED: return "user defined"; ++ case EX_FIELD_TYPE_SEQUENCE: return "sequence"; ++ case EX_BASIS: return "basis"; ++ case EX_QUADRATURE: return "quadrature"; ++ case EX_SCALAR: return "scalar"; ++ case EX_VECTOR_1D: return "vector 1D"; ++ case EX_VECTOR_2D: return "vector 2D"; ++ case EX_VECTOR_3D: return "vector 3D"; ++ case EX_QUATERNION_2D: return "quaternion 2D"; ++ case EX_QUATERNION_3D: return "quaternion 3D"; ++ case EX_FULL_TENSOR_36: return "full tensor 36"; ++ case EX_FULL_TENSOR_32: return "full tensor 32"; ++ case EX_FULL_TENSOR_22: return "full tensor 22"; ++ case EX_FULL_TENSOR_16: return "full tensor 16"; ++ case EX_FULL_TENSOR_12: return "full tensor 12"; ++ case EX_SYM_TENSOR_33: return "symmetric tensor 33"; ++ case EX_SYM_TENSOR_31: return "symmetric tensor 31"; ++ case EX_SYM_TENSOR_21: return "symmetric tensor 21"; ++ case EX_SYM_TENSOR_13: return "symmetric tensor 13"; ++ case EX_SYM_TENSOR_11: return "symmetric tensor 11"; ++ case EX_SYM_TENSOR_10: return "symmetric tensor 10"; ++ case EX_ASYM_TENSOR_03: return "asymmetric tensor 03"; ++ case EX_ASYM_TENSOR_02: return "asymmetric tensor 02"; ++ case EX_ASYM_TENSOR_01: return "asymmetric tensor 01"; ++ case EX_MATRIX_2X2: return "matrix 2x2"; ++ case EX_MATRIX_3X3: return "matrix 3x3"; ++ case EX_FIELD_TYPE_INVALID: return "invalid"; ++ } ++ return "invalid"; ++} +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_all_times.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_all_times.c +index bfe0fa04d9..bfb84be8a8 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_all_times.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_all_times.c +@@ -59,7 +59,7 @@ int ex_get_all_times(int exoid, void *time_values) + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -71,7 +71,7 @@ int ex_get_all_times(int exoid, void *time_values) + } + + /*read time values */ +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_var_float(exoid, varid, time_values); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_assemblies.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_assemblies.c +index a58ac913d5..aee75c0d00 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_assemblies.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_assemblies.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2021 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -13,20 +13,20 @@ + * writes the assembly parameters and optionally assembly data for all assemblies + * assumes that `assembly` is large enough to contain all assemblies. + * \param exoid exodus file id +- * \param *assembly array of ex_assembly structures ++ * \param assembly array of ex_assembly structures + */ + int ex_get_assemblies(int exoid, ex_assembly *assembly) + { + /* Determine number of assemblies on database */ +- int num_assembly = ex_inquire_int(exoid, EX_INQ_ASSEMBLY); +- int max_use_name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_USED_NAME_LENGTH); ++ int num_assembly = (int)ex_inquire_int(exoid, EX_INQ_ASSEMBLY); ++ int max_use_name_length = (int)ex_inquire_int(exoid, EX_INQ_DB_MAX_USED_NAME_LENGTH); + + if (num_assembly < 0) { + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to inquire ASSEMBLY count in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, num_assembly); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_assembly.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_assembly.c +index bd5ffd6b98..78ef6e6666 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_assembly.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_assembly.c +@@ -17,7 +17,7 @@ + + int ex_get_assembly(int exoid, ex_assembly *assembly) + { +- struct ex__file_item *file = NULL; ++ struct exi_file_item *file = NULL; + int status = 0; + int dimid = 0; + size_t len = 0; +@@ -25,7 +25,7 @@ int ex_get_assembly(int exoid, ex_assembly *assembly) + + EX_FUNC_ENTER(); + +- file = ex__find_file_item(exoid); ++ file = exi_find_file_item(exoid); + if (!file) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d.", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr.c +index 8d2d8a9df6..45264b387a 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr.c +@@ -39,7 +39,7 @@ int ex_get_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, void *a + const char *vattrbname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -48,7 +48,7 @@ int ex_get_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, void *a + obj_id_ndx = 0; + } + else { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -97,7 +97,7 @@ int ex_get_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, void *a + } + + /* read in the attributes */ +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_var_float(exoid, attrid, attrib); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr_names.c +index 3d11a6c73b..3312df74d2 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr_names.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -34,19 +34,18 @@ int ex_get_attr_names(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, c + { + int status; + int varid, numattrdim, obj_id_ndx; +- size_t num_attr, i; + char errmsg[MAX_ERR_LENGTH]; + const char *dnumobjatt; + const char *vattrbname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Determine index of obj_id in vobjids array */ + if (obj_type != EX_NODAL) { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -121,6 +120,7 @@ int ex_get_attr_names(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, c + EX_FUNC_LEAVE(EX_WARN); /* no attributes for this object */ + } + ++ size_t num_attr = 0; + if ((status = nc_inq_dimlen(exoid, numattrdim, &num_attr)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get number of attributes for %s %" PRId64 " in file id %d", +@@ -138,7 +138,7 @@ int ex_get_attr_names(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, c + + if (status == NC_NOERR) { + /* read the names */ +- status = ex__get_names(exoid, varid, num_attr, names, obj_type, __func__); ++ status = exi_get_names(exoid, varid, num_attr, names, obj_type, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -147,7 +147,7 @@ int ex_get_attr_names(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, c + /* Names variable does not exist on the database; probably since this is an + * older version of the database. Return an empty array... + */ +- for (i = 0; i < num_attr; i++) { ++ for (size_t i = 0; i < num_attr; i++) { + names[i][0] = '\0'; + } + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr_param.c +index 15622d9271..1769bef201 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_attr_param.c +@@ -40,7 +40,7 @@ int ex_get_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, i + size_t lnum_attr_per_entry; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -49,7 +49,7 @@ int ex_get_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, i + obj_id_ndx = 0; + } + else { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_attribute.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_attribute.c +index bc016c46ca..2284a7e567 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_attribute.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_attribute.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -10,30 +10,25 @@ + #include "exodusII_int.h" // for EX_FATAL, etc + #include + +-/* An assembly attribute is similar to an IOSS property consisting of ++/* An entity attribute is similar to an IOSS property consisting of + a name, a type, and a value or values. It is not a value per entity +- in the assembly, but a value for the assembly. For now, they types ++ in the entity, but a value for the entity. For now, the types + will be limited to text, integer, and double to provide capability + without the complexity of supporting the many types available in + NetCDF-4 including user-defined types. Note that an attribute can + have multiple values, for example if the attribute is a range, it + could have the value {1.0, 100.0} + +- NOTE: This type of attribute (value on entity instead of value per +- entities members, for example nodes in a nodeset) will also be added +- to the other entity types (blocks and sets) when implemented for +- assemblies. +- + NOTE: Need a better name or way of distinguishing from the + attributes which are currently supported in Exodus. + */ + +-static bool ex__is_internal_attribute(const char *name, ex_entity_type obj_type) ++static bool exi_is_internal_attribute(const char *name, ex_entity_type obj_type) + { + if (name[0] == '_') { + return true; + } +- else if ((strcmp(name, "elem_type") == 0) || (strcmp(name, "entity_type1") == 0) || ++ else if ((strcmp(name, ATT_NAME_ELB) == 0) || (strcmp(name, "entity_type1") == 0) || + (strcmp(name, "entity_type2") == 0)) { + return true; + } +@@ -47,76 +42,28 @@ static bool ex__is_internal_attribute(const char *name, ex_entity_type obj_type) + (strcmp(name, ATT_LAST_WRITTEN_TIME) == 0))) { + return true; + } +- return false; +-} +- +-static int ex__get_varid(int exoid, ex_entity_type obj_type, ex_entity_id id) +-{ +- const char *entryptr = NULL; +- char errmsg[MAX_ERR_LENGTH]; +- +- int id_ndx = 0; +- int status = 0; +- int varid = 0; +- +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { +- return (EX_FATAL); +- } +- +- /* First, locate index of this objects id `obj_type` id array */ +- id_ndx = ex__id_lkup(exoid, obj_type, id); +- if (id_ndx <= 0) { +- ex_get_err(NULL, NULL, &status); +- if (status != 0) { +- if (status == EX_NULLENTITY) { /* NULL object? */ +- return EX_NOERR; +- } +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate %s id %" PRId64 " in id array in file id %d", +- ex_name_of_object(obj_type), id, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return EX_FATAL; +- } ++ else if (strncmp(name, "Field@", 6) == 0) { ++ return true; + } +- +- switch (obj_type) { +- case EX_ASSEMBLY: entryptr = VAR_ENTITY_ASSEMBLY(id_ndx); break; +- case EX_BLOB: entryptr = VAR_ENTITY_BLOB(id_ndx); break; +- case EX_NODE_SET: entryptr = VAR_NODE_NS(id_ndx); break; +- case EX_EDGE_SET: entryptr = VAR_EDGE_ES(id_ndx); break; +- case EX_FACE_SET: entryptr = VAR_FACE_FS(id_ndx); break; +- case EX_SIDE_SET: entryptr = VAR_ELEM_SS(id_ndx); break; +- case EX_ELEM_SET: entryptr = VAR_ELEM_ELS(id_ndx); break; +- case EX_EDGE_BLOCK: entryptr = VAR_EBCONN(id_ndx); break; +- case EX_FACE_BLOCK: entryptr = VAR_FBCONN(id_ndx); break; +- case EX_ELEM_BLOCK: entryptr = VAR_CONN(id_ndx); break; +- default: +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: object type %d not supported in call to %s", obj_type, +- __func__); +- ex_err(__func__, errmsg, EX_BADPARAM); +- return EX_FATAL; ++ else if (strncmp(name, "Basis@", 6) == 0) { ++ return true; + } +- +- if ((status = nc_inq_varid(exoid, entryptr, &varid)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate entity list array for %s %" PRId64 " in file id %d", +- ex_name_of_object(obj_type), id, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return EX_FATAL; ++ else if (strncmp(name, "Quad@", 5) == 0) { ++ return true; + } +- return varid; ++ return false; + } + +-static int ex__get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity_id id, int *varid) ++static int exi_get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity_id id, int *varid) + { +- int att_count = 0; +- int status; +- char errmsg[MAX_ERR_LENGTH]; ++ int att_count = 0; ++ int status; + + if (obj_type == EX_GLOBAL) { + *varid = NC_GLOBAL; + + if ((status = nc_inq(exoid, NULL, NULL, &att_count, NULL)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get GLOBAL attribute count in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -124,13 +71,14 @@ static int ex__get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity + } + } + else { +- *varid = ex__get_varid(exoid, obj_type, id); ++ *varid = exi_get_varid(exoid, obj_type, id); + if (*varid <= 0) { +- /* Error message handled in ex__get_varid */ ++ /* Error message handled in exi_get_varid */ + return 0; + } + + if ((status = nc_inq_var(exoid, *varid, NULL, NULL, NULL, NULL, &att_count)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get attribute count on %s with id %" PRId64 " in file id %d", + ex_name_of_object(obj_type), id, exoid); +@@ -149,13 +97,10 @@ static int ex__get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity + */ + int ex_get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity_id id) + { +- int status; +- int varid; +- int att_count, count; +- + EX_FUNC_ENTER(); + +- att_count = ex__get_attribute_count(exoid, obj_type, id, &varid); ++ int varid; ++ int att_count = exi_get_attribute_count(exoid, obj_type, id, &varid); + if (att_count < 0) { + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, +@@ -166,9 +111,10 @@ int ex_get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity_id id) + } + + /* Get names of each attribute and see if it is an 'internal' name */ +- count = att_count; ++ int count = att_count; + for (int i = 0; i < count; i++) { +- char name[NC_MAX_NAME]; ++ char name[EX_MAX_NAME + 1]; ++ int status; + if ((status = nc_inq_attname(exoid, varid, i, name)) != NC_NOERR) { + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, +@@ -177,7 +123,7 @@ int ex_get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity_id id) + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } +- if (ex__is_internal_attribute(name, obj_type)) { ++ if (exi_is_internal_attribute(name, obj_type)) { + att_count--; + } + } +@@ -200,14 +146,13 @@ int ex_get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity_id id) + */ + int ex_get_attribute_param(int exoid, ex_entity_type obj_type, ex_entity_id id, ex_attribute *attr) + { +- int status; + char errmsg[MAX_ERR_LENGTH]; + int varid; + int att_count, count; + + EX_FUNC_ENTER(); + +- att_count = ex__get_attribute_count(exoid, obj_type, id, &varid); ++ att_count = exi_get_attribute_count(exoid, obj_type, id, &varid); + if (att_count < 0) { + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -217,7 +162,8 @@ int ex_get_attribute_param(int exoid, ex_entity_type obj_type, ex_entity_id id, + */ + count = 0; + for (int i = 0; i < att_count; i++) { +- char name[NC_MAX_NAME]; ++ char name[EX_MAX_NAME + 1]; ++ int status; + if ((status = nc_inq_attname(exoid, varid, i, name)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get attribute named %s on %s with id %" PRId64 " in file id %d", +@@ -225,7 +171,7 @@ int ex_get_attribute_param(int exoid, ex_entity_type obj_type, ex_entity_id id, + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } +- if (!ex__is_internal_attribute(name, obj_type)) { ++ if (!exi_is_internal_attribute(name, obj_type)) { + nc_type type; + size_t val_count; + +@@ -251,18 +197,15 @@ int ex_get_attribute_param(int exoid, ex_entity_type obj_type, ex_entity_id id, + /*! Get the values for the specified attribute. */ + int ex_get_attribute(int exoid, ex_attribute *attr) + { +- int status; +- char errmsg[MAX_ERR_LENGTH]; +- int varid; +- + EX_FUNC_ENTER(); ++ int varid; + if (attr->entity_type == EX_GLOBAL) { + varid = NC_GLOBAL; + } + else { +- varid = ex__get_varid(exoid, attr->entity_type, attr->entity_id); ++ varid = exi_get_varid(exoid, attr->entity_type, attr->entity_id); + if (varid <= 0) { +- /* Error message handled in ex__get_varid */ ++ /* Error message handled in exi_get_varid */ + EX_FUNC_LEAVE(varid); + } + } +@@ -281,6 +224,7 @@ int ex_get_attribute(int exoid, ex_attribute *attr) + attr->values = calloc(attr->value_count + 1, sizeof(char)); + } + if (attr->values == NULL) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf( + errmsg, MAX_ERR_LENGTH, + "ERROR: failed allocate memory to store values for attribute %s on %s with id %" PRId64 +@@ -291,7 +235,9 @@ int ex_get_attribute(int exoid, ex_attribute *attr) + } + } + ++ int status; + if ((status = nc_get_att(exoid, varid, attr->name, attr->values)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to read attribute %s on %s with id %" PRId64 " in file id %d", + attr->name, ex_name_of_object(attr->entity_type), attr->entity_id, exoid); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_blob.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_blob.c +index 8541bc7279..be17e7f613 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_blob.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_blob.c +@@ -17,7 +17,7 @@ + + int ex_get_blob(int exoid, ex_blob *blob) + { +- struct ex__file_item *file = NULL; ++ struct exi_file_item *file = NULL; + int status = 0; + int dimid = 0; + size_t len = 0; +@@ -25,7 +25,7 @@ int ex_get_blob(int exoid, ex_blob *blob) + + EX_FUNC_ENTER(); + +- file = ex__find_file_item(exoid); ++ file = exi_find_file_item(exoid); + if (!file) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d.", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_blobs.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_blobs.c +index fde8ca7ab5..9b08148ebd 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_blobs.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_blobs.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -23,7 +23,7 @@ int ex_get_blobs(int exoid, ex_blob *blob) + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to inquire BLOB count in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, num_blob); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_block.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_block.c +index 12ea5d7b85..285bf7ac37 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_block.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_block.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -55,43 +55,43 @@ int ex_get_block(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, char * + int64_t *n_faces_per_entry = num_faces_per_entry; + int64_t *n_attr_per_entry = num_attr_per_entry; + +- if (n_entries_this_blk) { ++ if (num_entries_this_blk) { + *n_entries_this_blk = block.num_entry; + } +- if (n_nodes_per_entry) { ++ if (num_nodes_per_entry) { + *n_nodes_per_entry = block.num_nodes_per_entry; + } +- if (n_edges_per_entry) { ++ if (num_edges_per_entry) { + *n_edges_per_entry = block.num_edges_per_entry; + } +- if (n_faces_per_entry) { ++ if (num_faces_per_entry) { + *n_faces_per_entry = block.num_faces_per_entry; + } +- if (n_attr_per_entry) { ++ if (num_attr_per_entry) { + *n_attr_per_entry = block.num_attribute; + } + } + else { +- int *n_entries_this_blk = num_entries_this_blk; +- int *n_nodes_per_entry = num_nodes_per_entry; +- int *n_edges_per_entry = num_edges_per_entry; +- int *n_faces_per_entry = num_faces_per_entry; +- int *n_attr_per_entry = num_attr_per_entry; ++ int *n_entries_this_blk = (int *)num_entries_this_blk; ++ int *n_nodes_per_entry = (int *)num_nodes_per_entry; ++ int *n_edges_per_entry = (int *)num_edges_per_entry; ++ int *n_faces_per_entry = (int *)num_faces_per_entry; ++ int *n_attr_per_entry = (int *)num_attr_per_entry; + +- if (n_entries_this_blk) { +- *n_entries_this_blk = block.num_entry; ++ if (num_entries_this_blk) { ++ *n_entries_this_blk = (int)block.num_entry; + } +- if (n_nodes_per_entry) { +- *n_nodes_per_entry = block.num_nodes_per_entry; ++ if (num_nodes_per_entry) { ++ *n_nodes_per_entry = (int)block.num_nodes_per_entry; + } +- if (n_edges_per_entry) { +- *n_edges_per_entry = block.num_edges_per_entry; ++ if (num_edges_per_entry) { ++ *n_edges_per_entry = (int)block.num_edges_per_entry; + } +- if (n_faces_per_entry) { +- *n_faces_per_entry = block.num_faces_per_entry; ++ if (num_faces_per_entry) { ++ *n_faces_per_entry = (int)block.num_faces_per_entry; + } +- if (n_attr_per_entry) { +- *n_attr_per_entry = block.num_attribute; ++ if (num_attr_per_entry) { ++ *n_attr_per_entry = (int)block.num_attribute; + } + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_id_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_id_map.c +new file mode 100644 +index 0000000000..3752313ed4 +--- /dev/null ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_id_map.c +@@ -0,0 +1,102 @@ ++/* ++ * Copyright(C) 2022 National Technology & Engineering Solutions ++ * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ++ * NTESS, the U.S. Government retains certain rights in this software. ++ * ++ * See packages/seacas/LICENSE for details ++ */ ++/***************************************************************************** ++ * ++ * ex_get_block_id_map ++ * ++ * entry conditions - ++ * input parameters: ++ * int exoid exodus file id ++ * int map_type type of map (node, edge, face, element) ++ * ++ * exit conditions - ++ * int* map map ++ * ++ *****************************************************************************/ ++ ++#include "exodusII.h" // for ex_err, etc ++#include "exodusII_int.h" // for EX_FATAL, EX_NOERR, etc ++ ++/* ++ * reads the id map for the edge/face/element block with the specified id. ++ */ ++ ++int ex_get_block_id_map(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, void_int *map) ++{ ++ int status; ++ char errmsg[MAX_ERR_LENGTH]; ++ const char *dnument = NULL; ++ ex_entity_type map_type = EX_INVALID; ++ ++ EX_FUNC_ENTER(); ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ /* Determine index of entity_id in id array */ ++ int blk_id_ndx = exi_id_lkup(exoid, obj_type, entity_id); ++ if (blk_id_ndx <= 0) { /* Empty block */ ++ ex_get_err(NULL, NULL, &status); ++ if (status != 0) { ++ if (status == EX_NULLENTITY) { /* NULL element block? */ ++ EX_FUNC_LEAVE(EX_NOERR); ++ } ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to locate %s id %" PRId64 " in id array in file id %d", ++ ex_name_of_object(obj_type), entity_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ } ++ ++ size_t offset = 1; ++ size_t len = 0; ++ for (int i = 1; i <= blk_id_ndx; i++) { ++ offset += len; ++ /* inquire values of some dimensions */ ++ int dimid = 0; ++ ++ /* Determine the number of entities in all previous blocks. */ ++ switch (obj_type) { ++ case EX_EDGE_BLOCK: ++ dnument = DIM_NUM_ED_IN_EBLK(i); ++ map_type = EX_EDGE_MAP; ++ break; ++ case EX_FACE_BLOCK: ++ dnument = DIM_NUM_FA_IN_FBLK(i); ++ map_type = EX_FACE_MAP; ++ break; ++ case EX_ELEM_BLOCK: ++ dnument = DIM_NUM_EL_IN_BLK(i); ++ map_type = EX_ELEM_MAP; ++ break; ++ default: ++ snprintf(errmsg, MAX_ERR_LENGTH, "Bad block type parameter (%d) specified for file id %d.", ++ obj_type, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ if ((status = nc_inq_dimid(exoid, dnument, &dimid)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to locate number of entities in %s %" PRId64 " in file id %d", ++ ex_name_of_object(obj_type), entity_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if ((status = nc_inq_dimlen(exoid, dimid, &len)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to get number of %ss in block %" PRId64 " in file id %d", ++ ex_name_of_object(obj_type), entity_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ } ++ EX_FUNC_UNLOCK(); ++ return ex_get_partial_id_map(exoid, map_type, offset, len, map); ++} +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_param.c +index cadfe2f19e..73bf723b15 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_param.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -36,7 +36,6 @@ + int ex_get_block_param(int exoid, ex_block *block) + { + int dimid, connid, blk_id_ndx; +- size_t len, i; + char errmsg[MAX_ERR_LENGTH]; + int status; + const char *dnument = NULL; +@@ -47,11 +46,9 @@ int ex_get_block_param(int exoid, ex_block *block) + const char *ablknam = NULL; + const char *vblkcon = NULL; + +- struct ex__file_item *file = NULL; +- + EX_FUNC_ENTER(); + +- file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (!file) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d in ex_get_block_param().", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); +@@ -59,7 +56,7 @@ int ex_get_block_param(int exoid, ex_block *block) + } + + /* First, locate index of element block id in VAR_ID_EL_BLK array */ +- blk_id_ndx = ex__id_lkup(exoid, block->type, block->id); ++ blk_id_ndx = exi_id_lkup(exoid, block->type, block->id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + if (status != 0) { +@@ -84,8 +81,8 @@ int ex_get_block_param(int exoid, ex_block *block) + case EX_EDGE_BLOCK: + dnument = DIM_NUM_ED_IN_EBLK(blk_id_ndx); + dnumnod = DIM_NUM_NOD_PER_ED(blk_id_ndx); +- dnumedg = 0; +- dnumfac = 0; ++ dnumedg = NULL; ++ dnumfac = NULL; + dnumatt = DIM_NUM_ATT_IN_EBLK(blk_id_ndx); + vblkcon = VAR_EBCONN(blk_id_ndx); + ablknam = ATT_NAME_ELB; +@@ -93,8 +90,8 @@ int ex_get_block_param(int exoid, ex_block *block) + case EX_FACE_BLOCK: + dnument = DIM_NUM_FA_IN_FBLK(blk_id_ndx); + dnumnod = DIM_NUM_NOD_PER_FA(blk_id_ndx); +- dnumedg = 0; /* it is possible this might be non-NULL some day */ +- dnumfac = 0; ++ dnumedg = NULL; /* it is possible this might be non-NULL some day */ ++ dnumfac = NULL; + dnumatt = DIM_NUM_ATT_IN_FBLK(blk_id_ndx); + vblkcon = VAR_FBCONN(blk_id_ndx); + ablknam = ATT_NAME_ELB; +@@ -124,6 +121,7 @@ int ex_get_block_param(int exoid, ex_block *block) + EX_FUNC_LEAVE(EX_FATAL); + } + ++ size_t len; + if ((status = nc_inq_dimlen(exoid, dimid, &len)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get number of %ss in block %" PRId64 " in file id %d", +@@ -243,7 +241,7 @@ int ex_get_block_param(int exoid, ex_block *block) + ex_err_fn(exoid, __func__, errmsg, EX_MSG); + } + +- for (i = 0; i < MAX_STR_LENGTH + 1; i++) { ++ for (int i = 0; i < MAX_STR_LENGTH + 1; i++) { + block->topology[i] = '\0'; + + /* get the element type name */ +@@ -256,7 +254,7 @@ int ex_get_block_param(int exoid, ex_block *block) + } + + /* get rid of trailing blanks */ +- ex__trim(block->topology); ++ exi_trim(block->topology); + } + EX_FUNC_LEAVE(EX_NOERR); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_params.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_params.c +index d7e939293e..9b48ad81de 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_params.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_block_params.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -22,9 +22,8 @@ + + int ex_get_block_params(int exoid, size_t block_count, struct ex_block **blocks) + { +- size_t i; + EX_FUNC_ENTER(); +- for (i = 0; i < block_count; i++) { ++ for (size_t i = 0; i < block_count; i++) { + int status = ex_get_block_param(exoid, blocks[i]); + if (status != EX_NOERR) { + EX_FUNC_LEAVE(status); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_cmap_params.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_cmap_params.c +index 4466fa2f17..2e4bdefd14 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_cmap_params.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_cmap_params.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -38,16 +38,16 @@ + int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_node_cnts, + void_int *elem_cmap_ids, void_int *elem_cmap_elem_cnts, int processor) + { +- size_t cnt, num_n_comm_maps, num_e_comm_maps, start[1], count[1]; +- int64_t cmap_info_idx[2], cmap_data_idx[2]; +- int nmstat; ++ size_t start[1], count[1]; + int status, map_idx, varid, dimid; ++ int nmstat; ++ int64_t cmap_data_idx[2]; + + char errmsg[MAX_ERR_LENGTH]; + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -58,6 +58,7 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + /*****************************************************************************/ + + /* get the cmap information variables index */ ++ int64_t cmap_info_idx[2]; + if (ex_get_idx(exoid, VAR_N_COMM_INFO_IDX, cmap_info_idx, processor) == -1) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to find index variable, \"%s\", in file ID %d", + VAR_N_COMM_INFO_IDX, exoid); +@@ -82,7 +83,7 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + cmap_info_idx[1] = count[0]; + } /* End "if (cmap_info_idx[1] == -1) */ + +- num_n_comm_maps = cmap_info_idx[1] - cmap_info_idx[0]; ++ size_t num_n_comm_maps = cmap_info_idx[1] - cmap_info_idx[0]; + + if (num_n_comm_maps > 0) { + count[0] = num_n_comm_maps; +@@ -124,7 +125,7 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + if (node_cmap_node_cnts != NULL) { + + /* Get the node counts in each of the nodal communication maps */ +- for (cnt = 0; cnt < num_n_comm_maps; cnt++) { ++ for (size_t cnt = 0; cnt < num_n_comm_maps; cnt++) { + int64_t cmap_id; + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { + cmap_id = ((int64_t *)node_cmap_ids)[cnt]; +@@ -133,7 +134,7 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + cmap_id = ((int *)node_cmap_ids)[cnt]; + } + +- if ((map_idx = ne__id_lkup(exoid, VAR_N_COMM_IDS, cmap_info_idx, cmap_id)) < 0) { ++ if ((map_idx = nei_id_lkup(exoid, VAR_N_COMM_IDS, cmap_info_idx, cmap_id)) < 0) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find nodal comm map with ID %" PRId64 " in file ID %d", + cmap_id, exoid); +@@ -206,10 +207,10 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + ((int *)node_cmap_node_cnts)[cnt] = 0; + } + } /* "for(cnt=0; cnt < num_n_comm_maps; cnt++)" */ +- } /* "if (node_cmap_node_cnts != NULL)" */ +- } /* "if (node_cmap_ids != NULL)" */ +- } /* "if (num_n_comm_maps > 0)" */ +- } /* End "if ((dimid = nc_inq_dimid(exoid, DIM_NUM_N_CMAPS)) != -1)" */ ++ } /* "if (node_cmap_node_cnts != NULL)" */ ++ } /* "if (node_cmap_ids != NULL)" */ ++ } /* "if (num_n_comm_maps > 0)" */ ++ } /* End "if ((dimid = nc_inq_dimid(exoid, DIM_NUM_N_CMAPS)) != -1)" */ + + /*****************************************************************************/ + /*****************************************************************************/ +@@ -227,7 +228,7 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + } + + /* Get the number of elemental communications maps in the file */ +- if ((status = nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid)) == NC_NOERR) { ++ if (nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid) == NC_NOERR) { + /* check if I need to get the dimension of the nodal comm map */ + if (cmap_info_idx[1] == -1) { + if ((status = nc_inq_dimlen(exoid, dimid, count)) != NC_NOERR) { +@@ -242,7 +243,7 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + cmap_info_idx[1] = count[0]; + } /* End "if (cmap_info_idx[1] == -1) */ + +- num_e_comm_maps = cmap_info_idx[1] - cmap_info_idx[0]; ++ size_t num_e_comm_maps = cmap_info_idx[1] - cmap_info_idx[0]; + + if (num_e_comm_maps > 0) { + count[0] = num_e_comm_maps; +@@ -285,7 +286,7 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + * Get the element counts in each of the elemental + * communication maps + */ +- for (cnt = 0; cnt < num_e_comm_maps; cnt++) { ++ for (size_t cnt = 0; cnt < num_e_comm_maps; cnt++) { + int64_t cmap_id; + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { + cmap_id = ((int64_t *)elem_cmap_ids)[cnt]; +@@ -294,7 +295,7 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + cmap_id = ((int *)elem_cmap_ids)[cnt]; + } + +- if ((map_idx = ne__id_lkup(exoid, VAR_E_COMM_IDS, cmap_info_idx, cmap_id)) < 0) { ++ if ((map_idx = nei_id_lkup(exoid, VAR_E_COMM_IDS, cmap_info_idx, cmap_id)) < 0) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find elemental comm map with ID %" PRId64 " in file ID %d", + cmap_id, exoid); +@@ -367,10 +368,10 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + ((int *)elem_cmap_elem_cnts)[cnt] = 0; + } + } /* "for(cnt=0; cnt < num_e_comm_maps; cnt++)" */ +- } /* "if (elem_cmap_elem_cnts != NULL)" */ +- } /* "if (elem_cmap_ids != NULL)" */ +- } /* "if (num_e_comm_maps > 0)" */ +- } /* End "if ((dimid = nc_inq_dimid(exoid, DIM_NUM_E_CMAPS(processor))) != +- -1)" */ ++ } /* "if (elem_cmap_elem_cnts != NULL)" */ ++ } /* "if (elem_cmap_ids != NULL)" */ ++ } /* "if (num_e_comm_maps > 0)" */ ++ } /* End "if ((dimid = nc_inq_dimid(exoid, DIM_NUM_E_CMAPS(processor))) != ++ -1)" */ + EX_FUNC_LEAVE(EX_NOERR); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_concat_sets.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_concat_sets.c +index 95835f7f3f..417d0eb991 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_concat_sets.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_concat_sets.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -27,7 +27,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_set_specs, ex_err, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + int ex_get_concat_sets(int exoid, ex_entity_type set_type, struct ex_set_specs *set_specs) + { +@@ -39,20 +39,17 @@ int ex_get_concat_sets(int exoid, ex_entity_type set_type, struct ex_set_specs * + + void *sets_dist_fact = set_specs->sets_dist_fact; + +- int num_sets, i; +- float * flt_dist_fact; +- double * dbl_dist_fact; +- char errmsg[MAX_ERR_LENGTH]; +- ex_inquiry ex_inq_val; ++ char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* setup pointers based on set_type + NOTE: there is another block that sets more stuff later ... */ + ++ ex_inquiry ex_inq_val; + if (set_type == EX_NODE_SET) { + ex_inq_val = EX_INQ_NODE_SETS; + } +@@ -76,7 +73,7 @@ int ex_get_concat_sets(int exoid, ex_entity_type set_type, struct ex_set_specs * + + /* first check if any sets are specified */ + +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + if (status == NC_EBADDIM) { + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no %ss defined for file id %d", + ex_name_of_object(set_type), exoid); +@@ -91,7 +88,7 @@ int ex_get_concat_sets(int exoid, ex_entity_type set_type, struct ex_set_specs * + + /* inquire how many sets have been stored */ + +- num_sets = ex_inquire_int(exoid, ex_inq_val); ++ int num_sets = ex_inquire_int(exoid, ex_inq_val); + if (num_sets < 0) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of %ss defined for file id %d", + ex_name_of_object(set_type), exoid); +@@ -117,8 +114,8 @@ int ex_get_concat_sets(int exoid, ex_entity_type set_type, struct ex_set_specs * + ((int *)sets_dist_index)[0] = 0; + } + +- for (i = 0; i < num_sets; i++) { +- int set_id; ++ for (int i = 0; i < num_sets; i++) { ++ int64_t set_id; + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { + set_id = ((int64_t *)set_specs->sets_ids)[i]; + } +@@ -178,7 +175,7 @@ int ex_get_concat_sets(int exoid, ex_entity_type set_type, struct ex_set_specs * + int *sets_extra_list = set_specs->sets_extra_list; + int *sets_extra = sets_extra_list ? &(sets_extra_list)[((int *)sets_entry_index)[i]] : NULL; + status = ex_get_set(exoid, set_type, set_id, +- &(sets_entry_list[((int *)sets_entry_index)[i]]), sets_extra); ++ &(sets_entry_list[((int *)sets_entry_index)[i]]), sets_extra); + } + } + +@@ -187,7 +184,7 @@ int ex_get_concat_sets(int exoid, ex_entity_type set_type, struct ex_set_specs * + } + + /* get distribution factors for this set */ +- if (sets_dist_fact != 0) { ++ if (sets_dist_fact != NULL) { + size_t df_idx; + size_t num_dist; + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +@@ -199,13 +196,13 @@ int ex_get_concat_sets(int exoid, ex_entity_type set_type, struct ex_set_specs * + num_dist = ((int *)num_dist_per_set)[i]; + } + if (num_dist > 0) { /* only get df if they exist */ +- if (ex__comp_ws(exoid) == sizeof(float)) { +- flt_dist_fact = sets_dist_fact; +- status = ex_get_set_dist_fact(exoid, set_type, set_id, &(flt_dist_fact[df_idx])); ++ if (exi_comp_ws(exoid) == sizeof(float)) { ++ float *flt_dist_fact = sets_dist_fact; ++ status = ex_get_set_dist_fact(exoid, set_type, set_id, &(flt_dist_fact[df_idx])); + } + else { +- dbl_dist_fact = sets_dist_fact; +- status = ex_get_set_dist_fact(exoid, set_type, set_id, &(dbl_dist_fact[df_idx])); ++ double *dbl_dist_fact = sets_dist_fact; ++ status = ex_get_set_dist_fact(exoid, set_type, set_id, &(dbl_dist_fact[df_idx])); + } + if (status != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); /* error will be reported by subroutine */ +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_concat_side_set_node_count.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_concat_side_set_node_count.c +index 3588af9208..8e4d0b1217 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_concat_side_set_node_count.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_concat_side_set_node_count.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -24,36 +24,32 @@ + #include "exodusII.h" // for ex_err, EX_MSG, etc + #include "exodusII_int.h" // for elem_blk_parm, EX_FATAL, etc + +-/*! \endcond */ +- + /*! \undoc */ + int ex_get_concat_side_set_node_count(int exoid, int *side_set_node_cnt_list) + { + int ii, i, j, iss, ioff; + ex_entity_id side_set_id; +- int num_side_sets, num_elem_blks, ndim; +- int64_t tot_num_elem = 0, tot_num_ss_elem = 0, num_df = 0, side, elem; +- void_int * elem_blk_ids = NULL; +- void_int * side_set_ids = NULL; +- void_int * ss_elem_ndx = NULL; +- void_int * side_set_elem_list = NULL; +- void_int * side_set_side_list = NULL; ++ int64_t tot_num_ss_elem = 0, num_df = 0; ++ void_int *elem_blk_ids = NULL; ++ void_int *side_set_ids = NULL; ++ void_int *ss_elem_ndx = NULL; ++ void_int *side_set_elem_list = NULL; ++ void_int *side_set_side_list = NULL; + size_t elem_ctr; +- int int_size, ids_size; + int status; + +- struct ex__elem_blk_parm *elem_blk_parms = NULL; ++ struct exi_elem_blk_parm *elem_blk_parms = NULL; + + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* first check if any side sets are specified */ + /* inquire how many side sets have been stored */ +- num_side_sets = ex_inquire_int(exoid, EX_INQ_SIDE_SETS); ++ int num_side_sets = (int)ex_inquire_int(exoid, EX_INQ_SIDE_SETS); + if (num_side_sets < 0) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of side sets in file id %d", + exoid); +@@ -67,7 +63,7 @@ int ex_get_concat_side_set_node_count(int exoid, int *side_set_node_cnt_list) + EX_FUNC_LEAVE(EX_WARN); + } + +- num_elem_blks = ex_inquire_int(exoid, EX_INQ_ELEM_BLK); ++ int num_elem_blks = (int)ex_inquire_int(exoid, EX_INQ_ELEM_BLK); + if (num_elem_blks < 0) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of element blocks in file id %d", + exoid); +@@ -75,7 +71,7 @@ int ex_get_concat_side_set_node_count(int exoid, int *side_set_node_cnt_list) + EX_FUNC_LEAVE(EX_FATAL); + } + +- tot_num_elem = ex_inquire_int(exoid, EX_INQ_ELEM); ++ int64_t tot_num_elem = ex_inquire_int(exoid, EX_INQ_ELEM); + if (tot_num_elem < 0) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get total number of elements in file id %d", + exoid); +@@ -85,20 +81,18 @@ int ex_get_concat_side_set_node_count(int exoid, int *side_set_node_cnt_list) + + /* get the dimensionality of the coordinates; this is necessary to + distinguish between 2d TRIs and 3d TRIs */ +- ndim = ex_inquire_int(exoid, EX_INQ_DIM); ++ int ndim = (int)ex_inquire_int(exoid, EX_INQ_DIM); + if (ndim < 0) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get dimensionality in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); + EX_FUNC_LEAVE(EX_FATAL); + } + +- int_size = sizeof(int); +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +- int_size = sizeof(int64_t); +- } ++ bool ints_64 = ex_int64_status(exoid) & EX_BULK_INT64_API; ++ int int_size = ints_64 ? sizeof(int64_t) : sizeof(int); + + /* Allocate space for the element block ids */ +- ids_size = sizeof(int); ++ int ids_size = sizeof(int); + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { + ids_size = sizeof(int64_t); + } +@@ -117,7 +111,7 @@ int ex_get_concat_side_set_node_count(int exoid, int *side_set_node_cnt_list) + } + + /* Allocate space for the element block params */ +- if (!(elem_blk_parms = malloc(num_elem_blks * sizeof(struct ex__elem_blk_parm)))) { ++ if (!(elem_blk_parms = malloc(num_elem_blks * sizeof(struct exi_elem_blk_parm)))) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate space for element block params " + "for file id %d", +@@ -136,7 +130,7 @@ int ex_get_concat_side_set_node_count(int exoid, int *side_set_node_cnt_list) + id = ((int *)elem_blk_ids)[i]; + } + +- if (ex__get_block_param(exoid, id, ndim, &elem_blk_parms[i]) != EX_NOERR) { ++ if (exi_get_block_param(exoid, id, ndim, &elem_blk_parms[i]) != EX_NOERR) { + goto error_ret; + } + +@@ -239,7 +233,7 @@ int ex_get_concat_side_set_node_count(int exoid, int *side_set_node_cnt_list) + for (i = 0; i < tot_num_ss_elem; i++) { + elems[i] = i; /* init index array to current position */ + } +- ex__iqsort64(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); ++ exi_iqsort64(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); + } + else { + /* Sort side set element list into index array - non-destructive */ +@@ -247,14 +241,16 @@ int ex_get_concat_side_set_node_count(int exoid, int *side_set_node_cnt_list) + for (i = 0; i < tot_num_ss_elem; i++) { + elems[i] = i; /* init index array to current position */ + } +- ex__iqsort(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); ++ exi_iqsort(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); + } + + j = 0; /* The current element block... */ + for (ii = 0; ii < tot_num_ss_elem; ii++) { + + int64_t elem_ndx; +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { ++ int64_t elem; ++ int64_t side; ++ if (ints_64) { + elem_ndx = ((int64_t *)ss_elem_ndx)[ii]; + elem = ((int64_t *)side_set_elem_list)[elem_ndx]; + side = ((int64_t *)side_set_side_list)[elem_ndx] - 1; +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_conn.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_conn.c +index 16cccc1a99..ab046ee3d7 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_conn.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_conn.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -24,7 +24,7 @@ + * + */ + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__id_lkup, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_id_lkup, etc + + int ex_get_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, void_int *nodeconn, + void_int *edgeconn, void_int *faceconn) +@@ -53,7 +53,7 @@ int ex_get_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, void_in + const char *vfaceconn = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -67,7 +67,7 @@ int ex_get_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, void_in + + /* Locate index of element block id in VAR_ID_EL_BLK array */ + +- blk_id_ndx = ex__id_lkup(exoid, blk_type, blk_id); ++ blk_id_ndx = exi_id_lkup(exoid, blk_type, blk_id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + if (status != 0) { +@@ -89,19 +89,19 @@ int ex_get_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, void_in + switch (blk_type) { + case EX_EDGE_BLOCK: + dnumnodent = DIM_NUM_NOD_PER_ED(blk_id_ndx); +- dnumedgent = 0; +- dnumfacent = 0; ++ dnumedgent = NULL; ++ dnumfacent = NULL; + vnodeconn = VAR_EBCONN(blk_id_ndx); +- vedgeconn = 0; +- vfaceconn = 0; ++ vedgeconn = NULL; ++ vfaceconn = NULL; + break; + case EX_FACE_BLOCK: + dnumnodent = DIM_NUM_NOD_PER_FA(blk_id_ndx); +- dnumedgent = 0; +- dnumfacent = 0; ++ dnumedgent = NULL; ++ dnumfacent = NULL; + vnodeconn = VAR_FBCONN(blk_id_ndx); +- vedgeconn = 0; +- vfaceconn = 0; ++ vedgeconn = NULL; ++ vfaceconn = NULL; + break; + case EX_ELEM_BLOCK: + dnumnodent = DIM_NUM_NOD_PER_EL(blk_id_ndx); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_coord.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_coord.c +index a3a91f7f80..242d32fdcb 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_coord.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_coord.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_comp_ws, etc + + /*! + The function ex_get_coord() reads the nodal coordinates of the +@@ -75,17 +75,17 @@ int ex_get_coord(int exoid, void *x_coor, void *y_coor, void *z_coor) + int coordidx, coordidy, coordidz; + + int numnoddim, ndimdim; +- size_t num_nod, num_dim, start[2], count[2], i; ++ size_t num_nod, num_dim; + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire id's of previously defined dimensions */ + +- if (ex__get_dimension(exoid, DIM_NUM_DIM, "dimension count", &num_dim, &ndimdim, __func__) != ++ if (exi_get_dimension(exoid, DIM_NUM_DIM, "dimension count", &num_dim, &ndimdim, __func__) != + NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -111,17 +111,19 @@ int ex_get_coord(int exoid, void *x_coor, void *y_coor, void *z_coor) + EX_FUNC_LEAVE(EX_FATAL); + } + +- for (i = 0; i < num_dim; i++) { +- char *which = NULL; +- start[0] = i; +- start[1] = 0; ++ for (size_t i = 0; i < num_dim; i++) { ++ char *which = NULL; ++ size_t start[2]; ++ size_t count[2]; ++ start[0] = i; ++ start[1] = 0; + + count[0] = 1; + count[1] = num_nod; + + if (i == 0 && x_coor != NULL) { + which = "X"; +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, coordid, start, count, x_coor); + } + else { +@@ -130,7 +132,7 @@ int ex_get_coord(int exoid, void *x_coor, void *y_coor, void *z_coor) + } + else if (i == 1 && y_coor != NULL) { + which = "Y"; +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, coordid, start, count, y_coor); + } + else { +@@ -139,7 +141,7 @@ int ex_get_coord(int exoid, void *x_coor, void *y_coor, void *z_coor) + } + else if (i == 2 && z_coor != NULL) { + which = "Z"; +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, coordid, start, count, z_coor); + } + else { +@@ -188,7 +190,7 @@ int ex_get_coord(int exoid, void *x_coor, void *y_coor, void *z_coor) + } + + /* write out the coordinates */ +- for (i = 0; i < num_dim; i++) { ++ for (size_t i = 0; i < num_dim; i++) { + void *coor = NULL; + char *which = NULL; + +@@ -209,7 +211,7 @@ int ex_get_coord(int exoid, void *x_coor, void *y_coor, void *z_coor) + } + + if (coor != NULL && coordid != -1) { +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_var_float(exoid, coordid, coor); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_coord_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_coord_names.c +index cb74e47ef0..e80be3ecd7 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_coord_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_coord_names.c +@@ -51,7 +51,7 @@ int ex_get_coord_names(int exoid, char **coord_names) + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -79,7 +79,7 @@ int ex_get_coord_names(int exoid, char **coord_names) + } + + /* read the coordinate names */ +- status = ex__get_names(exoid, varid, num_dim, coord_names, EX_COORDINATE, __func__); ++ status = exi_get_names(exoid, varid, num_dim, coord_names, EX_COORDINATE, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_coordinate_frames.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_coordinate_frames.c +index 5a77da8002..5f06a1d24a 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_coordinate_frames.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_coordinate_frames.c +@@ -106,7 +106,7 @@ int ex_get_coordinate_frames(int exoid, int *nframes, void_int *cf_ids, void *pt + size_t count = 0; /* number vars to put in varput */ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -166,7 +166,7 @@ int ex_get_coordinate_frames(int exoid, int *nframes, void_int *cf_ids, void *pt + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_var_float(exoid, varids, pt_coordinates); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_eb_info_global.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_eb_info_global.c +index ef1d6d416d..326809e2bc 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_eb_info_global.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_eb_info_global.c +@@ -33,7 +33,7 @@ int ex_get_eb_info_global(int exoid, void_int *el_blk_ids, void_int *el_blk_cnts + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_elem_cmap.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_elem_cmap.c +index 6eee554414..023f172c36 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_elem_cmap.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_elem_cmap.c +@@ -42,7 +42,7 @@ int ex_get_elem_cmap(int exoid, ex_entity_id map_id, void_int *elem_ids, void_in + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -57,11 +57,11 @@ int ex_get_elem_cmap(int exoid, ex_entity_id map_id, void_int *elem_ids, void_in + + /* + * no need to check if the second index is -1 that is handled +- * in ne__id_lkup, where the dimension must be looked up anyways ++ * in nei_id_lkup, where the dimension must be looked up anyways + */ + + /* Get the index of the elemental comm map with the given ID */ +- if ((map_idx = ne__id_lkup(exoid, VAR_E_COMM_IDS, varidx, map_id)) < 0) { ++ if ((map_idx = nei_id_lkup(exoid, VAR_E_COMM_IDS, varidx, map_id)) < 0) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find elemental comm map with ID %" PRId64 " in file \ + ID %d", +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_elem_type.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_elem_type.c +index 435b4e3f84..ea02150e66 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_elem_type.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_elem_type.c +@@ -40,12 +40,12 @@ int ex_get_elem_type(int exoid, ex_entity_id elem_blk_id, char *elem_type) + /*****************************************************************************/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire id's of previously defined dimensions */ +- if ((el_blk_id_ndx = ex__id_lkup(exoid, EX_ELEM_BLOCK, elem_blk_id)) == -1) { ++ if ((el_blk_id_ndx = exi_id_lkup(exoid, EX_ELEM_BLOCK, elem_blk_id)) == -1) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find element block ID %" PRId64 " in file %d", elem_blk_id, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_entity_count_per_polyhedra.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_entity_count_per_polyhedra.c +index d8f01b3b40..a2b0e44b02 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_entity_count_per_polyhedra.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_entity_count_per_polyhedra.c +@@ -12,7 +12,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__id_lkup, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_id_lkup, etc + + /*! + * reads in the number of entities (nodes/faces) per polyhedra +@@ -30,11 +30,11 @@ int ex_get_entity_count_per_polyhedra(int exoid, ex_entity_type blk_type, ex_ent + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- blk_id_ndx = ex__id_lkup(exoid, blk_type, blk_id); ++ blk_id_ndx = exi_id_lkup(exoid, blk_type, blk_id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_field_metadata.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_field_metadata.c +new file mode 100644 +index 0000000000..e97b41c3ee +--- /dev/null ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_field_metadata.c +@@ -0,0 +1,572 @@ ++/* ++ * Copyright(C) 1999-2024 National Technology & Engineering Solutions ++ * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ++ * NTESS, the U.S. Government retains certain rights in this software. ++ * ++ * See packages/seacas/LICENSE for details ++ */ ++ ++#include "exodusII.h" // for ex_err, etc ++#include "exodusII_int.h" // for EX_FATAL, etc ++#include ++#include ++ ++static const char *exi_get_metadata_attribute(const char *name, const char *prefix, int pre_len) ++{ ++ /* ++ * Each field or basis attribute metadata attribute consists of 2 or more attributes. ++ * Return the string corresponding to {type} in an attribute of the form "Field@{name}@{type}" ++ * or "Basis@{name}@{type}" or "Quad@{name}@{type}". ++ */ ++ ++ if (strncmp(name, prefix, pre_len) == 0) { ++ /* Return the suffix (if any) following the last "@" */ ++ char *suffix = strrchr(name, '@'); ++ if (suffix != NULL) { ++ suffix++; ++ return suffix; ++ } ++ } ++ return NULL; ++} ++ ++static const char *exi_get_attribute_metadata_name(const char *attrib, int offset) ++{ ++ /* ++ * PRECONDITION: `attrib` is a basis or field metadata attribute of the form ++ * "Basis@{name}@{type}" or "Field@{name}@{type}" `offset` is the length ++ * of `Basis@` or `Field@` or `Quad@` ++ * ++ * Returns the `{name}` portion in `name` ++ */ ++ static char name[EX_MAX_NAME + 1]; ++ memset(name, '\0', EX_MAX_NAME + 1); ++ for (int i = 0; attrib[i + offset] != '@'; i++) { ++ name[i] = attrib[i + offset]; ++ } ++ return name; ++} ++ ++static int exi_get_attribute_count(int exoid, ex_entity_type obj_type, ex_entity_id id, int *varid) ++{ ++ int att_count = 0; ++ int status; ++ ++ if (obj_type == EX_GLOBAL) { ++ *varid = NC_GLOBAL; ++ ++ if ((status = nc_inq(exoid, NULL, NULL, &att_count, NULL)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get GLOBAL attribute count"); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ } ++ else { ++ *varid = exi_get_varid(exoid, obj_type, id); ++ if (*varid <= 0) { ++ /* Error message handled in exi_get_varid */ ++ return 0; ++ } ++ ++ if ((status = nc_inq_var(exoid, *varid, NULL, NULL, NULL, NULL, &att_count)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to get attribute count on %s with id %" PRId64, ++ ex_name_of_object(obj_type), id); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ } ++ return att_count; ++} ++ ++int ex_get_field_metadata_count(int exoid, ex_entity_type obj_type, ex_entity_id id) ++{ ++ EX_FUNC_ENTER(); ++ ++ int varid; ++ int att_count = exi_get_attribute_count(exoid, obj_type, id, &varid); ++ if (att_count < 0) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Negative attribute count (%d) on %s with id %" PRId64, ++ att_count, ex_name_of_object(obj_type), id); ++ ex_err_fn(exoid, __func__, errmsg, EX_INTERNAL); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ /* Get names of each attribute and see if it is a 'Field metadata' name */ ++ int count = 0; ++ for (int i = 0; i < att_count; i++) { ++ char name[EX_MAX_NAME + 1]; ++ int status; ++ if ((status = nc_inq_attname(exoid, varid, i, name)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to get attribute named %s on %s with id %" PRId64, name, ++ ex_name_of_object(obj_type), id); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ const char *type = exi_get_metadata_attribute(name, "Field@", 6); ++ if (type != NULL && strcmp("type", type) == 0) { ++ count++; ++ } ++ } ++ EX_FUNC_LEAVE(count); ++} ++ ++/*! Get the values for the specified attribute. */ ++int ex_get_field_metadata(int exoid, ex_field *field) ++{ ++ EX_FUNC_ENTER(); ++ ++ int varid; ++ int att_count = exi_get_attribute_count(exoid, field[0].entity_type, field[0].entity_id, &varid); ++ if (att_count < 0) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Negative attribute count (%d) on %s with id %" PRId64, ++ att_count, ex_name_of_object(field[0].entity_type), field[0].entity_id); ++ ex_err_fn(exoid, __func__, errmsg, EX_INTERNAL); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ /* Iterate through each Field metadata field and populate `field` */ ++ int count = 0; ++ for (int i = 0; i < att_count; i++) { ++ char attr_name[EX_MAX_NAME + 1]; ++ int status; ++ if ((status = nc_inq_attname(exoid, varid, i, attr_name)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to get attribute named %s on %s with id %" PRId64, attr_name, ++ ex_name_of_object(field[0].entity_type), field[0].entity_id); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ const char *fld_type = exi_get_metadata_attribute(attr_name, "Field@", 6); ++ if (fld_type != NULL) { ++ /* Get the field name. We know that the `name` is of the form "Field@{name}@{item}" */ ++ const char *fld_name = exi_get_attribute_metadata_name(attr_name, 6); ++ ++ /* If this is the first time we have seen this `fld_name`, then increment count and ++ * store the name */ ++ int found = -1; ++ int which = 0; ++ for (int ii = 0; ii < count; ii++) { ++ if (strcmp(field[ii].name, fld_name) == 0) { ++ found = ii; ++ which = ii; ++ break; ++ } ++ } ++ ++ if (found == -1) { ++ which = count; ++ strcpy(field[count].name, fld_name); ++ /* Set default separator type... */ ++ field[count].component_separator[0] = '_'; ++ field[count].component_separator[1] = '\0'; ++ ++ count++; ++ } ++ ++ nc_type type; /* integer, double, character, ... */ ++ size_t val_count; /* how many `type` values */ ++ if ((status = nc_inq_att(exoid, varid, attr_name, &type, &val_count)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to get parameters for attribute named %s on %s with id %" PRId64, ++ attr_name, ex_name_of_object(field[0].entity_type), field[0].entity_id); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (strcmp(fld_type, "type") == 0) { ++ status = nc_get_att_int(exoid, varid, attr_name, (int *)field[which].type); ++ if (field[which].nesting == 0) { ++ field[which].nesting = val_count; ++ } ++ } ++ else if (strcmp(fld_type, "separator") == 0) { ++ status = nc_get_att_text(exoid, varid, attr_name, field[which].component_separator); ++ } ++ else if (strcmp(fld_type, "cardinality") == 0) { ++ status = nc_get_att_int(exoid, varid, attr_name, field[which].cardinality); ++ if (field[which].nesting == 0) { ++ field[which].nesting = val_count; ++ } ++ } ++ else if (strcmp(fld_type, "type_name") == 0) { ++ status = nc_get_att_text(exoid, varid, attr_name, field[which].type_name); ++ } ++ else if (strcmp(fld_type, "suffices") == 0) { ++ status = nc_get_att_text(exoid, varid, attr_name, field[which].suffices); ++ } ++ else { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf( ++ errmsg, MAX_ERR_LENGTH, ++ "ERROR: Invalid field metadata attribute type %s on field %s on %s with id %" PRId64, ++ fld_type, fld_name, ex_name_of_object(field[0].entity_type), field[0].entity_id); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to read field metadata attribute type %s on field %s on %s with id " ++ "%" PRId64, ++ fld_type, fld_name, ex_name_of_object(field[0].entity_type), field[0].entity_id); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ } ++ } ++ EX_FUNC_LEAVE(EX_NOERR); ++} ++ ++int exi_get_metadata_count(int exoid, const char *which) ++{ ++ EX_FUNC_ENTER(); ++ ++ int varid; ++ int att_count = exi_get_attribute_count(exoid, EX_GLOBAL, 0, &varid); ++ if (att_count < 0) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Negative attribute count (%d)", att_count); ++ ex_err_fn(exoid, __func__, errmsg, EX_INTERNAL); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ /* Get names of each attribute and see if it is a `which` metadata name */ ++ size_t att_len = strlen(which); ++ int count = 0; ++ for (int i = 0; i < att_count; i++) { ++ char name[EX_MAX_NAME + 1]; ++ int status; ++ if ((status = nc_inq_attname(exoid, varid, i, name)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get attribute named %s", name); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ const char *type = exi_get_metadata_attribute(name, which, att_len); ++ if (type != NULL && strcmp("cardinality", type) == 0) { ++ count++; ++ } ++ } ++ EX_FUNC_LEAVE(count); ++} ++ ++int ex_get_basis_count(int exoid) { return exi_get_metadata_count(exoid, "Basis@"); } ++ ++int ex_get_quadrature_count(int exoid) { return exi_get_metadata_count(exoid, "Quad@"); } ++ ++int ex_get_basis(int exoid, ex_basis **pbasis, int *num_basis) ++{ ++ /* ++ * -- If this function is called and there is no basis metadata on the ++ * entity, it will return EX_NOTFOUND; ++ * ++ * -- If there are basis defined on the database, it will: ++ * - determine number of basis defined on database and return the count in `num_basis` ++ * - allocate `num_basis` copies of `ex_basis` ++ * - determine the cardinality of each basis and allocate the array members of each basis ++ * struct. ++ * - populate the array members for each basis. ++ * ++ * Upon return, the `pbasis` will contain `num_basis` structs fully populated. ++ */ ++ ++ // TODO: Should all array members of the struct be allocated and initialized to zero, or ++ // only the members that are actually defined on the database... ++ EX_FUNC_ENTER(); ++ ++ *num_basis = ex_get_basis_count(exoid); ++ if (*num_basis == 0) { ++ EX_FUNC_LEAVE(EX_NOTFOUND); ++ } ++ ++ int varid; ++ int att_count = exi_get_attribute_count(exoid, EX_GLOBAL, 0, &varid); ++ if (att_count < 0) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Negative attribute count (%d)", att_count); ++ ex_err_fn(exoid, __func__, errmsg, EX_INTERNAL); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (*pbasis == NULL) { ++ struct ex_basis *basis = (ex_basis *)calloc(*num_basis, sizeof(struct ex_basis)); ++ *pbasis = basis; ++ } ++ struct ex_basis *basis = *pbasis; ++ ++ // First, iterate through each attribute and get the basis name and cardinality ++ int count = 0; ++ for (int att = 0; att < att_count; att++) { ++ char attr_name[EX_MAX_NAME + 1]; ++ int status; ++ if ((status = nc_inq_attname(exoid, varid, att, attr_name)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get attribute named %s", attr_name); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (strncmp("Basis@", attr_name, 6) != 0) { ++ continue; ++ } ++ ++ const char *basis_type = exi_get_metadata_attribute(attr_name, "Basis@", 6); ++ if (basis_type != NULL && strcmp(basis_type, "cardinality") == 0) { ++ /* Get the basis name. We know that the `name` is of the form "Basis@{name}@{item}" */ ++ const char *basis_name = exi_get_attribute_metadata_name(attr_name, 6); ++ strcpy(basis[count].name, basis_name); ++ ++ int cardinality = 0; ++ status = nc_get_att_int(exoid, varid, attr_name, &cardinality); ++ basis[count].cardinality = cardinality; ++ count++; ++ if (count == *num_basis) { ++ break; ++ } ++ continue; ++ } ++ } ++ ++ if (count != *num_basis) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Internal error populating basis name and cardinality. Did not find correct " ++ "number of basis attributes."); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ ex_initialize_basis_struct(basis, *num_basis, 1); ++ ++ // Now iterate the attributes again and fully populate the basis struct(s) ++ for (int att = 0; att < att_count; att++) { ++ char attr_name[EX_MAX_NAME + 1]; ++ int status; ++ if ((status = nc_inq_attname(exoid, varid, att, attr_name)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get attribute named %s", attr_name); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (strncmp("Basis@", attr_name, 6) != 0) { ++ continue; ++ } ++ ++ const char *basis_type = exi_get_metadata_attribute(attr_name, "Basis@", 6); ++ if (basis_type != NULL) { ++ /* Get the basis name. We know that the `name` is of the form "Basis@{name}@{item}" */ ++ const char *basis_name = exi_get_attribute_metadata_name(attr_name, 6); ++ ++ // There is no guarantee that we will be getting names in the same order as above since ++ // attributes can be in any order. But, the name and cardinality for each basis will already ++ // be set, so we just need to find the correct one... ++ int which = -1; ++ for (int i = 0; i < *num_basis; i++) { ++ if (strcmp(basis[i].name, basis_name) == 0) { ++ which = i; ++ break; ++ } ++ } ++ ++ if (which == -1) { ++ // Internal error... ++ } ++ ++ if (strcmp(basis_type, "cardinality") == 0) { ++ // Cardinality already set; skip ++ } ++ else if (strcmp(basis_type, "subc_dim") == 0) { ++ status = nc_get_att_int(exoid, varid, attr_name, basis[which].subc_dim); ++ } ++ else if (status == NC_NOERR && strcmp(basis_type, "subc_ordinal") == 0) { ++ status = nc_get_att_int(exoid, varid, attr_name, basis[which].subc_ordinal); ++ } ++ else if (status == NC_NOERR && strcmp(basis_type, "subc_dof_ordinal") == 0) { ++ status = nc_get_att_int(exoid, varid, attr_name, basis[which].subc_dof_ordinal); ++ } ++ else if (status == NC_NOERR && strcmp(basis_type, "subc_num_dof") == 0) { ++ status = nc_get_att_int(exoid, varid, attr_name, basis[which].subc_num_dof); ++ } ++ else if (status == NC_NOERR && strcmp(basis_type, "xi") == 0) { ++ status = nc_get_att_double(exoid, varid, attr_name, basis[which].xi); ++ } ++ else if (status == NC_NOERR && strcmp(basis_type, "eta") == 0) { ++ status = nc_get_att_double(exoid, varid, attr_name, basis[which].eta); ++ } ++ else if (status == NC_NOERR && strcmp(basis_type, "zeta") == 0) { ++ status = nc_get_att_double(exoid, varid, attr_name, basis[which].zeta); ++ } ++ ++ if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to read Basis %s metadata", ++ basis[which].name); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ } ++ } ++ EX_FUNC_LEAVE(EX_NOERR); ++} ++ ++int ex_get_quadrature(int exoid, ex_quadrature **pquad, int *num_quad) ++{ ++ /* ++ * -- If this function is called and there is no quadrature metadata on the ++ * entity, it will return EX_NOTFOUND; ++ * ++ * -- If there are quadrature defined on the database, it will: ++ * - determine number of quadrature defined on database and return the count in `num_quad` ++ * - allocate `num_quad` copies of `ex_quad` ++ * - determine the cardinality of each quadrature and allocate the array members of each ++ * quadrature struct. ++ * - populate the array members for each quadrature. ++ * ++ * Upon return, the `pquad` will contain `num_basis` structs fully populated. ++ */ ++ ++ // TODO: Should all array members of the struct(xi, eta, zeta, ++ // weight) be allocated and initialized to zero, or only the ++ // members that are actually defined on the database... ++ EX_FUNC_ENTER(); ++ ++ *num_quad = ex_get_quadrature_count(exoid); ++ if (*num_quad == 0) { ++ EX_FUNC_LEAVE(EX_NOTFOUND); ++ } ++ ++ int varid; ++ int att_count = exi_get_attribute_count(exoid, EX_GLOBAL, 0, &varid); ++ if (att_count < 0) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Negative attribute count (%d)", att_count); ++ ex_err_fn(exoid, __func__, errmsg, EX_INTERNAL); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (*pquad == NULL) { ++ struct ex_quadrature *quad = (ex_quadrature *)calloc(*num_quad, sizeof(struct ex_quadrature)); ++ *pquad = quad; ++ } ++ struct ex_quadrature *quad = *pquad; ++ ++ // First, iterate through each attribute and get the quadrature name and cardinality ++ int count = 0; ++ for (int att = 0; att < att_count; att++) { ++ char attr_name[EX_MAX_NAME + 1]; ++ int status; ++ if ((status = nc_inq_attname(exoid, varid, att, attr_name)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get attribute named %s", attr_name); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (strncmp("Quad@", attr_name, 5) != 0) { ++ continue; ++ } ++ ++ const char *quadrature_type = exi_get_metadata_attribute(attr_name, "Quad@", 5); ++ if (quadrature_type != NULL && strcmp(quadrature_type, "cardinality") == 0) { ++ /* Get the quadrature name. We know that the `name` is of the form "Quad@{name}@{item}" */ ++ const char *quadrature_name = exi_get_attribute_metadata_name(attr_name, 5); ++ strcpy(quad[count].name, quadrature_name); ++ ++ int cardinality = 0; ++ status = nc_get_att_int(exoid, varid, attr_name, &cardinality); ++ quad[count].cardinality = cardinality; ++ count++; ++ if (count == *num_quad) { ++ break; ++ } ++ continue; ++ } ++ } ++ ++ if (count != *num_quad) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Internal error populating quadrature name and cardinality. Did not find " ++ "correct number of quadrature attributes."); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ ex_initialize_quadrature_struct(quad, *num_quad, 1); ++ ++ // Now iterate the attributes again and fully populate the quadrature struct(s) ++ for (int att = 0; att < att_count; att++) { ++ char attr_name[EX_MAX_NAME + 1]; ++ int status; ++ if ((status = nc_inq_attname(exoid, varid, att, attr_name)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get attribute named %s", attr_name); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (strncmp("Quad@", attr_name, 5) != 0) { ++ continue; ++ } ++ ++ const char *quadrature_type = exi_get_metadata_attribute(attr_name, "Quad@", 5); ++ if (quadrature_type != NULL) { ++ ++ /* Get the quadrature name. We know that the `name` is of the form "Quad@{name}@{item}" */ ++ const char *quadrature_name = exi_get_attribute_metadata_name(attr_name, 5); ++ ++ // There is no guarantee that we will be getting names in the same order as above since ++ // attributes can be in any order. But, the name and cardinality for each quadrature will ++ // already be set, so we just need to find the correct one... ++ int which = -1; ++ for (int i = 0; i < *num_quad; i++) { ++ if (strcmp(quad[i].name, quadrature_name) == 0) { ++ which = i; ++ break; ++ } ++ } ++ ++ if (which == -1) { ++ // Internal error... ++ } ++ ++ if (strcmp(quadrature_type, "cardinality") == 0) { ++ // Cardinality already set; skip ++ } ++ else if (strcmp(quadrature_type, "xi") == 0) { ++ status = nc_get_att_double(exoid, varid, attr_name, quad[which].xi); ++ } ++ else if (status == NC_NOERR && strcmp(quadrature_type, "eta") == 0) { ++ status = nc_get_att_double(exoid, varid, attr_name, quad[which].eta); ++ } ++ else if (status == NC_NOERR && strcmp(quadrature_type, "zeta") == 0) { ++ status = nc_get_att_double(exoid, varid, attr_name, quad[which].zeta); ++ } ++ else if (status == NC_NOERR && strcmp(quadrature_type, "weight") == 0) { ++ status = nc_get_att_double(exoid, varid, attr_name, quad[which].weight); ++ } ++ // NOTE: Do not put an else since will fall through if the ++ // arrays are NULL even though quadrature_type is valid. ++ ++ if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to read Quadrature %s metadata", ++ quad[which].name); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ } ++ } ++ EX_FUNC_LEAVE(EX_NOERR); ++} +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_glob_var_time_int.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_glob_var_time_int.c +index a116962d04..bd4bce3e87 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_glob_var_time_int.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_glob_var_time_int.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__comp_ws, EX_FATAL, etc ++#include "exodusII_int.h" // for exi_comp_ws, EX_FATAL, etc + + /*! + The function ex_get_glob_var_time() reads the values of a +@@ -71,7 +71,7 @@ error = ex_get_glob_var_time(exoid, var_index, beg_time, + + */ + +-int ex__get_glob_var_time(int exoid, int glob_var_index, int beg_time_step, int end_time_step, ++int exi_get_glob_var_time(int exoid, int glob_var_index, int beg_time_step, int end_time_step, + void *glob_var_vals) + { + int status; +@@ -80,7 +80,7 @@ int ex__get_glob_var_time(int exoid, int glob_var_index, int beg_time_step, int + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -136,7 +136,7 @@ int ex__get_glob_var_time(int exoid, int glob_var_index, int beg_time_step, int + EX_FUNC_LEAVE(EX_WARN); + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, varid, start, count, glob_var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_glob_vars_int.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_glob_vars_int.c +index 556db923b7..021a690040 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_glob_vars_int.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_glob_vars_int.c +@@ -24,13 +24,13 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__comp_ws, EX_FATAL, etc ++#include "exodusII_int.h" // for exi_comp_ws, EX_FATAL, etc + + /*! + Internal function. Do not use in client code. + */ + +-int ex__get_glob_vars(int exoid, int time_step, int num_glob_vars, void *glob_var_vals) ++int exi_get_glob_vars(int exoid, int time_step, int num_glob_vars, void *glob_var_vals) + { + int varid; + int status; +@@ -38,7 +38,7 @@ int ex__get_glob_vars(int exoid, int time_step, int num_glob_vars, void *glob_va + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -57,7 +57,7 @@ int ex__get_glob_vars(int exoid, int time_step, int num_glob_vars, void *glob_va + count[0] = 1; + count[1] = num_glob_vars; + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, varid, start, count, glob_var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_group_id.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_group_id.c +index d98c8ca401..d515edfdeb 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_group_id.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_group_id.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -23,12 +23,15 @@ int ex_get_group_id(int parent_id, const char *group_name, int *group_id) + char errmsg[MAX_ERR_LENGTH]; + #if NC_HAS_HDF5 + EX_FUNC_ENTER(); +- /* See if name contains "/" indicating it is a full path name... */ +- if (group_name == NULL) { ++ /* If the `group_name` is NULL, or is the single character '/', then ++ * return the root id. ++ */ ++ if (group_name == NULL || (group_name[0] == '/' && group_name[1] == '\0')) { + /* Return root */ + *group_id = (unsigned)parent_id & EX_FILE_ID_MASK; + } +- else if (strchr(group_name, '/') == NULL) { ++ /* If the name does not start with "/" then it is a relative name from current location... */ ++ else if (group_name[0] != '/') { + /* Local child */ + int status = nc_inq_grp_ncid(parent_id, group_name, group_id); + if (status != NC_NOERR) { +@@ -37,17 +40,20 @@ int ex_get_group_id(int parent_id, const char *group_name, int *group_id) + "group in file id %d", + group_name, parent_id); + ex_err_fn(parent_id, __func__, errmsg, status); ++ *group_id = 0; + EX_FUNC_LEAVE(EX_FATAL); + } + } + else { + /* Full path name */ +- int status = nc_inq_grp_full_ncid(parent_id, group_name, group_id); ++ int rootid = parent_id & EX_FILE_ID_MASK; ++ int status = nc_inq_grp_full_ncid(rootid, group_name, group_id); + if (status != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: Failed to locate group with full path name %s in file id %d", group_name, + parent_id); + ex_err_fn(parent_id, __func__, errmsg, status); ++ *group_id = 0; + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -61,6 +67,7 @@ int ex_get_group_id(int parent_id, const char *group_name, int *group_id) + "ERROR: Group capabilities are not available in this netcdf " + "version--not netcdf4"); + ex_err_fn(parent_id, __func__, errmsg, NC_ENOTNC4); ++ *group_id = 0; + EX_FUNC_LEAVE(EX_FATAL); + #endif + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_group_ids.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_group_ids.c +index 8cf88742eb..64ca846b29 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_group_ids.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_group_ids.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -10,7 +10,8 @@ + #include "exodusII_int.h" // for EX_FATAL, EX_NOERR + + /** +- * \ingroup Utilities Given a file or group 'parent' id, return the ++ * \ingroup Utilities ++ * Given a file or group 'parent' id, return the + * number of child groups and the ids of the child groups below the + * parent. If num_groups is NULL, do not return count; if group_ids + * is NULL, do not return ids. +@@ -23,7 +24,7 @@ int ex_get_group_ids(int parent_id, int *num_groups, int *group_ids) + int status; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(parent_id, __func__) != EX_NOERR) { ++ if (exi_check_valid_file_id(parent_id, __func__) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_id_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_id_map.c +index 169a18b4d5..21c2bd8de2 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_id_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_id_map.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -28,16 +28,14 @@ + + int ex_get_id_map(int exoid, ex_entity_type map_type, void_int *map) + { +- int dimid, mapid, status; +- size_t i; +- size_t num_entries; ++ int status; + char errmsg[MAX_ERR_LENGTH]; + const char *dnumentries; + const char *vmap; + const char *tname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -70,11 +68,14 @@ int ex_get_id_map(int exoid, ex_entity_type map_type, void_int *map) + } + + /* See if any entries are stored in this file */ ++ int dimid; + if (nc_inq_dimid(exoid, dnumentries, &dimid) != NC_NOERR) { + EX_FUNC_LEAVE(EX_NOERR); + } + ++ int mapid; + if (nc_inq_varid(exoid, vmap, &mapid) != NC_NOERR) { ++ size_t num_entries; + if ((status = nc_inq_dimlen(exoid, dimid, &num_entries)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of %ss in file id %d", tname, + exoid); +@@ -85,13 +86,13 @@ int ex_get_id_map(int exoid, ex_entity_type map_type, void_int *map) + /* generate default map of 1..n, where n is num_entries */ + if (ex_int64_status(exoid) & EX_MAPS_INT64_API) { + int64_t *lmap = (int64_t *)map; +- for (i = 0; i < num_entries; i++) { ++ for (size_t i = 0; i < num_entries; i++) { + lmap[i] = i + 1; + } + } + else { + int *lmap = (int *)map; +- for (i = 0; i < num_entries; i++) { ++ for (size_t i = 0; i < num_entries; i++) { + lmap[i] = i + 1; + } + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_ids.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_ids.c +index a9aa66f295..a828ec0c48 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_ids.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_ids.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -27,11 +27,9 @@ struct ncvar + + static int ex_get_nonstandard_ids(int exoid, ex_entity_type obj_type, void_int *ids) + { +- int status; +- char errmsg[MAX_ERR_LENGTH]; + + int64_t count = 0; +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (file) { + if (obj_type == EX_ASSEMBLY) { + count = file->assembly_count; +@@ -48,6 +46,11 @@ static int ex_get_nonstandard_ids(int exoid, ex_entity_type obj_type, void_int * + int num_found = 0; + struct ncvar var; + int nvars; ++ int rootid = exoid & EX_FILE_ID_MASK; ++ int root_var_count = 0; ++ if (rootid != exoid) { ++ nc_inq(rootid, NULL, &root_var_count, NULL, NULL); ++ } + nc_inq(exoid, NULL, &nvars, NULL, NULL); + char *type = NULL; + if (obj_type == EX_ASSEMBLY) { +@@ -57,9 +60,11 @@ static int ex_get_nonstandard_ids(int exoid, ex_entity_type obj_type, void_int * + type = "blob_entity"; + } + +- for (int varid = 0; varid < nvars; varid++) { ++ for (int varid = root_var_count; varid < nvars + root_var_count; varid++) { ++ int status; + if ((status = nc_inq_var(exoid, varid, var.name, &var.type, &var.ndims, var.dims, + &var.natts)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get variable parameters in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -81,6 +86,7 @@ static int ex_get_nonstandard_ids(int exoid, ex_entity_type obj_type, void_int * + break; + } + if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get %s ids in file id %d", + ex_name_of_object(obj_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -94,13 +100,13 @@ static int ex_get_nonstandard_ids(int exoid, ex_entity_type obj_type, void_int * + + int ex_get_ids(int exoid, ex_entity_type obj_type, void_int *ids) + { +- int varid, status; +- char errmsg[MAX_ERR_LENGTH]; ++ int varid = 0; ++ int status = 0; + +- const char *varidobj; ++ const char *varidobj = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -124,13 +130,17 @@ int ex_get_ids(int exoid, ex_entity_type obj_type, void_int *ids) + case EX_FACE_MAP: varidobj = VAR_FAM_PROP(1); break; + case EX_ELEM_MAP: varidobj = VAR_EM_PROP(1); break; + default: /* invalid variable type */ ++ { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Invalid type specified in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + EX_FUNC_LEAVE(EX_FATAL); + } ++ } + + /* Determine if there are any 'obj-type' objects */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(obj_type), &varid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(obj_type), &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no %s defined in file id %d", + ex_name_of_object(obj_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -139,6 +149,7 @@ int ex_get_ids(int exoid, ex_entity_type obj_type, void_int *ids) + + /* inquire id's of previously defined dimensions and variables */ + if ((status = nc_inq_varid(exoid, varidobj, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s ids variable in file id %d", + ex_name_of_object(obj_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -154,6 +165,7 @@ int ex_get_ids(int exoid, ex_entity_type obj_type, void_int *ids) + } + + if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to return %s ids in file id %d", + ex_name_of_object(obj_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_info.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_info.c +index 46387b3cbb..5c9d7e2d25 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_info.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_info.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__trim, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_trim, etc + + /*! + \ingroup Utilities +@@ -47,28 +47,27 @@ error = ex_get_info (exoid, info); + + int ex_get_info(int exoid, char **info) + { +- int status; +- size_t i; +- int dimid, varid; +- size_t num_info, start[2], count[2]; +- char errmsg[MAX_ERR_LENGTH]; +- +- int rootid = exoid & EX_FILE_ID_MASK; ++ int status; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire previously defined dimensions and variables */ ++ int rootid = exoid & EX_FILE_ID_MASK; ++ int dimid; + if ((status = nc_inq_dimid(rootid, DIM_NUM_INFO, &dimid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "Warning: failed to locate number of info records in file id %d", rootid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_WARN); + } + ++ size_t num_info; + if ((status = nc_inq_dimlen(rootid, dimid, &num_info)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of info records in file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -77,7 +76,9 @@ int ex_get_info(int exoid, char **info) + + /* do this only if there are any information records */ + if (num_info > 0) { ++ int varid; + if ((status = nc_inq_varid(rootid, VAR_INFO, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate info record data in file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -85,20 +86,19 @@ int ex_get_info(int exoid, char **info) + } + + /* read the information records */ +- for (i = 0; i < num_info; i++) { +- start[0] = i; +- count[0] = 1; +- start[1] = 0; +- count[1] = MAX_LINE_LENGTH + 1; ++ for (size_t i = 0; i < num_info; i++) { ++ size_t start[] = {i, 0}; ++ size_t count[] = {1, MAX_LINE_LENGTH + 1}; + + if ((status = nc_get_vara_text(rootid, varid, start, count, info[i])) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get info record data in file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + info[i][MAX_LINE_LENGTH] = '\0'; +- ex__trim(info[i]); ++ exi_trim(info[i]); + } + } + EX_FUNC_LEAVE(EX_NOERR); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_init.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_init.c +index caad631599..aa8dc5aa0a 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_init.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_init.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -34,7 +34,7 @@ + /*! + \ingroup ModelDescription + +-The function ex_get_init() reads the initializationinitialization ++The function ex_get_init() reads the initialization + parameters from an opened exodus file. + + \return In case of an error, ex_get_init() returns a negative number; +@@ -79,7 +79,7 @@ int ex_get_init(int exoid, char *title, void_int *num_dim, void_int *num_nodes, + int errval; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -112,12 +112,12 @@ int ex_get_init(int exoid, char *title, void_int *num_dim, void_int *num_nodes, + int *n_node_sets = num_node_sets; + int *n_side_sets = num_side_sets; + +- *n_dim = info.num_dim; +- *n_nodes = info.num_nodes; +- *n_elem = info.num_elem; +- *n_elem_blk = info.num_elem_blk; +- *n_node_sets = info.num_node_sets; +- *n_side_sets = info.num_side_sets; ++ *n_dim = (int)info.num_dim; ++ *n_nodes = (int)info.num_nodes; ++ *n_elem = (int)info.num_elem; ++ *n_elem_blk = (int)info.num_elem_blk; ++ *n_node_sets = (int)info.num_node_sets; ++ *n_side_sets = (int)info.num_side_sets; + } + ex_copy_string(title, info.title, MAX_LINE_LENGTH + 1); + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_ext.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_ext.c +index 91e6cb2315..2dcb5d7ed3 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_ext.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_ext.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022, 2024, 2025 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -24,14 +24,25 @@ + #include "exodusII.h" // for ex_init_params, etc + #include "exodusII_int.h" // for EX_FATAL, EX_NOERR, etc + +-static void ex__get_entity_count(int exoid, ex_init_params *info) ++static void exi_get_entity_count(int exoid, ex_init_params *info) + { +- int ndims; ++ int ndims = 0; ++#if NC_HAS_HDF5 ++ int include_parent_group = 0; // Only want dims in current group ++ nc_inq_dimids(exoid, &ndims, NULL, include_parent_group); ++ int *dimids = calloc(ndims, sizeof(int)); ++ nc_inq_dimids(exoid, &ndims, dimids, include_parent_group); ++#else + nc_inq(exoid, &ndims, NULL, NULL, NULL); ++#endif + for (int dimid = 0; dimid < ndims; dimid++) { +- char dim_nm[NC_MAX_NAME]; ++ char dim_nm[EX_MAX_NAME + 1] = {'\0'}; + size_t dim_sz; ++#if NC_HAS_HDF5 ++ nc_inq_dim(exoid, dimids[dimid], dim_nm, &dim_sz); ++#else + nc_inq_dim(exoid, dimid, dim_nm, &dim_sz); ++#endif + /* For assemblies, we check for a dim starting with "num_entity_assembly" */ + if (strncmp(dim_nm, "num_entity_assembly", 19) == 0) { + info->num_assembly++; +@@ -40,30 +51,32 @@ static void ex__get_entity_count(int exoid, ex_init_params *info) + info->num_blob++; + } + } ++#if NC_HAS_HDF5 ++ free(dimids); ++#endif + } + + /* Used to reduce repeated code below */ + static int ex_get_dim_value(int exoid, const char *name, const char *dimension_name, int dimension, + int64_t *value) + { +- char errmsg[MAX_ERR_LENGTH]; +- int status; +- +- if ((status = nc_inq_dimid(exoid, dimension_name, &dimension)) != NC_NOERR) { ++ if (nc_inq_dimid(exoid, dimension_name, &dimension) != NC_NOERR) { + /* optional and default to zero. */ + *value = 0; + } + else { + size_t tmp; ++ int status; + if ((status = nc_inq_dimlen(exoid, dimension, &tmp)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of %s in file id %d", name, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + *value = tmp; + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + /*! +@@ -76,16 +89,8 @@ static int ex_get_dim_value(int exoid, const char *name, const char *dimension_n + + int ex_get_init_ext(int exoid, ex_init_params *info) + { +- int dimid = 0; +- char errmsg[MAX_ERR_LENGTH]; +- int status = 0; +- size_t title_len = 0; +- nc_type title_type = 0; +- +- int rootid = exoid & EX_FILE_ID_MASK; +- + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -109,7 +114,7 @@ int ex_get_init_ext(int exoid, ex_init_params *info) + info->num_assembly = 0; + info->num_blob = 0; + +- dimid = 0; ++ int dimid = 0; + if (ex_get_dim_value(exoid, "dimension count", DIM_NUM_DIM, dimid, &info->num_dim) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -118,7 +123,7 @@ int ex_get_init_ext(int exoid, ex_init_params *info) + } + + /* Counts for assemblies and blobs */ +- ex__get_entity_count(exoid, info); ++ exi_get_entity_count(exoid, info); + + if (ex_get_dim_value(exoid, "edges", DIM_NUM_EDGE, dimid, &info->num_edge) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); +@@ -135,6 +140,7 @@ int ex_get_init_ext(int exoid, ex_init_params *info) + EX_FUNC_LEAVE(EX_FATAL); + } + if (info->num_elem_blk == 0 && info->num_elem > 0) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate number of element blocks in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +@@ -180,39 +186,41 @@ int ex_get_init_ext(int exoid, ex_init_params *info) + EX_FUNC_LEAVE(EX_FATAL); + } + +- if ((status = nc_inq_att(rootid, NC_GLOBAL, ATT_TITLE, &title_type, &title_len)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no title in file id %d", rootid); +- ex_err_fn(exoid, __func__, errmsg, status); +- } +- +- /* Check title length to avoid overrunning clients memory space; include +- * trailing null */ +- if (title_len > 0) { +- if (title_len > MAX_LINE_LENGTH) { +- char *title = malloc(title_len + 1); +- if ((status = nc_get_att_text(rootid, NC_GLOBAL, ATT_TITLE, title)) == NC_NOERR) { +- ex_copy_string(info->title, title, MAX_LINE_LENGTH + 1); +- info->title[MAX_LINE_LENGTH] = '\0'; ++ int rootid = exoid & EX_FILE_ID_MASK; ++ int status; ++ size_t title_len = 0; ++ nc_type title_type = 0; ++ if ((status = nc_inq_att(rootid, NC_GLOBAL, ATT_TITLE, &title_type, &title_len)) == NC_NOERR) { ++ /* Check title length to avoid overrunning clients memory space; include ++ * trailing null */ ++ if (title_len > 0) { ++ if (title_len > MAX_LINE_LENGTH) { ++ char *title = malloc(title_len + 1); ++ if ((status = nc_get_att_text(rootid, NC_GLOBAL, ATT_TITLE, title)) == NC_NOERR) { ++ ex_copy_string(info->title, title, MAX_LINE_LENGTH + 1); ++ info->title[MAX_LINE_LENGTH] = '\0'; ++ } ++ free(title); ++ } ++ else { ++ status = nc_get_att_text(rootid, NC_GLOBAL, ATT_TITLE, info->title); ++ info->title[title_len] = '\0'; ++ } ++ if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get title in file id %d", rootid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); + } +- free(title); +- } +- else { +- status = nc_get_att_text(rootid, NC_GLOBAL, ATT_TITLE, info->title); +- info->title[title_len] = '\0'; +- } +- if (status != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get title in file id %d", rootid); +- ex_err_fn(exoid, __func__, errmsg, status); +- EX_FUNC_LEAVE(EX_FATAL); + } + } + else { + info->title[0] = '\0'; + } + +- /* Update settings in ex__file_item struct */ ++ /* Update settings in exi_file_item struct */ + { +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (file) { + file->has_nodes = info->num_nodes > 0; + file->has_edges = info->num_edge > 0; +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_global.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_global.c +index 0d1714f2b6..67264487c8 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_global.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_global.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -36,8 +36,6 @@ + static int ex_get_dim_value(int exoid, const char *name, const char *dimension_name, int dimension, + size_t *value) + { +- char errmsg[MAX_ERR_LENGTH]; +- int status; + + if (nc_inq_dimid(exoid, dimension_name, &dimension) != NC_NOERR) { + /* optional and default to zero. */ +@@ -45,15 +43,17 @@ static int ex_get_dim_value(int exoid, const char *name, const char *dimension_n + } + else { + size_t tmp; ++ int status; + if ((status = nc_inq_dimlen(exoid, dimension, &tmp)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of %s in file id %d", name, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + *value = tmp; + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + /*! +@@ -64,36 +64,39 @@ int ex_get_init_global(int exoid, void_int *num_nodes_g, void_int *num_elems_g, + void_int *num_elem_blks_g, void_int *num_node_sets_g, + void_int *num_side_sets_g) + { +- int dimid; +- size_t nng, neg, nebg, nnsg, nssg; +- + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Check the file version information */ +- if ((dimid = ne__check_file_version(exoid)) != EX_NOERR) { ++ int dimid; ++ if ((dimid = nei_check_file_version(exoid)) != EX_NOERR) { + EX_FUNC_LEAVE(dimid); + } + ++ size_t nng; + if (ex_get_dim_value(exoid, "global nodes", DIM_NUM_NODES_GLOBAL, dimid, &nng) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++ size_t neg; + if (ex_get_dim_value(exoid, "global elements", DIM_NUM_ELEMS_GLOBAL, dimid, &neg) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++ size_t nebg; + if (ex_get_dim_value(exoid, "global element blocks", DIM_NUM_ELBLK_GLOBAL, dimid, &nebg) != + EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++ size_t nnsg; + if (ex_get_dim_value(exoid, "global node sets", DIM_NUM_NS_GLOBAL, dimid, &nnsg) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++ size_t nssg; + if (ex_get_dim_value(exoid, "global side sets", DIM_NUM_SS_GLOBAL, dimid, &nssg) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_info.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_info.c +index 78ca31afaf..ca69f4a433 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_info.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_init_info.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -39,7 +39,7 @@ int ex_get_init_info(int exoid, int *num_proc, int *num_proc_in_f, char *ftype) + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -48,14 +48,14 @@ int ex_get_init_info(int exoid, int *num_proc, int *num_proc_in_f, char *ftype) + *num_proc_in_f = 1; + + /* Get the file type */ +- if (ex__get_file_type(exoid, ftype) != EX_NOERR) { ++ if (exi_get_file_type(exoid, ftype) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get file type for file ID %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); + + EX_FUNC_LEAVE(EX_FATAL); + } + +- if ((status = nc_inq_dimid(exoid, DIM_NUM_PROCS, &dimid)) != NC_NOERR) { ++ if (nc_inq_dimid(exoid, DIM_NUM_PROCS, &dimid) != NC_NOERR) { + /* This isn't a parallel file. Just return now with no error, but with num_proc and + * num_proc_in_f set to 1 */ + EX_FUNC_LEAVE(EX_NOERR); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_loadbal_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_loadbal_param.c +index 3fd7dc5774..0795dc6ce6 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_loadbal_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_loadbal_param.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -48,7 +48,7 @@ int ex_get_loadbal_param(int exoid, void_int *num_int_nodes, void_int *num_bor_n + char errmsg[MAX_ERR_LENGTH]; + /*-----------------------------Execution begins-----------------------------*/ + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -72,12 +72,12 @@ int ex_get_loadbal_param(int exoid, void_int *num_int_nodes, void_int *num_bor_n + } + + /* Check the file version information */ +- if ((dimid = ne__check_file_version(exoid)) != EX_NOERR) { ++ if ((dimid = nei_check_file_version(exoid)) != EX_NOERR) { + EX_FUNC_LEAVE(dimid); + } + + /* Get the file type */ +- if (ex__get_file_type(exoid, ftype) != EX_NOERR) { ++ if (exi_get_file_type(exoid, ftype) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unable to find file type for file ID %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); + +@@ -479,7 +479,7 @@ int ex_get_loadbal_param(int exoid, void_int *num_int_nodes, void_int *num_bor_n + /* check if I need to get the dimension of the elemental comm map */ + if (varidx[1] == -1) { + /* Get the elemental comm map information */ +- if ((status = nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid)) != NC_NOERR) { ++ if (nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid) != NC_NOERR) { + varidx[1] = 0; + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_map.c +index 96ebafb6b8..151bcac061 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_map.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -43,40 +43,42 @@ error = ex_get_map(exoid, elem_map); + + int ex_get_map(int exoid, void_int *elem_map) + { +- int numelemdim, mapid, status; +- size_t num_elem, i; +- char errmsg[MAX_ERR_LENGTH]; ++ int status; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire id's of previously defined dimensions and variables */ + + /* See if file contains any elements...*/ +- if ((status = nc_inq_dimid(exoid, DIM_NUM_ELEM, &numelemdim)) != NC_NOERR) { ++ int numelemdim; ++ if (nc_inq_dimid(exoid, DIM_NUM_ELEM, &numelemdim) != NC_NOERR) { + EX_FUNC_LEAVE(EX_NOERR); + } + ++ size_t num_elem; + if ((status = nc_inq_dimlen(exoid, numelemdim, &num_elem)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of elements in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + ++ int mapid; + if (nc_inq_varid(exoid, VAR_MAP, &mapid) != NC_NOERR) { + /* generate default map of 1..n, where n is num_elem */ + if (ex_int64_status(exoid) & EX_MAPS_INT64_API) { + int64_t *lmap = (int64_t *)elem_map; +- for (i = 0; i < num_elem; i++) { ++ for (size_t i = 0; i < num_elem; i++) { + lmap[i] = i + 1; + } + } + else { + int *lmap = (int *)elem_map; +- for (i = 0; i < num_elem; i++) { ++ for (size_t i = 0; i < num_elem; i++) { + lmap[i] = i + 1; + } + } +@@ -93,6 +95,7 @@ int ex_get_map(int exoid, void_int *elem_map) + } + + if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get element order map in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_map_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_map_param.c +index 0b67ff5be5..1623b7eb94 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_map_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_map_param.c +@@ -36,7 +36,7 @@ int ex_get_map_param(int exoid, int *num_node_maps, int *num_elem_maps) + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_name.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_name.c +index fa259bbc45..33b7b141e4 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_name.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_name.c +@@ -32,16 +32,13 @@ + + int ex_get_name(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, char *name) + { +- int status; +- int varid, ent_ndx; +- char errmsg[MAX_ERR_LENGTH]; +- char *vobj = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++ char *vobj = NULL; + switch (obj_type) { + case EX_ASSEMBLY: { + ex_assembly assembly = {entity_id, name}; +@@ -59,18 +56,21 @@ int ex_get_name(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, char + case EX_EDGE_MAP: vobj = VAR_NAME_EDM; break; + case EX_FACE_MAP: vobj = VAR_NAME_FAM; break; + case EX_ELEM_MAP: vobj = VAR_NAME_EM; break; +- default: ++ default: { + /* invalid variable type */ ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Invalid type specified in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + EX_FUNC_LEAVE(EX_FATAL); + } ++ } + +- if ((status = nc_inq_varid(exoid, vobj, &varid)) == NC_NOERR) { ++ int varid; ++ if (nc_inq_varid(exoid, vobj, &varid) == NC_NOERR) { + /* If this is a null entity, then 'ent_ndx' will be negative. + * We don't care in this __func__, so make it positive and continue... + */ +- ent_ndx = ex__id_lkup(exoid, obj_type, entity_id); ++ int ent_ndx = exi_id_lkup(exoid, obj_type, entity_id); + if (ent_ndx < 0) { + ent_ndx = -ent_ndx; + } +@@ -81,7 +81,7 @@ int ex_get_name(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, char + int api_name_size = ex_inquire_int(exoid, EX_INQ_MAX_READ_NAME_LENGTH); + int name_size = db_name_size < api_name_size ? db_name_size : api_name_size; + +- status = ex__get_name(exoid, varid, ent_ndx - 1, name, name_size, obj_type, __func__); ++ int status = exi_get_name(exoid, varid, ent_ndx - 1, name, name_size, obj_type, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_names.c +index 5557338a9b..72e239f802 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_names.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2021 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -23,7 +23,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__get_dimension, EX_NOERR, etc ++#include "exodusII_int.h" // for exi_get_dimension, EX_NOERR, etc + + /* + * reads the entity names from the database +@@ -31,17 +31,14 @@ + + int ex_get_names(int exoid, ex_entity_type obj_type, char **names) + { +- int status; +- int varid, temp; +- size_t num_entity, i; +- char errmsg[MAX_ERR_LENGTH]; +- + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- /* inquire previously defined dimensions and variables */ ++ int status; ++ int varid, temp; ++ size_t num_entity; + + switch (obj_type) { + /* ======== ASSEMBLY ========= */ +@@ -53,7 +50,7 @@ int ex_get_names(int exoid, ex_entity_type obj_type, char **names) + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to inquire ASSEMBLY count in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, num_assembly); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { +@@ -78,67 +75,69 @@ int ex_get_names(int exoid, ex_entity_type obj_type, char **names) + } + /* ======== BLOCKS ========= */ + case EX_EDGE_BLOCK: +- ex__get_dimension(exoid, DIM_NUM_ED_BLK, "edge block", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_ED_BLK, "edge block", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_ED_BLK, &varid); + break; + case EX_FACE_BLOCK: +- ex__get_dimension(exoid, DIM_NUM_FA_BLK, "face block", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_FA_BLK, "face block", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_FA_BLK, &varid); + break; + case EX_ELEM_BLOCK: +- ex__get_dimension(exoid, DIM_NUM_EL_BLK, "element block", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_EL_BLK, "element block", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_EL_BLK, &varid); + break; + + /* ======== SETS ========= */ + case EX_NODE_SET: +- ex__get_dimension(exoid, DIM_NUM_NS, "nodeset", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_NS, "nodeset", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_NS, &varid); + break; + case EX_EDGE_SET: +- ex__get_dimension(exoid, DIM_NUM_ES, "edgeset", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_ES, "edgeset", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_ES, &varid); + break; + case EX_FACE_SET: +- ex__get_dimension(exoid, DIM_NUM_FS, "faceset", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_FS, "faceset", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_FS, &varid); + break; + case EX_SIDE_SET: +- ex__get_dimension(exoid, DIM_NUM_SS, "sideset", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_SS, "sideset", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_SS, &varid); + break; + case EX_ELEM_SET: +- ex__get_dimension(exoid, DIM_NUM_ELS, "elemset", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_ELS, "elemset", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_ELS, &varid); + break; + + /* ======== MAPS ========= */ + case EX_NODE_MAP: +- ex__get_dimension(exoid, DIM_NUM_NM, "node map", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_NM, "node map", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_NM, &varid); + break; + case EX_EDGE_MAP: +- ex__get_dimension(exoid, DIM_NUM_EDM, "edge map", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_EDM, "edge map", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_EDM, &varid); + break; + case EX_FACE_MAP: +- ex__get_dimension(exoid, DIM_NUM_FAM, "face map", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_FAM, "face map", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_FAM, &varid); + break; + case EX_ELEM_MAP: +- ex__get_dimension(exoid, DIM_NUM_EM, "element map", &num_entity, &temp, __func__); ++ exi_get_dimension(exoid, DIM_NUM_EM, "element map", &num_entity, &temp, __func__); + status = nc_inq_varid(exoid, VAR_NAME_EM, &varid); + break; + + /* invalid variable type */ +- default: ++ default: { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Invalid type specified in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + EX_FUNC_LEAVE(EX_FATAL); + } ++ } + + if (status == NC_NOERR) { +- if ((status = ex__get_names(exoid, varid, num_entity, names, obj_type, "ex_get_names")) != ++ if ((status = exi_get_names(exoid, varid, num_entity, names, obj_type, "ex_get_names")) != + EX_NOERR) { + EX_FUNC_LEAVE(status); + } +@@ -147,7 +146,7 @@ int ex_get_names(int exoid, ex_entity_type obj_type, char **names) + /* Names variable does not exist on the database; probably since this is an + * older version of the database. Return an empty array... + */ +- for (i = 0; i < num_entity; i++) { ++ for (size_t i = 0; i < num_entity; i++) { + names[i][0] = '\0'; + } + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_nodal_var_time_int.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_nodal_var_time_int.c +index 2749a7fa67..cd001d7aed 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_nodal_var_time_int.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_nodal_var_time_int.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_WARN, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_WARN, exi_comp_ws, etc + + /*! + The function ex_get_nodal_var_time() reads the values of a nodal +@@ -78,7 +78,7 @@ error = ex_get_var_time(exoid, EX_NODAL, var_index, node_num, beg_time, + ~~~ + */ + +-int ex__get_nodal_var_time(int exoid, int nodal_var_index, int64_t node_number, int beg_time_step, ++int exi_get_nodal_var_time(int exoid, int nodal_var_index, int64_t node_number, int beg_time_step, + int end_time_step, void *nodal_var_vals) + { + int status; +@@ -87,7 +87,7 @@ int ex__get_nodal_var_time(int exoid, int nodal_var_index, int64_t node_number, + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + /* Check that times are in range */ +@@ -170,7 +170,7 @@ int ex__get_nodal_var_time(int exoid, int nodal_var_index, int64_t node_number, + count[1] = 1; + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, varid, start, count, nodal_var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_node_cmap.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_node_cmap.c +index de65827e41..9a989dd337 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_node_cmap.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_node_cmap.c +@@ -38,7 +38,7 @@ int ex_get_node_cmap(int exoid, ex_entity_id map_id, void_int *node_ids, void_in + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -53,11 +53,11 @@ int ex_get_node_cmap(int exoid, ex_entity_id map_id, void_int *node_ids, void_in + + /* + * no need to check if the second index is -1 that is handled +- * in ne__id_lkup, where the dimension must be looked up anyways ++ * in nei_id_lkup, where the dimension must be looked up anyways + */ + + /* Get the index of the nodal comm map with the given ID */ +- if ((map_idx = ne__id_lkup(exoid, VAR_N_COMM_IDS, varidx, map_id)) < 0) { ++ if ((map_idx = nei_id_lkup(exoid, VAR_N_COMM_IDS, varidx, map_id)) < 0) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find nodal comm map with ID %" PRId64 " in file ID %d", map_id, + exoid); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_ns_param_global.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_ns_param_global.c +index cc9f54eb9c..2014ca5b21 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_ns_param_global.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_ns_param_global.c +@@ -35,7 +35,7 @@ int ex_get_ns_param_global(int exoid, void_int *global_ids, void_int *node_cnts, + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_num_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_num_map.c +index f7f7a493ae..0f81f29bcd 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_num_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_num_map.c +@@ -38,7 +38,7 @@ int ex_get_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, void + const char *dim_num_maps; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -79,7 +79,7 @@ int ex_get_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, void + } + + /* Lookup index of map id property array */ +- id_ndx = ex__id_lkup(exoid, map_type, map_id); ++ id_ndx = exi_id_lkup(exoid, map_type, map_id); + if (id_ndx <= 0) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate %s id %" PRId64 " in id variable in file id %d", +@@ -89,7 +89,7 @@ int ex_get_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, void + } + + /* inquire id's of previously defined dimensions and variables */ +- if ((status = nc_inq_varid(exoid, ex__name_of_map(map_type, id_ndx), &var_id)) != NC_NOERR) { ++ if ((status = nc_inq_varid(exoid, exi_name_of_map(map_type, id_ndx), &var_id)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s %" PRId64 " in file id %d", + ex_name_of_object(map_type), map_id, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_object_truth_vector.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_object_truth_vector.c +index 798396a7c4..34479d6089 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_object_truth_vector.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_object_truth_vector.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -15,7 +15,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__get_dimension, EX_FATAL, etc ++#include "exodusII_int.h" // for exi_get_dimension, EX_FATAL, etc + + /*! + * reads the EXODUS specified variable truth vector from the database +@@ -24,10 +24,9 @@ + int ex_get_object_truth_vector(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, + int num_var, int *var_vec) + { +- int statust; +- int varid, tabid, i, status, ent_ndx; ++ int statust, status; ++ int varid, tabid; + size_t num_var_db = 0; +- size_t start[2], count[2]; + char errmsg[MAX_ERR_LENGTH]; + + /* +@@ -39,70 +38,70 @@ int ex_get_object_truth_vector(int exoid, ex_entity_type obj_type, ex_entity_id + const char *var_name = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + switch (obj_type) { + case EX_EDGE_BLOCK: + status = +- ex__get_dimension(exoid, DIM_NUM_EDG_VAR, "edge variables", &num_var_db, &varid, __func__); ++ exi_get_dimension(exoid, DIM_NUM_EDG_VAR, "edge variables", &num_var_db, &varid, __func__); + statust = nc_inq_varid(exoid, VAR_EBLK_TAB, &tabid); + var_name = "vals_edge_var"; + ent_type = "eb"; + break; + case EX_FACE_BLOCK: + status = +- ex__get_dimension(exoid, DIM_NUM_FAC_VAR, "face variables", &num_var_db, &varid, __func__); ++ exi_get_dimension(exoid, DIM_NUM_FAC_VAR, "face variables", &num_var_db, &varid, __func__); + statust = nc_inq_varid(exoid, VAR_FBLK_TAB, &tabid); + var_name = "vals_face_var"; + ent_type = "fb"; + break; + case EX_ELEM_BLOCK: +- status = ex__get_dimension(exoid, DIM_NUM_ELE_VAR, "element variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_ELE_VAR, "element variables", &num_var_db, &varid, ++ __func__); + statust = nc_inq_varid(exoid, VAR_ELEM_TAB, &tabid); + var_name = "vals_elem_var"; + ent_type = "eb"; + break; + case EX_NODE_SET: +- status = ex__get_dimension(exoid, DIM_NUM_NSET_VAR, "nodeset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_NSET_VAR, "nodeset variables", &num_var_db, &varid, ++ __func__); + statust = nc_inq_varid(exoid, VAR_NSET_TAB, &tabid); + var_name = "vals_nset_var"; + ent_type = "ns"; + break; + case EX_EDGE_SET: +- status = ex__get_dimension(exoid, DIM_NUM_ESET_VAR, "edgeset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_ESET_VAR, "edgeset variables", &num_var_db, &varid, ++ __func__); + statust = nc_inq_varid(exoid, VAR_ESET_TAB, &tabid); + var_name = "vals_eset_var"; + ent_type = "es"; + break; + case EX_FACE_SET: +- status = ex__get_dimension(exoid, DIM_NUM_FSET_VAR, "faceset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_FSET_VAR, "faceset variables", &num_var_db, &varid, ++ __func__); + statust = nc_inq_varid(exoid, VAR_FSET_TAB, &tabid); + var_name = "vals_fset_var"; + ent_type = "fs"; + break; + case EX_SIDE_SET: +- status = ex__get_dimension(exoid, DIM_NUM_SSET_VAR, "sideset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_SSET_VAR, "sideset variables", &num_var_db, &varid, ++ __func__); + statust = nc_inq_varid(exoid, VAR_SSET_TAB, &tabid); + var_name = "vals_sset_var"; + ent_type = "ss"; + break; + case EX_ELEM_SET: +- status = ex__get_dimension(exoid, DIM_NUM_ELSET_VAR, "elemset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_ELSET_VAR, "elemset variables", &num_var_db, &varid, ++ __func__); + statust = nc_inq_varid(exoid, VAR_ELSET_TAB, &tabid); + var_name = "vals_elset_var"; + ent_type = "es"; + break; + case EX_BLOB: + status = +- ex__get_dimension(exoid, DIM_NUM_BLOB_VAR, "blob variables", &num_var_db, &varid, __func__); ++ exi_get_dimension(exoid, DIM_NUM_BLOB_VAR, "blob variables", &num_var_db, &varid, __func__); + statust = nc_inq_varid(exoid, VAR_BLOB_TAB, &tabid); + var_name = "vals_blob_var"; + ent_type = "blob"; +@@ -119,7 +118,7 @@ int ex_get_object_truth_vector(int exoid, ex_entity_type obj_type, ex_entity_id + } + + /* Determine index of entity_id in id array */ +- ent_ndx = ex__id_lkup(exoid, obj_type, entity_id); ++ int ent_ndx = exi_id_lkup(exoid, obj_type, entity_id); + if (ent_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + if (status != 0) { +@@ -149,9 +148,9 @@ int ex_get_object_truth_vector(int exoid, ex_entity_type obj_type, ex_entity_id + if (statust != NC_NOERR) { + /* since truth vector isn't stored in the data file, derive it dynamically + */ +- for (i = 0; i < num_var; i++) { ++ for (int i = 0; i < num_var; i++) { + /* NOTE: names are 1-based */ +- if (nc_inq_varid(exoid, ex__catstr2(var_name, i + 1, ent_type, ent_ndx), &tabid) != ++ if (nc_inq_varid(exoid, exi_catstr2(var_name, i + 1, ent_type, ent_ndx), &tabid) != + NC_NOERR) { + /* variable doesn't exist; put a 0 in the truth vector */ + var_vec[i] = 0; +@@ -166,6 +165,7 @@ int ex_get_object_truth_vector(int exoid, ex_entity_type obj_type, ex_entity_id + + /* read in the truth vector */ + ++ size_t start[2], count[2]; + start[0] = ent_ndx - 1; + start[1] = 0; + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_one_attr.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_one_attr.c +index 5a529f9b4e..081c1995e9 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_one_attr.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_one_attr.c +@@ -24,7 +24,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__get_dimension, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_get_dimension, etc + + /* + * reads the attributes for an edge, face, or element block +@@ -45,13 +45,13 @@ int ex_get_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int + const char *vattrbname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Determine index of obj_id in vobjids array */ + if (obj_type != EX_NODAL) { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -127,12 +127,12 @@ int ex_get_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int + } + + /* inquire id's of previously defined dimensions */ +- if (ex__get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != ++ if (exi_get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != + NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { ++ if (exi_get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -163,7 +163,7 @@ int ex_get_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int + stride[0] = 1; + stride[1] = num_attr; + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vars_float(exoid, attrid, start, count, stride, attrib); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_attr.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_attr.c +index 0956bfe695..b9d3def69f 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_attr.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_attr.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -28,7 +28,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__get_dimension, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_get_dimension, etc + + /*! + * reads the specified attribute for a subsect of a block +@@ -57,7 +57,7 @@ int ex_get_partial_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, + const char *vattrbname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -69,7 +69,7 @@ int ex_get_partial_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, + + /* Determine index of obj_id in vobjids array */ + if (obj_type != EX_NODAL) { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -145,12 +145,12 @@ int ex_get_partial_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, + } + + /* inquire id's of previously defined dimensions */ +- if (ex__get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != ++ if (exi_get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != + NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (start_num + num_ent - 1 > num_entries_this_obj) { ++ if (start_num + num_ent - 1 > (int64_t)num_entries_this_obj) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: start index (%" PRId64 ") + count (%" PRId64 + ") is larger than total number of entities (%zu) in file id %d", +@@ -159,7 +159,7 @@ int ex_get_partial_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { ++ if (exi_get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -181,7 +181,7 @@ int ex_get_partial_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, + start[0] = 0; + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, attrid, start, count, attrib); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_conn.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_conn.c +index d027216869..b90895aeb4 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_conn.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_conn.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -27,8 +27,9 @@ + * revision history - + * + */ ++ + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /* + * reads the connectivity array for an element block +@@ -61,7 +62,7 @@ int ex_get_partial_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, + const char *vfaceconn = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -78,7 +79,7 @@ int ex_get_partial_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, + + /* Locate index of element block id in VAR_ID_EL_BLK array */ + +- blk_id_ndx = ex__id_lkup(exoid, blk_type, blk_id); ++ blk_id_ndx = exi_id_lkup(exoid, blk_type, blk_id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -102,19 +103,19 @@ int ex_get_partial_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, + switch (blk_type) { + case EX_EDGE_BLOCK: + dnumnodent = DIM_NUM_NOD_PER_ED(blk_id_ndx); +- dnumedgent = 0; +- dnumfacent = 0; ++ dnumedgent = NULL; ++ dnumfacent = NULL; + vnodeconn = VAR_EBCONN(blk_id_ndx); +- vedgeconn = 0; +- vfaceconn = 0; ++ vedgeconn = NULL; ++ vfaceconn = NULL; + break; + case EX_FACE_BLOCK: + dnumnodent = DIM_NUM_NOD_PER_FA(blk_id_ndx); +- dnumedgent = 0; +- dnumfacent = 0; ++ dnumedgent = NULL; ++ dnumfacent = NULL; + vnodeconn = VAR_FBCONN(blk_id_ndx); +- vedgeconn = 0; +- vfaceconn = 0; ++ vedgeconn = NULL; ++ vfaceconn = NULL; + break; + case EX_ELEM_BLOCK: + dnumnodent = DIM_NUM_NOD_PER_EL(blk_id_ndx); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_coord.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_coord.c +index b940558c50..5eacd75a43 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_coord.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_coord.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -27,7 +27,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_comp_ws, etc + + /*! + * reads the coordinates of the nodes. +@@ -62,7 +62,7 @@ int ex_get_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, v + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -81,7 +81,7 @@ int ex_get_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, v + } + + --start_node_num; +- if (start_node_num + num_nodes > num_nod) { ++ if (start_node_num + num_nodes > (int64_t)num_nod) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: start index (%" PRId64 ") + node count (%" PRId64 + ") is larger than total number of nodes (%zu) in file id %d", +@@ -90,7 +90,7 @@ int ex_get_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, v + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__get_dimension(exoid, DIM_NUM_DIM, "dimension count", &num_dim, &ndimdim, __func__) != ++ if (exi_get_dimension(exoid, DIM_NUM_DIM, "dimension count", &num_dim, &ndimdim, __func__) != + NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -117,7 +117,7 @@ int ex_get_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, v + + if (i == 0 && x_coor != NULL) { + which = "X"; +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, coordid, start, count, x_coor); + } + else { +@@ -126,7 +126,7 @@ int ex_get_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, v + } + else if (i == 1 && y_coor != NULL) { + which = "Y"; +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, coordid, start, count, y_coor); + } + else { +@@ -135,7 +135,7 @@ int ex_get_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, v + } + else if (i == 2 && z_coor != NULL) { + which = "Z"; +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, coordid, start, count, z_coor); + } + else { +@@ -211,7 +211,7 @@ int ex_get_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, v + } + + if (coor != NULL && coordid != -1) { +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, coordid, start, count, coor); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_coord_component.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_coord_component.c +index f0a300b8b8..2ab09b0fbe 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_coord_component.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_coord_component.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_comp_ws, etc + + /*! + * reads the coordinates of some of the nodes in the model for the specified component +@@ -38,7 +38,7 @@ int ex_get_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + const char *which = "XYZ"; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -57,7 +57,7 @@ int ex_get_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + } + + --start_node_num; +- if (start_node_num + num_nodes > num_nod) { ++ if (start_node_num + num_nodes > (int64_t)num_nod) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: start index (%" PRId64 ") + node count (%" PRId64 + ") is larger than total number of nodes (%zu) in file id %d", +@@ -66,12 +66,12 @@ int ex_get_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__get_dimension(exoid, DIM_NUM_DIM, "dimensions", &num_dim, &ndimdim, __func__) != ++ if (exi_get_dimension(exoid, DIM_NUM_DIM, "dimensions", &num_dim, &ndimdim, __func__) != + NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (component > num_dim) { ++ if (component > (int64_t)num_dim) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: Component (%d) is larger than number of dimensions (%zu) in file id %d", + component, num_dim, exoid); +@@ -99,7 +99,7 @@ int ex_get_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + start[1] = 0; + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, coordid, start, count, coor); + } + else { +@@ -132,7 +132,7 @@ int ex_get_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, coordid, start, count, coor); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_id_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_id_map.c +index ead11147d9..5df3505091 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_id_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_id_map.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -29,20 +29,16 @@ + int ex_get_partial_id_map(int exoid, ex_entity_type map_type, int64_t start_entity_num, + int64_t num_entities, void_int *map) + { +- int dimid, mapid, status; +- int64_t i; +- size_t num_entries; +- size_t start[1], count[1]; +- char errmsg[MAX_ERR_LENGTH]; +- const char *dnumentries; +- const char *vmap; +- const char *tname; ++ char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++ const char *dnumentries; ++ const char *vmap; ++ const char *tname; + switch (map_type) { + case EX_NODE_MAP: + tname = "node"; +@@ -72,10 +68,13 @@ int ex_get_partial_id_map(int exoid, ex_entity_type map_type, int64_t start_enti + } + + /* See if any entries are stored in this file */ ++ int dimid; + if (nc_inq_dimid(exoid, dnumentries, &dimid) != NC_NOERR) { + EX_FUNC_LEAVE(EX_NOERR); + } + ++ size_t num_entries; ++ int status; + if ((status = nc_inq_dimlen(exoid, dimid, &num_entries)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of %ss in file id %d", tname, + exoid); +@@ -91,7 +90,7 @@ int ex_get_partial_id_map(int exoid, ex_entity_type map_type, int64_t start_enti + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (start_entity_num + num_entities - 1 > num_entries) { ++ if (start_entity_num + num_entities - 1 > (int64_t)num_entries) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: start index (%" PRId64 ") + entity count (%" PRId64 + ") is larger than total number of entities (%zu) in file id %d", +@@ -100,17 +99,18 @@ int ex_get_partial_id_map(int exoid, ex_entity_type map_type, int64_t start_enti + EX_FUNC_LEAVE(EX_FATAL); + } + ++ int mapid; + if (nc_inq_varid(exoid, vmap, &mapid) != NC_NOERR) { + /* generate portion of the default map (1..num_entries) */ + if (ex_int64_status(exoid) & EX_MAPS_INT64_API) { + int64_t *lmap = (int64_t *)map; +- for (i = 0; i < num_entities; i++) { ++ for (int64_t i = 0; i < num_entities; i++) { + lmap[i] = start_entity_num + i; + } + } + else { + int *lmap = (int *)map; +- for (i = 0; i < num_entities; i++) { ++ for (int64_t i = 0; i < num_entities; i++) { + lmap[i] = start_entity_num + i; + } + } +@@ -118,8 +118,8 @@ int ex_get_partial_id_map(int exoid, ex_entity_type map_type, int64_t start_enti + EX_FUNC_LEAVE(EX_NOERR); + } + +- start[0] = start_entity_num - 1; +- count[0] = num_entities; ++ size_t start[] = {start_entity_num - 1}; ++ size_t count[] = {num_entities}; + if (count[0] == 0) { + start[0] = 0; + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_nodal_var_int.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_nodal_var_int.c +index f04eb7bc36..1d982a1d40 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_nodal_var_int.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_nodal_var_int.c +@@ -28,7 +28,7 @@ + *****************************************************************************/ + + #include // for ex_err, etc +-#include // for EX_WARN, ex__comp_ws, etc ++#include // for EX_WARN, exi_comp_ws, etc + + /*! + \internal +@@ -37,7 +37,7 @@ + the reading of nodal variable values. + */ + +-int ex__get_partial_nodal_var(int exoid, int time_step, int nodal_var_index, int64_t start_node, ++int exi_get_partial_nodal_var(int exoid, int time_step, int nodal_var_index, int64_t start_node, + int64_t num_nodes, void *var_vals) + { + int varid; +@@ -46,7 +46,7 @@ int ex__get_partial_nodal_var(int exoid, int time_step, int nodal_var_index, int + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -87,7 +87,7 @@ int ex__get_partial_nodal_var(int exoid, int time_step, int nodal_var_index, int + } + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, varid, start, count, var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_num_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_num_map.c +index f548847600..5a6d864110 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_num_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_num_map.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -41,7 +41,7 @@ int ex_get_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + const char *dim_num_maps; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -81,7 +81,7 @@ int ex_get_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + } + + /* Check input parameters for a valid range of numbers */ +- if (ent_start <= 0 || ent_start > num_mobj) { ++ if (ent_start <= 0 || ent_start > (int64_t)num_mobj) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: start count is invalid in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + EX_FUNC_LEAVE(EX_FATAL); +@@ -93,7 +93,7 @@ int ex_get_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ent_start + ent_count - 1 > num_mobj) { ++ if (ent_start + ent_count - 1 > (int64_t)num_mobj) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: start+count-1 is larger than element count in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +@@ -109,7 +109,7 @@ int ex_get_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + } + + /* Lookup index of element map id property array */ +- id_ndx = ex__id_lkup(exoid, map_type, map_id); ++ id_ndx = exi_id_lkup(exoid, map_type, map_id); + if (id_ndx <= 0) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate %s id %" PRId64 " in id variable in file id %d", +@@ -119,7 +119,7 @@ int ex_get_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + } + + /* inquire id's of previously defined dimensions and variables */ +- if ((status = nc_inq_varid(exoid, ex__name_of_map(map_type, id_ndx), &var_id)) != NC_NOERR) { ++ if ((status = nc_inq_varid(exoid, exi_name_of_map(map_type, id_ndx), &var_id)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s %" PRId64 " in file id %d", + ex_name_of_object(map_type), map_id, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_one_attr.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_one_attr.c +index 1de3536505..5da909921d 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_one_attr.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_one_attr.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -28,7 +28,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__get_dimension, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_get_dimension, etc + + /*! + * reads the specified attribute for a subsect of a block +@@ -59,7 +59,7 @@ int ex_get_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj + const char *vattrbname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -71,7 +71,7 @@ int ex_get_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj + + /* Determine index of obj_id in vobjids array */ + if (obj_type != EX_NODAL) { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -147,12 +147,12 @@ int ex_get_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj + } + + /* inquire id's of previously defined dimensions */ +- if (ex__get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != ++ if (exi_get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != + NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (start_num + num_ent - 1 > num_entries_this_obj && num_ent > 0) { ++ if (start_num + num_ent - 1 > (int64_t)num_entries_this_obj && num_ent > 0) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: start index (%" PRId64 ") + count (%" PRId64 + ") is larger than total number of entities (%zu) in file id %d", +@@ -161,7 +161,7 @@ int ex_get_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { ++ if (exi_get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -195,7 +195,7 @@ int ex_get_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj + if (count[0] == 0) { + start[0] = 0; + } +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vars_float(exoid, attrid, start, count, stride, attrib); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_set.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_set.c +index 8bfd1f1395..ba9273f521 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_set.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_set.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__is_parallel, etc ++#include "exodusII_int.h" // for exi_is_parallel, etc + + /*! + * reads a portion of the set entry list and set extra list for a single set +@@ -29,16 +29,16 @@ int ex_get_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + int entry_list_id, extra_list_id, set_id_ndx; + size_t start[1], count[1]; + char errmsg[MAX_ERR_LENGTH]; +- char * entryptr = NULL; +- char * extraptr = NULL; ++ char *entryptr = NULL; ++ char *extraptr = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no %ss defined in file id %d", + ex_name_of_object(set_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -46,7 +46,7 @@ int ex_get_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + + /* Lookup index of set id in VAR_*S_IDS array */ +- set_id_ndx = ex__id_lkup(exoid, set_type, set_id); ++ set_id_ndx = exi_id_lkup(exoid, set_type, set_id); + if (set_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -98,7 +98,7 @@ int ex_get_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + + /* read the entry list and extra list arrays */ +- if (set_entry_list != NULL || ex__is_parallel(exoid)) { ++ if (set_entry_list != NULL || exi_is_parallel(exoid)) { + start[0] = offset - 1; + count[0] = num_to_get; + if (count[0] == 0) { +@@ -122,7 +122,7 @@ int ex_get_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + + /* only do for edge, face and side sets */ +- if (extraptr && (set_extra_list != NULL || ex__is_parallel(exoid))) { ++ if (extraptr && (set_extra_list != NULL || exi_is_parallel(exoid))) { + if ((status = nc_inq_varid(exoid, extraptr, &extra_list_id)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate extra list for %s %" PRId64 " in file id %d", +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_set_dist_fact.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_set_dist_fact.c +index b34661e9fa..f3f897e8cf 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_set_dist_fact.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_set_dist_fact.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /*! + * reads the distribution factors for a single set +@@ -21,15 +21,15 @@ int ex_get_partial_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_i + int status; + size_t start[1], count[1]; + char errmsg[MAX_ERR_LENGTH]; +- char * factptr = NULL; ++ char *factptr = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no %s sets stored in file id %d", + ex_name_of_object(set_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -37,7 +37,7 @@ int ex_get_partial_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_i + } + + /* Lookup index of set id in VAR_*S_IDS array */ +- set_id_ndx = ex__id_lkup(exoid, set_type, set_id); ++ set_id_ndx = exi_id_lkup(exoid, set_type, set_id); + if (set_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -99,7 +99,7 @@ int ex_get_partial_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_i + if (count[0] == 0) { + start[0] = 0; + } +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, dist_id, start, count, set_dist_fact); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_var.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_var.c +index 8c6f8445c6..bb12106cbd 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_var.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_partial_var.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /* + * reads the values of a single element variable for one element block at +@@ -52,21 +52,21 @@ int ex_get_partial_var(int exoid, int time_step, ex_entity_type var_type, int va + /* FIXME: Special case: ignore obj_id, possible large_file complications, + * etc. */ + status = +- ex__get_partial_nodal_var(exoid, time_step, var_index, start_index, num_entities, var_vals); ++ exi_get_partial_nodal_var(exoid, time_step, var_index, start_index, num_entities, var_vals); + EX_FUNC_LEAVE(status); + } + if (var_type == EX_GLOBAL) { + /* FIXME: Special case: all vars stored in 2-D single array. */ +- status = ex__get_glob_vars(exoid, time_step, num_entities, var_vals); ++ status = exi_get_glob_vars(exoid, time_step, num_entities, var_vals); + EX_FUNC_LEAVE(status); + } + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Determine index of obj_id in VAR_ID_EL_BLK array */ +- obj_id_ndx = ex__id_lkup(exoid, var_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, var_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -88,7 +88,7 @@ int ex_get_partial_var(int exoid, int time_step, ex_entity_type var_type, int va + + /* inquire previously defined variable */ + +- if ((status = nc_inq_varid(exoid, ex__name_var_of_object(var_type, var_index, obj_id_ndx), ++ if ((status = nc_inq_varid(exoid, exi_name_var_of_object(var_type, var_index, obj_id_ndx), + &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s %" PRId64 " var %d in file id %d", + ex_name_of_object(var_type), obj_id, var_index, exoid); +@@ -106,7 +106,7 @@ int ex_get_partial_var(int exoid, int time_step, ex_entity_type var_type, int va + start[1] = 0; + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, varid, start, count, var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_processor_elem_maps.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_processor_elem_maps.c +index 8c5020f8f5..374fcaef11 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_processor_elem_maps.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_processor_elem_maps.c +@@ -37,12 +37,12 @@ int ex_get_processor_elem_maps(int exoid, void_int *elem_mapi, void_int *elem_ma + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Get the file type */ +- if (ex__get_file_type(exoid, ftype) != EX_NOERR) { ++ if (exi_get_file_type(exoid, ftype) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unable to find file type for file ID %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_processor_node_maps.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_processor_node_maps.c +index 93262df6e1..a79954cc7c 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_processor_node_maps.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_processor_node_maps.c +@@ -42,12 +42,12 @@ int ex_get_processor_node_maps(int exoid, void_int *node_mapi, void_int *node_ma + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Get the file type */ +- if (ex__get_file_type(exoid, ftype) != EX_NOERR) { ++ if (exi_get_file_type(exoid, ftype) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unable to find file type for file ID %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); + EX_FUNC_LEAVE(EX_FATAL); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop.c +index 0657539fbc..a90903d4f0 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop.c +@@ -59,13 +59,13 @@ int ex_get_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const c + int num_props, i, propid; + int found = false; + size_t start[1]; +- char * name; ++ char *name; + char tmpstr[MAX_STR_LENGTH + 1]; + + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -123,9 +123,9 @@ int ex_get_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const c + } + + /* find index into property array using obj_id; read value from property */ +- /* array at proper index; ex__id_lkup returns an index that is 1-based, */ ++ /* array at proper index; exi_id_lkup returns an index that is 1-based, */ + /* but netcdf expects 0-based arrays so subtract 1 */ +- status = ex__id_lkup(exoid, obj_type, obj_id); ++ status = exi_id_lkup(exoid, obj_type, obj_id); + if (status > 0) { + start[0] = status - 1; + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop_array.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop_array.c +index 3b943aa3fe..a39f0758e2 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop_array.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop_array.c +@@ -94,7 +94,7 @@ int ex_get_prop_array(int exoid, ex_entity_type obj_type, const char *prop_name, + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop_names.c +index ba465a4ea8..2476d5c461 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_prop_names.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -77,25 +77,17 @@ for (i=0; i < num_props; i++) { + + int ex_get_prop_names(int exoid, ex_entity_type obj_type, char **prop_names) + { +- int status; +- int i, num_props, propid; +- char * var_name; +- size_t att_len; +- nc_type att_type; +- int api_name_size = ex_inquire_int(exoid, EX_INQ_MAX_READ_NAME_LENGTH); +- +- char errmsg[MAX_ERR_LENGTH]; +- + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* determine which type of object property names are desired for */ ++ char errmsg[MAX_ERR_LENGTH]; ++ int num_props = ex_get_num_props(exoid, obj_type); + +- num_props = ex_get_num_props(exoid, obj_type); +- +- for (i = 0; i < num_props; i++) { ++ char *var_name; ++ for (int i = 0; i < num_props; i++) { + switch (obj_type) { + case EX_ELEM_BLOCK: var_name = VAR_EB_PROP(i + 1); break; + case EX_FACE_BLOCK: var_name = VAR_FA_PROP(i + 1); break; +@@ -116,6 +108,8 @@ int ex_get_prop_names(int exoid, ex_entity_type obj_type, char **prop_names) + EX_FUNC_LEAVE(EX_FATAL); + } + ++ int status; ++ int propid; + if ((status = nc_inq_varid(exoid, var_name, &propid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate property array %s in file id %d", + var_name, exoid); +@@ -125,6 +119,8 @@ int ex_get_prop_names(int exoid, ex_entity_type obj_type, char **prop_names) + + /* for each property, read the "name" attribute of property array variable + */ ++ size_t att_len; ++ nc_type att_type; + if ((status = nc_inq_att(exoid, propid, ATT_PROP_NAME, &att_type, &att_len)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get property attributes (type, len) in file id %d", exoid); +@@ -132,6 +128,7 @@ int ex_get_prop_names(int exoid, ex_entity_type obj_type, char **prop_names) + EX_FUNC_LEAVE(EX_FATAL); + } + ++ size_t api_name_size = ex_inquire_int(exoid, EX_INQ_MAX_READ_NAME_LENGTH); + if (att_len - 1 <= api_name_size) { + /* Client has large enough char string to hold text... */ + if ((status = nc_get_att_text(exoid, propid, ATT_PROP_NAME, prop_names[i])) != NC_NOERR) { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_qa.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_qa.c +index 2399540943..47d6123153 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_qa.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_qa.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__trim, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_trim, etc + + /*! + \ingroup Utilities +@@ -55,28 +55,25 @@ error = ex_get_qa (exoid, qa_record); + + int ex_get_qa(int exoid, char *qa_record[][4]) + { +- int status; +- int dimid, varid; +- size_t i, j; +- size_t num_qa_records, start[3], count[3]; +- +- char errmsg[MAX_ERR_LENGTH]; +- +- int rootid = exoid & EX_FILE_ID_MASK; +- + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire previously defined dimensions and variables */ ++ int status; ++ int rootid = exoid & EX_FILE_ID_MASK; ++ int dimid; + if ((status = nc_inq_dimid(rootid, DIM_NUM_QA, &dimid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no qa records stored in file id %d", rootid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_WARN); + } + ++ size_t num_qa_records; + if ((status = nc_inq_dimlen(rootid, dimid, &num_qa_records)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of qa records in file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -85,7 +82,9 @@ int ex_get_qa(int exoid, char *qa_record[][4]) + + /* do this only if there are any QA records */ + if (num_qa_records > 0) { ++ int varid; + if ((status = nc_inq_varid(rootid, VAR_QA_TITLE, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate qa record data in file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -93,22 +92,19 @@ int ex_get_qa(int exoid, char *qa_record[][4]) + } + + /* read the QA records */ +- for (i = 0; i < num_qa_records; i++) { +- for (j = 0; j < 4; j++) { +- start[0] = i; +- count[0] = 1; +- start[1] = j; +- count[1] = 1; +- start[2] = 0; +- count[2] = MAX_STR_LENGTH + 1; ++ for (size_t i = 0; i < num_qa_records; i++) { ++ for (size_t j = 0; j < 4; j++) { ++ size_t start[] = {i, j, 0}; ++ size_t count[] = {1, 1, MAX_STR_LENGTH + 1}; + if ((status = nc_get_vara_text(rootid, varid, start, count, qa_record[i][j])) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get qa record data in file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + qa_record[i][j][MAX_STR_LENGTH] = '\0'; +- ex__trim(qa_record[i][j]); ++ exi_trim(qa_record[i][j]); + } + } + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_name.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_name.c +index 7b1a1b35f3..4baf5a5a04 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_name.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_name.c +@@ -23,7 +23,7 @@ int ex_get_reduction_variable_name(int exoid, ex_entity_type obj_type, int var_n + const char *vname = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -61,7 +61,7 @@ int ex_get_reduction_variable_name(int exoid, ex_entity_type obj_type, int var_n + int api_name_size = ex_inquire_int(exoid, EX_INQ_MAX_READ_NAME_LENGTH); + int name_size = db_name_size < api_name_size ? db_name_size : api_name_size; + +- status = ex__get_name(exoid, varid, var_num - 1, var_name, name_size, obj_type, __func__); ++ status = exi_get_name(exoid, varid, var_num - 1, var_name, name_size, obj_type, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_names.c +index b2865e9c8d..bd8d9371e5 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_names.c +@@ -71,7 +71,7 @@ int ex_get_reduction_variable_names(int exoid, ex_entity_type obj_type, int num_ + const char *vvarname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -103,7 +103,7 @@ int ex_get_reduction_variable_names(int exoid, ex_entity_type obj_type, int num_ + } + + /* read the variable names */ +- status = ex__get_names(exoid, varid, num_vars, var_names, obj_type, __func__); ++ status = exi_get_names(exoid, varid, num_vars, var_names, obj_type, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_param.c +index 4207cb8d4f..2542443dea 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_variable_param.c +@@ -62,7 +62,7 @@ int ex_get_reduction_variable_param(int exoid, ex_entity_type obj_type, int *num + int status; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_vars.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_vars.c +index 792cd3f6b3..1fd54f766c 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_vars.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_reduction_vars.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /*! + \ingroup ResultsData +@@ -72,18 +72,18 @@ int ex_get_reduction_vars(int exoid, int time_step, ex_entity_type var_type, ex_ + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + if (var_type == EX_GLOBAL) { + /* FIXME: Special case: all vars stored in 2-D single array. */ +- status = ex__get_glob_vars(exoid, time_step, num_variables, var_vals); ++ status = exi_get_glob_vars(exoid, time_step, num_variables, var_vals); + EX_FUNC_LEAVE(status); + } + + /* Determine index of obj_id in VAR_ID_XXX array */ +- obj_id_ndx = ex__id_lkup(exoid, var_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, var_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -96,7 +96,7 @@ int ex_get_reduction_vars(int exoid, int time_step, ex_entity_type var_type, ex_ + } + + /* inquire previously defined variable */ +- if ((status = nc_inq_varid(exoid, ex__name_red_var_of_object(var_type, obj_id_ndx), &varid)) != ++ if ((status = nc_inq_varid(exoid, exi_name_red_var_of_object(var_type, obj_id_ndx), &varid)) != + NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "Warning: no reduction variables for %s %" PRId64 " in file id %d", +@@ -112,7 +112,7 @@ int ex_get_reduction_vars(int exoid, int time_step, ex_entity_type var_type, ex_ + count[0] = 1; + count[1] = num_variables; + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, varid, start, count, var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_set.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_set.c +index e24174929e..a82f3bfcfa 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_set.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_set.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /*! + * reads the set entry list and set extra list for a single set +@@ -31,12 +31,12 @@ int ex_get_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, void_int + char *extraptr = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no %ss stored in file id %d", + ex_name_of_object(set_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -44,7 +44,7 @@ int ex_get_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, void_int + } + + /* Lookup index of set id in VAR_*S_IDS array */ +- set_id_ndx = ex__id_lkup(exoid, set_type, set_id); ++ set_id_ndx = exi_id_lkup(exoid, set_type, set_id); + if (set_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_set_dist_fact.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_set_dist_fact.c +index 8769b9a78a..8d45635c67 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_set_dist_fact.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_set_dist_fact.c +@@ -40,12 +40,12 @@ int ex_get_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_id set_id + char *factptr = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no %s sets stored in file id %d", + ex_name_of_object(set_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -53,7 +53,7 @@ int ex_get_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_id set_id + } + + /* Lookup index of set id in VAR_*S_IDS array */ +- set_id_ndx = ex__id_lkup(exoid, set_type, set_id); ++ set_id_ndx = exi_id_lkup(exoid, set_type, set_id); + if (set_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -110,7 +110,7 @@ int ex_get_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_id set_id + } + + /* read in the distribution factors array */ +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_var_float(exoid, dist_id, set_dist_fact); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_set_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_set_param.c +index ac3f804717..5e0b448523 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_set_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_set_param.c +@@ -41,11 +41,11 @@ int ex_get_set_param(int exoid, ex_entity_type set_type, ex_entity_id set_id, + size_t lnum_entry_in_set; + size_t lnum_dist_fact_in_set; + char errmsg[MAX_ERR_LENGTH]; +- char * numentryptr = NULL; +- char * numdfptr = NULL; ++ char *numentryptr = NULL; ++ char *numdfptr = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -66,7 +66,7 @@ int ex_get_set_param(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + } + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no %ss stored in file id %d", + ex_name_of_object(set_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -74,7 +74,7 @@ int ex_get_set_param(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + + /* Lookup index of set id in VAR_*S_IDS array */ +- set_id_ndx = ex__id_lkup(exoid, set_type, set_id); ++ set_id_ndx = exi_id_lkup(exoid, set_type, set_id); + if (set_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -114,7 +114,7 @@ int ex_get_set_param(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + + /* inquire values of dimension for number of entities in set */ +- if (ex__get_dimension(exoid, numentryptr, "entries", &lnum_entry_in_set, &dimid, __func__) != ++ if (exi_get_dimension(exoid, numentryptr, "entries", &lnum_entry_in_set, &dimid, __func__) != + NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_sets.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_sets.c +index ed51449e26..99e9cca6b6 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_sets.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_sets.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_set, EX_FATAL, EX_NOERR, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id ++#include "exodusII_int.h" // for exi_check_valid_file_id + + int ex_get_sets(int exoid, size_t set_count, struct ex_set *sets) + { +@@ -16,7 +16,7 @@ int ex_get_sets(int exoid, size_t set_count, struct ex_set *sets) + int stat; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_count.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_count.c +index f78cb8a571..cf4f331441 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_count.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_count.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -27,7 +27,6 @@ + int ex_get_side_set_node_count(int exoid, ex_entity_id side_set_id, int *side_set_node_cnt_list) + { + int status; +- size_t ii, i, j; + int num_side_sets, num_elem_blks, ndim; + size_t tot_num_ss_elem = 0; + int64_t side, elem; +@@ -37,13 +36,13 @@ int ex_get_side_set_node_count(int exoid, ex_entity_id side_set_id, int *side_se + void_int *side_set_side_list = NULL; + size_t elem_ctr; + +- struct ex__elem_blk_parm *elem_blk_parms = NULL; ++ struct exi_elem_blk_parm *elem_blk_parms = NULL; + + char errmsg[MAX_ERR_LENGTH]; + int err_stat = EX_NOERR; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -64,7 +63,7 @@ int ex_get_side_set_node_count(int exoid, ex_entity_id side_set_id, int *side_se + } + + /* Lookup index of side set id in VAR_SS_IDS array */ +- if (ex__id_lkup(exoid, EX_SIDE_SET, side_set_id) <= 0) { ++ if (exi_id_lkup(exoid, EX_SIDE_SET, side_set_id) <= 0) { + ; + } + ex_get_err(NULL, NULL, &status); +@@ -101,10 +100,8 @@ int ex_get_side_set_node_count(int exoid, ex_entity_id side_set_id, int *side_se + EX_FUNC_LEAVE(EX_FATAL); + } + +- int int_size = sizeof(int); +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +- int_size = sizeof(int64_t); +- } ++ bool ints_64 = ex_int64_status(exoid) & EX_BULK_INT64_API; ++ int int_size = ints_64 ? sizeof(int64_t) : sizeof(int); + + /* First determine the # of elements in the side set*/ + int err; +@@ -173,18 +170,18 @@ int ex_get_side_set_node_count(int exoid, ex_entity_id side_set_id, int *side_se + if (int_size == sizeof(int64_t)) { + /* Sort side set element list into index array - non-destructive */ + int64_t *elems = (int64_t *)ss_elem_ndx; +- for (i = 0; i < tot_num_ss_elem; i++) { ++ for (size_t i = 0; i < tot_num_ss_elem; i++) { + elems[i] = i; /* init index array to current position */ + } +- ex__iqsort64(side_set_elem_list, elems, tot_num_ss_elem); ++ exi_iqsort64(side_set_elem_list, elems, tot_num_ss_elem); + } + else { + /* Sort side set element list into index array - non-destructive */ + int *elems = (int *)ss_elem_ndx; +- for (i = 0; i < tot_num_ss_elem; i++) { ++ for (size_t i = 0; i < tot_num_ss_elem; i++) { + elems[i] = i; /* init index array to current position */ + } +- ex__iqsort(side_set_elem_list, elems, tot_num_ss_elem); ++ exi_iqsort(side_set_elem_list, elems, tot_num_ss_elem); + } + } + +@@ -215,7 +212,7 @@ int ex_get_side_set_node_count(int exoid, ex_entity_id side_set_id, int *side_se + } + + /* Allocate space for the element block params */ +- if (!(elem_blk_parms = malloc(num_elem_blks * sizeof(struct ex__elem_blk_parm)))) { ++ if (!(elem_blk_parms = malloc(num_elem_blks * sizeof(struct exi_elem_blk_parm)))) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate space for element block params " + "for file id %d", +@@ -226,65 +223,74 @@ int ex_get_side_set_node_count(int exoid, ex_entity_id side_set_id, int *side_se + } + + elem_ctr = 0; +- for (i = 0; i < num_elem_blks; i++) { ++ for (int ib = 0; ib < num_elem_blks; ib++) { + ex_entity_id id; + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { +- id = ((int64_t *)elem_blk_ids)[i]; ++ id = ((int64_t *)elem_blk_ids)[ib]; + } + else { +- id = ((int *)elem_blk_ids)[i]; ++ id = ((int *)elem_blk_ids)[ib]; + } + +- err_stat = ex__get_block_param(exoid, id, ndim, &elem_blk_parms[i]); ++ err_stat = exi_get_block_param(exoid, id, ndim, &elem_blk_parms[ib]); + if (err_stat != EX_NOERR) { + goto cleanup; + } + +- elem_ctr += elem_blk_parms[i].num_elem_in_blk; +- elem_blk_parms[i].elem_ctr = elem_ctr; /* save elem number max */ ++ elem_ctr += elem_blk_parms[ib].num_elem_in_blk; ++ elem_blk_parms[ib].elem_ctr = elem_ctr; /* save elem number max */ + } + + /* Finally... Create the list of node counts for each face in the + * side set. + */ + +- j = 0; /* The current element block... */ +- for (ii = 0; ii < tot_num_ss_elem; ii++) { +- +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +- i = ((int64_t *)ss_elem_ndx)[ii]; +- elem = ((int64_t *)side_set_elem_list)[i]; +- side = ((int64_t *)side_set_side_list)[i] - 1; /* Convert to 0-based sides */ +- } +- else { +- i = ((int *)ss_elem_ndx)[ii]; +- elem = ((int *)side_set_elem_list)[i]; +- side = ((int *)side_set_side_list)[i] - 1; /* Convert to 0-based sides */ +- } ++ /* There is not partial read for this function, but all ranks must call because exodus runs ++ * NC_COLLECTIVE for all variables. Typically, either all ranks call and get same data, or one ++ * rank reads. To do the one rank read, we only store the data if `side_set_node_cnt_list != ++ * NULL` ++ */ ++ if (side_set_node_cnt_list != NULL) { ++ int jb = 0; /* The current element block... */ ++ for (size_t ii = 0; ii < tot_num_ss_elem; ii++) { ++ ++ size_t i = 0; ++ if (ints_64) { ++ i = ((int64_t *)ss_elem_ndx)[ii]; ++ elem = ((int64_t *)side_set_elem_list)[i]; ++ side = ((int64_t *)side_set_side_list)[i] - 1; /* Convert to 0-based sides */ ++ } ++ else { ++ i = ((int *)ss_elem_ndx)[ii]; ++ elem = ((int *)side_set_elem_list)[i]; ++ side = ((int *)side_set_side_list)[i] - 1; /* Convert to 0-based sides */ ++ } + +- /* +- * Since the elements are being accessed in sorted, order, the +- * block that contains the elements must progress sequentially +- * from block 0 to block[num_elem_blks-1]. Once we find an element +- * not in this block, find a following block that contains it... +- */ +- for (; j < num_elem_blks; j++) { +- if (elem <= elem_blk_parms[j].elem_ctr) { +- break; ++ /* ++ * Since the elements are being accessed in sorted, order, the ++ * block that contains the elements must progress sequentially ++ * from block 0 to block[num_elem_blks-1]. Once we find an element ++ * not in this block, find a following block that contains it... ++ */ ++ for (; jb < num_elem_blks; jb++) { ++ if (elem <= elem_blk_parms[jb].elem_ctr) { ++ break; ++ } + } +- } + +- if (j < num_elem_blks) { +- assert(side < elem_blk_parms[j].num_sides); +- side_set_node_cnt_list[i] = elem_blk_parms[j].num_nodes_per_side[side]; +- } +- else { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: Invalid element number %" PRId64 " found in side set %" PRId64 " in file %d", +- elem, side_set_id, exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- err_stat = EX_FATAL; +- goto cleanup; ++ if (jb < num_elem_blks) { ++ assert(side < elem_blk_parms[jb].num_sides); ++ side_set_node_cnt_list[i] = elem_blk_parms[jb].num_nodes_per_side[side]; ++ } ++ else { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Invalid element number %" PRId64 " found in side set %" PRId64 ++ " in file %d", ++ elem, side_set_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ err_stat = EX_FATAL; ++ goto cleanup; ++ } + } + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_list.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_list.c +index ef1ed624cb..604ca3696c 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_list.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_list.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -42,7 +42,7 @@ static int check_valid_side(size_t side_num, size_t max_sides, char *topology, i + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + err_stat = EX_FATAL; + } +- return (err_stat); ++ return err_stat; + } + + static void get_nodes(int exoid, void_int *to, size_t ito, void_int *from, size_t ifrom) +@@ -58,7 +58,6 @@ static void get_nodes(int exoid, void_int *to, size_t ito, void_int *from, size_ + int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *side_set_node_cnt_list, + void_int *side_set_node_list) + { +- size_t ii, i, j; + int64_t elem, side; + int64_t num_side_sets, num_elem_blks, num_df, ndim; + int64_t tot_num_elem = 0, tot_num_ss_elem = 0, elem_num = 0; +@@ -66,18 +65,18 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + void_int *elem_blk_ids = NULL; + void_int *connect = NULL; + void_int *ss_elem_ndx = NULL; +- int64_t * ss_elem_node_ndx = NULL; +- int64_t * ss_parm_ndx = NULL; ++ int64_t *ss_elem_node_ndx = NULL; ++ int64_t *ss_parm_ndx = NULL; + void_int *side_set_elem_list = NULL; + void_int *side_set_side_list = NULL; +- size_t elem_ctr, node_ctr, elem_num_pos; ++ int64_t elem_ctr, node_ctr, elem_num_pos; + size_t num_nodes_per_elem; + int int_size, ids_size; + + int err_stat = EX_NOERR; + int status; + +- struct ex__elem_blk_parm *elem_blk_parms = NULL; ++ struct exi_elem_blk_parm *elem_blk_parms = NULL; + + /* side to node translation tables - + These tables are used to look up the side number based on the +@@ -87,136 +86,11 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + tables were generated by following the right-hand rule for determining + the outward normal. + */ +- /* triangle */ +- static int tri_table[3][3] = { +- {1, 2, 4}, /* side 1 */ +- {2, 3, 5}, /* side 2 */ +- {3, 1, 6} /* side 3 */ +- }; +- +- /* triangle 3d */ +- static int tri3_table[5][7] = { +- {1, 2, 3, 4, 5, 6, 7}, /* side 1 (face) */ +- {3, 2, 1, 6, 5, 4, 7}, /* side 2 (face) */ +- {1, 2, 4, 0, 0, 0, 0}, /* side 3 (edge) */ +- {2, 3, 5, 0, 0, 0, 0}, /* side 4 (edge) */ +- {3, 1, 6, 0, 0, 0, 0} /* side 5 (edge) */ +- }; +- +- /* quad */ +- static int quad_table[4][3] = { +- {1, 2, 5}, /* side 1 */ +- {2, 3, 6}, /* side 2 */ +- {3, 4, 7}, /* side 3 */ +- {4, 1, 8} /* side 4 */ +- }; +- +- /* shell */ +- static int shell_table[6][9] = { +- {1, 2, 3, 4, 5, 6, 7, 8, 9}, /* side 1 (face) */ +- {1, 4, 3, 2, 8, 7, 6, 5, 9}, /* side 2 (face) */ +- {1, 2, 5, 0, 0, 0, 0, 0, 0}, /* side 3 (edge) */ +- {2, 3, 6, 0, 0, 0, 0, 0, 0}, /* side 4 (edge) */ +- {3, 4, 7, 0, 0, 0, 0, 0, 0}, /* side 5 (edge) */ +- {4, 1, 8, 0, 0, 0, 0, 0, 0} /* side 6 (edge) */ +- }; +- +- /* tetra */ +- static int tetra_table[4][7] = { +- {1, 2, 4, 5, 9, 8, 14}, /* Side 1 nodes */ +- {2, 3, 4, 6, 10, 9, 12}, /* Side 2 nodes */ +- {1, 4, 3, 8, 10, 7, 13}, /* Side 3 nodes */ +- {1, 3, 2, 7, 6, 5, 11} /* Side 4 nodes */ +- }; +- +- /* wedge */ +- /* wedge 6 or 7 */ +- static int wedge6_table[5][4] = { +- {1, 2, 5, 4}, /* Side 1 nodes -- quad */ +- {2, 3, 6, 5}, /* Side 2 nodes -- quad */ +- {1, 4, 6, 3}, /* Side 3 nodes -- quad */ +- {1, 3, 2, 0}, /* Side 4 nodes -- triangle */ +- {4, 5, 6, 0} /* Side 5 nodes -- triangle */ +- }; +- +- /* wedge 12 -- localization element */ +- static int wedge12_table[5][6] = { +- {1, 2, 5, 4, 7, 10}, /* Side 1 nodes -- quad */ +- {2, 3, 6, 5, 8, 11}, /* Side 2 nodes -- quad */ +- {1, 4, 6, 3, 9, 12}, /* Side 3 nodes -- quad */ +- {1, 3, 2, 9, 8, 7}, /* Side 4 nodes -- triangle */ +- {4, 5, 6, 10, 11, 12} /* Side 5 nodes -- triangle */ +- }; +- +- /* wedge 15 or 16 */ +- static int wedge15_table[5][8] = { +- {1, 2, 5, 4, 7, 11, 13, 10}, /* Side 1 nodes -- quad */ +- {2, 3, 6, 5, 8, 12, 14, 11}, /* Side 2 nodes -- quad */ +- {1, 4, 6, 3, 10, 15, 12, 9}, /* Side 3 nodes -- quad */ +- {1, 3, 2, 9, 8, 7, 0, 0}, /* Side 4 nodes -- triangle */ +- {4, 5, 6, 13, 14, 15, 0, 0} /* Side 5 nodes -- triangle */ +- }; +- +- /* wedge 20 */ +- static int wedge20_table[5][9] = { +- {1, 2, 5, 4, 7, 11, 13, 10, 20}, /* Side 1 nodes -- quad */ +- {2, 3, 6, 5, 8, 12, 14, 11, 18}, /* Side 2 nodes -- quad */ +- {1, 4, 6, 3, 10, 15, 12, 9, 19}, /* Side 3 nodes -- quad */ +- {1, 3, 2, 9, 8, 7, 16, 0, 0}, /* Side 4 nodes -- triangle */ +- {4, 5, 6, 13, 14, 15, 17, 0, 0} /* Side 5 nodes -- triangle */ +- }; +- +- /* wedge 21 */ +- static int wedge21_table[5][9] = { +- {1, 2, 5, 4, 7, 11, 13, 10, 21}, /* Side 1 nodes -- quad */ +- {2, 3, 6, 5, 8, 12, 14, 11, 19}, /* Side 2 nodes -- quad */ +- {1, 4, 6, 3, 10, 15, 12, 9, 20}, /* Side 3 nodes -- quad */ +- {1, 3, 2, 9, 8, 7, 17, 0, 0}, /* Side 4 nodes -- triangle */ +- {4, 5, 6, 13, 14, 15, 18, 0, 0} /* Side 5 nodes -- triangle */ +- }; +- +- /* wedge 18 */ +- static int wedge18_table[5][9] = { +- {1, 2, 5, 4, 7, 11, 13, 10, 16}, /* Side 1 nodes -- quad */ +- {2, 3, 6, 5, 8, 12, 14, 11, 17}, /* Side 2 nodes -- quad */ +- {1, 4, 6, 3, 10, 15, 12, 9, 18}, /* Side 3 nodes -- quad */ +- {1, 3, 2, 9, 8, 7, 0, 0, 0}, /* Side 4 nodes -- triangle */ +- {4, 5, 6, 13, 14, 15, 0, 0, 0} /* Side 5 nodes -- triangle */ +- }; +- +- /* hex */ +- static int hex_table[6][9] = { +- {1, 2, 6, 5, 9, 14, 17, 13, 26}, /* side 1 */ +- {2, 3, 7, 6, 10, 15, 18, 14, 25}, /* side 2 */ +- {3, 4, 8, 7, 11, 16, 19, 15, 27}, /* side 3 */ +- {1, 5, 8, 4, 13, 20, 16, 12, 24}, /* side 4 */ +- {1, 4, 3, 2, 12, 11, 10, 9, 22}, /* side 5 */ +- {5, 6, 7, 8, 17, 18, 19, 20, 23} /* side 6 */ +- }; +- +- /* hex 16 -- localization element */ +- static int hex16_table[6][8] = { +- {1, 2, 6, 5, 9, 13, 0, 0}, /* side 1 -- 6 node quad */ +- {2, 3, 7, 6, 10, 14, 0, 0}, /* side 2 -- 6 node quad */ +- {3, 4, 8, 7, 11, 15, 0, 0}, /* side 3 -- 6 node quad */ +- {4, 1, 5, 8, 12, 16, 0, 0}, /* side 4 -- 6 node quad */ +- {1, 4, 3, 2, 12, 11, 10, 9}, /* side 5 -- 8 node quad */ +- {5, 6, 7, 8, 13, 14, 15, 16} /* side 6 -- 8 node quad */ +- }; +- +- /* pyramid */ +- static int pyramid_table[5][9] = { +- {1, 2, 5, 0, 6, 11, 10, 0, 15}, /* side 1 (tri) */ +- {2, 3, 5, 0, 7, 12, 11, 0, 16}, /* side 2 (tri) */ +- {3, 4, 5, 0, 8, 13, 12, 0, 17}, /* side 3 (tri) */ +- {1, 5, 4, 0, 10, 13, 9, 0, 18}, /* side 4 (tri) */ +- {1, 4, 3, 2, 9, 8, 7, 6, 14} /* side 5 (quad) */ +- }; + + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -238,7 +112,7 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + } + + /* Lookup index of side set id in VAR_SS_IDS array */ +- if (ex__id_lkup(exoid, EX_SIDE_SET, side_set_id) <= 0) { ++ if (exi_id_lkup(exoid, EX_SIDE_SET, side_set_id) <= 0) { + ex_get_err(NULL, NULL, &status); + + if (status != 0) { +@@ -353,18 +227,18 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + if (int_size == sizeof(int64_t)) { + /* Sort side set element list into index array - non-destructive */ + int64_t *elems = (int64_t *)ss_elem_ndx; +- for (i = 0; i < tot_num_ss_elem; i++) { ++ for (int i = 0; i < tot_num_ss_elem; i++) { + elems[i] = i; /* init index array to current position */ + } +- ex__iqsort64(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); ++ exi_iqsort64(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); + } + else { + /* Sort side set element list into index array - non-destructive */ + int *elems = (int *)ss_elem_ndx; +- for (i = 0; i < tot_num_ss_elem; i++) { ++ for (int i = 0; i < tot_num_ss_elem; i++) { + elems[i] = i; /* init index array to current position */ + } +- ex__iqsort(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); ++ exi_iqsort(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); + } + + /* Allocate space for the element block ids */ +@@ -384,7 +258,7 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + } + + /* Allocate space for the element block params */ +- if (!(elem_blk_parms = malloc(num_elem_blks * sizeof(struct ex__elem_blk_parm)))) { ++ if (!(elem_blk_parms = malloc(num_elem_blks * sizeof(struct exi_elem_blk_parm)))) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate space for element block params " + "for file id %d", +@@ -395,7 +269,7 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + } + + elem_ctr = 0; +- for (i = 0; i < num_elem_blks; i++) { ++ for (int i = 0; i < num_elem_blks; i++) { + ex_entity_id id; + if (ids_size == sizeof(int64_t)) { + id = ((int64_t *)elem_blk_ids)[i]; +@@ -404,7 +278,7 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + id = ((int *)elem_blk_ids)[i]; + } + +- err_stat = ex__get_block_param(exoid, id, ndim, &elem_blk_parms[i]); ++ err_stat = exi_get_block_param(exoid, id, ndim, &elem_blk_parms[i]); + if (err_stat != EX_NOERR) { + goto cleanup; + } +@@ -440,8 +314,9 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + parameter index. + */ + node_ctr = 0; +- j = 0; /* The current element block... */ +- for (ii = 0; ii < tot_num_ss_elem; ii++) { ++ int j = 0; /* The current element block... */ ++ for (int64_t ii = 0; ii < tot_num_ss_elem; ii++) { ++ size_t i = 0; + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { + i = ((int64_t *)ss_elem_ndx)[ii]; + elem = ((int64_t *)side_set_elem_list)[i]; +@@ -486,7 +361,8 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + if (node_ctr != num_df) { + snprintf(errmsg, MAX_ERR_LENGTH, + "Warning: In side set %" PRId64 " the distribution factor count (%" PRId64 +- ") does not match the side set node list length (%zu). These should match and this " ++ ") does not match the side set node list length (%" PRId64 ++ "). These should match and this " + "may indicate a corrupt database in file %d", + side_set_id, num_df, node_ctr, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MSG); +@@ -497,18 +373,18 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + * exclusive scan to determine where the nodes will be put in the list for each face + */ + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +- for (i = 0; i < tot_num_ss_elem; i++) { ++ for (int64_t i = 0; i < tot_num_ss_elem; i++) { + ((int64_t *)side_set_node_cnt_list)[i] = ss_elem_node_ndx[i]; + } + } + else { +- for (i = 0; i < tot_num_ss_elem; i++) { ++ for (int64_t i = 0; i < tot_num_ss_elem; i++) { + ((int *)side_set_node_cnt_list)[i] = (int)ss_elem_node_ndx[i]; + } + } + + int64_t sum = 0; +- for (i = 0; i < tot_num_ss_elem; i++) { ++ for (int64_t i = 0; i < tot_num_ss_elem; i++) { + int64_t cnt = ss_elem_node_ndx[i]; + ss_elem_node_ndx[i] = sum; + sum += cnt; +@@ -606,13 +482,27 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + + case EX_EL_BEAM: { /* Note: no side-node lookup table is used for this + simple case */ +- for (i = 0; i < num_nodes_per_elem; i++) { +- get_nodes(exoid, side_set_node_list, node_pos + i, connect, connect_offset + i); ++ if (side_num == 0) { ++ for (size_t i = 0; i < num_nodes_per_elem; i++) { ++ get_nodes(exoid, side_set_node_list, node_pos + i, connect, connect_offset + i); ++ } ++ } ++ else { ++ for (size_t i = 0; i < num_nodes_per_elem; i++) { ++ int nn = num_nodes_per_elem - i - 1; ++ get_nodes(exoid, side_set_node_list, node_pos + i, connect, connect_offset + nn); ++ } + } + break; + } + case EX_EL_TRIANGLE: { + if (ndim == 2) { /* 2d TRIs */ ++ static const int tri_table[3][3] = { ++ {1, 2, 4}, /* side 1 */ ++ {2, 3, 5}, /* side 2 */ ++ {3, 1, 6} /* side 3 */ ++ }; ++ + if (check_valid_side(side_num, 3, "triangle", exoid) != EX_NOERR) { + goto cleanup; + } +@@ -632,6 +522,14 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + goto cleanup; + } + ++ static const int tri3_table[5][7] = { ++ {1, 2, 3, 4, 5, 6, 7}, /* side 1 (face) */ ++ {3, 2, 1, 6, 5, 4, 7}, /* side 2 (face) */ ++ {1, 2, 4, 0, 0, 0, 0}, /* side 3 (edge) */ ++ {2, 3, 5, 0, 0, 0, 0}, /* side 4 (edge) */ ++ {3, 1, 6, 0, 0, 0, 0} /* side 5 (edge) */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos, connect, + connect_offset + tri3_table[side_num][0] - 1); + get_nodes(exoid, side_set_node_list, node_pos + 1, connect, +@@ -699,6 +597,13 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + goto cleanup; + } + ++ static const int quad_table[4][3] = { ++ {1, 2, 5}, /* side 1 */ ++ {2, 3, 6}, /* side 2 */ ++ {3, 4, 7}, /* side 3 */ ++ {4, 1, 8} /* side 4 */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos + 0, connect, + connect_offset + quad_table[side_num][0] - 1); + get_nodes(exoid, side_set_node_list, node_pos + 1, connect, +@@ -714,6 +619,15 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + goto cleanup; + } + ++ static const int shell_table[6][9] = { ++ {1, 2, 3, 4, 5, 6, 7, 8, 9}, /* side 1 (face) */ ++ {1, 4, 3, 2, 8, 7, 6, 5, 9}, /* side 2 (face) */ ++ {1, 2, 5, 0, 0, 0, 0, 0, 0}, /* side 3 (edge) */ ++ {2, 3, 6, 0, 0, 0, 0, 0, 0}, /* side 4 (edge) */ ++ {3, 4, 7, 0, 0, 0, 0, 0, 0}, /* side 5 (edge) */ ++ {4, 1, 8, 0, 0, 0, 0, 0, 0} /* side 6 (edge) */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos + 0, connect, + connect_offset + shell_table[side_num][0] - 1); + get_nodes(exoid, side_set_node_list, node_pos + 1, connect, +@@ -767,6 +681,13 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + goto cleanup; + } + ++ static const int tetra_table[4][7] = { ++ {1, 2, 4, 5, 9, 8, 14}, /* Side 1 nodes */ ++ {2, 3, 4, 6, 10, 9, 12}, /* Side 2 nodes */ ++ {1, 4, 3, 8, 10, 7, 13}, /* Side 3 nodes */ ++ {1, 3, 2, 7, 6, 5, 11} /* Side 4 nodes */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos + 0, connect, + connect_offset + tetra_table[side_num][0] - 1); + get_nodes(exoid, side_set_node_list, node_pos + 1, connect, +@@ -794,6 +715,13 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + } + + if (num_nodes_per_elem == 6 || num_nodes_per_elem == 7) { ++ static const int wedge6_table[5][4] = { ++ {1, 2, 5, 4}, /* Side 1 nodes -- quad */ ++ {2, 3, 6, 5}, /* Side 2 nodes -- quad */ ++ {1, 4, 6, 3}, /* Side 3 nodes -- quad */ ++ {1, 3, 2, 0}, /* Side 4 nodes -- triangle */ ++ {4, 5, 6, 0} /* Side 5 nodes -- triangle */ ++ }; + get_nodes(exoid, side_set_node_list, node_pos++, connect, + connect_offset + wedge6_table[side_num][node_off++] - 1); + get_nodes(exoid, side_set_node_list, node_pos++, connect, +@@ -813,6 +741,14 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + } + + else if (num_nodes_per_elem == 15 || num_nodes_per_elem == 16) { ++ static const int wedge15_table[5][8] = { ++ {1, 2, 5, 4, 7, 11, 13, 10}, /* Side 1 nodes -- quad */ ++ {2, 3, 6, 5, 8, 12, 14, 11}, /* Side 2 nodes -- quad */ ++ {1, 4, 6, 3, 10, 15, 12, 9}, /* Side 3 nodes -- quad */ ++ {1, 3, 2, 9, 8, 7, 0, 0}, /* Side 4 nodes -- triangle */ ++ {4, 5, 6, 13, 14, 15, 0, 0} /* Side 5 nodes -- triangle */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos++, connect, + connect_offset + wedge15_table[side_num][node_off++] - 1); + get_nodes(exoid, side_set_node_list, node_pos++, connect, +@@ -842,6 +778,14 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + else if (num_nodes_per_elem == 12) { + /* Wedge 12 - 6-node quad faces (0,1,2) and 6-node tri faces (3,4) */ + /* All faces (quad or tri) have 6 nodes */ ++ static const int wedge12_table[5][6] = { ++ {1, 2, 5, 4, 7, 10}, /* Side 1 nodes -- quad */ ++ {2, 3, 6, 5, 8, 11}, /* Side 2 nodes -- quad */ ++ {1, 4, 6, 3, 9, 12}, /* Side 3 nodes -- quad */ ++ {1, 3, 2, 9, 8, 7}, /* Side 4 nodes -- triangle */ ++ {4, 5, 6, 10, 11, 12} /* Side 5 nodes -- triangle */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos++, connect, + connect_offset + wedge12_table[side_num][node_off++] - 1); + get_nodes(exoid, side_set_node_list, node_pos++, connect, +@@ -858,6 +802,14 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + } + + else if (num_nodes_per_elem == 20) { ++ static const int wedge20_table[5][9] = { ++ {1, 2, 5, 4, 7, 11, 13, 10, 20}, /* Side 1 nodes -- quad */ ++ {2, 3, 6, 5, 8, 12, 14, 11, 18}, /* Side 2 nodes -- quad */ ++ {1, 4, 6, 3, 10, 15, 12, 9, 19}, /* Side 3 nodes -- quad */ ++ {1, 3, 2, 9, 8, 7, 16, 0, 0}, /* Side 4 nodes -- triangle */ ++ {4, 5, 6, 13, 14, 15, 17, 0, 0} /* Side 5 nodes -- triangle */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos++, connect, + connect_offset + wedge20_table[side_num][node_off++] - 1); + get_nodes(exoid, side_set_node_list, node_pos++, connect, +@@ -886,6 +838,13 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + } + } + else if (num_nodes_per_elem == 21) { ++ static const int wedge21_table[5][9] = { ++ {1, 2, 5, 4, 7, 11, 13, 10, 21}, /* Side 1 nodes -- quad */ ++ {2, 3, 6, 5, 8, 12, 14, 11, 19}, /* Side 2 nodes -- quad */ ++ {1, 4, 6, 3, 10, 15, 12, 9, 20}, /* Side 3 nodes -- quad */ ++ {1, 3, 2, 9, 8, 7, 17, 0, 0}, /* Side 4 nodes -- triangle */ ++ {4, 5, 6, 13, 14, 15, 18, 0, 0} /* Side 5 nodes -- triangle */ ++ }; + get_nodes(exoid, side_set_node_list, node_pos++, connect, + connect_offset + wedge21_table[side_num][node_off++] - 1); + get_nodes(exoid, side_set_node_list, node_pos++, connect, +@@ -915,6 +874,14 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + /* Wedge 18 - 9-node quad faces (0,1,2) and 6-node tri faces (3,4) */ + /* All faces (quad or tri) have at least 6 nodes */ + /* This gets nodes 1-6 */ ++ static const int wedge18_table[5][9] = { ++ {1, 2, 5, 4, 7, 11, 13, 10, 16}, /* Side 1 nodes -- quad */ ++ {2, 3, 6, 5, 8, 12, 14, 11, 17}, /* Side 2 nodes -- quad */ ++ {1, 4, 6, 3, 10, 15, 12, 9, 18}, /* Side 3 nodes -- quad */ ++ {1, 3, 2, 9, 8, 7, 0, 0, 0}, /* Side 4 nodes -- triangle */ ++ {4, 5, 6, 13, 14, 15, 0, 0, 0} /* Side 5 nodes -- triangle */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos++, connect, + connect_offset + wedge18_table[side_num][node_off++] - 1); + get_nodes(exoid, side_set_node_list, node_pos++, connect, +@@ -956,6 +923,14 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + goto cleanup; + } + ++ static const int pyramid_table[5][9] = { ++ {1, 2, 5, 0, 6, 11, 10, 0, 15}, /* side 1 (tri) */ ++ {2, 3, 5, 0, 7, 12, 11, 0, 16}, /* side 2 (tri) */ ++ {3, 4, 5, 0, 8, 13, 12, 0, 17}, /* side 3 (tri) */ ++ {1, 5, 4, 0, 10, 13, 9, 0, 18}, /* side 4 (tri) */ ++ {1, 4, 3, 2, 9, 8, 7, 6, 14} /* side 5 (quad) */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos++, connect, + connect_offset + pyramid_table[side_num][0] - 1); + get_nodes(exoid, side_set_node_list, node_pos++, connect, +@@ -1008,6 +983,15 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + + if (num_nodes_per_elem == 16) { + /* Localization element -- four 6-node sides and two 8-node sides */ ++ static const int hex16_table[6][8] = { ++ {1, 2, 6, 5, 9, 13, 0, 0}, /* side 1 -- 6 node quad */ ++ {2, 3, 7, 6, 10, 14, 0, 0}, /* side 2 -- 6 node quad */ ++ {3, 4, 8, 7, 11, 15, 0, 0}, /* side 3 -- 6 node quad */ ++ {4, 1, 5, 8, 12, 16, 0, 0}, /* side 4 -- 6 node quad */ ++ {1, 4, 3, 2, 12, 11, 10, 9}, /* side 5 -- 8 node quad */ ++ {5, 6, 7, 8, 13, 14, 15, 16} /* side 6 -- 8 node quad */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos + 0, connect, + connect_offset + hex16_table[side_num][0] - 1); + get_nodes(exoid, side_set_node_list, node_pos + 1, connect, +@@ -1028,6 +1012,15 @@ int ex_get_side_set_node_list(int exoid, ex_entity_id side_set_id, void_int *sid + } + } + else { ++ static const int hex_table[6][9] = { ++ {1, 2, 6, 5, 9, 14, 17, 13, 26}, /* side 1 */ ++ {2, 3, 7, 6, 10, 15, 18, 14, 25}, /* side 2 */ ++ {3, 4, 8, 7, 11, 16, 19, 15, 27}, /* side 3 */ ++ {1, 5, 8, 4, 13, 20, 16, 12, 24}, /* side 4 */ ++ {1, 4, 3, 2, 12, 11, 10, 9, 22}, /* side 5 */ ++ {5, 6, 7, 8, 17, 18, 19, 20, 23} /* side 6 */ ++ }; ++ + get_nodes(exoid, side_set_node_list, node_pos + 0, connect, + connect_offset + hex_table[side_num][0] - 1); + get_nodes(exoid, side_set_node_list, node_pos + 1, connect, +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_list_len.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_list_len.c +index aff9b20a94..6e0ac40f98 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_list_len.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_side_set_node_list_len.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -36,13 +36,13 @@ + int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + void_int *side_set_node_list_len) + { +- size_t ii, i, j; ++ int64_t ii, i, j; + int64_t num_side_sets, num_elem_blks, num_df, ndim; +- size_t list_len = 0; ++ int64_t list_len = 0; + int64_t tot_num_elem = 0, tot_num_ss_elem = 0; + void_int *elem_blk_ids = NULL; +- int * ss_elem_ndx = NULL; +- int64_t * ss_elem_ndx_64 = NULL; ++ int *ss_elem_ndx = NULL; ++ int64_t *ss_elem_ndx_64 = NULL; + + void_int *side_set_elem_list = NULL; + void_int *side_set_side_list = NULL; +@@ -51,16 +51,17 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + int err_stat = EX_NOERR; + int status; + +- struct ex__elem_blk_parm *elem_blk_parms = NULL; ++ struct exi_elem_blk_parm *elem_blk_parms = NULL; + + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { ++ bool ints_64 = ex_int64_status(exoid) & EX_BULK_INT64_API; ++ if (ints_64) { + *(int64_t *)side_set_node_list_len = 0; /* default value */ + } + else { +@@ -111,7 +112,7 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + } + + /* First determine the # of elements in the side set*/ +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { ++ if (ints_64) { + status = ex_get_set_param(exoid, EX_SIDE_SET, side_set_id, &tot_num_ss_elem, &num_df); + } + else { +@@ -136,10 +137,8 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + + /* Allocate space for the side set element list */ + { +- int int_size = sizeof(int); +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +- int_size = sizeof(int64_t); +- } ++ int int_size = ints_64 ? sizeof(int64_t) : sizeof(int); ++ + if (!(side_set_elem_list = malloc(tot_num_ss_elem * int_size))) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate space for side set element " +@@ -189,17 +188,17 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + } + + /* Sort side set element list into index array - non-destructive */ +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { ++ if (ints_64) { + for (i = 0; i < tot_num_ss_elem; i++) { + ss_elem_ndx_64[i] = i; /* init index array to current position */ + } +- ex__iqsort64(side_set_elem_list, ss_elem_ndx_64, tot_num_ss_elem); ++ exi_iqsort64(side_set_elem_list, ss_elem_ndx_64, tot_num_ss_elem); + } + else { + for (i = 0; i < tot_num_ss_elem; i++) { + ss_elem_ndx[i] = i; /* init index array to current position */ + } +- ex__iqsort(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); ++ exi_iqsort(side_set_elem_list, ss_elem_ndx, tot_num_ss_elem); + } + + /* Allocate space for the element block ids */ +@@ -228,7 +227,7 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + } + + /* Allocate space for the element block params */ +- if (!(elem_blk_parms = calloc(num_elem_blks, sizeof(struct ex__elem_blk_parm)))) { ++ if (!(elem_blk_parms = calloc(num_elem_blks, sizeof(struct exi_elem_blk_parm)))) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate space for element block params " + "for file id %d", +@@ -248,7 +247,7 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + id = ((int *)elem_blk_ids)[i]; + } + +- err_stat = ex__get_block_param(exoid, id, ndim, &elem_blk_parms[i]); ++ err_stat = exi_get_block_param(exoid, id, ndim, &elem_blk_parms[i]); + if (err_stat != EX_NOERR) { + goto cleanup; + } +@@ -262,9 +261,9 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + list_len = 0; + j = 0; /* The current element block... */ + for (ii = 0; ii < tot_num_ss_elem; ii++) { +- size_t elem; +- size_t side; +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { ++ int64_t elem; ++ int64_t side; ++ if (ints_64) { + i = ss_elem_ndx_64[ii]; + elem = ((int64_t *)side_set_elem_list)[i]; + side = ((int64_t *)side_set_side_list)[i]; +@@ -291,8 +290,8 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + + if (j >= num_elem_blks) { + snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: Invalid element number %zu found in side set %" PRId64 " in file %d", elem, +- side_set_id, exoid); ++ "ERROR: Invalid element number %" PRId64 " found in side set %" PRId64 " in file %d", ++ elem, side_set_id, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + err_stat = EX_FATAL; + goto cleanup; +@@ -300,7 +299,7 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + list_len += elem_blk_parms[j].num_nodes_per_side[side - 1]; + } + +- if (ex_int64_status(exoid) & EX_BULK_INT64_API) { ++ if (ints_64) { + *(int64_t *)side_set_node_list_len = list_len; + } + else { +@@ -311,7 +310,8 @@ int ex_get_side_set_node_list_len(int exoid, ex_entity_id side_set_id, + if (list_len != num_df) { + snprintf(errmsg, MAX_ERR_LENGTH, + "Warning: In side set %" PRId64 " the distribution factor count (%" PRId64 +- ") does not match the side set node list length (%zu). These should match and this " ++ ") does not match the side set node list length (%" PRId64 ++ "). These should match and this " + "may indicate a corrupt database in file %d", + side_set_id, num_df, list_len, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MSG); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_ss_param_global.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_ss_param_global.c +index 3c776871f9..29c1dad0bf 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_ss_param_global.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_ss_param_global.c +@@ -35,7 +35,7 @@ int ex_get_ss_param_global(int exoid, void_int *global_ids, void_int *side_cnts, + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_time.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_time.c +index 45fc9e7b31..08a71b3386 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_time.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_time.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_comp_ws, etc + + /*! + \ingroup ResultsData +@@ -54,11 +54,11 @@ int ex_get_time(int exoid, int time_step, void *time_value) + int varid; + size_t start[1]; + char errmsg[MAX_ERR_LENGTH]; +- struct ex__file_item *file = NULL; ++ struct exi_file_item *file = NULL; + + EX_FUNC_ENTER(); + +- file = ex__find_file_item(exoid); ++ file = exi_find_file_item(exoid); + if (!file) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d.", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); +@@ -105,7 +105,7 @@ int ex_get_time(int exoid, int time_step, void *time_value) + /* read time value */ + start[0] = --time_step; + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_var1_float(exoid, varid, start, time_value); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_truth_table.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_truth_table.c +index a5584e9b30..077f357640 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_truth_table.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_truth_table.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2025 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -22,7 +22,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__get_dimension, EX_FATAL, etc ++#include "exodusII_int.h" // for exi_get_dimension, EX_FATAL, etc + + /*! + * \ingroup ResultsData +@@ -36,8 +36,11 @@ + + int ex_get_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_var, int *var_tab) + { +- int dimid, varid, tabid, i, j, status, status1; +- size_t num_entity = 0; ++ int dimid = 0; ++ int varid = 0; ++ int tabid = 0; ++ int status = 0; ++ int status1 = 0; + size_t num_var_db = 0; + char errmsg[MAX_ERR_LENGTH]; + +@@ -50,70 +53,70 @@ int ex_get_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + const char *var_name = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + switch (obj_type) { + case EX_EDGE_BLOCK: + status = +- ex__get_dimension(exoid, DIM_NUM_EDG_VAR, "edge variables", &num_var_db, &varid, __func__); ++ exi_get_dimension(exoid, DIM_NUM_EDG_VAR, "edge variables", &num_var_db, &varid, __func__); + status1 = nc_inq_varid(exoid, VAR_EBLK_TAB, &tabid); + var_name = "vals_edge_var"; + ent_type = "eb"; + break; + case EX_FACE_BLOCK: + status = +- ex__get_dimension(exoid, DIM_NUM_FAC_VAR, "face variables", &num_var_db, &varid, __func__); ++ exi_get_dimension(exoid, DIM_NUM_FAC_VAR, "face variables", &num_var_db, &varid, __func__); + status1 = nc_inq_varid(exoid, VAR_FBLK_TAB, &tabid); + var_name = "vals_face_var"; + ent_type = "fb"; + break; + case EX_ELEM_BLOCK: +- status = ex__get_dimension(exoid, DIM_NUM_ELE_VAR, "element variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_ELE_VAR, "element variables", &num_var_db, &varid, ++ __func__); + status1 = nc_inq_varid(exoid, VAR_ELEM_TAB, &tabid); + var_name = "vals_elem_var"; + ent_type = "eb"; + break; + case EX_NODE_SET: +- status = ex__get_dimension(exoid, DIM_NUM_NSET_VAR, "nodeset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_NSET_VAR, "nodeset variables", &num_var_db, &varid, ++ __func__); + status1 = nc_inq_varid(exoid, VAR_NSET_TAB, &tabid); + var_name = "vals_nset_var"; + ent_type = "ns"; + break; + case EX_EDGE_SET: +- status = ex__get_dimension(exoid, DIM_NUM_ESET_VAR, "edgeset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_ESET_VAR, "edgeset variables", &num_var_db, &varid, ++ __func__); + status1 = nc_inq_varid(exoid, VAR_ESET_TAB, &tabid); + var_name = "vals_eset_var"; + ent_type = "es"; + break; + case EX_FACE_SET: +- status = ex__get_dimension(exoid, DIM_NUM_FSET_VAR, "faceset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_FSET_VAR, "faceset variables", &num_var_db, &varid, ++ __func__); + status1 = nc_inq_varid(exoid, VAR_FSET_TAB, &tabid); + var_name = "vals_fset_var"; + ent_type = "fs"; + break; + case EX_SIDE_SET: +- status = ex__get_dimension(exoid, DIM_NUM_SSET_VAR, "sideset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_SSET_VAR, "sideset variables", &num_var_db, &varid, ++ __func__); + status1 = nc_inq_varid(exoid, VAR_SSET_TAB, &tabid); + var_name = "vals_sset_var"; + ent_type = "ss"; + break; + case EX_ELEM_SET: +- status = ex__get_dimension(exoid, DIM_NUM_ELSET_VAR, "elemset variables", &num_var_db, &varid, +- __func__); ++ status = exi_get_dimension(exoid, DIM_NUM_ELSET_VAR, "elemset variables", &num_var_db, &varid, ++ __func__); + status1 = nc_inq_varid(exoid, VAR_ELSET_TAB, &tabid); + var_name = "vals_elset_var"; + ent_type = "es"; + break; + case EX_BLOB: + status = +- ex__get_dimension(exoid, DIM_NUM_BLOB_VAR, "blob variables", &num_var_db, &varid, __func__); ++ exi_get_dimension(exoid, DIM_NUM_BLOB_VAR, "blob variables", &num_var_db, &varid, __func__); + status1 = nc_inq_varid(exoid, VAR_BLOB_TAB, &tabid); + var_name = "vals_blob_var"; + ent_type = "blob"; +@@ -129,11 +132,12 @@ int ex_get_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + EX_FUNC_LEAVE(EX_WARN); + } + ++ size_t num_entity = 0; + if (obj_type == EX_BLOB) { + num_entity = ex_inquire_int(exoid, EX_INQ_BLOB); + } + else { +- status = ex__get_dimension(exoid, ex__dim_num_objects(obj_type), ex_name_of_object(obj_type), ++ status = exi_get_dimension(exoid, exi_dim_num_objects(obj_type), ex_name_of_object(obj_type), + &num_entity, &dimid, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); +@@ -157,11 +161,11 @@ int ex_get_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + + if (status1 != NC_NOERR) { + /* since truth table isn't stored in the data file, derive it dynamically */ +- for (j = 0; j < num_blk; j++) { ++ for (int j = 0; j < num_blk; j++) { + +- for (i = 0; i < num_var; i++) { ++ for (int i = 0; i < num_var; i++) { + /* NOTE: names are 1-based */ +- if (nc_inq_varid(exoid, ex__catstr2(var_name, i + 1, ent_type, j + 1), &tabid) == ++ if (nc_inq_varid(exoid, exi_catstr2(var_name, i + 1, ent_type, j + 1), &tabid) == + NC_NOERR) { + /* variable exists; put a 1 in the truth table */ + var_tab[j * num_var + i] = 1; +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_var.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_var.c +index ee882e682c..5b4033cd6b 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_var.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_var.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /*! + \ingroup ResultsData +@@ -68,79 +68,6 @@ error = ex_get_var (idexo, time_step, EX_ELEM_BLOCK, var_index, blk_id, + int ex_get_var(int exoid, int time_step, ex_entity_type var_type, int var_index, + ex_entity_id obj_id, int64_t num_entry_this_obj, void *var_vals) + { +- int status; +- int varid, obj_id_ndx; +- size_t start[2], count[2]; +- char errmsg[MAX_ERR_LENGTH]; +- +- EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { +- EX_FUNC_LEAVE(EX_FATAL); +- } +- +- if (var_type == EX_NODAL) { +- /* FIXME: Special case: ignore obj_id, possible large_file complications, +- * etc. */ +- status = ex__get_nodal_var(exoid, time_step, var_index, num_entry_this_obj, var_vals); +- EX_FUNC_LEAVE(status); +- } +- if (var_type == EX_GLOBAL) { +- /* FIXME: Special case: all vars stored in 2-D single array. */ +- status = ex__get_glob_vars(exoid, time_step, num_entry_this_obj, var_vals); +- EX_FUNC_LEAVE(status); +- } +- +- /* Determine index of obj_id in VAR_ID_EL_BLK array */ +- obj_id_ndx = ex__id_lkup(exoid, var_type, obj_id); +- if (obj_id_ndx <= 0) { +- ex_get_err(NULL, NULL, &status); +- +- if (status != 0) { +- if (status == EX_NULLENTITY) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "Warning: no %s variables for NULL block %" PRId64 " in file id %d", +- ex_name_of_object(var_type), obj_id, exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_NULLENTITY); +- EX_FUNC_LEAVE(EX_WARN); +- } +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate %s id %" PRId64 " in id variable in file id %d", +- ex_name_of_object(var_type), obj_id, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- EX_FUNC_LEAVE(EX_FATAL); +- } +- } +- +- /* inquire previously defined variable */ +- +- if ((status = nc_inq_varid(exoid, ex__name_var_of_object(var_type, var_index, obj_id_ndx), +- &varid)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s %" PRId64 " var %d in file id %d", +- ex_name_of_object(var_type), obj_id, var_index, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- EX_FUNC_LEAVE(EX_FATAL); +- } +- +- /* read values of element variable */ +- start[0] = --time_step; +- start[1] = 0; +- +- count[0] = 1; +- count[1] = num_entry_this_obj; +- +- if (ex__comp_ws(exoid) == 4) { +- status = nc_get_vara_float(exoid, varid, start, count, var_vals); +- } +- else { +- status = nc_get_vara_double(exoid, varid, start, count, var_vals); +- } +- +- if (status != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to get %s %" PRId64 " variable %d in file id %d", +- ex_name_of_object(var_type), obj_id, var_index, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- EX_FUNC_LEAVE(EX_FATAL); +- } +- EX_FUNC_LEAVE(EX_NOERR); ++ return ex_get_var_multi_time(exoid, var_type, var_index, obj_id, num_entry_this_obj, time_step, ++ time_step, var_vals); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_var_multi_time.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_var_multi_time.c +new file mode 100644 +index 0000000000..984ee9b5f8 +--- /dev/null ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_var_multi_time.c +@@ -0,0 +1,148 @@ ++/* ++ * Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions ++ * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ++ * NTESS, the U.S. Government retains certain rights in this software. ++ * ++ * See packages/seacas/LICENSE for details ++ */ ++ ++#include "exodusII.h" // for ex_err, ex_name_of_object, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc ++ ++/*! ++\ingroup ResultsData ++ ++The function ex_get_var() reads the values of the ++selected entity variables for a single time step. Memory must be allocated for ++the variables values array before this function is invoked. ++ ++Because variables are floating point values, the application ++code must declare the array passed to be the appropriate type ++(float or double) to match the compute word size passed in ++ex_create() or ex_open(). ++ ++In case of an error, ex_get_var() returns a negative ++number; a warning will return a positive number. Possible causes of ++errors include: ++ ++ - data file not properly opened with call to ex_create() or ex_open() ++ - variable does not exist for the desired block or set. ++ - invalid block or set. ++ - no variables of the selected type stored in the file. ++ - a warning value is returned if no variables of the selected entity type are stored in the file. ++ ++\param[in] exoid exodus file ID returned from a previous call to ++ex_create() or ex_open(). ++ ++\param[in] var_type block/variable type node, edge/face/element block, or ++ node/edge/face/side/element set of type ex_entity_type. ++\param[in] var_index variable index; 1-based ++\param[in] obj_id object id, see ex_get_ids() ++\param[in] num_entry_this_obj The number of entities in this object stored in the database. ++\param[in] beg_time_step The first time step to access variable data from. 1-based. ++\param[in] end_time_step The last time step to access variable data from. 1-based. ++ ++\param[out] var_vals Returned array of num_entry_this_obj variable values ++ for the time_step'th time step. ++ ++The following is an example code segment that reads the 10th element ++variable for element block with id 100 over all 10 time steps. There ++are 'num_elements_this_block' elements in element block 100. ++ ++~~~{.c} ++int num_elements_this_block, error, time_step; ++int var_index = 10; ++int blk_id = 100; ++int num_time_step = 10; ++int num_variables; ++float *var_values; ++ ++var_values = (float *) calloc(num_elements_this_block * num_time_step, sizeof(float)); ++error = ex_get_var_multi_time (idexo, EX_ELEM_BLOCK, var_index, blk_id, ++ num_elements_this_block, 1, num_time_step, var_values); ++~~~ ++ ++ */ ++ ++int ex_get_var_multi_time(int exoid, ex_entity_type var_type, int var_index, ex_entity_id obj_id, ++ int64_t num_entry_this_obj, int beg_time_step, int end_time_step, ++ void *var_vals) ++{ ++ int status; ++ int varid, obj_id_ndx; ++ size_t start[2], count[2]; ++ char errmsg[MAX_ERR_LENGTH]; ++ ++ EX_FUNC_ENTER(); ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (var_type == EX_NODAL) { ++ /* FIXME: Special case: ignore obj_id, possible large_file complications, ++ * etc. */ ++ status = exi_get_nodal_var_multi_time(exoid, var_index, num_entry_this_obj, beg_time_step, ++ end_time_step, var_vals); ++ EX_FUNC_LEAVE(status); ++ } ++ if (var_type == EX_GLOBAL) { ++ /* FIXME: Special case: all vars stored in 2-D single array. */ ++ status = exi_get_glob_vars_multi_time(exoid, num_entry_this_obj, beg_time_step, end_time_step, ++ var_vals); ++ EX_FUNC_LEAVE(status); ++ } ++ ++ /* Determine index of obj_id in VAR_ID_EL_BLK array */ ++ obj_id_ndx = exi_id_lkup(exoid, var_type, obj_id); ++ if (obj_id_ndx <= 0) { ++ ex_get_err(NULL, NULL, &status); ++ ++ if (status != 0) { ++ if (status == EX_NULLENTITY) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "Warning: no %s variables for NULL block %" PRId64 " in file id %d", ++ ex_name_of_object(var_type), obj_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_NULLENTITY); ++ EX_FUNC_LEAVE(EX_WARN); ++ } ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to locate %s id %" PRId64 " in id variable in file id %d", ++ ex_name_of_object(var_type), obj_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ } ++ ++ /* inquire previously defined variable */ ++ ++ if ((status = nc_inq_varid(exoid, exi_name_var_of_object(var_type, var_index, obj_id_ndx), ++ &varid)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s %" PRId64 " var %d in file id %d", ++ ex_name_of_object(var_type), obj_id, var_index, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ /* read values of element variable */ ++ start[0] = --beg_time_step; ++ start[1] = 0; ++ ++ count[0] = end_time_step - beg_time_step; ++ count[1] = num_entry_this_obj; ++ ++ if (exi_comp_ws(exoid) == 4) { ++ status = nc_get_vara_float(exoid, varid, start, count, var_vals); ++ } ++ else { ++ status = nc_get_vara_double(exoid, varid, start, count, var_vals); ++ } ++ ++ if (status != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to get %s %" PRId64 " variable %d in file id %d", ++ ex_name_of_object(var_type), obj_id, var_index, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ EX_FUNC_LEAVE(EX_NOERR); ++} +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_var_time.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_var_time.c +index 279e95756e..ddff7941f4 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_var_time.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_var_time.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -46,9 +46,8 @@ int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, int64_t i + { + int dimid, varid; + int status; +- int * stat_vals = NULL; +- size_t numel = 0; +- size_t offset; ++ int *stat_vals = NULL; ++ int64_t numel = 0; + size_t num_obj, i; + size_t num_entries_this_obj = 0; + size_t start[2], count[2]; +@@ -57,16 +56,16 @@ int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, int64_t i + const char *varobstat; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + switch (var_type) { + case EX_GLOBAL: +- status = ex__get_glob_var_time(exoid, var_index, beg_time_step, end_time_step, var_vals); ++ status = exi_get_glob_var_time(exoid, var_index, beg_time_step, end_time_step, var_vals); + EX_FUNC_LEAVE(status); + case EX_NODAL: +- status = ex__get_nodal_var_time(exoid, var_index, id, beg_time_step, end_time_step, var_vals); ++ status = exi_get_nodal_var_time(exoid, var_index, id, beg_time_step, end_time_step, var_vals); + EX_FUNC_LEAVE(status); + case EX_EDGE_BLOCK: + varobjids = VAR_ID_ED_BLK; +@@ -115,7 +114,7 @@ int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, int64_t i + /* find what object the entry is in */ + + /* first, find out how many objects there are */ +- status = ex__get_dimension(exoid, ex__dim_num_objects(var_type), ex_name_of_object(var_type), ++ status = exi_get_dimension(exoid, exi_dim_num_objects(var_type), ex_name_of_object(var_type), + &num_obj, &dimid, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(status); +@@ -170,7 +169,7 @@ int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, int64_t i + + i = 0; + if (stat_vals[i] != 0) { +- if ((status = nc_inq_dimid(exoid, ex__dim_num_entries_in_object(var_type, i + 1), &dimid)) != ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_entries_in_object(var_type, i + 1), &dimid)) != + NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate number of entries in %zuth %s in file id %d", i, +@@ -194,7 +193,7 @@ int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, int64_t i + + while (numel <= id) { + if (stat_vals[++i] != 0) { +- if ((status = nc_inq_dimid(exoid, ex__dim_num_entries_in_object(var_type, i + 1), &dimid)) != ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_entries_in_object(var_type, i + 1), &dimid)) != + NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate number of entries in %zuth %s in file id %d", i, +@@ -215,10 +214,10 @@ int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, int64_t i + numel += num_entries_this_obj; + } + } +- offset = id - (numel - num_entries_this_obj); ++ size_t offset = id - (numel - num_entries_this_obj); + + /* inquire previously defined variable */ +- if ((status = nc_inq_varid(exoid, ex__name_var_of_object(var_type, var_index, i + 1), &varid)) != ++ if ((status = nc_inq_varid(exoid, exi_name_var_of_object(var_type, var_index, i + 1), &varid)) != + NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate variable %zu for %dth %s in file id %d", i, var_index, +@@ -275,7 +274,7 @@ int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, int64_t i + count[0] = end_time_step - beg_time_step + 1; + count[1] = 1; + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_get_vara_float(exoid, varid, start, count, var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_name.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_name.c +index 8ff88c8c2e..8b5d2f2e58 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_name.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_name.c +@@ -40,7 +40,7 @@ int ex_get_variable_name(int exoid, ex_entity_type obj_type, int var_num, char * + const char *vname = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -79,7 +79,7 @@ int ex_get_variable_name(int exoid, ex_entity_type obj_type, int var_num, char * + int api_name_size = ex_inquire_int(exoid, EX_INQ_MAX_READ_NAME_LENGTH); + int name_size = db_name_size < api_name_size ? db_name_size : api_name_size; + +- status = ex__get_name(exoid, varid, var_num - 1, var_name, name_size, obj_type, __func__); ++ status = exi_get_name(exoid, varid, var_num - 1, var_name, name_size, obj_type, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_names.c +index 88f6314e3b..b35bd4d9ea 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_names.c +@@ -71,7 +71,7 @@ int ex_get_variable_names(int exoid, ex_entity_type obj_type, int num_vars, char + const char *vvarname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -104,7 +104,7 @@ int ex_get_variable_names(int exoid, ex_entity_type obj_type, int num_vars, char + } + + /* read the variable names */ +- status = ex__get_names(exoid, varid, num_vars, var_names, obj_type, __func__); ++ status = exi_get_names(exoid, varid, num_vars, var_names, obj_type, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_param.c +index 54ebf13a23..e02b17490e 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_get_variable_param.c +@@ -79,7 +79,7 @@ int ex_get_variable_param(int exoid, ex_entity_type obj_type, int *num_vars) + int status; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_inquire.c b/ThirdParty/exodusII/vtkexodusII/src/ex_inquire.c +index 5035f1e0c3..885b465cd4 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_inquire.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_inquire.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2021 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -10,106 +10,108 @@ + #include "exodusII_int.h" + + /*! \cond INTERNAL */ +-static int ex__get_dimension_value(int exoid, int64_t *var, int default_value, ++static int exi_get_dimension_value(int exoid, int64_t *var, int default_value, + const char *dimension_name, int missing_ok) + { +- int status; +- char errmsg[MAX_ERR_LENGTH]; +- size_t idum; +- int dimid; ++ int status; ++ int dimid; + + if ((status = nc_inq_dimid(exoid, dimension_name, &dimid)) != NC_NOERR) { + *var = default_value; + if (missing_ok) { +- return (EX_NOERR); ++ return EX_NOERR; + } ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to retrieve dimension %s for file id %d", + dimension_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } ++ size_t idum; + if ((status = nc_inq_dimlen(exoid, dimid, &idum)) != NC_NOERR) { + *var = default_value; ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to retrieve value for dimension %s for file id %d", dimension_name, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + *var = idum; +- return (EX_NOERR); ++ return EX_NOERR; + } + + static int ex_get_concat_set_len(int exoid, int64_t *set_length, const char *set_name, + const char *set_num_dim, const char *set_stat_var, + const char *set_size_root, int missing_ok) + { +- int i; +- int status; +- char errmsg[MAX_ERR_LENGTH]; +- size_t idum; +- int dimid, varid; +- size_t num_sets; +- int * stat_vals = NULL; +- + *set_length = 0; /* default return value */ + +- if ((status = nc_inq_dimid(exoid, set_num_dim, &dimid)) == NC_NOERR) { ++ int dimid; ++ if (nc_inq_dimid(exoid, set_num_dim, &dimid) == NC_NOERR) { ++ int status; ++ size_t num_sets; + if ((status = nc_inq_dimlen(exoid, dimid, &num_sets)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of %s sets in file id %d", + set_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* Allocate space for stat array */ ++ int *stat_vals = NULL; + if (!(stat_vals = malloc((int)num_sets * sizeof(int)))) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate memory for %s set status " + "array for file id %d", + set_name, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* get variable id of status array */ +- if ((status = nc_inq_varid(exoid, set_stat_var, &varid)) == NC_NOERR) { ++ int varid; ++ if (nc_inq_varid(exoid, set_stat_var, &varid) == NC_NOERR) { + /* if status array exists, use it, otherwise assume, object exists + to be backward compatible */ + if ((status = nc_get_var_int(exoid, varid, stat_vals)) != NC_NOERR) { + free(stat_vals); ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get %s set status array from file id %d", + set_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + else { /* default: status is true */ +- for (i = 0; i < num_sets; i++) { ++ for (size_t i = 0; i < num_sets; i++) { + stat_vals[i] = 1; + } + } + +- for (i = 0; i < num_sets; i++) { ++ for (size_t i = 0; i < num_sets; i++) { + if (stat_vals[i] == 0) { /* is this object null? */ + continue; + } + +- if ((status = nc_inq_dimid(exoid, ex__catstr(set_size_root, i + 1), &dimid)) != NC_NOERR) { ++ size_t idum; ++ if (nc_inq_dimid(exoid, exi_catstr(set_size_root, i + 1), &dimid) != NC_NOERR) { + if (missing_ok) { + idum = 0; + } + else { + *set_length = 0; + free(stat_vals); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + else { +- if ((status = nc_inq_dimlen(exoid, dimid, &idum)) != NC_NOERR) { ++ if (nc_inq_dimlen(exoid, dimid, &idum) != NC_NOERR) { + *set_length = 0; + free(stat_vals); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + +@@ -118,7 +120,7 @@ static int ex_get_concat_set_len(int exoid, int64_t *set_length, const char *set + + free(stat_vals); + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + static void flt_cvt(float *xptr, double x) { *xptr = (float)x; } +@@ -127,19 +129,16 @@ static void flt_cvt(float *xptr, double x) { *xptr = (float)x; } + static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float *ret_float, + char *ret_char) + { +- int dimid, varid, rootid; +- void_int *ids = NULL; +- size_t i; +- size_t ldum = 0; +- size_t num_sets, idum; +- int * stat_vals; +- char errmsg[MAX_ERR_LENGTH]; +- int status; +- char tmp_title[2048]; +- int num_var; +- +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { +- return (EX_FATAL); ++ int dimid, varid; ++ size_t ldum = 0; ++ size_t num_sets, idum; ++ int *stat_vals; ++ char errmsg[MAX_ERR_LENGTH]; ++ int status; ++ int num_var; ++ ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ return EX_FATAL; + } + + if (ret_char) { +@@ -148,19 +147,19 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + if (!ret_int) { + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: integer argument is NULL which is not allowed."); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } + +- rootid = exoid & EX_FILE_ID_MASK; ++ int rootid = exoid & EX_FILE_ID_MASK; + + switch (req_info) { + case EX_INQ_FILE_TYPE: + + /* obsolete call */ +- /*returns "r" for regular EXODUS file or "h" for history EXODUS file*/ ++ /*return "r" for regular EXODUS file or "h" for history EXODUS file*/ + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: file type inquire is obsolete"); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_WARN); ++ return EX_WARN; + + case EX_INQ_API_VERS: + /* returns the EXODUS API version number */ +@@ -169,7 +168,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "Warning: float argument is NULL for EX_INQ_API_VERS " + "which is not allowed."); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if (nc_get_att_float(rootid, NC_GLOBAL, ATT_API_VERSION, ret_float) != +@@ -179,7 +178,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get EXODUS API version for file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + +@@ -192,14 +191,14 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "Warning: float argument is NULL for EX_INQ_DB_VERS " + "which is not allowed."); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if ((status = nc_get_att_float(rootid, NC_GLOBAL, ATT_VERSION, ret_float)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get EXODUS database version for file id %d", rootid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + break; + +@@ -212,9 +211,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + flt_cvt(ret_float, version); + } + +- if (ret_int) { +- *ret_int = EX_API_VERS_NODOT; +- } ++ *ret_int = EX_API_VERS_NODOT; + break; + + case EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH: +@@ -222,7 +219,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + It will not include the space for the trailing null, so if it + is defined as 33 on the database, 32 will be returned. + */ +- if ((status = nc_inq_dimid(rootid, DIM_STR_NAME, &dimid)) != NC_NOERR) { ++ if (nc_inq_dimid(rootid, DIM_STR_NAME, &dimid) != NC_NOERR) { + /* If not found, then an older database */ + *ret_int = 32; + } +@@ -233,7 +230,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get name string length in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + *ret_int = name_length - 1; +@@ -272,7 +269,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + * default if not set by the client is 32 characters. The value + * does not include the trailing null. + */ +- struct ex__file_item *file = ex__find_file_item(rootid); ++ struct exi_file_item *file = exi_find_file_item(rootid); + + if (!file) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d for ex_inquire_int().", rootid); +@@ -291,17 +288,18 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "for file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } + else { + /* returns the title of the database */ + /* Title is stored at root level... */ ++ char tmp_title[2048]; + if ((status = nc_get_att_text(rootid, NC_GLOBAL, ATT_TITLE, tmp_title)) != NC_NOERR) { + *ret_char = '\0'; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get database title for file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + ex_copy_string(ret_char, tmp_title, MAX_LINE_LENGTH + 1); + } +@@ -309,9 +307,9 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_DIM: + /* returns the dimensionality (2 or 3, for 2-d or 3-d) of the database */ +- if (ex__get_dimension(exoid, DIM_NUM_DIM, "database dimensionality", &ldum, &dimid, __func__) != ++ if (exi_get_dimension(exoid, DIM_NUM_DIM, "database dimensionality", &ldum, &dimid, __func__) != + NC_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = ldum; + break; +@@ -320,7 +318,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + /* returns the number of assemblies */ + { + *ret_int = 0; +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (file) { + *ret_int = file->assembly_count; + } +@@ -331,7 +329,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + /* returns the number of blobs */ + { + *ret_int = 0; +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (file) { + *ret_int = file->blob_count; + } +@@ -340,7 +338,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_NODES: + /* returns the number of nodes */ +- if (ex__get_dimension(exoid, DIM_NUM_NODES, "nodes", &ldum, &dimid, NULL) != NC_NOERR) { ++ if (exi_get_dimension(exoid, DIM_NUM_NODES, "nodes", &ldum, &dimid, NULL) != NC_NOERR) { + *ret_int = 0; + } + else { +@@ -350,7 +348,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_ELEM: + /* returns the number of elements */ +- if (ex__get_dimension(exoid, DIM_NUM_ELEM, "elements", &ldum, &dimid, NULL) != NC_NOERR) { ++ if (exi_get_dimension(exoid, DIM_NUM_ELEM, "elements", &ldum, &dimid, NULL) != NC_NOERR) { + *ret_int = 0; + } + else { +@@ -360,7 +358,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_ELEM_BLK: + /* returns the number of element blocks */ +- if (ex__get_dimension(exoid, DIM_NUM_EL_BLK, "element blocks", &ldum, &dimid, NULL) != ++ if (exi_get_dimension(exoid, DIM_NUM_EL_BLK, "element blocks", &ldum, &dimid, NULL) != + NC_NOERR) { + *ret_int = 0; + } +@@ -371,7 +369,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_NODE_SETS: + /* returns the number of node sets */ +- if (ex__get_dimension(exoid, DIM_NUM_NS, "node sets", &ldum, &dimid, NULL) != NC_NOERR) { ++ if (exi_get_dimension(exoid, DIM_NUM_NS, "node sets", &ldum, &dimid, NULL) != NC_NOERR) { + *ret_int = 0; + } + else { +@@ -404,10 +402,10 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of node sets in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + +- for (i = 0; i < num_sets; i++) { ++ for (size_t i = 0; i < num_sets; i++) { + if ((status = nc_inq_varid(exoid, VAR_FACT_NS(i + 1), &varid)) != NC_NOERR) { + if (status == NC_ENOTVAR) { + idum = 0; /* this dist factor doesn't exist */ +@@ -419,7 +417,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "ERROR: failed to locate number of dist fact for %zu'th node set in file id %d", i, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + else { +@@ -429,7 +427,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "ERROR: failed to locate number of nodes in %zu'th node set in file id %d", i, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + if ((status = nc_inq_dimlen(exoid, dimid, &idum)) != NC_NOERR) { + *ret_int = 0; +@@ -437,7 +435,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "ERROR: failed to get number of nodes in %zu'th node set in file id %d", i, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + *ret_int += idum; +@@ -448,7 +446,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_SIDE_SETS: + /* returns the number of side sets */ +- if (ex__get_dimension(exoid, DIM_NUM_SS, "side sets", &ldum, &dimid, NULL) != NC_NOERR) { ++ if (exi_get_dimension(exoid, DIM_NUM_SS, "side sets", &ldum, &dimid, NULL) != NC_NOERR) { + *ret_int = 0; + } + else { +@@ -467,22 +465,23 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of side sets in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + ++ int *ids = NULL; + if (!(ids = malloc(num_sets * sizeof(int64_t)))) { /* May be getting 2x what is + needed, but should be OK */ + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate memory for side set ids for file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if (ex_get_ids(exoid, EX_SIDE_SET, ids) == EX_FATAL) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get side set ids in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); + free(ids); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* allocate space for stat array */ +@@ -493,10 +492,10 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "array for file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (EX_FATAL); ++ return EX_FATAL; + } + /* get variable id of status array */ +- if ((status = nc_inq_varid(exoid, VAR_SS_STAT, &varid)) == NC_NOERR) { ++ if (nc_inq_varid(exoid, VAR_SS_STAT, &varid) == NC_NOERR) { + /* if status array exists, use it, otherwise assume, object exists + to be backward compatible */ + +@@ -506,18 +505,18 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get element block status array from file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + else { /* default: status is true */ +- for (i = 0; i < num_sets; i++) { ++ for (size_t i = 0; i < num_sets; i++) { + stat_vals[i] = 1; + } + } + + /* walk id list, get each side set node length and sum for total */ + +- for (i = 0; i < num_sets; i++) { ++ for (size_t i = 0; i < num_sets; i++) { + ex_entity_id id; + if (stat_vals[i] == 0) { /* is this object null? */ + continue; +@@ -547,7 +546,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + ex_err_fn(exoid, __func__, errmsg, status); + free(stat_vals); + free(ids); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + +@@ -584,10 +583,10 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of side sets in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + +- for (i = 0; i < num_sets; i++) { ++ for (size_t i = 0; i < num_sets; i++) { + if ((status = nc_inq_dimid(exoid, DIM_NUM_DF_SS(i + 1), &dimid)) != NC_NOERR) { + if (status == NC_EBADDIM) { + ldum = 0; /* this dist factor doesn't exist */ +@@ -599,7 +598,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "ERROR: failed to locate number of dist fact for %zu'th side set in file id %d", i, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + else { +@@ -609,7 +608,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "ERROR: failed to get number of dist factors in %zu'th side set in file id %d", + i, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + *ret_int += ldum; +@@ -620,7 +619,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_QA: + /* returns the number of QA records */ +- if (ex__get_dimension(rootid, DIM_NUM_QA, "QA records", &ldum, &dimid, NULL) != NC_NOERR) { ++ if (exi_get_dimension(rootid, DIM_NUM_QA, "QA records", &ldum, &dimid, NULL) != NC_NOERR) { + *ret_int = 0; + } + else { +@@ -630,7 +629,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_INFO: + /* returns the number of information records */ +- if (ex__get_dimension(rootid, DIM_NUM_INFO, "info records", &ldum, &dimid, NULL) != NC_NOERR) { ++ if (exi_get_dimension(rootid, DIM_NUM_INFO, "info records", &ldum, &dimid, NULL) != NC_NOERR) { + *ret_int = 0; + } + else { +@@ -640,8 +639,8 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_TIME: + /* returns the number of time steps stored in the database */ +- if (ex__get_dimension(exoid, DIM_TIME, "time dimension", &ldum, &dimid, __func__) != NC_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension(exoid, DIM_TIME, "time dimension", &ldum, &dimid, __func__) != NC_NOERR) { ++ return EX_FATAL; + } + *ret_int = ldum; + break; +@@ -663,7 +662,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_ELEM_MAP: + /* returns the number of element maps */ +- if (ex__get_dimension(exoid, DIM_NUM_EM, "element maps", &ldum, &dimid, NULL) != NC_NOERR) { ++ if (exi_get_dimension(exoid, DIM_NUM_EM, "element maps", &ldum, &dimid, NULL) != NC_NOERR) { + *ret_int = 0; + } + else { +@@ -678,7 +677,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_NODE_MAP: + /* returns the number of node maps */ +- if (ex__get_dimension(exoid, DIM_NUM_NM, "node maps", &ldum, &dimid, NULL) != NC_NOERR) { ++ if (exi_get_dimension(exoid, DIM_NUM_NM, "node maps", &ldum, &dimid, NULL) != NC_NOERR) { + *ret_int = 0; + } + else { +@@ -693,22 +692,22 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_EDGE: + /* returns the number of edges (defined across all edge blocks). */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_EDGE, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_EDGE, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + + case EX_INQ_EDGE_BLK: + /* returns the number of edge blocks. */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_ED_BLK, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_ED_BLK, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + + case EX_INQ_EDGE_SETS: + /* returns the number of edge sets. */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_ES, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_ES, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + +@@ -737,22 +736,22 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_FACE: + /* returns the number of faces (defined across all face blocks). */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_FACE, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_FACE, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + + case EX_INQ_FACE_BLK: + /* returns the number of face blocks. */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_FA_BLK, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_FA_BLK, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + + case EX_INQ_FACE_SETS: + /* returns the number of face sets. */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_FS, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_FS, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + +@@ -781,8 +780,8 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_ELEM_SETS: + /* returns the number of element sets. */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_ELS, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_ELS, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + +@@ -804,92 +803,92 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + + case EX_INQ_EDGE_MAP: + /* returns the number of edge maps. */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_EDM, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_EDM, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + + case EX_INQ_FACE_MAP: + /* returns the number of face maps. */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_FAM, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_FAM, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + + case EX_INQ_NUM_NODE_VAR: + if (ex_get_variable_param(exoid, EX_NODAL, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_NUM_EDGE_BLOCK_VAR: + if (ex_get_variable_param(exoid, EX_EDGE_BLOCK, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_NUM_FACE_BLOCK_VAR: + if (ex_get_variable_param(exoid, EX_FACE_BLOCK, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_NUM_ELEM_BLOCK_VAR: + if (ex_get_variable_param(exoid, EX_ELEM_BLOCK, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_NUM_NODE_SET_VAR: + if (ex_get_variable_param(exoid, EX_NODE_SET, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_NUM_EDGE_SET_VAR: + if (ex_get_variable_param(exoid, EX_EDGE_SET, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_NUM_FACE_SET_VAR: + if (ex_get_variable_param(exoid, EX_FACE_SET, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_NUM_ELEM_SET_VAR: + if (ex_get_variable_param(exoid, EX_ELEM_SET, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_NUM_SIDE_SET_VAR: + if (ex_get_variable_param(exoid, EX_SIDE_SET, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_NUM_GLOBAL_VAR: + if (ex_get_variable_param(exoid, EX_GLOBAL, &num_var) != EX_NOERR) { +- return (EX_FATAL); ++ return EX_FATAL; + } + *ret_int = num_var; + break; + + case EX_INQ_COORD_FRAMES: + /* return the number of coordinate frames */ +- if (ex__get_dimension_value(exoid, ret_int, 0, DIM_NUM_CFRAMES, 1) != EX_NOERR) { +- return (EX_FATAL); ++ if (exi_get_dimension_value(exoid, ret_int, 0, DIM_NUM_CFRAMES, 1) != EX_NOERR) { ++ return EX_FATAL; + } + break; + +@@ -937,7 +936,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "null for file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } + #if NC_HAS_HDF5 + nc_inq_grpname(exoid, ret_char); +@@ -969,13 +968,21 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + "null for file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } + #if NC_HAS_HDF5 + nc_inq_grpname_full(exoid, NULL, ret_char); + #endif + break; + ++ case EX_INQ_FILE_FORMAT: { ++ /* return netCDF file format. ++ */ ++ int nc_format = 0; ++ nc_inq_format(exoid, &nc_format); ++ *ret_int = nc_format; ++ } break; ++ + case EX_INQ_THREADSAFE: + /* Return 1 if the library was compiled in thread-safe mode. + * Return 0 otherwise +@@ -991,9 +998,9 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float + *ret_int = 0; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: invalid inquiry %d", req_info); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + /*! +@@ -1021,7 +1028,7 @@ int num_block = ex_inquire_int(exoid, EX_INQ_ELEM_BLK); + */ + int64_t ex_inquire_int(int exoid, ex_inquiry req_info) + { +- char * cdummy = NULL; /* Needed just for function call, unused. */ ++ char *cdummy = NULL; /* Needed just for function call, unused. */ + float fdummy = 0; /* Needed just for function call, unused. */ + int64_t ret_val = 0; + int error; +@@ -1095,7 +1102,7 @@ int ex_inquire(int exoid, ex_inquiry req_info, void_int *ret_int, float *ret_flo + } + /* ret_int is a 32-bit int */ + int64_t tmp_int; +- int * return_int = ret_int; ++ int *return_int = ret_int; + + EX_FUNC_ENTER(); + ierr = ex_inquire_internal(exoid, req_info, &tmp_int, ret_float, ret_char); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_int_get_block_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_int_get_block_param.c +index 7b33bc4b41..647e1e2d5b 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_int_get_block_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_int_get_block_param.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -11,33 +11,31 @@ + #include + + /* Generic error message for element type/node count mapping...*/ +-static int el_node_count_error(int exoid, struct ex__elem_blk_parm elem_blk_parms) ++static int el_node_count_error(int exoid, struct exi_elem_blk_parm elem_blk_parms) + { + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: An element of type '%s' with %d nodes is not valid.", + elem_blk_parms.elem_type, elem_blk_parms.num_nodes_per_elem); + ex_err_fn(exoid, __func__, errmsg, EX_MSG); +- return (EX_FATAL); ++ return EX_FATAL; + } + +-int ex__get_block_param(int exoid, ex_entity_id id, int ndim, +- struct ex__elem_blk_parm *elem_blk_parm) ++int exi_get_block_param(int exoid, ex_entity_id id, int ndim, ++ struct exi_elem_blk_parm *elem_blk_parm) + { +- size_t m; +- char errmsg[MAX_ERR_LENGTH]; +- + EX_FUNC_ENTER(); + + ex_block block; + block.id = id; + block.type = EX_ELEM_BLOCK; + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* read in an element block parameter */ + if ((ex_get_block_param(exoid, &block)) != EX_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get element block %" PRId64 " parameters in file id %d", block.id, + exoid); +@@ -50,6 +48,7 @@ int ex__get_block_param(int exoid, ex_entity_id id, int ndim, + elem_blk_parm->num_attr = block.num_attribute; + elem_blk_parm->elem_blk_id = block.id; + ++ size_t m; + for (m = 0; m < strlen(block.topology); m++) { + elem_blk_parm->elem_type[m] = toupper(block.topology[m]); + } +@@ -80,6 +79,12 @@ int ex__get_block_param(int exoid, ex_entity_id id, int ndim, + elem_blk_parm->num_nodes_per_side[2] = 3; + elem_blk_parm->num_nodes_per_side[3] = 3; + } ++ else if (elem_blk_parm->num_nodes_per_elem == 12 || elem_blk_parm->num_nodes_per_elem == 16) { ++ elem_blk_parm->num_nodes_per_side[0] = 4; ++ elem_blk_parm->num_nodes_per_side[1] = 4; ++ elem_blk_parm->num_nodes_per_side[2] = 4; ++ elem_blk_parm->num_nodes_per_side[3] = 4; ++ } + else { + EX_FUNC_LEAVE(el_node_count_error(exoid, *elem_blk_parm)); + } +@@ -100,6 +105,15 @@ int ex__get_block_param(int exoid, ex_entity_id id, int ndim, + elem_blk_parm->num_nodes_per_side[1] = 3; + elem_blk_parm->num_nodes_per_side[2] = 3; + } ++ else if (elem_blk_parm->num_nodes_per_elem == 9 || /* Tri9 */ ++ elem_blk_parm->num_nodes_per_elem == 13) { /* Tri13 */ ++ elem_blk_parm->num_nodes_per_side[0] = 4; ++ elem_blk_parm->num_nodes_per_side[1] = 4; ++ elem_blk_parm->num_nodes_per_side[2] = 4; ++ } ++ else { ++ EX_FUNC_LEAVE(el_node_count_error(exoid, *elem_blk_parm)); ++ } + } + else if (ndim == 3) { /* 3d TRIs -- triangular shell*/ + elem_blk_parm->num_sides = 5; /* 2 Faces and 3 Edges */ +@@ -117,6 +131,13 @@ int ex__get_block_param(int exoid, ex_entity_id id, int ndim, + elem_blk_parm->num_nodes_per_side[3] = 3; + elem_blk_parm->num_nodes_per_side[4] = 3; + } ++ else if (elem_blk_parm->num_nodes_per_elem == 9 || elem_blk_parm->num_nodes_per_elem == 13) { ++ elem_blk_parm->num_nodes_per_side[0] = elem_blk_parm->num_nodes_per_elem; ++ elem_blk_parm->num_nodes_per_side[1] = elem_blk_parm->num_nodes_per_elem; ++ elem_blk_parm->num_nodes_per_side[2] = 4; ++ elem_blk_parm->num_nodes_per_side[3] = 4; ++ elem_blk_parm->num_nodes_per_side[4] = 4; ++ } + else { + EX_FUNC_LEAVE(el_node_count_error(exoid, *elem_blk_parm)); + } +@@ -197,6 +218,22 @@ int ex__get_block_param(int exoid, ex_entity_id id, int ndim, + elem_blk_parm->num_nodes_per_side[4] = 9; + elem_blk_parm->num_nodes_per_side[5] = 9; + } ++ else if (elem_blk_parm->num_nodes_per_elem == 32) { ++ elem_blk_parm->num_nodes_per_side[0] = 12; ++ elem_blk_parm->num_nodes_per_side[1] = 12; ++ elem_blk_parm->num_nodes_per_side[2] = 12; ++ elem_blk_parm->num_nodes_per_side[3] = 12; ++ elem_blk_parm->num_nodes_per_side[4] = 12; ++ elem_blk_parm->num_nodes_per_side[5] = 12; ++ } ++ else if (elem_blk_parm->num_nodes_per_elem == 64) { ++ elem_blk_parm->num_nodes_per_side[0] = 16; ++ elem_blk_parm->num_nodes_per_side[1] = 16; ++ elem_blk_parm->num_nodes_per_side[2] = 16; ++ elem_blk_parm->num_nodes_per_side[3] = 16; ++ elem_blk_parm->num_nodes_per_side[4] = 16; ++ elem_blk_parm->num_nodes_per_side[5] = 16; ++ } + else { + EX_FUNC_LEAVE(el_node_count_error(exoid, *elem_blk_parm)); + } +@@ -229,6 +266,18 @@ int ex__get_block_param(int exoid, ex_entity_id id, int ndim, + elem_blk_parm->num_nodes_per_side[2] = 7; + elem_blk_parm->num_nodes_per_side[3] = 7; + } ++ else if (elem_blk_parm->num_nodes_per_elem == 16) { ++ elem_blk_parm->num_nodes_per_side[0] = 9; ++ elem_blk_parm->num_nodes_per_side[1] = 9; ++ elem_blk_parm->num_nodes_per_side[2] = 9; ++ elem_blk_parm->num_nodes_per_side[3] = 9; ++ } ++ else if (elem_blk_parm->num_nodes_per_elem == 40) { ++ elem_blk_parm->num_nodes_per_side[0] = 13; ++ elem_blk_parm->num_nodes_per_side[1] = 13; ++ elem_blk_parm->num_nodes_per_side[2] = 13; ++ elem_blk_parm->num_nodes_per_side[3] = 13; ++ } + else { + EX_FUNC_LEAVE(el_node_count_error(exoid, *elem_blk_parm)); + } +@@ -250,7 +299,7 @@ int ex__get_block_param(int exoid, ex_entity_id id, int ndim, + elem_blk_parm->num_nodes_per_side[3] = 6; /* 6-node tri faces */ + elem_blk_parm->num_nodes_per_side[4] = 6; + } +- else if (elem_blk_parm->num_nodes_per_elem == 15) { ++ else if (elem_blk_parm->num_nodes_per_elem == 15 || elem_blk_parm->num_nodes_per_elem == 16) { + elem_blk_parm->num_nodes_per_side[0] = 8; + elem_blk_parm->num_nodes_per_side[1] = 8; + elem_blk_parm->num_nodes_per_side[2] = 8; +@@ -271,6 +320,20 @@ int ex__get_block_param(int exoid, ex_entity_id id, int ndim, + elem_blk_parm->num_nodes_per_side[3] = 7; + elem_blk_parm->num_nodes_per_side[4] = 7; + } ++ else if (elem_blk_parm->num_nodes_per_elem == 24) { ++ elem_blk_parm->num_nodes_per_side[0] = 12; ++ elem_blk_parm->num_nodes_per_side[1] = 12; ++ elem_blk_parm->num_nodes_per_side[2] = 12; ++ elem_blk_parm->num_nodes_per_side[3] = 9; ++ elem_blk_parm->num_nodes_per_side[4] = 9; ++ } ++ else if (elem_blk_parm->num_nodes_per_elem == 52) { ++ elem_blk_parm->num_nodes_per_side[0] = 16; ++ elem_blk_parm->num_nodes_per_side[1] = 16; ++ elem_blk_parm->num_nodes_per_side[2] = 16; ++ elem_blk_parm->num_nodes_per_side[3] = 13; ++ elem_blk_parm->num_nodes_per_side[4] = 13; ++ } + else { + EX_FUNC_LEAVE(el_node_count_error(exoid, *elem_blk_parm)); + } +@@ -322,6 +385,10 @@ int ex__get_block_param(int exoid, ex_entity_id id, int ndim, + elem_blk_parm->num_nodes_per_side[0] = 3; + elem_blk_parm->num_nodes_per_side[1] = 3; + } ++ else if (elem_blk_parm->num_nodes_per_elem == 4) { ++ elem_blk_parm->num_nodes_per_side[0] = 4; ++ elem_blk_parm->num_nodes_per_side[1] = 4; ++ } + else { + EX_FUNC_LEAVE(el_node_count_error(exoid, *elem_blk_parm)); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_ne_util.c b/ThirdParty/exodusII/vtkexodusII/src/ex_ne_util.c +index 8854d626fa..be897605db 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_ne_util.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_ne_util.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -11,11 +11,11 @@ + /*****************************************************************************/ + /* Function(s) contained in this file: + * +- * ex__leavedef() +- * ne__id_lkup() +- * ex__get_file_type() +- * ex__put_nemesis_version() +- * ne__check_file_version() ++ * exi_leavedef() ++ * nei_id_lkup() ++ * exi_get_file_type() ++ * exi_put_nemesis_version() ++ * nei_check_file_version() + * ex_get_idx() + * + ***************************************************************************** +@@ -37,62 +37,64 @@ char *ne_ret_string; + /* Note: This function assumes a 1-d vector of data for "ne_var_name". + */ + /*****************************************************************************/ +-int ne__id_lkup(int exoid, const char *ne_var_name, int64_t *idx, ex_entity_id ne_var_id) ++int nei_id_lkup(int exoid, const char *ne_var_name, int64_t *idx, ex_entity_id ne_var_id) + { +- int status; +- int varid, ndims, dimid[1], ret = -1; +- nc_type var_type; +- size_t length, start[1]; +- int64_t my_index, begin, end; +- long long id_val; +- +- char errmsg[MAX_ERR_LENGTH]; +- ++ int status; ++ int varid; + if ((status = nc_inq_varid(exoid, ne_var_name, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to find variable ID for \"%s\" in file ID %d", + ne_var_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* check if I need the length for this variable */ + if (idx[1] == -1) { + /* Get the dimension IDs for this variable */ +- if ((status = nc_inq_var(exoid, varid, (char *)0, &var_type, &ndims, dimid, (int *)0)) != +- NC_NOERR) { ++ int ndims; ++ int dimid[1]; ++ nc_type var_type; ++ if ((status = nc_inq_var(exoid, varid, NULL, &var_type, &ndims, dimid, NULL)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find dimension ID for variable \"%s\" " + "in file ID %d", + ne_var_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* Get the length of this variable */ ++ size_t length; + if ((status = nc_inq_dimlen(exoid, dimid[0], &length)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find dimension for variable \"%s\" in file ID %d", ne_var_name, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + idx[1] = length; + } /* End "if (idx[1] == -1)" */ + +- begin = idx[0]; +- end = idx[1]; ++ int64_t begin = idx[0]; ++ int64_t end = idx[1]; + + /* Find the index by looping over each entry */ +- for (my_index = begin; my_index < end; my_index++) { +- start[0] = my_index; +- status = nc_get_var1_longlong(exoid, varid, start, &id_val); ++ int ret = -1; ++ for (int64_t my_index = begin; my_index < end; my_index++) { ++ size_t start[] = {my_index}; ++ long long id_val; ++ status = nc_get_var1_longlong(exoid, varid, start, &id_val); + + if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to find variable \"%s\" in file ID %d", + ne_var_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if (id_val == ne_var_id) { +@@ -100,7 +102,7 @@ int ne__id_lkup(int exoid, const char *ne_var_name, int64_t *idx, ex_entity_id n + break; + } + } +- return (ret); ++ return ret; + } + + /*****************************************************************************/ +@@ -109,17 +111,12 @@ int ne__id_lkup(int exoid, const char *ne_var_name, int64_t *idx, ex_entity_id n + /* This function retrieves the file type from a Nemesis file. + */ + /*****************************************************************************/ +-int ex__get_file_type(int exoid, char *ftype) ++int exi_get_file_type(int exoid, char *ftype) + { +- int status; +- int varid; +- int lftype; +- +- char errmsg[MAX_ERR_LENGTH]; +- + EX_FUNC_ENTER(); + +- if ((status = nc_inq_varid(exoid, VAR_FILE_TYPE, &varid)) != NC_NOERR) { ++ int varid; ++ if (nc_inq_varid(exoid, VAR_FILE_TYPE, &varid) != NC_NOERR) { + + /* If no file type is found, assume parallel */ + ftype[0] = 'p'; +@@ -128,7 +125,10 @@ int ex__get_file_type(int exoid, char *ftype) + EX_FUNC_LEAVE(EX_NOERR); + } + ++ int status; ++ int lftype; + if ((status = nc_get_var1_int(exoid, varid, NULL, &lftype)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get variable \"%s\" from file ID %d", + VAR_FILE_TYPE, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -152,24 +152,20 @@ int ex__get_file_type(int exoid, char *ftype) + /* This function outputs the Nemesis version information to the file. + */ + /*****************************************************************************/ +-int ex__put_nemesis_version(int exoid) ++int exi_put_nemesis_version(int exoid) + { +- int status; +- float file_ver, api_ver; +- +- char errmsg[MAX_ERR_LENGTH]; +- + EX_FUNC_ENTER(); + +- file_ver = NEMESIS_FILE_VERSION; +- api_ver = NEMESIS_API_VERSION; ++ float file_ver = NEMESIS_FILE_VERSION; + + /* Check to see if the nemesis file version is already in the file */ + if (nc_get_att_float(exoid, NC_GLOBAL, "nemesis_file_version", &file_ver) != NC_NOERR) { + + /* Output the Nemesis file version */ ++ int status; + if ((status = nc_put_att_float(exoid, NC_GLOBAL, ATT_NEM_FILE_VERSION, NC_FLOAT, 1, + &file_ver)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to output nemesis file version in file ID %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -177,8 +173,10 @@ int ex__put_nemesis_version(int exoid) + } + + /* Output the Nemesis API version */ ++ float api_ver = NEMESIS_API_VERSION; + if ((status = nc_put_att_float(exoid, NC_GLOBAL, ATT_NEM_API_VERSION, NC_FLOAT, 1, &api_ver)) != + NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to output nemesis api version in file ID %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -194,7 +192,7 @@ int ex__put_nemesis_version(int exoid) + /* This function checks that the version info is correct. + */ + /*****************************************************************************/ +-int ne__check_file_version(int exoid) ++int nei_check_file_version(int exoid) + { + #if 0 + float file_ver; +@@ -235,7 +233,6 @@ int ne__check_file_version(int exoid) + /*****************************************************************************/ + int ex_get_idx(int exoid, const char *ne_var_name, int64_t *my_index, int pos) + { +- int status; + int varid; + size_t start[1], count[1]; + #if NC_HAS_HDF5 +@@ -256,7 +253,7 @@ int ex_get_idx(int exoid, const char *ne_var_name, int64_t *my_index, int pos) + * means that this is a parallel file, and the index does + * not exists. This is not an error + */ +- if ((status = nc_inq_varid(exoid, ne_var_name, &varid)) == NC_NOERR) { ++ if (nc_inq_varid(exoid, ne_var_name, &varid) == NC_NOERR) { + /* check if we are at the beginning of the index vector */ + if (pos == 0) { + start[0] = pos; +@@ -268,9 +265,9 @@ int ex_get_idx(int exoid, const char *ne_var_name, int64_t *my_index, int pos) + } + + #if NC_HAS_HDF5 +- status = nc_get_vara_longlong(exoid, varid, start, count, varidx); ++ int status = nc_get_vara_longlong(exoid, varid, start, count, varidx); + #else +- status = nc_get_vara_int(exoid, varid, start, count, varidx); ++ int status = nc_get_vara_int(exoid, varid, start, count, varidx); + #endif + if (status != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to find variable \"%s\" in file ID %d", +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_open.c b/ThirdParty/exodusII/vtkexodusII/src/ex_open.c +index 37be0822e5..91901eb62b 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_open.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_open.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -27,6 +27,7 @@ + + #include "exodusII.h" // for ex_err, etc + #include "exodusII_int.h" // for EX_FATAL, etc ++#include + /*! + \ingroup Utilities + +@@ -101,13 +102,11 @@ exoid = ex_open ("test.exo", \co{filename path} + int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *version, + int run_version) + { +- int exoid = -1; +- int status = 0, stat_att = 0, stat_dim = 0; ++ int exoid = -1; ++ int status = 0; + nc_type att_type = NC_NAT; +- size_t att_len = 0; + int old_fill = 0; + int file_wordsize = 0; +- int dim_str_name = 0; + int int64_status = 0; + int nc_mode = 0; + +@@ -119,7 +118,7 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + /* set error handling mode to no messages, non-fatal errors */ + ex_opts(exoptval); /* call required to set ncopts first time through */ + +- ex__check_version(run_version); ++ exi_check_version(run_version); + + if ((mode & EX_READ) && (mode & EX_WRITE)) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Cannot specify both EX_READ and EX_WRITE"); +@@ -127,12 +126,21 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + EX_FUNC_LEAVE(EX_FATAL); + } + ++ if (!path || strlen(path) == 0) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Filename is not specified."); ++ ex_err(__func__, errmsg, EX_BADFILEMODE); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ char *canon_path = exi_canonicalize_filename(path); ++ + /* Verify that this file is not already open for read or write... + In theory, should be ok for the file to be open multiple times + for read, but bad things can happen if being read and written + at the same time... + */ +- if (ex__check_multiple_open(path, mode, __func__)) { ++ if (exi_check_multiple_open(canon_path, mode, __func__)) { ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -146,7 +154,7 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + } + #endif + +- if ((status = nc_open(path, nc_mode, &exoid)) != NC_NOERR) { ++ if ((status = nc_open(canon_path, nc_mode, &exoid)) != NC_NOERR) { + /* NOTE: netCDF returns an id of -1 on an error - but no error code! */ + /* It is possible that the user is trying to open a netcdf4 + file, but the netcdf4 capabilities aren't available in the +@@ -168,7 +176,7 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + int type = 0; + ex_opts(EX_VERBOSE); + +- ex__check_file_type(path, &type); ++ exi_check_file_type(canon_path, &type); + + if (type == 0) { + /* Error message printed at lower level */ +@@ -180,8 +188,10 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + "file:\n\t'%s'\n\tfailed. The netcdf library supports " + "netcdf-4 so there must be a filesystem or some other " + "issue.\n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + #else + /* This is an hdf5 (netcdf4) file. If NC_HAS_HDF5 is not defined, + then we either don't have hdf5 support in this netcdf version, +@@ -196,8 +206,10 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + "file:\n\t'%s'.\n\tEither the netcdf library does not " + "support netcdf-4 or there is a filesystem or some " + "other issue.\n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + #endif + } + else if (type == 4) { +@@ -207,8 +219,10 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + "file:\n\t'%s'\n\tfailed. The netcdf library supports " + "CDF5-type files so there must be a filesystem or some other " + "issue \n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + #else + /* This is an cdf5 (64BIT_DATA) file. If NC_64BIT_DATA is not defined, + then we either don't have cdf5 support in this netcdf version, +@@ -223,33 +237,36 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + "file:\n\t'%s'.\n\tEither the netcdf library does not " + "support CDF5 or there is a filesystem or some " + "other issue \n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + + #endif + } + else if (type == 1) { +- /* Possibly an issue with an older file created by a Java-based NetCDF library which wrote +- * corrupted data which is now being checked by newer releases of the NetCDF library... +- * SEE: https://github.com/Unidata/netcdf-c/issues/1115 +- */ +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to open '%s' of type %d for reading.\n" +- "\t\tIf this is an old file, it is possible that it has some internal corruption\n" +- "\t\tthat is now being checked by recent versions of the NetCDF library.\n" +- "\t\tTo fix, you can find an older version of `nccopy` (prior to 4.6.0)\n" +- "\t\tthen try `nccopy bad_file.g fixed_file.g`.", +- path, type); +- ex_err(__func__, errmsg, status); +- EX_FUNC_LEAVE(EX_FATAL); +- ++ /* Possibly an issue with an older file created by a Java-based NetCDF library which wrote ++ * corrupted data which is now being checked by newer releases of the NetCDF library... ++ * SEE: https://github.com/Unidata/netcdf-c/issues/1115 ++ */ ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to open '%s' of type %d for reading.\n" ++ "\t\tIf this is an old file, it is possible that it has some internal corruption\n" ++ "\t\tthat is now being checked by recent versions of the NetCDF library.\n" ++ "\t\tTo fix, you can find an older version of `nccopy` (prior to 4.6.0)\n" ++ "\t\tthen try `nccopy bad_file.g fixed_file.g`.", ++ canon_path, type); ++ ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + } + snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to open %s of type %d for reading. Either " +- "the file does not exist,\n\tor there is a permission or file " ++ "ERROR: failed to open %s of type %d for reading.\n\t\tThe " ++ "file does not exist, or there is a permission or file " + "format issue.", +- path, type); ++ canon_path, type); + ex_err(__func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -263,32 +280,38 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + #endif + } + #endif +- if ((status = nc_open(path, nc_mode, &exoid)) != NC_NOERR) { ++ if ((status = nc_open(canon_path, nc_mode, &exoid)) != NC_NOERR) { + /* NOTE: netCDF returns an id of -1 on an error - but no error code! */ + snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to open %s for read/write. Either the file " ++ "ERROR: failed to open %s for read/write.\n\tEither the file " + "does not exist,\n\tor there is a permission or file format " + "issue.", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* turn off automatic filling of netCDF variables */ + if ((status = nc_set_fill(exoid, NC_NOFILL, &old_fill)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to set nofill mode in file id %d named %s", +- exoid, path); ++ exoid, canon_path); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +- stat_att = nc_inq_att(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &att_type, &att_len); +- stat_dim = nc_inq_dimid(exoid, DIM_STR_NAME, &dim_str_name); ++ size_t att_len = 0; ++ int stat_att = nc_inq_att(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &att_type, &att_len); ++ int dim_str_name = 0; ++ int stat_dim = nc_inq_dimid(exoid, DIM_STR_NAME, &dim_str_name); + if (stat_att != NC_NOERR || stat_dim != NC_NOERR) { ++ /* This must still be nc_redef */ + if ((status = nc_redef(exoid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to place file id %d named %s into define mode", exoid, path); ++ "ERROR: failed to place file id %d named %s into define mode", exoid, canon_path); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -299,6 +322,7 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to add maximum_name_length attribute in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -307,16 +331,20 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + * add it now. */ + if (stat_dim != NC_NOERR) { + /* Not found; set to default value of 32+1. */ +- int max_name = ex__default_max_name_length < 32 ? 32 : ex__default_max_name_length; ++ int max_name = exi_default_max_name_length < 32 ? 32 : exi_default_max_name_length; + if ((status = nc_def_dim(exoid, DIM_STR_NAME, max_name + 1, &dim_str_name)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define string name dimension in file id %d named %s", exoid, +- path); ++ canon_path); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + } +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = nc_enddef(exoid)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -330,6 +358,7 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get database version for file id: %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -338,6 +367,7 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Unsupported file version %.2f in file id: %d", + *version, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -348,6 +378,7 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get file wordsize from file id: %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -372,26 +403,30 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver + not know that file was closed and possibly new file opened for + this exoid + */ +- if (ex__find_file_item(exoid) != NULL) { ++ if (exi_find_file_item(exoid) != NULL) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: There is an existing file already using the file " + "id %d which was also assigned to file %s.\n\tWas " + "nc_close() called instead of ex_close() on an open Exodus " + "file?\n", +- exoid, path); ++ exoid, canon_path); + ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); + nc_close(exoid); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* initialize floating point and integer size conversion. */ +- if (ex__conv_init(exoid, comp_ws, io_ws, file_wordsize, int64_status, false, false, false, ++ if (exi_conv_init(exoid, comp_ws, io_ws, file_wordsize, int64_status, false, false, false, + mode & EX_WRITE) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to initialize conversion routines in file id %d named %s", exoid, path); ++ "ERROR: failed to initialize conversion routines in file id %d named %s", exoid, ++ canon_path); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + ++ free(canon_path); + EX_FUNC_LEAVE(exoid); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c +index d195088e46..5fd2eec4c2 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -31,6 +31,7 @@ + #include "exodusII.h" + #include "exodusII_int.h" + #include ++#include + /*! + \ingroup Utilities + +@@ -97,7 +98,7 @@ exoid = ex_open_par ("test.exo", \co{filename path} + &CPU_word_size, \co{CPU word size} + &IO_word_size, \co{IO word size} + &version, \co{ExodusII library version +- MPI_COMM_WORLD, ++ MPI_COMM_WORLD, // CHECK: ALLOW MPI_COMM_WORLD + MPI_INFO_NULL);} + ~~~ + */ +@@ -119,18 +120,16 @@ struct ncvar /* variable */ + int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float *version, + MPI_Comm comm, MPI_Info info, int run_version) + { +- int exoid = -1; +- int status = 0, stat_att = 0, stat_dim = 0; +- nc_type att_type = NC_NAT; +- size_t att_len = 0; +- int nc_mode = 0; +- int old_fill = 0; +- int file_wordsize = 0; +- int dim_str_name = 0; +- int int64_status = 0; +- bool is_hdf5 = false; +- bool is_pnetcdf = false; +- bool in_redef = false; ++ int exoid = -1; ++ int status = 0; ++ int nc_mode = 0; ++ int old_fill = 0; ++ int file_wordsize = 0; ++ int dim_str_name = 0; ++ int int64_status = 0; ++ bool is_hdf5 = false; ++ bool is_pnetcdf = false; ++ bool in_redef = false; + + char errmsg[MAX_ERR_LENGTH]; + +@@ -139,7 +138,7 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + /* set error handling mode to no messages, non-fatal errors */ + ex_opts(exoptval); /* call required to set ncopts first time through */ + +- ex__check_version(run_version); ++ exi_check_version(run_version); + + if ((mode & EX_READ) && (mode & EX_WRITE)) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Cannot specify both EX_READ and EX_WRITE"); +@@ -147,12 +146,21 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + EX_FUNC_LEAVE(EX_FATAL); + } + ++ if (!path || strlen(path) == 0) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Filename is not specified."); ++ ex_err(__func__, errmsg, EX_BADFILEMODE); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ char *canon_path = exi_canonicalize_filename(path); ++ + /* Verify that this file is not already open for read or write... + In theory, should be ok for the file to be open multiple times + for read, but bad things can happen if being read and written + at the same time... + */ +- if (ex__check_multiple_open(path, mode, __func__)) { ++ if (exi_check_multiple_open(canon_path, mode, __func__)) { ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -172,7 +180,16 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + else { + nc_mode = (NC_NOWRITE | NC_SHARE | NC_MPIIO); + } +- if ((status = nc_open_par(path, nc_mode, comm, info, &exoid)) != NC_NOERR) { ++ /* There is an issue on some versions of mpi that limit the length of the path to <250 characters ++ * Check for that here and use `path` if `canon_path` is >=250 characters... ++ */ ++ if (strlen(canon_path) >= 250) { ++ status = nc_open_par(path, nc_mode, comm, info, &exoid); ++ } ++ else { ++ status = nc_open_par(canon_path, nc_mode, comm, info, &exoid); ++ } ++ if (status != NC_NOERR) { + /* It is possible that the user is trying to open a netcdf4 + file, but the netcdf4 capabilities aren't available in the + netcdf linked to this library. Note that we can't just use a +@@ -191,7 +208,7 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + we have the define that shows it is enabled, then assume other error... + */ + int type = 0; +- ex__check_file_type(path, &type); ++ exi_check_file_type(path, &type); + + if (type == 0) { + /* Error message printed at lower level */ +@@ -203,8 +220,10 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + "file:\n\t'%s'\n\tfailed. The netcdf library supports " + "netcdf-4 so there must be a filesystem or some other " + "issue \n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + #else + /* This is an hdf5 (netcdf4) file. If NC_HAS_HDF5 is not defined, + then we either don't have hdf5 support in this netcdf version, +@@ -219,8 +238,10 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + "file:\n\t'%s'\n\tEither the netcdf library does not " + "support netcdf-4 or there is a filesystem or some " + "other issue \n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + #endif + } + else if (type == 4) { +@@ -230,8 +251,10 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + "file:\n\t'%s'\n\tfailed. The netcdf library supports " + "CDF5-type files so there must be a filesystem or some other " + "issue \n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + #else + /* This is an cdf5 (64BIT_DATA) file. If NC_64BIT_DATA is not defined, + then we either don't have cdf5 support in this netcdf version, +@@ -246,8 +269,10 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + "file:\n\t'%s'\n\tEither the netcdf library does not " + "support CDF5 or there is a filesystem or some " + "other issue \n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + #endif + } + else if (type == 1 || type == 2) { +@@ -255,11 +280,13 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + snprintf(errmsg, MAX_ERR_LENGTH, + "EXODUS: ERROR: Attempting to open the classic NetCDF " + "file:\n\t'%s'\n\tfailed. The netcdf library supports " +- "PNetCDF files as required for parallel readinf of this " ++ "PNetCDF files as required for parallel reading of this " + "file type, so there must be a filesystem or some other " + "issue \n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + #else + /* This is an normal NetCDF format file, for parallel reading, the PNetCDF + library is required but that is not compiled into this version. +@@ -268,23 +295,26 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + "EXODUS: ERROR: Attempting to open the NetCDF " + "file:\n\t'%s'\n\tThe NetCDF library was not " + "built with PNetCDF support as required for parallel access to this file.\n", +- path); ++ canon_path); + ex_err(__func__, errmsg, status); ++ free(canon_path); ++ EX_FUNC_LEAVE(EX_FATAL); + #endif + } + + snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to open %s for read/write. Either the file " +- "does not exist,\n\tor there is a permission or file format " +- "issue.", +- path); ++ "ERROR: failed to open %s of type %d for reading.\n\t\tThe " ++ "file does not exist, or there is a permission or file " ++ "format issue.", ++ canon_path, type); + ex_err(__func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* File opened correctly */ + int type = 0; +- ex__check_file_type(path, &type); ++ exi_check_file_type(canon_path, &type); + if (type == 5) { + is_hdf5 = true; + } +@@ -295,9 +325,10 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + if (mode & EX_WRITE) { /* Appending */ + /* turn off automatic filling of netCDF variables */ + if (is_pnetcdf) { +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + in_redef = true; +@@ -306,17 +337,21 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + if ((status = nc_set_fill(exoid, NC_NOFILL, &old_fill)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to set nofill mode in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +- stat_att = nc_inq_att(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &att_type, &att_len); +- stat_dim = nc_inq_dimid(exoid, DIM_STR_NAME, &dim_str_name); ++ nc_type att_type = NC_NAT; ++ size_t att_len = 0; ++ int stat_att = nc_inq_att(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &att_type, &att_len); ++ int stat_dim = nc_inq_dimid(exoid, DIM_STR_NAME, &dim_str_name); + if (stat_att != NC_NOERR || stat_dim != NC_NOERR) { + if (!in_redef) { + if ((status = nc_redef(exoid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + in_redef = true; +@@ -330,17 +365,27 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + * add it now. */ + if (stat_dim != NC_NOERR) { + /* Not found; set to default value of 32+1. */ +- int max_name = ex__default_max_name_length < 32 ? 32 : ex__default_max_name_length; ++ int max_name = exi_default_max_name_length < 32 ? 32 : exi_default_max_name_length; + nc_def_dim(exoid, DIM_STR_NAME, max_name + 1, &dim_str_name); + } + } + + if (in_redef) { +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = nc_enddef(exoid)) != NC_NOERR) { ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } +- in_redef = false; + } ++ } /* End of (mode & EX_WRITE) */ ++ ++ /* If this is a `pnetcdf` file (non HDF5), then we can't set the ++ * collective vs independent setting on a per-variable basis -- it ++ * is set for the entire file. Several apps rely on being able to ++ * access some set or other data in an independent mode, so we can't ++ * set any vars to collective or it sets the file to collective and ++ * we potentially hang... ++ */ ++ if (!is_pnetcdf) { + + /* If this is a parallel execution and we are appending, then we + * need to set the parallel access method for all transient variables to NC_COLLECTIVE since +@@ -351,29 +396,22 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + int ngatts; /* number of global attributes */ + int recdimid; /* id of unlimited dimension */ + +- int varid; +- + /* Determine number of variables on the database... */ + nc_inq(exoid, &ndims, &nvars, &ngatts, &recdimid); + +- for (varid = 0; varid < nvars; varid++) { ++ for (int varid = 0; varid < nvars; varid++) { + struct ncvar var; + nc_inq_var(exoid, varid, var.name, &var.type, &var.ndims, var.dims, &var.natts); + +- if ((strcmp(var.name, VAR_GLO_VAR) == 0) || (strncmp(var.name, "vals_elset_var", 14) == 0) || +- (strncmp(var.name, "vals_sset_var", 13) == 0) || +- (strncmp(var.name, "vals_fset_var", 13) == 0) || +- (strncmp(var.name, "vals_eset_var", 13) == 0) || +- (strncmp(var.name, "vals_nset_var", 13) == 0) || +- (strncmp(var.name, "vals_nod_var", 12) == 0) || +- (strncmp(var.name, "vals_edge_var", 13) == 0) || +- (strncmp(var.name, "vals_face_var", 13) == 0) || +- (strncmp(var.name, "vals_elem_var", 13) == 0) || +- (strcmp(var.name, VAR_WHOLE_TIME) == 0)) { ++ if (((strncmp(var.name, "vals_", 5) == 0) && (strncmp(var.name, "vals_red_", 9) != 0)) || ++ (strcmp(var.name, VAR_WHOLE_TIME) == 0) || (strncmp(var.name, "coord", 5) == 0) || ++ (strcmp(var.name, "connect") == 0) || (strcmp(var.name, "edgconn") == 0) || ++ (strcmp(var.name, "ebconn") == 0) || (strcmp(var.name, "facconn") == 0) || ++ (strcmp(var.name, "fbconn") == 0) || (strcmp(var.name, "attrib") == 0)) { + nc_var_par_access(exoid, varid, NC_COLLECTIVE); + } + } +- } /* End of (mode & EX_WRITE) */ ++ } + + /* determine version of EXODUS file, and the word size of + * floating point and integer values stored in the file +@@ -383,6 +421,7 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get database version for file id: %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -391,6 +430,7 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Unsupported file version %.2f in file id: %d", + *version, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -401,6 +441,7 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get file wordsize from file id: %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -425,27 +466,30 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + not know that file was closed and possibly new file opened for + this exoid + */ +- if (ex__find_file_item(exoid) != NULL) { ++ if (exi_find_file_item(exoid) != NULL) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: There is an existing file already using the file " + "id %d which was also assigned to file %s.\n\tWas " + "nc_close() called instead of ex_close() on an open Exodus " + "file?\n", +- exoid, path); ++ exoid, canon_path); + ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); + nc_close(exoid); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* initialize floating point and integer size conversion. */ +- if (ex__conv_init(exoid, comp_ws, io_ws, file_wordsize, int64_status, 1, is_hdf5, is_pnetcdf, ++ if (exi_conv_init(exoid, comp_ws, io_ws, file_wordsize, int64_status, 1, is_hdf5, is_pnetcdf, + mode & EX_WRITE) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to initialize conversion routines in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); ++ free(canon_path); + EX_FUNC_LEAVE(EX_FATAL); + } + ++ free(canon_path); + EX_FUNC_LEAVE(exoid); + } + #else +@@ -453,5 +497,5 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + * Prevent warning in some versions of ranlib(1) because the object + * file has no symbols. + */ +-const char exodus_unused_symbol_dummy_ex_open_par; ++extern const char exodus_unused_symbol_dummy_ex_open_par; + #endif +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_opts.c b/ThirdParty/exodusII/vtkexodusII/src/ex_opts.c +index 51f364183e..74664ec451 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_opts.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_opts.c +@@ -10,7 +10,7 @@ + #include "exodusII_int.h" + + /*! \cond INTERNAL */ +-int ex__default_max_name_length = 32; /* For default compatibility with older clients */ ++int exi_default_max_name_length = 32; /* For default compatibility with older clients */ + + #if defined(VERBOSE) + int exoptval = EX_VERBOSE; /* loud mode: set EX_VERBOSE */ +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_all_var_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_all_var_param.c +index 5879804796..00a3e19194 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_all_var_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_all_var_param.c +@@ -42,8 +42,8 @@ + * \param *sset_var_tab sideset variable truth table array + */ + +-int ex_put_all_var_param(int exoid, int num_g, int num_n, int num_e, int *elem_var_tab, int num_m, +- int *nset_var_tab, int num_s, int *sset_var_tab) ++int ex_put_all_var_param(int exoid, int num_g, int num_n, int num_e, const int *elem_var_tab, ++ int num_m, const int *nset_var_tab, int num_s, const int *sset_var_tab) + { + ex_var_params vparam; + +@@ -54,15 +54,15 @@ int ex_put_all_var_param(int exoid, int num_g, int num_n, int num_e, int *elem_v + vparam.num_face = 0; + vparam.face_var_tab = 0; + vparam.num_elem = num_e; +- vparam.elem_var_tab = elem_var_tab; ++ vparam.elem_var_tab = (int *)elem_var_tab; + vparam.num_nset = num_m; +- vparam.nset_var_tab = nset_var_tab; ++ vparam.nset_var_tab = (int *)nset_var_tab; + vparam.num_eset = 0; + vparam.eset_var_tab = 0; + vparam.num_fset = 0; + vparam.fset_var_tab = 0; + vparam.num_sset = num_s; +- vparam.sset_var_tab = sset_var_tab; ++ vparam.sset_var_tab = (int *)sset_var_tab; + vparam.num_elset = 0; + vparam.elset_var_tab = 0; + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_all_var_param_ext.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_all_var_param_ext.c +index 981a20d32c..be763293f4 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_all_var_param_ext.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_all_var_param_ext.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -19,7 +19,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__get_dimension, etc ++#include "exodusII_int.h" // for exi_get_dimension, etc + + static int define_dimension(int exoid, const char *DIMENSION, int count, const char *label, + int *dimid); +@@ -29,15 +29,15 @@ static int *get_status_array(int exoid, int var_count, const char *VARIABLE, con + static int put_truth_table(int exoid, int varid, int *table, const char *label); + static int define_truth_table(ex_entity_type obj_type, int exoid, int num_ent, int num_var, + int *var_tab, int *status_tab, void_int *ids, const char *label); +-static int ex_define_vars(int exoid, ex_entity_type obj_type, const char *entity_name, +- const char *entity_blk_name, int numvar, const char *DNAME, int dimid1, +- int dimid2, int DVAL, void_int **entity_ids, const char *VNOV, +- const char *VTV, int **status_var, int *truth_table, +- int *truth_table_var); ++static int exi_define_vars(int exoid, ex_entity_type obj_type, const char *entity_name, ++ const char *entity_blk_name, int numvar, const char *DNAME, int dimid1, ++ int dimid2, int DVAL, void_int **entity_ids, const char *VNOV, ++ const char *VTV, int **status_var, int *truth_table, ++ int *truth_table_var); + + #define EX_GET_IDS_STATUS(TNAME, NUMVAR, DNAME, DID, DVAL, VIDS, EIDS, VSTAT, VSTATVAL) \ + if (NUMVAR > 0) { \ +- status = ex__get_dimension(exoid, DNAME, TNAME "s", &DVAL, &DID, __func__); \ ++ status = exi_get_dimension(exoid, DNAME, TNAME "s", &DVAL, &DID, __func__); \ + if (status != NC_NOERR) \ + goto error_ret; \ + \ +@@ -103,7 +103,7 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp) + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -115,7 +115,7 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp) + goto error_ret; + } + +- if ((status = nc_inq_dimid(exoid, DIM_NUM_NODES, &num_nod_dim)) != NC_NOERR) { ++ if (nc_inq_dimid(exoid, DIM_NUM_NODES, &num_nod_dim) != NC_NOERR) { + num_nod_dim = -1; /* There is probably no nodes on this file */ + } + +@@ -144,7 +144,7 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp) + EX_ELEM_SET, VAR_ELS_STAT, elset_stat); + + /* put file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; +@@ -166,7 +166,7 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp) + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + + /* Now define global variable name variable */ + if (define_variable_name_variable(exoid, VAR_NAME_GLO_VAR, dimid, "global") != NC_NOERR) { +@@ -190,7 +190,7 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp) + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + } + } + +@@ -200,66 +200,62 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp) + } + } + +- if ((status = +- ex_define_vars(exoid, EX_EDGE_BLOCK, "edge", "edge block", vp->num_edge, DIM_NUM_EDG_VAR, +- numedblkdim, numedvardim, num_edge_blk, &edblk_ids, VAR_NAME_EDG_VAR, +- VAR_EBLK_TAB, &edblk_stat, vp->edge_var_tab, &edblk_varid)) != EX_NOERR) { ++ if (exi_define_vars(exoid, EX_EDGE_BLOCK, "edge", "edge block", vp->num_edge, DIM_NUM_EDG_VAR, ++ numedblkdim, numedvardim, num_edge_blk, &edblk_ids, VAR_NAME_EDG_VAR, ++ VAR_EBLK_TAB, &edblk_stat, vp->edge_var_tab, &edblk_varid) != EX_NOERR) { + goto error_ret; + } + +- if ((status = +- ex_define_vars(exoid, EX_FACE_BLOCK, "face", "face block", vp->num_face, DIM_NUM_FAC_VAR, +- numfablkdim, numfavardim, num_face_blk, &fablk_ids, VAR_NAME_FAC_VAR, +- VAR_FBLK_TAB, &fablk_stat, vp->face_var_tab, &fablk_varid)) != EX_NOERR) { ++ if (exi_define_vars(exoid, EX_FACE_BLOCK, "face", "face block", vp->num_face, DIM_NUM_FAC_VAR, ++ numfablkdim, numfavardim, num_face_blk, &fablk_ids, VAR_NAME_FAC_VAR, ++ VAR_FBLK_TAB, &fablk_stat, vp->face_var_tab, &fablk_varid) != EX_NOERR) { + goto error_ret; + } + +- if ((status = ex_define_vars(exoid, EX_ELEM_BLOCK, "element", "element block", vp->num_elem, +- DIM_NUM_ELE_VAR, numelblkdim, numelvardim, num_elem_blk, &eblk_ids, +- VAR_NAME_ELE_VAR, VAR_ELEM_TAB, &eblk_stat, vp->elem_var_tab, +- &eblk_varid)) != EX_NOERR) { ++ if (exi_define_vars(exoid, EX_ELEM_BLOCK, "element", "element block", vp->num_elem, ++ DIM_NUM_ELE_VAR, numelblkdim, numelvardim, num_elem_blk, &eblk_ids, ++ VAR_NAME_ELE_VAR, VAR_ELEM_TAB, &eblk_stat, vp->elem_var_tab, ++ &eblk_varid) != EX_NOERR) { + goto error_ret; + } + +- if ((status = +- ex_define_vars(exoid, EX_NODE_SET, "nodeset", "node set", vp->num_nset, DIM_NUM_NSET_VAR, +- numnsetdim, nsetvardim, num_nset, &nset_ids, VAR_NAME_NSET_VAR, +- VAR_NSET_TAB, &nset_stat, vp->nset_var_tab, &nset_varid)) != EX_NOERR) { ++ if (exi_define_vars(exoid, EX_NODE_SET, "nodeset", "node set", vp->num_nset, DIM_NUM_NSET_VAR, ++ numnsetdim, nsetvardim, num_nset, &nset_ids, VAR_NAME_NSET_VAR, VAR_NSET_TAB, ++ &nset_stat, vp->nset_var_tab, &nset_varid) != EX_NOERR) { + goto error_ret; + } + +- if ((status = +- ex_define_vars(exoid, EX_EDGE_SET, "edgeset", "edge set", vp->num_eset, DIM_NUM_ESET_VAR, +- numesetdim, esetvardim, num_eset, &eset_ids, VAR_NAME_ESET_VAR, +- VAR_ESET_TAB, &eset_stat, vp->eset_var_tab, &eset_varid)) != EX_NOERR) { ++ if (exi_define_vars(exoid, EX_EDGE_SET, "edgeset", "edge set", vp->num_eset, DIM_NUM_ESET_VAR, ++ numesetdim, esetvardim, num_eset, &eset_ids, VAR_NAME_ESET_VAR, VAR_ESET_TAB, ++ &eset_stat, vp->eset_var_tab, &eset_varid) != EX_NOERR) { + goto error_ret; + } + +- if ((status = +- ex_define_vars(exoid, EX_FACE_SET, "faceset", "face set", vp->num_fset, DIM_NUM_FSET_VAR, +- numfsetdim, fsetvardim, num_fset, &fset_ids, VAR_NAME_FSET_VAR, +- VAR_FSET_TAB, &fset_stat, vp->fset_var_tab, &fset_varid)) != EX_NOERR) { ++ if (exi_define_vars(exoid, EX_FACE_SET, "faceset", "face set", vp->num_fset, DIM_NUM_FSET_VAR, ++ numfsetdim, fsetvardim, num_fset, &fset_ids, VAR_NAME_FSET_VAR, VAR_FSET_TAB, ++ &fset_stat, vp->fset_var_tab, &fset_varid) != EX_NOERR) { + goto error_ret; + } + +- if ((status = +- ex_define_vars(exoid, EX_SIDE_SET, "sideset", "side set", vp->num_sset, DIM_NUM_SSET_VAR, +- numssetdim, ssetvardim, num_sset, &sset_ids, VAR_NAME_SSET_VAR, +- VAR_SSET_TAB, &sset_stat, vp->sset_var_tab, &sset_varid)) != EX_NOERR) { ++ if (exi_define_vars(exoid, EX_SIDE_SET, "sideset", "side set", vp->num_sset, DIM_NUM_SSET_VAR, ++ numssetdim, ssetvardim, num_sset, &sset_ids, VAR_NAME_SSET_VAR, VAR_SSET_TAB, ++ &sset_stat, vp->sset_var_tab, &sset_varid) != EX_NOERR) { + goto error_ret; + } + +- if ((status = ex_define_vars(exoid, EX_ELEM_SET, "elemset", "element set", vp->num_elset, +- DIM_NUM_ELSET_VAR, numelsetdim, elsetvardim, num_elset, &elset_ids, +- VAR_NAME_ELSET_VAR, VAR_ELSET_TAB, &elset_stat, vp->elset_var_tab, +- &elset_varid)) != EX_NOERR) { ++ if (exi_define_vars(exoid, EX_ELEM_SET, "elemset", "element set", vp->num_elset, ++ DIM_NUM_ELSET_VAR, numelsetdim, elsetvardim, num_elset, &elset_ids, ++ VAR_NAME_ELSET_VAR, VAR_ELSET_TAB, &elset_stat, vp->elset_var_tab, ++ &elset_varid) != EX_NOERR) { + goto error_ret; + } + + /* leave define mode */ + + in_define = 0; +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; + } + +@@ -317,7 +313,7 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp) + /* Fatal error: exit definition mode and return */ + error_ret: + if (in_define == 1) { +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + } + free(eblk_ids); + free(edblk_ids); +@@ -343,10 +339,10 @@ error_ret: + static int define_dimension(int exoid, const char *DIMENSION, int count, const char *label, + int *dimid) + { +- char errmsg[MAX_ERR_LENGTH]; +- int status; ++ int status; + if ((status = nc_def_dim(exoid, DIMENSION, count, dimid)) != NC_NOERR) { + if (status == NC_ENAMEINUSE) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: %s variable name parameters are already defined " + "in file id %d", +@@ -354,78 +350,77 @@ static int define_dimension(int exoid, const char *DIMENSION, int count, const c + ex_err_fn(exoid, __func__, errmsg, status); + } + else { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define number of %s variables in file id %d", label, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } + } +- return (status); ++ return status; + } + + static int define_variable_name_variable(int exoid, const char *VARIABLE, int dimension, + const char *label) + { +- char errmsg[MAX_ERR_LENGTH]; +- int dims[2]; +- int variable; +- int status; +-#if NC_HAS_HDF5 +- int fill = NC_FILL_CHAR; +-#endif +- ++ int dims[2]; + dims[0] = dimension; + (void)nc_inq_dimid(exoid, DIM_STR_NAME, &dims[1]); /* Checked earlier, so known to exist */ + ++ int variable; ++ int status; + if ((status = nc_def_var(exoid, VARIABLE, NC_CHAR, 2, dims, &variable)) != NC_NOERR) { + if (status == NC_ENAMEINUSE) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: %s variable names are already defined in file id %d", + label, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } + else { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define %s variable names in file id %d", + label, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } + } +- ex__set_compact_storage(exoid, variable); +-#if NC_HAS_HDF5 ++ exi_set_compact_storage(exoid, variable); ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) ++ int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, variable, 0, &fill); + #endif +- return (status); ++ return status; + } + + static int *get_status_array(int exoid, int var_count, const char *VARIABLE, const char *label) + { +- char errmsg[MAX_ERR_LENGTH]; +- int varid; +- int status; + int *stat_vals = NULL; + + if (!(stat_vals = malloc(var_count * sizeof(int)))) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate memory for %s status array for file id %d", label, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (NULL); ++ return NULL; + } + + /* get variable id of status array */ ++ int varid; + if ((nc_inq_varid(exoid, VARIABLE, &varid)) == NC_NOERR) { + /* if status array exists (V 2.01+), use it, otherwise assume + object exists to be backward compatible */ + ++ int status; + if ((status = nc_get_var_int(exoid, varid, stat_vals)) != NC_NOERR) { + free(stat_vals); ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get %s status array from file id %d", + label, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (NULL); ++ return NULL; + } + } + else { + /* status array doesn't exist (V2.00), dummy one up for later checking */ +- int i; +- for (i = 0; i < var_count; i++) { ++ for (int i = 0; i < var_count; i++) { + stat_vals[i] = 1; + } + } +@@ -434,12 +429,10 @@ static int *get_status_array(int exoid, int var_count, const char *VARIABLE, con + + static int put_truth_table(int exoid, int varid, int *table, const char *label) + { +- int iresult = 0; +- char errmsg[MAX_ERR_LENGTH]; +- +- iresult = nc_put_var_int(exoid, varid, table); ++ int iresult = nc_put_var_int(exoid, varid, table); + + if (iresult != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to store %s variable truth table in file id %d", + label, exoid); + ex_err_fn(exoid, __func__, errmsg, iresult); +@@ -450,28 +443,27 @@ static int put_truth_table(int exoid, int varid, int *table, const char *label) + static int define_truth_table(ex_entity_type obj_type, int exoid, int num_ent, int num_var, + int *var_tab, int *status_tab, void_int *ids, const char *label) + { +- char errmsg[MAX_ERR_LENGTH]; +- int k = 0; +- int i, j; +- int time_dim; +- int dims[2]; +- int varid; +- int status; ++ int time_dim; ++ int varid; ++ int status; + + if ((status = nc_inq_dimid(exoid, DIM_TIME, &time_dim)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate time dimension in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + return -1; + } + + if (var_tab == NULL) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: %s variable truth table is NULL in file id %d", label, + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + return -1; + } + +- for (i = 0; i < num_ent; i++) { ++ int k = 0; ++ for (int i = 0; i < num_ent; i++) { + int64_t id; + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { + id = ((int64_t *)ids)[i]; +@@ -480,22 +472,24 @@ static int define_truth_table(ex_entity_type obj_type, int exoid, int num_ent, i + id = ((int *)ids)[i]; + } + +- for (j = 1; j <= num_var; j++) { ++ for (int j = 1; j <= num_var; j++) { + + /* check if variables are to be put out for this block */ + if (var_tab[k] != 0) { + if (status_tab[i] != 0) { /* only define variable if active */ ++ int dims[2]; + dims[0] = time_dim; + + /* Determine number of entities in entity */ + /* Need way to make this more generic... */ +- status = nc_inq_dimid(exoid, ex__dim_num_entries_in_object(obj_type, i + 1), &dims[1]); ++ status = nc_inq_dimid(exoid, exi_dim_num_entries_in_object(obj_type, i + 1), &dims[1]); + if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate number of entities in %s %" PRId64 " in file id %d", + label, id, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); ++ return status; + } + + /* define netCDF variable to store variable values; +@@ -503,36 +497,35 @@ static int define_truth_table(ex_entity_type obj_type, int exoid, int num_ent, i + * that the index of the EXODUS variable (which is part of + * the name of the netCDF variable) will begin at 1 instead of 0 + */ +- status = nc_def_var(exoid, ex__name_var_of_object(obj_type, j, i + 1), nc_flt_code(exoid), ++ status = nc_def_var(exoid, exi_name_var_of_object(obj_type, j, i + 1), nc_flt_code(exoid), + 2, dims, &varid); + if (status != NC_NOERR) { + if (status != NC_ENAMEINUSE) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define %s variable for %s %" PRId64 " in file id %d", + label, label, id, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); ++ return status; + } + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + } +- } /* if */ ++ } /* if */ + k++; /* increment truth table pointer */ +- } /* for j */ +- } /* for i */ ++ } /* for j */ ++ } /* for i */ + return NC_NOERR; + } + +-static int ex_define_vars(int exoid, ex_entity_type obj_type, const char *entity_name, +- const char *entity_blk_name, int numvar, const char *DNAME, int dimid1, +- int dimid2, int DVAL, void_int **entity_ids, const char *VNOV, +- const char *VTV, int **status_var, int *truth_table, int *truth_table_var) ++static int exi_define_vars(int exoid, ex_entity_type obj_type, const char *entity_name, ++ const char *entity_blk_name, int numvar, const char *DNAME, int dimid1, ++ int dimid2, int DVAL, void_int **entity_ids, const char *VNOV, ++ const char *VTV, int **status_var, int *truth_table, ++ int *truth_table_var) + { +- int status = 0; +- int dims[2]; +- char errmsg[MAX_ERR_LENGTH]; +- + if (numvar > 0) { ++ int status; + if ((status = define_dimension(exoid, DNAME, numvar, entity_name, &dimid2)) != NC_NOERR) { + return status; + } +@@ -556,16 +549,15 @@ static int ex_define_vars(int exoid, ex_entity_type obj_type, const char *entity + * table + */ + +- dims[0] = dimid1; +- dims[1] = dimid2; +- ++ int dims[] = {dimid1, dimid2}; + if ((status = nc_def_var(exoid, VTV, NC_INT, 2, dims, truth_table_var)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define %s variable truth table in file id %d", entity_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + return status; + } +- ex__set_compact_storage(exoid, *truth_table_var); ++ exi_set_compact_storage(exoid, *truth_table_var); + } + return NC_NOERR; + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_assemblies.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_assemblies.c +index d8fd46a889..a8ee3e14d4 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_assemblies.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_assemblies.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -25,7 +25,7 @@ int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assembl + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -37,15 +37,15 @@ int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assembl + + int *entlst_id = (int *)calloc(count, sizeof(int)); + +- int max_name_len = 0; +- bool in_define = false; ++ size_t max_name_len = 0; ++ bool in_define = false; + for (size_t i = 0; i < count; i++) { + /* See if an assembly with this id has already been defined or exists on file... */ + if (nc_inq_varid(exoid, VAR_ENTITY_ASSEMBLY(assemblies[i].id), &entlst_id[i]) != NC_NOERR) { + /* Assembly has not already been defined */ + /* put netcdf file into define mode */ + if (!in_define) { +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -106,7 +106,7 @@ int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assembl + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, entlst_id[i], 1); ++ exi_compress_variable(exoid, entlst_id[i], 1); + + if (ex_int64_status(exoid) & EX_IDS_INT64_DB) { + long long tmp = assemblies[i].id; +@@ -158,7 +158,7 @@ int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assembl + } + + /* Increment assembly count */ +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (file) { + file->assembly_count++; + } +@@ -166,14 +166,19 @@ int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assembl + } + /* leave define mode */ + if (in_define) { +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); + free(entlst_id); + EX_FUNC_LEAVE(EX_FATAL); + } ++ in_define = false; + } + + /* Update the maximum_name_length attribute on the file. */ +- ex__update_max_name_length(exoid, max_name_len - 1); ++ if (max_name_len > 0) { ++ exi_update_max_name_length(exoid, max_name_len - 1); ++ } + + /* Assembly are now all defined; see if any set data needs to be output... */ + for (size_t i = 0; i < count; i++) { +@@ -195,7 +200,7 @@ int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assembl + /* Fatal error: exit definition mode and return */ + error_ret: + if (in_define) { +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + } + free(entlst_id); + EX_FUNC_LEAVE(EX_FATAL); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr.c +index 60fc667a0c..846011c8a8 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr.c +@@ -24,7 +24,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_comp_ws, etc + + /*! + * writes the attributes for an edge/face/element block +@@ -41,13 +41,13 @@ int ex_put_attr(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const v + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + if (blk_type != EX_NODAL) { + /* Determine index of blk_id in VAR_ID_EL_BLK array */ +- blk_id_ndx = ex__id_lkup(exoid, blk_type, blk_id); ++ blk_id_ndx = exi_id_lkup(exoid, blk_type, blk_id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -94,7 +94,7 @@ int ex_put_attr(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const v + } + + /* write out the attributes */ +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_var_float(exoid, attrid, attrib); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr_names.c +index e1b3b96a9d..8954f73750 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr_names.c +@@ -25,7 +25,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__id_lkup, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_id_lkup, etc + + /*! + * writes the attribute names for a block +@@ -43,11 +43,11 @@ int ex_put_attr_names(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, c + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- blk_id_ndx = ex__id_lkup(exoid, blk_type, blk_id); ++ blk_id_ndx = exi_id_lkup(exoid, blk_type, blk_id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -136,7 +136,7 @@ int ex_put_attr_names(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, c + } + + /* write out the attributes */ +- status = ex__put_names(exoid, varid, num_attr, names, blk_type, "attribute", __func__); ++ status = exi_put_names(exoid, varid, num_attr, names, blk_type, "attribute", __func__); + + EX_FUNC_LEAVE(status); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr_param.c +index 34ac9bd393..dd7847c7da 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_attr_param.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -46,12 +46,9 @@ int ex_put_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, i + int numobjentdim; + int obj_id_ndx; + int numattrdim; +-#if NC_HAS_HDF5 +- int fill = NC_FILL_CHAR; +-#endif + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -60,7 +57,7 @@ int ex_put_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, i + obj_id_ndx = 0; + } + else { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -152,7 +149,7 @@ int ex_put_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, i + } + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -176,7 +173,7 @@ int ex_put_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, i + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + + /* inquire previously defined dimensions */ + if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &strdim)) != NC_NOERR) { +@@ -196,12 +193,13 @@ int ex_put_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, i + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +-#if NC_HAS_HDF5 ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) ++ int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, varid, 0, &fill); + #endif + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -209,6 +207,6 @@ int ex_put_attr_param(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, i + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_attribute.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_attribute.c +index 8ba6e29ecc..a63b09cc81 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_attribute.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_attribute.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -9,123 +9,36 @@ + #include "exodusII.h" // for ex_err, etc + #include "exodusII_int.h" // for EX_FATAL, etc + +-/* An assembly attribute is similar to an IOSS property consisting of ++/* An entity attribute is similar to an IOSS property consisting of + a name, a type, and a value or values. It is not a value per entity +- in the assembly, but a value for the assembly. For now, they types ++ in the entity, but a value for the entity itself. For now, the types + will be limited to text, integer, and double to provide capability + without the complexity of supporting the many types available in + NetCDF-4 including user-defined types. Note that an attribute can + have multiple values, for example if the attribute is a range, it + could have the value {1.0, 100.0} + +- NOTE: This type of attribute (value on entity instead of value per +- entities members, for example nodes in a nodeset) will also be added +- to the other entity types (blocks and sets) when implemented for +- assemblies. +- + NOTE: Need a better name or way of distinguishing from the + attributes which are currently supported in Exodus. + */ + +-static int ex__get_varid(int exoid, ex_entity_type obj_type, ex_entity_id id) +-{ +- const char *entryptr = NULL; +- char errmsg[MAX_ERR_LENGTH]; +- +- int id_ndx = 0; +- int status = 0; +- int varid = 0; +- +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { +- EX_FUNC_LEAVE(EX_FATAL); +- } +- +- if (obj_type == EX_GLOBAL) { +- return NC_GLOBAL; +- } +- +- if (obj_type == EX_ASSEMBLY) { +- if ((status = nc_inq_varid(exoid, VAR_ENTITY_ASSEMBLY(id), &varid)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate %s id %" PRId64 " in id array in file id %d", +- ex_name_of_object(obj_type), id, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return EX_FATAL; +- } +- return varid; +- } +- +- if (obj_type == EX_BLOB) { +- if ((status = nc_inq_varid(exoid, VAR_ENTITY_BLOB(id), &varid)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate %s id %" PRId64 " in id array in file id %d", +- ex_name_of_object(obj_type), id, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return EX_FATAL; +- } +- return varid; +- } +- +- /* Everything else ... */ +- /* First, locate index of this objects id `obj_type` id array */ +- id_ndx = ex__id_lkup(exoid, obj_type, id); +- if (id_ndx <= 0) { +- ex_get_err(NULL, NULL, &status); +- if (status != 0) { +- if (status == EX_NULLENTITY) { /* NULL object? */ +- return EX_NOERR; +- } +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate %s id %" PRId64 " in id array in file id %d", +- ex_name_of_object(obj_type), id, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return EX_FATAL; +- } +- } +- +- switch (obj_type) { +- case EX_NODE_SET: entryptr = VAR_NODE_NS(id_ndx); break; +- case EX_EDGE_SET: entryptr = VAR_EDGE_ES(id_ndx); break; +- case EX_FACE_SET: entryptr = VAR_FACE_FS(id_ndx); break; +- case EX_SIDE_SET: entryptr = VAR_ELEM_SS(id_ndx); break; +- case EX_ELEM_SET: entryptr = VAR_ELEM_ELS(id_ndx); break; +- case EX_EDGE_BLOCK: entryptr = VAR_EBCONN(id_ndx); break; +- case EX_FACE_BLOCK: entryptr = VAR_FBCONN(id_ndx); break; +- case EX_ELEM_BLOCK: entryptr = VAR_CONN(id_ndx); break; +- default: +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: object type %d not supported in call to %s", obj_type, +- __func__); +- ex_err(__func__, errmsg, EX_BADPARAM); +- return EX_FATAL; +- } +- +- if ((status = nc_inq_varid(exoid, entryptr, &varid)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate entity list array for %s %" PRId64 " in file id %d", +- ex_name_of_object(obj_type), id, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return EX_FATAL; +- } +- return varid; +-} +- + /* define and output a double attribute */ + int ex_put_double_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, +- const char *atr_name, int num_values, double *values) ++ const char *atr_name, int num_values, const double *values) + { + int status; + char errmsg[MAX_ERR_LENGTH]; + int varid; + + EX_FUNC_ENTER(); +- varid = ex__get_varid(exoid, obj_type, id); ++ varid = exi_get_varid(exoid, obj_type, id); + if (varid <= 0 && obj_type != EX_GLOBAL) { +- /* Error message handled in ex__get_varid */ ++ /* Error message handled in exi_get_varid */ + EX_FUNC_LEAVE(varid); + } + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -141,7 +54,9 @@ int ex_put_double_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -149,27 +64,27 @@ int ex_put_double_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* define and output an integer attribute */ + int ex_put_integer_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, +- const char *atr_name, int num_values, void_int *values) ++ const char *atr_name, int num_values, const void_int *values) + { + int status; + char errmsg[MAX_ERR_LENGTH]; + int varid; + + EX_FUNC_ENTER(); +- varid = ex__get_varid(exoid, obj_type, id); ++ varid = exi_get_varid(exoid, obj_type, id); + if (varid <= 0 && obj_type != EX_GLOBAL) { +- /* Error message handled in ex__get_varid */ ++ /* Error message handled in exi_get_varid */ + EX_FUNC_LEAVE(varid); + } + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -191,7 +106,9 @@ int ex_put_integer_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -199,7 +116,7 @@ int ex_put_integer_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -213,14 +130,14 @@ int ex_put_text_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, c + + EX_FUNC_ENTER(); + +- varid = ex__get_varid(exoid, obj_type, id); ++ varid = exi_get_varid(exoid, obj_type, id); + if (varid <= 0 && obj_type != EX_GLOBAL) { +- /* Error message handled in ex__get_varid */ ++ /* Error message handled in exi_get_varid */ + EX_FUNC_LEAVE(varid); + } + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -235,7 +152,9 @@ int ex_put_text_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, c + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -243,7 +162,7 @@ int ex_put_text_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, c + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -273,7 +192,7 @@ int ex_put_attribute(int exoid, ex_attribute attribute) + } + + /*! Define and output the specified attributes. */ +-int ex_put_attributes(int exoid, size_t attr_count, ex_attribute *attr) ++int ex_put_attributes(int exoid, size_t attr_count, const ex_attribute *attr) + { + for (size_t i = 0; i < attr_count; i++) { + int status = ex_put_attribute(exoid, attr[i]); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_blobs.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_blobs.c +index 5eb9e44d95..89c22537bb 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_blobs.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_blobs.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -23,13 +23,13 @@ int ex_put_blobs(int exoid, size_t count, const struct ex_blob *blobs) + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + int *entlst_id = (int *)calloc(count, sizeof(int)); + +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(entlst_id); +@@ -85,7 +85,7 @@ int ex_put_blobs(int exoid, size_t count, const struct ex_blob *blobs) + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, entlst_id[i], 1); ++ exi_compress_variable(exoid, entlst_id[i], 1); + + if (ex_int64_status(exoid) & EX_IDS_INT64_DB) { + long long id = blobs[i].id; +@@ -111,13 +111,15 @@ int ex_put_blobs(int exoid, size_t count, const struct ex_blob *blobs) + } + + /* Increment blob count */ +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + if (file) { + file->blob_count++; + } + } + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); + free(entlst_id); + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -139,7 +141,7 @@ int ex_put_blobs(int exoid, size_t count, const struct ex_blob *blobs) + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + free(entlst_id); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_block_params.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_block_params.c +index ee31c0fe21..a30774b2d5 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_block_params.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_block_params.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -35,9 +35,9 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + int connid = 0; + int npeid; + char errmsg[MAX_ERR_LENGTH]; +- char * entity_type1 = NULL; +- char * entity_type2 = NULL; +- int * blocks_to_define = NULL; ++ char *entity_type1 = NULL; ++ char *entity_type2 = NULL; ++ int *blocks_to_define = NULL; + const char *dnumblk = NULL; + const char *vblkids = NULL; + const char *vblksta = NULL; +@@ -53,16 +53,13 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + const char *dnnpe = NULL; + const char *dnepe = NULL; + const char *dnfpe = NULL; +-#if NC_HAS_HDF5 +- int fill = NC_FILL_CHAR; +-#endif + + if (block_count == 0) { +- return (EX_NOERR); ++ return EX_NOERR; + } + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -115,16 +112,16 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + EX_FUNC_LEAVE(EX_FATAL); + } +- if ((status = ex__get_dimension(exoid, dnumblk, ex_name_of_object(last_type), &num_blk, &dimid, ++ if ((status = exi_get_dimension(exoid, dnumblk, ex_name_of_object(last_type), &num_blk, &dimid, + __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: No %ss defined in file id %d", + ex_name_of_object(last_type), exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + + if (block_count == num_blk) { +- status = ex__put_homogenous_block_params(exoid, block_count, blocks); ++ status = exi_put_homogenous_block_params(exoid, block_count, blocks); + EX_FUNC_LEAVE(status); + } + } +@@ -165,11 +162,11 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + } + + /* first check if any blocks of that type are specified */ +- if ((status = ex__get_dimension(exoid, dnumblk, ex_name_of_object(blocks[i].type), &num_blk, ++ if ((status = exi_get_dimension(exoid, dnumblk, ex_name_of_object(blocks[i].type), &num_blk, + &dimid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: No %ss defined in file id %d", + ex_name_of_object(blocks[i].type), exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); ++ ex_err_fn(exoid, __func__, errmsg, status); + free(blocks_to_define); + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -189,7 +186,7 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + EX_FUNC_LEAVE(EX_FATAL); + } + +- status = ex__id_lkup(exoid, blocks[i].type, blocks[i].id); ++ status = exi_id_lkup(exoid, blocks[i].type, blocks[i].id); + if (-status != EX_LOOKUPFAIL) { /* found the element block id */ + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: %s id %" PRId64 " already exists in file id %d", + ex_name_of_object(blocks[i].type), blocks[i].id, exoid); +@@ -200,10 +197,10 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + + /* Keep track of the total number of element blocks defined using a counter + stored in a linked list keyed by exoid. +- NOTE: ex__get_file_item is a function that finds the number of element ++ NOTE: exi_get_file_item is a function that finds the number of element + blocks for a specific file and returns that value. + */ +- cur_num_blk = ex__get_file_item(exoid, ex__get_counter_list(blocks[i].type)); ++ cur_num_blk = exi_get_file_item(exoid, exi_get_counter_list(blocks[i].type)); + if (cur_num_blk >= (int)num_blk) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: exceeded number of %ss (%d) defined in file id %d", + ex_name_of_object(blocks[i].type), (int)num_blk, exoid); +@@ -212,9 +209,9 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + EX_FUNC_LEAVE(EX_FATAL); + } + +- /* NOTE: ex__inc_file_item is a function that finds the number of element ++ /* NOTE: exi_inc_file_item is a function that finds the number of element + blocks for a specific file and returns that value incremented. */ +- cur_num_blk = ex__inc_file_item(exoid, ex__get_counter_list(blocks[i].type)); ++ cur_num_blk = exi_inc_file_item(exoid, exi_get_counter_list(blocks[i].type)); + start[0] = cur_num_blk; + + /* write out block id to previously defined id array variable*/ +@@ -256,7 +253,7 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + } + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(blocks_to_define); +@@ -274,27 +271,27 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + case EX_EDGE_BLOCK: + dneblk = DIM_NUM_ED_IN_EBLK(blk_id_ndx); + dnnpe = DIM_NUM_NOD_PER_ED(blk_id_ndx); +- dnepe = 0; +- dnfpe = 0; ++ dnepe = NULL; ++ dnfpe = NULL; + dnape = DIM_NUM_ATT_IN_EBLK(blk_id_ndx); + vblkatt = VAR_EATTRIB(blk_id_ndx); + vattnam = VAR_NAME_EATTRIB(blk_id_ndx); + vnodcon = VAR_EBCONN(blk_id_ndx); +- vedgcon = 0; +- vfaccon = 0; ++ vedgcon = NULL; ++ vfaccon = NULL; + break; + case EX_FACE_BLOCK: + dneblk = DIM_NUM_FA_IN_FBLK(blk_id_ndx); + dnnpe = DIM_NUM_NOD_PER_FA(blk_id_ndx); +- dnepe = 0; +- dnfpe = 0; ++ dnepe = NULL; ++ dnfpe = NULL; + dnape = DIM_NUM_ATT_IN_FBLK(blk_id_ndx); + vblkatt = VAR_FATTRIB(blk_id_ndx); + vattnam = VAR_NAME_FATTRIB(blk_id_ndx); + vnodcon = VAR_FBCONN(blk_id_ndx); + vnpecnt = VAR_FBEPEC(blk_id_ndx); +- vedgcon = 0; +- vfaccon = 0; ++ vedgcon = NULL; ++ vfaccon = NULL; + break; + case EX_ELEM_BLOCK: + dneblk = DIM_NUM_EL_IN_BLK(blk_id_ndx); +@@ -383,22 +380,7 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); +- +-#if defined(PARALLEL_AWARE_EXODUS) +- /* +- * There is currently a bug in netcdf-4.5.1-devel and earlier +- * for partial parallel output of strided arrays in collective +- * mode for netcdf-4-based output. If the number of attributes > +- * 1 and in parallel mode, set the mode to independent. +- */ +- if (blocks[i].num_attribute > 1) { +- struct ex__file_item *file = ex__find_file_item(exoid); +- if (file->is_parallel && file->is_hdf5) { +- nc_var_par_access(exoid, varid, NC_INDEPENDENT); +- } +- } +-#endif ++ exi_compress_variable(exoid, varid, 2); + + /* inquire previously defined dimensions */ + if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &strdim)) != NC_NOERR) { +@@ -418,7 +400,8 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +-#if NC_HAS_HDF5 ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) ++ int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, att_name_varid, 0, &fill); + #endif + } +@@ -531,7 +514,7 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, connid, 1); ++ exi_compress_variable(exoid, connid, 1); + } + } + /* store element type as attribute of connectivity variable */ +@@ -579,7 +562,9 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + free(blocks_to_define); + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -598,14 +583,13 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + write anything; avoids corruption in some cases. + */ + size_t count[2]; +- char * text = ""; +- size_t j; ++ char *text = ""; + + count[0] = 1; + start[1] = 0; + count[1] = strlen(text) + 1; + +- for (j = 0; j < blocks[i].num_attribute; j++) { ++ for (int64_t j = 0; j < blocks[i].num_attribute; j++) { + start[0] = j; + nc_put_vara_text(exoid, att_name_varid, start, count, text); + } +@@ -618,6 +602,6 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl + error_ret: + free(blocks_to_define); + +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_cmap_params.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_cmap_params.c +index 5707511790..196d1966bf 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_cmap_params.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_cmap_params.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -33,38 +33,34 @@ + /*****************************************************************************/ + + #include // for ex_err, etc +-#include // for EX_FATAL, ex__leavedef, etc ++#include // for EX_FATAL, exi_leavedef, etc + +-int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_node_cnts, +- void_int *elem_cmap_ids, void_int *elem_cmap_elem_cnts, int64_t processor) ++int ex_put_cmap_params(int exoid, const void_int *node_cmap_ids, ++ const void_int *node_cmap_node_cnts, const void_int *elem_cmap_ids, ++ const void_int *elem_cmap_elem_cnts, int64_t processor) + { +- size_t num_n_comm_maps, num_e_comm_maps; +- size_t ncnt_cmap, ecnt_cmap; +- size_t icm; +- int varid, dimid[1], n_varid, e_varid, status; +- int n_varid_idx, e_varid_idx; +- size_t start[1]; +- char ftype[2]; +- int64_t nl_ncnt_cmap, nl_ecnt_cmap; +- int nmstat; ++ int dimid[1]; ++ size_t start[1]; ++ char ftype[2]; + + char errmsg[MAX_ERR_LENGTH]; + +- int index_type = NC_INT; +- int id_type = NC_INT; +- int format; +- + EX_UNUSED(processor); + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++ int format; + nc_inq_format(exoid, &format); ++ ++ int index_type = NC_INT; + if ((ex_int64_status(exoid) & EX_BULK_INT64_DB) || (format == NC_FORMAT_NETCDF4)) { + index_type = NC_INT64; + } ++ ++ int id_type = NC_INT; + if (ex_int64_status(exoid) & EX_IDS_INT64_DB) { + id_type = NC_INT64; + } +@@ -75,7 +71,7 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + ** be used for writing a parallel file + */ + /* Get the file type */ +- if (ex__get_file_type(exoid, ftype) != EX_NOERR) { ++ if (exi_get_file_type(exoid, ftype) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get file type from file ID %d\n", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MSG); + EX_FUNC_LEAVE(EX_FATAL); +@@ -90,14 +86,16 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + } + + /* Put NetCDF file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ int status; ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to file ID %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Check to see if there are nodal communications maps in the file */ +- if ((status = nc_inq_dimid(exoid, DIM_NUM_N_CMAPS, &dimid[0])) != NC_NOERR) { ++ size_t num_n_comm_maps; ++ if (nc_inq_dimid(exoid, DIM_NUM_N_CMAPS, &dimid[0]) != NC_NOERR) { + num_n_comm_maps = 0; + } + else { +@@ -114,6 +112,7 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + * Add dimensions for the size of the number of nodal + * communication maps. + */ ++ int n_varid_idx; + if (num_n_comm_maps > 0) { + + /* add the communications data index variable */ +@@ -123,20 +122,20 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + VAR_N_COMM_DATA_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Add dimensions for all of the nodal communication maps */ +- ncnt_cmap = 0; ++ int ncnt_cmap = 0; + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +- for (icm = 0; icm < num_n_comm_maps; icm++) { ++ for (size_t icm = 0; icm < num_n_comm_maps; icm++) { + ncnt_cmap += ((int64_t *)node_cmap_node_cnts)[icm]; + } + } + else { +- for (icm = 0; icm < num_n_comm_maps; icm++) { ++ for (size_t icm = 0; icm < num_n_comm_maps; icm++) { + ncnt_cmap += ((int *)node_cmap_node_cnts)[icm]; + } + } +@@ -146,38 +145,40 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + DIM_NCNT_CMAP, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Define variables for the nodal IDS and processor vectors */ ++ int varid; + if ((status = nc_def_var(exoid, VAR_N_COMM_NIDS, id_type, 1, dimid, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to add variable \"%s\" in file ID %d", + VAR_N_COMM_NIDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + if ((status = nc_def_var(exoid, VAR_N_COMM_PROC, NC_INT, 1, dimid, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to add variable \"%s\" in file ID %d", + VAR_N_COMM_PROC, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + } /* End "if (num_n_comm_maps > 0)" */ + + /* Check to see if there are elemental communications maps in the file */ +- if ((status = nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid[0])) != NC_NOERR) { ++ size_t num_e_comm_maps; ++ if (nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid[0]) != NC_NOERR) { + num_e_comm_maps = 0; + } + else { +@@ -194,6 +195,7 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + * Add dimensions for the size of the number of elemental + * communication maps. + */ ++ int e_varid_idx; + if (num_e_comm_maps > 0) { + + /* add the communications data index variable */ +@@ -203,20 +205,20 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + VAR_E_COMM_DATA_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Add dimensions for each of the nodal communication maps */ +- ecnt_cmap = 0; ++ int ecnt_cmap = 0; + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +- for (icm = 0; icm < num_e_comm_maps; icm++) { ++ for (size_t icm = 0; icm < num_e_comm_maps; icm++) { + ecnt_cmap += ((int64_t *)elem_cmap_elem_cnts)[icm]; + } + } + else { +- for (icm = 0; icm < num_e_comm_maps; icm++) { ++ for (size_t icm = 0; icm < num_e_comm_maps; icm++) { + ecnt_cmap += ((int *)elem_cmap_elem_cnts)[icm]; + } + } +@@ -225,53 +227,55 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + DIM_ECNT_CMAP, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Define variables for the element IDS and processor vectors */ ++ int varid; + if ((status = nc_def_var(exoid, VAR_E_COMM_EIDS, id_type, 1, dimid, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to add variable \"%s\" in file ID %d", + VAR_E_COMM_EIDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + if ((status = nc_def_var(exoid, VAR_E_COMM_PROC, NC_INT, 1, dimid, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to add variable \"%s\" in file ID %d", + VAR_E_COMM_PROC, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + if ((status = nc_def_var(exoid, VAR_E_COMM_SIDS, NC_INT, 1, dimid, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to add variable \"%s\" in file ID %d", + VAR_E_COMM_SIDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + } /* End "if (num_e_comm_maps > 0)" */ + + /* Exit define mode */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + /* Set the status of the nodal communication maps */ + if (num_n_comm_maps > 0) { + ++ int n_varid; + if ((status = nc_inq_varid(exoid, VAR_N_COMM_STAT, &n_varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to find variable ID for \"%s\" in file ID %d", + VAR_N_COMM_STAT, exoid); +@@ -279,8 +283,8 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + EX_FUNC_LEAVE(EX_FATAL); + } + +- nl_ncnt_cmap = 0; /* reset this for index */ +- for (icm = 0; icm < num_n_comm_maps; icm++) { ++ int64_t nl_ncnt_cmap = 0; /* reset this for index */ ++ for (size_t icm = 0; icm < num_n_comm_maps; icm++) { + + size_t ncnc; + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +@@ -290,13 +294,8 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + ncnc = ((int *)node_cmap_node_cnts)[icm]; + } + +- start[0] = icm; +- if (ncnc > 0) { +- nmstat = 1; +- } +- else { +- nmstat = 0; +- } ++ int nmstat = ncnc > 0 ? 1 : 0; ++ start[0] = icm; + + if ((status = nc_put_var1_int(exoid, n_varid, start, &nmstat)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unable to output variable in file ID %d", exoid); +@@ -344,6 +343,7 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + if (num_e_comm_maps > 0) { + + /* Get variable ID for elemental status vector */ ++ int e_varid; + if ((status = nc_inq_varid(exoid, VAR_E_COMM_STAT, &e_varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to find variable ID for \"%s\" in file ID %d", + VAR_E_COMM_STAT, exoid); +@@ -351,8 +351,8 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + EX_FUNC_LEAVE(EX_FATAL); + } + +- nl_ecnt_cmap = 0; /* reset this for index */ +- for (icm = 0; icm < num_e_comm_maps; icm++) { ++ int64_t nl_ecnt_cmap = 0; /* reset this for index */ ++ for (size_t icm = 0; icm < num_e_comm_maps; icm++) { + size_t ecec; + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { + ecec = ((int64_t *)elem_cmap_elem_cnts)[icm]; +@@ -360,13 +360,8 @@ int ex_put_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n + else { + ecec = ((int *)elem_cmap_elem_cnts)[icm]; + } +- start[0] = icm; +- if (ecec > 0) { +- nmstat = 1; +- } +- else { +- nmstat = 0; +- } ++ start[0] = icm; ++ int nmstat = ecec > 0 ? 1 : 0; + + if ((status = nc_put_var1_int(exoid, e_varid, start, &nmstat)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unable to output variable in file ID %d", exoid); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_cmap_params_cc.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_cmap_params_cc.c +index 607af5d6fc..1df47f1eee 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_cmap_params_cc.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_cmap_params_cc.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -33,19 +33,20 @@ + /*****************************************************************************/ + /*****************************************************************************/ + #include // for ex_err, etc +-#include // for EX_FATAL, ex__leavedef, etc ++#include // for EX_FATAL, exi_leavedef, etc + +-int ex_put_cmap_params_cc(int exoid, void_int *node_cmap_ids, void_int *node_cmap_node_cnts, +- void_int *node_proc_ptrs, void_int *elem_cmap_ids, +- void_int *elem_cmap_elem_cnts, void_int *elem_proc_ptrs) ++int ex_put_cmap_params_cc(int exoid, const void_int *node_cmap_ids, ++ const void_int *node_cmap_node_cnts, const void_int *node_proc_ptrs, ++ const void_int *elem_cmap_ids, const void_int *elem_cmap_elem_cnts, ++ const void_int *elem_proc_ptrs) + { +- size_t num_n_comm_maps, num_e_comm_maps, num_procs_in_file; +- int status, icm, n_varid[2], e_varid[2], iproc; ++ size_t num_n_comm_maps, num_e_comm_maps; ++ int status, n_varid[2], e_varid[2]; + int varid, n_dimid[1], e_dimid[1]; + int n_varid_idx, e_varid_idx; + int num_icm; + size_t start[1], count[1]; +- size_t ecnt_cmap, ncnt_cmap; ++ size_t iproc; + + long long nl_ecnt_cmap, nl_ncnt_cmap; + void_int *n_var_idx = NULL; +@@ -54,16 +55,16 @@ int ex_put_cmap_params_cc(int exoid, void_int *node_cmap_ids, void_int *node_cma + int nmstat; + + char errmsg[MAX_ERR_LENGTH]; +- int format; + int index_type, bulk_type; + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* See if using NC_FORMAT_NETCDF4 format... */ ++ int format; + nc_inq_format(exoid, &format); + if ((ex_int64_status(exoid) & EX_BULK_INT64_DB) || (format == NC_FORMAT_NETCDF4)) { + index_type = NC_INT64; +@@ -86,6 +87,7 @@ int ex_put_cmap_params_cc(int exoid, void_int *node_cmap_ids, void_int *node_cma + EX_FUNC_LEAVE(EX_FATAL); + } + ++ size_t num_procs_in_file; + if ((status = nc_inq_dimlen(exoid, n_dimid[0], &num_procs_in_file)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find length of dimension \"%s\" in file ID %d", DIM_NUM_PROCS_F, +@@ -158,7 +160,7 @@ file ID %d", + } /* "if (num_n_comm_maps > 0)" */ + + /* Check to see if there are elemental communications maps in the file */ +- if ((status = nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &e_dimid[0])) != NC_NOERR) { ++ if (nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &e_dimid[0]) != NC_NOERR) { + num_e_comm_maps = 0; + } + else { +@@ -213,7 +215,7 @@ file ID %d", + } /* "if (num_e_comm_maps >0)" */ + + /* Put NetCDF file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file ID %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -231,13 +233,13 @@ file ID %d", + VAR_N_COMM_DATA_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } + + /* now add up all of the nodal communications maps */ +- ncnt_cmap = 0; ++ size_t ncnt_cmap = 0; + for (iproc = 0; iproc < num_procs_in_file; iproc++) { + if (index_type == NC_INT64) { + num_icm = ((int64_t *)n_var_idx)[iproc + 1] - ((int64_t *)n_var_idx)[iproc]; +@@ -245,7 +247,7 @@ file ID %d", + else { + num_icm = ((int *)n_var_idx)[iproc + 1] - ((int *)n_var_idx)[iproc]; + } +- for (icm = 0; icm < num_icm; icm++) { ++ for (int icm = 0; icm < num_icm; icm++) { + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { + ncnt_cmap += ((int64_t *)node_cmap_node_cnts)[((int64_t *)node_proc_ptrs)[iproc] + icm]; + } +@@ -261,7 +263,7 @@ file ID %d", + ncnt_cmap, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -272,22 +274,22 @@ file ID %d", + VAR_N_COMM_NIDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + if ((status = nc_def_var(exoid, VAR_N_COMM_PROC, NC_INT, 1, n_dimid, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to add variable \"%s\" in file ID %d", + VAR_N_COMM_PROC, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + } /* End "if (num_n_comm_maps > 0)" */ + +@@ -303,13 +305,13 @@ file ID %d", + VAR_E_COMM_DATA_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } + + /* now add up all of the nodal communications maps */ +- ecnt_cmap = 0; ++ size_t ecnt_cmap = 0; + for (iproc = 0; iproc < num_procs_in_file; iproc++) { + if (index_type == NC_INT64) { + num_icm = ((int64_t *)e_var_idx)[iproc + 1] - ((int64_t *)e_var_idx)[iproc]; +@@ -317,7 +319,7 @@ file ID %d", + else { + num_icm = ((int *)e_var_idx)[iproc + 1] - ((int *)e_var_idx)[iproc]; + } +- for (icm = 0; icm < num_icm; icm++) { ++ for (int icm = 0; icm < num_icm; icm++) { + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { + ecnt_cmap += ((int64_t *)elem_cmap_elem_cnts)[((int64_t *)elem_proc_ptrs)[iproc] + icm]; + } +@@ -333,7 +335,7 @@ file ID %d", + DIM_ECNT_CMAP, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -344,38 +346,38 @@ file ID %d", + VAR_E_COMM_EIDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + if ((status = nc_def_var(exoid, VAR_E_COMM_PROC, NC_INT, 1, e_dimid, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to add variable \"%s\" in file ID %d", + VAR_E_COMM_PROC, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + if ((status = nc_def_var(exoid, VAR_E_COMM_SIDS, bulk_type, 1, e_dimid, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to add variable \"%s\" in file ID %d", + VAR_E_COMM_SIDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + } /* End "if (num_e_comm_maps > 0)" */ + + /* Exit define mode */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + /* Set the status of the nodal communication maps */ + if (num_n_comm_maps > 0) { +@@ -415,7 +417,7 @@ file ID %d", + else { + num_icm = ((int *)n_var_idx)[iproc + 1] - ((int *)n_var_idx)[iproc]; + } +- for (icm = 0; icm < num_icm; icm++) { ++ for (int icm = 0; icm < num_icm; icm++) { + size_t cnt; + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { + cnt = ((int64_t *)node_cmap_node_cnts)[proc_ptr + icm]; +@@ -526,7 +528,7 @@ file ID %d", + else { + num_icm = ((int *)e_var_idx)[iproc + 1] - ((int *)e_var_idx)[iproc]; + } +- for (icm = 0; icm < num_icm; icm++) { ++ for (int icm = 0; icm < num_icm; icm++) { + + size_t cnt; + if (ex_int64_status(exoid) & EX_BULK_INT64_API) { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_all_blocks.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_all_blocks.c +index a41470896f..f4b4a997bc 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_all_blocks.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_all_blocks.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -41,9 +41,6 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + int elem_work = 0; /* is DIM_NUM_EL_BLK defined? If so, there's work to do */ + int edge_work = 0; /* is DIM_NUM_ED_BLK defined? If so, there's work to do */ + int face_work = 0; /* is DIM_NUM_FA_BLK defined? If so, there's work to do */ +-#if NC_HAS_HDF5 +- int fill = NC_FILL_CHAR; +-#endif + + int *edge_id_int = NULL; + int *face_id_int = NULL; +@@ -88,7 +85,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + elem_id_int = param->elem_blk_id; + } + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -208,13 +205,13 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + EX_FUNC_LEAVE(EX_NOERR); + } + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +-#if NC_HAS_HDF5 ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) + #define EX_PREPARE_ATTRIB_ARRAY(TNAME, CURBLK, DNAME, DVAL, ID, VANAME, VADIM0, VADIM1, VANNAME) \ + if (DVAL[iblk] > 0) { \ + if ((status = nc_def_dim(exoid, DNAME(CURBLK + 1), DVAL[iblk], &VADIM1)) != NC_NOERR) { \ +@@ -238,7 +235,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + ex_err_fn(exoid, __func__, errmsg, status); \ + goto error_ret; /* exit define mode and return */ \ + } \ +- ex__compress_variable(exoid, temp, 2); \ ++ exi_compress_variable(exoid, temp, 2); \ + \ + /* Attribute names... */ \ + dims[0] = VADIM1; \ +@@ -250,6 +247,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + ex_err_fn(exoid, __func__, errmsg, status); \ + goto error_ret; /* exit define mode and return */ \ + } \ ++ int fill = NC_FILL_CHAR; \ + nc_def_var_fill(exoid, temp, 0, &fill); \ + } + #else +@@ -276,7 +274,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + ex_err_fn(exoid, __func__, errmsg, status); \ + goto error_ret; /* exit define mode and return */ \ + } \ +- ex__compress_variable(exoid, temp, 2); \ ++ exi_compress_variable(exoid, temp, 2); \ + \ + /* Attribute names... */ \ + dims[0] = VADIM1; \ +@@ -309,7 +307,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + ex_err_fn(exoid, __func__, errmsg, status); \ + goto error_ret; /* exit define mode and return */ \ + } \ +- ex__compress_variable(exoid, connid, 1); \ ++ exi_compress_variable(exoid, connid, 1); \ + } + + /* Iterate over edge blocks ... */ +@@ -322,7 +320,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + eb_id = edge_id_int[iblk]; + } + +- cur_num_edge_blk = ex__get_file_item(exoid, ex__get_counter_list(EX_EDGE_BLOCK)); ++ cur_num_edge_blk = exi_get_file_item(exoid, exi_get_counter_list(EX_EDGE_BLOCK)); + if (cur_num_edge_blk >= (int)num_edge_blk) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: exceeded number of edge blocks (%ld) defined in file id %d", +@@ -331,9 +329,9 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + goto error_ret; + } + +- /* NOTE: ex__inc_file_item is used to find the number of edge blocks ++ /* NOTE: exi_inc_file_item is used to find the number of edge blocks + for a specific file and returns that value incremented. */ +- cur_num_edge_blk = ex__inc_file_item(exoid, ex__get_counter_list(EX_EDGE_BLOCK)); ++ cur_num_edge_blk = exi_inc_file_item(exoid, exi_get_counter_list(EX_EDGE_BLOCK)); + + if (param->num_edge_this_blk[iblk] == 0) { /* Is this a NULL edge block? */ + continue; +@@ -390,7 +388,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + fb_id = face_id_int[iblk]; + } + +- cur_num_face_blk = ex__get_file_item(exoid, ex__get_counter_list(EX_FACE_BLOCK)); ++ cur_num_face_blk = exi_get_file_item(exoid, exi_get_counter_list(EX_FACE_BLOCK)); + if (cur_num_face_blk >= (int)num_face_blk) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: exceeded number of face blocks (%ld) defined in file id %d", +@@ -399,9 +397,9 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + goto error_ret; + } + +- /* NOTE: ex__inc_file_item is used to find the number of edge blocks ++ /* NOTE: exi_inc_file_item is used to find the number of edge blocks + for a specific file and returns that value incremented. */ +- cur_num_face_blk = ex__inc_file_item(exoid, ex__get_counter_list(EX_FACE_BLOCK)); ++ cur_num_face_blk = exi_inc_file_item(exoid, exi_get_counter_list(EX_FACE_BLOCK)); + + if (param->num_face_this_blk[iblk] == 0) { /* Is this a NULL face block? */ + continue; +@@ -458,7 +456,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + eb_id = elem_id_int[iblk]; + } + +- cur_num_elem_blk = ex__get_file_item(exoid, ex__get_counter_list(EX_ELEM_BLOCK)); ++ cur_num_elem_blk = exi_get_file_item(exoid, exi_get_counter_list(EX_ELEM_BLOCK)); + if (cur_num_elem_blk >= (int)num_elem_blk) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: exceeded number of element blocks (%ld) defined " +@@ -468,9 +466,9 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + goto error_ret; + } + +- /* NOTE: ex__inc_file_item is used to find the number of element blocks ++ /* NOTE: exi_inc_file_item is used to find the number of element blocks + for a specific file and returns that value incremented. */ +- cur_num_elem_blk = ex__inc_file_item(exoid, ex__get_counter_list(EX_ELEM_BLOCK)); ++ cur_num_elem_blk = exi_inc_file_item(exoid, exi_get_counter_list(EX_ELEM_BLOCK)); + + if (param->num_elem_this_blk[iblk] == 0) { /* Is this a NULL element block? */ + continue; +@@ -559,7 +557,7 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + ex_err_fn(exoid, __func__, errmsg, status); + } + for (i = 1; i <= num_maps[map_type]; ++i) { +- const char *mapname = ex__name_of_map(map_enums[map_type], i); ++ const char *mapname = exi_name_of_map(map_enums[map_type], i); + if (nc_inq_varid(exoid, mapname, &temp) != NC_NOERR) { + int map_int_type = NC_INT; + if (ex_int64_status(exoid) & EX_MAPS_INT64_DB) { +@@ -578,14 +576,16 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, temp, 1); ++ exi_compress_variable(exoid, temp, 1); + } + } + } + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -593,6 +593,6 @@ int ex_put_concat_all_blocks(int exoid, const ex_block_params *param) + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_elem_block.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_elem_block.c +index fb9d05164b..1e59fd4890 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_elem_block.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_elem_block.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -33,11 +33,12 @@ + * \param num_attr_this_blk number of attributes + * \param define_maps if != 0, write maps, else don't + */ +-int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_type[], ++int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *const elem_type[], + const void_int *num_elem_this_blk, const void_int *num_nodes_per_elem, + const void_int *num_attr_this_blk, int define_maps) + { +- int i, varid, dimid, dims[2], strdim, *eb_array; ++ size_t i; ++ int varid, dimid, dims[2], strdim, *eb_array; + int temp; + int iblk; + int status; +@@ -46,12 +47,9 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + size_t length; + int cur_num_elem_blk, nelnoddim, numelbdim, numattrdim, connid, numelemdim, numnodedim; + char errmsg[MAX_ERR_LENGTH]; +-#if NC_HAS_HDF5 +- int fill = NC_FILL_CHAR; +-#endif + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -82,13 +80,13 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + } + + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { +- for (i = 0; i < num_elem_blk; i++) { +- eb_array[i] = (((int64_t *)num_elem_this_blk)[i] == 0) ? 0 : 1; ++ for (int ib = 0; ib < num_elem_blk; ib++) { ++ eb_array[ib] = (((int64_t *)num_elem_this_blk)[ib] == 0) ? 0 : 1; + } + } + else { +- for (i = 0; i < num_elem_blk; i++) { +- eb_array[i] = (((int *)num_elem_this_blk)[i] == 0) ? 0 : 1; ++ for (int ib = 0; ib < num_elem_blk; ib++) { ++ eb_array[ib] = (((int *)num_elem_this_blk)[ib] == 0) ? 0 : 1; + } + } + +@@ -146,7 +144,7 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + } + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(eb_array); +@@ -182,7 +180,7 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + num_attr = ((int *)num_attr_this_blk)[iblk]; + } + +- cur_num_elem_blk = ex__get_file_item(exoid, ex__get_counter_list(EX_ELEM_BLOCK)); ++ cur_num_elem_blk = exi_get_file_item(exoid, exi_get_counter_list(EX_ELEM_BLOCK)); + if (cur_num_elem_blk >= num_elem_blk) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: exceeded number of element blocks (%d) defined in file id %d", num_elem_blk, +@@ -191,9 +189,9 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + goto error_ret; + } + +- /* NOTE: ex__inc_file_item is used to find the number of element blocks ++ /* NOTE: exi_inc_file_item is used to find the number of element blocks + for a specific file and returns that value incremented. */ +- cur_num_elem_blk = ex__inc_file_item(exoid, ex__get_counter_list(EX_ELEM_BLOCK)); ++ cur_num_elem_blk = exi_inc_file_item(exoid, exi_get_counter_list(EX_ELEM_BLOCK)); + + if (eb_array[iblk] == 0) { /* Is this a NULL element block? */ + continue; +@@ -238,7 +236,7 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, connid, 1); ++ exi_compress_variable(exoid, connid, 1); + + /* store element type as attribute of connectivity variable */ + if ((status = nc_put_att_text(exoid, connid, ATT_NAME_ELB, strlen(elem_type[iblk]) + 1, +@@ -273,7 +271,8 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +-#if NC_HAS_HDF5 ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) ++ int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, temp, 0, &fill); + #endif + eb_array[iblk] = temp; +@@ -315,7 +314,7 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, temp, 1); ++ exi_compress_variable(exoid, temp, 1); + } + } + +@@ -339,13 +338,15 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, temp, 1); ++ exi_compress_variable(exoid, temp, 1); + } + } + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + free(eb_array); + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -355,7 +356,7 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + * attribute name. + */ + size_t start[2], count[2]; +- char * text = ""; ++ char *text = ""; + count[0] = 1; + start[1] = 0; + count[1] = strlen(text) + 1; +@@ -384,6 +385,6 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *elem_ + /* Fatal error: exit definition mode and return */ + error_ret: + free(eb_array); +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_sets.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_sets.c +index d23c61af97..31c59c187c 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_sets.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_concat_sets.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -23,7 +23,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_comp_ws, etc + + /*! + * writes the set ID's, set entry count array, set entry pointers array, +@@ -42,26 +42,26 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + const void_int *num_dist_per_set = set_specs->num_dist_per_set; + const void_int *sets_entry_index = set_specs->sets_entry_index; + const void_int *sets_dist_index = set_specs->sets_dist_index; +- const void * sets_dist_fact = set_specs->sets_dist_fact; ++ const void *sets_dist_fact = set_specs->sets_dist_fact; + size_t num_df, num_entry; + int i, cur_num_sets, num_sets; + int dimid, varid, set_id_ndx, dims[1]; +- int * set_stat = NULL; ++ int *set_stat = NULL; + int set_int_type, int_size; + +- const float * flt_dist_fact = NULL; ++ const float *flt_dist_fact = NULL; + const double *dbl_dist_fact = NULL; + char errmsg[MAX_ERR_LENGTH]; +- char * idsptr = NULL; +- char * statptr = NULL; +- char * numdfptr = NULL; +- char * factptr = NULL; +- char * elemptr = NULL; +- char * extraptr = NULL; ++ char *idsptr = NULL; ++ char *statptr = NULL; ++ char *numdfptr = NULL; ++ char *factptr = NULL; ++ char *elemptr = NULL; ++ char *extraptr = NULL; + ex_inquiry ex_inq_val; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -105,7 +105,7 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + } + + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &temp)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &temp)) != NC_NOERR) { + if (status == NC_EBADDIM) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no %ss defined for file id %d", + ex_name_of_object(set_type), exoid); +@@ -171,7 +171,7 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + } + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(set_stat); +@@ -190,10 +190,10 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + + /* Keep track of the total number of sets defined using a counter stored + in a linked list keyed by exoid. +- NOTE: ex__get_file_item is used to find the number of sets of type ++ NOTE: exi_get_file_item is used to find the number of sets of type + for a specific file and returns that value. + */ +- cur_num_sets = ex__get_file_item(exoid, ex__get_counter_list(set_type)); ++ cur_num_sets = exi_get_file_item(exoid, exi_get_counter_list(set_type)); + if (cur_num_sets >= num_sets) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: exceeded number of %ss (%d) defined in file id %d", + ex_name_of_object(set_type), num_sets, exoid); +@@ -201,10 +201,10 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + goto error_ret; + } + +- /* NOTE: ex__inc_file_item is used to find the number of sets ++ /* NOTE: exi_inc_file_item is used to find the number of sets + for a specific file and returns that value incremented. */ + +- cur_num_sets = ex__inc_file_item(exoid, ex__get_counter_list(set_type)); ++ cur_num_sets = exi_inc_file_item(exoid, exi_get_counter_list(set_type)); + set_id_ndx = cur_num_sets + 1; + + /* setup more pointers based on set_type */ +@@ -246,11 +246,11 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + } + + if (int_size == sizeof(int)) { +- status = nc_def_dim(exoid, ex__dim_num_entries_in_object(set_type, set_id_ndx), ++ status = nc_def_dim(exoid, exi_dim_num_entries_in_object(set_type, set_id_ndx), + ((int *)num_entries_per_set)[i], &dimid); + } + else { +- status = nc_def_dim(exoid, ex__dim_num_entries_in_object(set_type, set_id_ndx), ++ status = nc_def_dim(exoid, exi_dim_num_entries_in_object(set_type, set_id_ndx), + ((int64_t *)num_entries_per_set)[i], &dimid); + } + +@@ -292,7 +292,7 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, temp, 1); ++ exi_compress_variable(exoid, temp, 1); + + /* create extra list variable for set (only for edge, face and side sets) + */ +@@ -312,7 +312,7 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, temp, 1); ++ exi_compress_variable(exoid, temp, 1); + } + + /* define dimension for number of dist factors per set */ +@@ -375,12 +375,14 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, temp, 2); ++ exi_compress_variable(exoid, temp, 2); + } /* end define dist factors */ + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + free(set_stat); + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -473,7 +475,7 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + df_ndx = ((int64_t *)sets_dist_index)[i]; + } + +- if (ex__comp_ws(exoid) == sizeof(float)) { ++ if (exi_comp_ws(exoid) == sizeof(float)) { + flt_dist_fact = sets_dist_fact; + if (num_df > 0) { /* store dist factors if required */ + if (ex_put_set_dist_fact(exoid, set_type, set_id, &(flt_dist_fact[df_ndx])) == -1) { +@@ -487,7 +489,7 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + } + } + } +- else if (ex__comp_ws(exoid) == sizeof(double)) { ++ else if (exi_comp_ws(exoid) == sizeof(double)) { + dbl_dist_fact = sets_dist_fact; + if (num_df) { /* only store if they exist */ + if (ex_put_set_dist_fact(exoid, set_type, set_id, &(dbl_dist_fact[df_ndx])) == -1) { +@@ -504,7 +506,7 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + else { + /* unknown floating point word size */ + snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: unsupported floating point word size %d for file id %d", ex__comp_ws(exoid), ++ "ERROR: unsupported floating point word size %d for file id %d", exi_comp_ws(exoid), + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + free(set_stat); +@@ -518,6 +520,6 @@ int ex_put_concat_sets(int exoid, ex_entity_type set_type, const struct ex_set_s + error_ret: + free(set_stat); + +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_conn.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_conn.c +index 523a555b6c..c0393593b8 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_conn.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_conn.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__id_lkup, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_id_lkup, etc + + /*! write out the connectivity array */ + int ex_int_write_conn(int exoid, ex_entity_id blk_id, const char *type, int var_id, +@@ -26,7 +26,7 @@ int ex_int_write_conn(int exoid, ex_entity_id blk_id, const char *type, int var_ + "ERROR: failed to write connectivity array for %s block %" PRId64 " in file id %d", + type, blk_id, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); ++ return status; + } + return status; + } +@@ -44,15 +44,16 @@ int ex_int_write_conn(int exoid, ex_entity_id blk_id, const char *type, int var_ + int ex_put_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const void_int *node_conn, + const void_int *elem_edge_conn, const void_int *elem_face_conn) + { +- int connid = -1, blk_id_ndx, status; ++ int connid = -1; ++ int status; + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- blk_id_ndx = ex__id_lkup(exoid, blk_type, blk_id); ++ int blk_id_ndx = exi_id_lkup(exoid, blk_type, blk_id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -107,7 +108,7 @@ int ex_put_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const v + int nedpereldim, nfapereldim; + size_t num_ed_per_elem, num_fa_per_elem; + +- if (elem_edge_conn != 0) { ++ if (elem_edge_conn != NULL) { + status = nc_inq_dimid(exoid, DIM_NUM_EDG_PER_EL(blk_id_ndx), &nedpereldim); + if (status != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, +@@ -119,7 +120,7 @@ int ex_put_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const v + } + } + +- if (elem_face_conn != 0) { ++ if (elem_face_conn != NULL) { + status = nc_inq_dimid(exoid, DIM_NUM_FAC_PER_EL(blk_id_ndx), &nfapereldim); + if (status != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, +@@ -132,7 +133,7 @@ int ex_put_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const v + } + + num_ed_per_elem = 0; +- if ((elem_edge_conn != 0) && ++ if ((elem_edge_conn != NULL) && + ((status = nc_inq_dimlen(exoid, nedpereldim, &num_ed_per_elem)) != NC_NOERR)) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get number of edges/elem in block %" PRId64 " in file id %d", +@@ -142,7 +143,7 @@ int ex_put_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const v + } + + num_fa_per_elem = 0; +- if ((elem_face_conn != 0) && ++ if ((elem_face_conn != NULL) && + ((status = nc_inq_dimlen(exoid, nfapereldim, &num_fa_per_elem)) != NC_NOERR)) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get number of faces/elem in block %" PRId64 " in file id %d", +@@ -151,8 +152,8 @@ int ex_put_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const v + EX_FUNC_LEAVE(EX_FATAL); + } + +- if ((num_ed_per_elem == 0 && elem_edge_conn != 0) || +- (num_ed_per_elem != 0 && elem_edge_conn == 0)) { ++ if ((num_ed_per_elem == 0 && elem_edge_conn != NULL) || ++ (num_ed_per_elem != 0 && elem_edge_conn == NULL)) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: number of edges per element (%ld) doesn't " + "agree with elem_edge_conn (0x%p)", +@@ -161,8 +162,8 @@ int ex_put_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const v + EX_FUNC_LEAVE(EX_FATAL); + } + +- if ((num_fa_per_elem == 0 && elem_face_conn != 0) || +- (num_fa_per_elem != 0 && elem_face_conn == 0)) { ++ if ((num_fa_per_elem == 0 && elem_face_conn != NULL) || ++ (num_fa_per_elem != 0 && elem_face_conn == NULL)) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: number of faces per element (%ld) doesn't " + "agree with elem_face_conn (0x%p)", +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_coord.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_coord.c +index 1571586654..eb88a828f8 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_coord.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_coord.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -95,13 +95,13 @@ int ex_put_coord(int exoid, const void *x_coor, const void *y_coor, const void * + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire id's of previously defined dimensions */ + +- if ((status = nc_inq_dimid(exoid, DIM_NUM_NODES, &numnoddim)) != NC_NOERR) { ++ if (nc_inq_dimid(exoid, DIM_NUM_NODES, &numnoddim) != NC_NOERR) { + /* If not found, then this file is storing 0 nodes. + Return immediately */ + EX_FUNC_LEAVE(EX_NOERR); +@@ -162,7 +162,7 @@ int ex_put_coord(int exoid, const void *x_coor, const void *y_coor, const void * + /* write out the coordinates */ + for (i = 0; i < num_dim; i++) { + const void *coor = NULL; +- char * which = NULL; ++ char *which = NULL; + + if (i == 0) { + coor = x_coor; +@@ -181,7 +181,7 @@ int ex_put_coord(int exoid, const void *x_coor, const void *y_coor, const void * + } + + if (coor != NULL && coordid != -1) { +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_var_float(exoid, coordid, coor); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_coord_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_coord_names.c +index 2396b74304..17fa2d2556 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_coord_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_coord_names.c +@@ -43,7 +43,7 @@ error = ex_put_coord_names (exoid, coord_names); + + */ + +-int ex_put_coord_names(int exoid, char *coord_names[]) ++int ex_put_coord_names(int exoid, char *const coord_names[]) + { + int status; + int ndimdim, varid; +@@ -51,7 +51,7 @@ int ex_put_coord_names(int exoid, char *coord_names[]) + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -77,7 +77,7 @@ int ex_put_coord_names(int exoid, char *coord_names[]) + } + + /* write out coordinate names */ +- status = ex__put_names(exoid, varid, num_dim, coord_names, EX_COORDINATE, "", __func__); ++ status = exi_put_names(exoid, varid, num_dim, coord_names, EX_COORDINATE, "", __func__); + + EX_FUNC_LEAVE(status); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_coordinate_frames.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_coordinate_frames.c +index 820dc25c3a..9e2edda442 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_coordinate_frames.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_coordinate_frames.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -27,17 +27,10 @@ + #include "exodusII.h" // for ex_err, EXERRVAL, etc + #include "exodusII_int.h" // for EX_FATAL, EX_NOERR, etc + +-int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids, void *pt_coordinates, +- const char *tags) ++int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids, ++ const void *pt_coordinates, const char *tags) + { +- int status; +- int dim, dim9; /* dimension id for nframes, nframes*9 */ + char errmsg[MAX_ERR_LENGTH]; /* buffer for error messages */ +- int varcoords; /* variable id for the coordinates */ +- int varids; /* variable id for the frame ids */ +- int vartags; /* variable id for the frame tags */ +- int i; /* general indices */ +- int int_type; + + EX_FUNC_ENTER(); + +@@ -53,22 +46,24 @@ int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids, voi + EX_FUNC_LEAVE(1); + } + +- assert(cf_ids != 0); +- assert(pt_coordinates != 0); +- assert(tags != 0); ++ assert(cf_ids != NULL); ++ assert(pt_coordinates != NULL); ++ assert(tags != NULL); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* make the definitions */ + /* go into define mode. define num_frames, num_frames9 */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ int status; ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + ++ int dim, dim9; /* dimension id for nframes, nframes*9 */ + if ((status = nc_def_dim(exoid, DIM_NUM_CFRAMES, nframes, &dim)) != NC_NOERR || + (nc_def_dim(exoid, DIM_NUM_CFRAME9, nframes * 9, &dim9) != NC_NOERR)) { + snprintf(errmsg, MAX_ERR_LENGTH, +@@ -77,12 +72,15 @@ int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids, voi + goto error_ret; + } + +- int_type = NC_INT; ++ int int_type = NC_INT; + if (ex_int64_status(exoid) & EX_IDS_INT64_DB) { + int_type = NC_INT64; + } + + /* define the variables. coordinates, tags and ids */ ++ int varcoords; /* variable id for the coordinates */ ++ int varids; /* variable id for the frame ids */ ++ int vartags; /* variable id for the frame tags */ + if (nc_def_var(exoid, VAR_FRAME_COORDS, nc_flt_code(exoid), 1, &dim9, &varcoords) != NC_NOERR || + (nc_def_var(exoid, VAR_FRAME_IDS, int_type, 1, &dim, &varids) != NC_NOERR) || + (nc_def_var(exoid, VAR_FRAME_TAGS, NC_CHAR, 1, &dim, &vartags) != NC_NOERR)) { +@@ -93,13 +91,13 @@ int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids, voi + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* check variables consistency */ +- for (i = 0; i < nframes; i++) { +- if (strchr("RrCcSs", tags[i]) == 0) { ++ for (int i = 0; i < nframes; i++) { ++ if (strchr("RrCcSs", tags[i]) == NULL) { + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: Unrecognized coordinate frame tag: '%c'.", + tags[i]); + ex_err_fn(exoid, __func__, errmsg, 2); +@@ -127,7 +125,7 @@ int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids, voi + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_var_float(exoid, varcoords, pt_coordinates); + } + else { +@@ -142,6 +140,6 @@ int ex_put_coordinate_frames(int exoid, int nframes, const void_int *cf_ids, voi + EX_FUNC_LEAVE(EX_NOERR); + + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_eb_info_global.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_eb_info_global.c +index 26b2a2c839..0393409327 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_eb_info_global.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_eb_info_global.c +@@ -26,13 +26,13 @@ + #include + #include + +-int ex_put_eb_info_global(int exoid, void_int *el_blk_ids, void_int *el_blk_cnts) ++int ex_put_eb_info_global(int exoid, const void_int *el_blk_ids, const void_int *el_blk_cnts) + { + int varid, status; + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_elem_cmap.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_elem_cmap.c +index 2b43db5c46..4d0a022cd0 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_elem_cmap.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_elem_cmap.c +@@ -30,8 +30,8 @@ + #include // for ex_err, etc + #include // for EX_FATAL, DIM_ECNT_CMAP, etc + +-int ex_put_elem_cmap(int exoid, ex_entity_id map_id, void_int *elem_ids, void_int *side_ids, +- void_int *proc_ids, int processor) ++int ex_put_elem_cmap(int exoid, ex_entity_id map_id, const void_int *elem_ids, ++ const void_int *side_ids, const void_int *proc_ids, int processor) + { + int map_idx, varid, dimid, status; + size_t start[1], count[1], ret_val; +@@ -42,7 +42,7 @@ int ex_put_elem_cmap(int exoid, ex_entity_id map_id, void_int *elem_ids, void_in + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -56,7 +56,7 @@ int ex_put_elem_cmap(int exoid, ex_entity_id map_id, void_int *elem_ids, void_in + } + + /* Get the index for this map_id */ +- if ((map_idx = ne__id_lkup(exoid, VAR_E_COMM_IDS, varidx, map_id)) == -1) { ++ if ((map_idx = nei_id_lkup(exoid, VAR_E_COMM_IDS, varidx, map_id)) == -1) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find index for variable \"%s\" in file ID %d", VAR_E_COMM_IDS, + exoid); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_entity_count_per_polyhedra.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_entity_count_per_polyhedra.c +index 6131f74d2f..d7531efae8 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_entity_count_per_polyhedra.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_entity_count_per_polyhedra.c +@@ -12,7 +12,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__id_lkup, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_id_lkup, etc + + /*! + * writes out the number of entities (nodes/faces) per polyhedra +@@ -30,11 +30,11 @@ int ex_put_entity_count_per_polyhedra(int exoid, ex_entity_type blk_type, ex_ent + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- blk_id_ndx = ex__id_lkup(exoid, blk_type, blk_id); ++ blk_id_ndx = exi_id_lkup(exoid, blk_type, blk_id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_field_metadata.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_field_metadata.c +new file mode 100644 +index 0000000000..6f90d2d328 +--- /dev/null ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_field_metadata.c +@@ -0,0 +1,343 @@ ++/* ++ * Copyright(C) 2022, 2023, 2024 National Technology & Engineering Solutions ++ * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ++ * NTESS, the U.S. Government retains certain rights in this software. ++ * ++ * See packages/seacas/LICENSE for details ++ */ ++ ++#include "exodusII.h" // for ex_err, etc ++#include "exodusII_int.h" // for EX_FATAL, etc ++ ++static int exi_print_type_error(int status, const char *name, const char *type, ++ const char *attribute, int exoid, const char *func) ++{ ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to store '%s' for %s '%s' in file id %d", ++ attribute, type, name, exoid); ++ ex_err_fn(exoid, func, errmsg, status); ++ return EX_FATAL; ++} ++ ++static int exi_print_attribute_error(int status, const char *name, const char *attribute, ++ ex_entity_type entity_type, ex_entity_id entity_id, int exoid, ++ const char *func) ++{ ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to store field metadata '%s' for field '%s' on %s with id %" PRId64 ++ " in file id %d", ++ attribute, name, ex_name_of_object(entity_type), entity_id, exoid); ++ ex_err_fn(exoid, func, errmsg, status); ++ return EX_FATAL; ++} ++ ++int ex_put_multi_field_metadata(int exoid, const ex_field field[], const int count) ++{ ++ exi_persist_redef(exoid, __func__); ++ for (int i = 0; i < count; i++) { ++ if (field[i].type[0] != EX_SCALAR) { ++ int status = ex_put_field_metadata(exoid, field[i]); ++ if (status != EX_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to store field metadata for field '%s' on %s with id %" PRId64 ++ " in file id %d", ++ field[i].name, ex_name_of_object(field[i].entity_type), field[i].entity_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ exi_persist_leavedef(exoid, __func__); ++ return EX_FATAL; ++ } ++ } ++ } ++ exi_persist_leavedef(exoid, __func__); ++ return EX_NOERR; ++} ++ ++int ex_put_field_metadata(int exoid, const ex_field field) ++{ ++ /* ++ * The attribute name is `Field@{name}@type` ++ * ++ * Field `nesting` is calculated as size of `type` field ++ * The `type` field is a sequence of integers which are the values of the `ex_field_type` enum. ++ * NOTE: For backward compatibility, we can only add new entries to this enum at the end. ++ * ++ * If size of `component_separator` == 0 then the default '_' separator used by all component ++ * levels If size of `component_separator` == 1 then that separator used by all component levels ++ * Else the size must equal nesting and it specifies a potentially different separator for each ++ * level. ++ */ ++#if 0 ++ fprintf(stderr, ++ "ex_put_field_metadata: Field '%s' of type '%s' with separator '%s' on block %lld\n", ++ field.name, ex_field_type_enum_to_string(field.type[0]), field.component_separator, ++ field.entity_id); ++#endif ++ ++ exi_persist_redef(exoid, __func__); ++ int status = 0; ++ static const char *field_template = "Field@%s@%s"; ++ char attribute_name[EX_MAX_NAME + 1]; ++ snprintf(attribute_name, EX_MAX_NAME + 1, field_template, field.name, "type"); ++ if ((status = ex_put_integer_attribute(exoid, field.entity_type, field.entity_id, attribute_name, ++ field.nesting, field.type)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_attribute_error(status, field.name, "type", field.entity_type, field.entity_id, ++ exoid, __func__); ++ } ++ ++ /* Do not write if empty... */ ++ if (field.type_name[0] != '\0') { ++ snprintf(attribute_name, EX_MAX_NAME + 1, field_template, field.name, "type_name"); ++ if ((status = ex_put_text_attribute(exoid, field.entity_type, field.entity_id, attribute_name, ++ field.type_name)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_attribute_error(status, field.name, "type_name", field.entity_type, ++ field.entity_id, exoid, __func__); ++ } ++ } ++ ++ /* Default component_separator is '_'. Avoid writing if that is what it is... */ ++ if (field.component_separator[0] != '_' || field.nesting > 1) { ++ snprintf(attribute_name, EX_MAX_NAME + 1, field_template, field.name, "separator"); ++ if ((status = ex_put_text_attribute(exoid, field.entity_type, field.entity_id, attribute_name, ++ field.component_separator)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_attribute_error(status, field.name, "separator", field.entity_type, ++ field.entity_id, exoid, __func__); ++ } ++ } ++ ++ bool needs_cardinality = false; ++ for (int i = 0; i < field.nesting; i++) { ++ if (field.type[i] == EX_FIELD_TYPE_USER_DEFINED || field.type[i] == EX_FIELD_TYPE_SEQUENCE) { ++ needs_cardinality = true; ++ break; ++ } ++ } ++ if (needs_cardinality) { ++ snprintf(attribute_name, EX_MAX_NAME + 1, field_template, field.name, "cardinality"); ++ if ((status = ex_put_integer_attribute(exoid, field.entity_type, field.entity_id, ++ attribute_name, field.nesting, field.cardinality)) != ++ EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_attribute_error(status, field.name, "cardinality", field.entity_type, ++ field.entity_id, exoid, __func__); ++ } ++ } ++ ++ exi_persist_leavedef(exoid, __func__); ++ return EX_NOERR; ++} ++ ++int exi_put_type_attribute(int exoid, const char *att_root, const char *name, const char *type, ++ ex_type value_type, int cardinality, const void *entry) ++{ ++ int status = EX_NOERR; ++ if (entry != NULL) { ++ static const char *template = "%s@%s@%s"; ++ char attribute_name[EX_MAX_NAME + 1]; ++ snprintf(attribute_name, EX_MAX_NAME + 1, template, att_root, name, type); ++ if (value_type == EX_INTEGER) { ++ status = ex_put_integer_attribute(exoid, EX_GLOBAL, 0, attribute_name, cardinality, entry); ++ } ++ else if (value_type == EX_DOUBLE) { ++ status = ex_put_double_attribute(exoid, EX_GLOBAL, 0, attribute_name, cardinality, entry); ++ } ++ } ++ return status; ++} ++ ++int exi_put_basis_attribute(int exoid, const char *basis_name, const char *type, ex_type value_type, ++ int cardinality, const void *basis_entry) ++{ ++ return exi_put_type_attribute(exoid, "Basis", basis_name, type, value_type, cardinality, ++ basis_entry); ++} ++ ++int exi_put_quad_attribute(int exoid, const char *quad_name, const char *type, ex_type value_type, ++ int cardinality, const void *quad_entry) ++{ ++ return exi_put_type_attribute(exoid, "Quad", quad_name, type, value_type, cardinality, ++ quad_entry); ++} ++ ++int ex_put_basis(int exoid, const ex_basis basis) ++{ ++ /* ++ * typedef struct ex_basis { ++ * char name[EX_MAX_NAME + 1]; ++ * int cardinality; -- number of `basis` points == dimension of non-null subc_*, xi, eta, zeta ++ * int *subc_dim; ++ * int *subc_ordinal; ++ * int *subc_dof_ordinal; ++ * int *subc_num_dof; ++ * double *xi; ++ * double *eta; ++ * double *zeta; ++ * } ex_basis; ++ */ ++ ++ exi_persist_redef(exoid, __func__); ++ int status; ++ if ((status = exi_put_basis_attribute(exoid, basis.name, "cardinality", EX_INTEGER, 1, ++ &basis.cardinality)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, basis.name, "basis", "cardinality", exoid, __func__); ++ } ++ ++ if ((status = exi_put_basis_attribute(exoid, basis.name, "subc_dim", EX_INTEGER, ++ basis.cardinality, basis.subc_dim)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, basis.name, "basis", "subc_dim", exoid, __func__); ++ } ++ ++ if ((status = exi_put_basis_attribute(exoid, basis.name, "subc_ordinal", EX_INTEGER, ++ basis.cardinality, basis.subc_ordinal)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, basis.name, "basis", "subc_ordinal", exoid, __func__); ++ } ++ ++ if ((status = exi_put_basis_attribute(exoid, basis.name, "subc_dof_ordinal", EX_INTEGER, ++ basis.cardinality, basis.subc_dof_ordinal)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, basis.name, "basis", "subc_dof_ordinal", exoid, __func__); ++ } ++ ++ if ((status = exi_put_basis_attribute(exoid, basis.name, "subc_num_dof", EX_INTEGER, ++ basis.cardinality, basis.subc_num_dof)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, basis.name, "basis", "subc_num_dof", exoid, __func__); ++ } ++ ++ if ((status = exi_put_basis_attribute(exoid, basis.name, "xi", EX_DOUBLE, basis.cardinality, ++ basis.xi)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, basis.name, "basis", "xi", exoid, __func__); ++ } ++ ++ if ((status = exi_put_basis_attribute(exoid, basis.name, "eta", EX_DOUBLE, basis.cardinality, ++ basis.eta)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, basis.name, "basis", "eta", exoid, __func__); ++ } ++ ++ if ((status = exi_put_basis_attribute(exoid, basis.name, "zeta", EX_DOUBLE, basis.cardinality, ++ basis.zeta)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, basis.name, "basis", "zeta", exoid, __func__); ++ } ++ exi_persist_leavedef(exoid, __func__); ++ return EX_NOERR; ++} ++ ++int ex_put_quadrature(int exoid, const ex_quadrature quad) ++{ ++ /* ++ * typedef struct ex_quad { ++ * char name[EX_MAX_NAME + 1]; ++ * int cardinality; -- number of `quad` points == dimension of non-null subc_*, xi, eta, zeta ++ * int *subc_dim; ++ * int *subc_ordinal; ++ * int *subc_dof_ordinal; ++ * int *subc_num_dof; ++ * double *xi; ++ * double *eta; ++ * double *zeta; ++ * } ex_quad; ++ */ ++ ++ exi_persist_redef(exoid, __func__); ++ int status; ++ if ((status = exi_put_quad_attribute(exoid, quad.name, "cardinality", EX_INTEGER, 1, ++ &quad.cardinality)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, quad.name, "quad", "cardinality", exoid, __func__); ++ } ++ ++ if ((status = exi_put_quad_attribute(exoid, quad.name, "xi", EX_DOUBLE, quad.cardinality, ++ quad.xi)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, quad.name, "quad", "xi", exoid, __func__); ++ } ++ ++ if ((status = exi_put_quad_attribute(exoid, quad.name, "eta", EX_DOUBLE, quad.cardinality, ++ quad.eta)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, quad.name, "quad", "eta", exoid, __func__); ++ } ++ ++ if ((status = exi_put_quad_attribute(exoid, quad.name, "zeta", EX_DOUBLE, quad.cardinality, ++ quad.zeta)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, quad.name, "quad", "zeta", exoid, __func__); ++ } ++ ++ if ((status = exi_put_quad_attribute(exoid, quad.name, "weight", EX_DOUBLE, quad.cardinality, ++ quad.weight)) != EX_NOERR) { ++ exi_persist_leavedef(exoid, __func__); ++ return exi_print_type_error(status, quad.name, "quad", "weight", exoid, __func__); ++ } ++ exi_persist_leavedef(exoid, __func__); ++ return EX_NOERR; ++} ++ ++int ex_put_field_suffices(int exoid, const ex_field field, const char *suffices) ++{ ++ /* ++ * For a user-defined field metadata type, output the `cardinality`-count suffices. ++ * The suffices are in a single comma-separated string. ++ * This call is only valid if the field metadata type is user-defined. ++ * ++ * Example: cardinality = 4, type is EX_USER_DEFINED, name is "Species" ++ * Suffices = "h2o,gas,ch4,methane" ++ * The fields would be "Species_h2o", "Species_gas", "Species_ch4", "Species_methane" ++ * ++ * Accesses field.entity_type, field.entity_id, field.name, field.type, field.cardinality ++ * The attribute name is `Field@{name}@suffices` ++ */ ++ int status; ++ char errmsg[MAX_ERR_LENGTH]; ++ ++ char attribute_name[EX_MAX_NAME + 1]; ++ static const char *field_template = "Field@%s@%s"; ++ ++ if (field.type[0] != EX_FIELD_TYPE_USER_DEFINED) { ++ snprintf( ++ errmsg, MAX_ERR_LENGTH, ++ "ERROR: Field '%s' is not of type EX_FIELD_TYPE_USER_DEFINED; cannot specify suffices.", ++ field.name); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ return EX_FATAL; ++ } ++ ++ /* Count the commas in the comma-separated list of suffices. Must be one less than the field ++ * cardinality... */ ++ int comma_count = 0; ++ for (size_t i = 0; i < strlen(suffices); i++) { ++ if (suffices[i] == ',') { ++ comma_count++; ++ } ++ } ++ if (comma_count + 1 != field.cardinality[0]) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Field '%s' cardinality is %d but there were %d suffices defined. These must " ++ "be equal.", ++ field.name, field.cardinality[0], comma_count + 1); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ return EX_FATAL; ++ } ++ ++ snprintf(attribute_name, EX_MAX_NAME + 1, field_template, field.name, "suffices"); ++ if ((status = ex_put_text_attribute(exoid, field.entity_type, field.entity_id, attribute_name, ++ suffices)) != EX_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to store field suffices for field '%s' on %s with id %" PRId64 ++ " in file id %d", ++ field.name, ex_name_of_object(field.entity_type), field.entity_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ return EX_NOERR; ++} +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_id_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_id_map.c +index 7af1df3491..fb38531d55 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_id_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_id_map.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -44,7 +44,7 @@ int ex_put_id_map(int exoid, ex_entity_type map_type, const void_int *map) + const char *vmap; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -83,7 +83,7 @@ int ex_put_id_map(int exoid, ex_entity_type map_type, const void_int *map) + + /* put netcdf file into define mode */ + if (nc_inq_varid(exoid, vmap, &mapid) != NC_NOERR) { +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -111,10 +111,12 @@ int ex_put_id_map(int exoid, ex_entity_type map_type, const void_int *map) + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, mapid, 1); ++ exi_compress_variable(exoid, mapid, 1); + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -138,6 +140,6 @@ int ex_put_id_map(int exoid, ex_entity_type map_type, const void_int *map) + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_info.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_info.c +index dae2a8adfe..4878d1d884 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_info.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_info.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -70,7 +70,7 @@ error = ex_put_info(exoid, num_info, info); + + */ + +-int ex_put_info(int exoid, int num_info, char *info[]) ++int ex_put_info(int exoid, int num_info, char *const info[]) + { + int status; + int i, lindim, num_info_dim, dims[2], varid; +@@ -80,7 +80,7 @@ int ex_put_info(int exoid, int num_info, char *info[]) + int rootid = exoid & EX_FILE_ID_MASK; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -95,7 +95,7 @@ int ex_put_info(int exoid, int num_info, char *info[]) + if (status != NC_NOERR) { + + /* put file into define mode */ +- if ((status = nc_redef(rootid)) != NC_NOERR) { ++ if ((status = exi_redef(rootid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed put file id %d into define mode", rootid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -135,11 +135,21 @@ int ex_put_info(int exoid, int num_info, char *info[]) + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__set_compact_storage(rootid, varid); +- ex__compress_variable(rootid, varid, 3); ++ /* In parallel, only rank=0 will write the info records. ++ * Should be able to take advantage of HDF5 handling identical data on all ranks ++ * or use the compact storage, but we had issues on some NFS filesystems and some ++ * compilers/mpi so are doing it this way... ++ */ ++#if defined(PARALLEL_AWARE_EXODUS) ++ if (exi_is_parallel(rootid)) { ++ nc_var_par_access(rootid, varid, NC_INDEPENDENT); ++ } ++#endif + + /* leave define mode */ +- if ((status = ex__leavedef(rootid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(rootid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -170,21 +180,17 @@ int ex_put_info(int exoid, int num_info, char *info[]) + } + } + } +- else if (ex__is_parallel(rootid)) { +- /* All processors need to call nc_put_vara_text in case in a global +- * collective mode */ +- char dummy[] = " "; +- for (i = 0; i < num_info; i++) { +- start[0] = start[1] = 0; +- count[0] = count[1] = 0; +- nc_put_vara_text(rootid, varid, start, count, dummy); +- } ++ /* PnetCDF applies setting to entire file, so put back to collective... */ ++#if defined(PARALLEL_AWARE_EXODUS) ++ if (exi_is_parallel(rootid)) { ++ nc_var_par_access(rootid, varid, NC_COLLECTIVE); + } ++#endif + } + EX_FUNC_LEAVE(EX_NOERR); + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(rootid, __func__); ++ exi_leavedef(rootid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_init.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_init.c +index 4b7ebc07e8..7f8a72dc26 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_init.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_init.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -76,5 +76,5 @@ int ex_put_init(int exoid, const char *title, int64_t num_dim, int64_t num_nodes + par.num_elem_maps = 0; + par.num_assembly = 0; + +- return (ex_put_init_ext(exoid, &par)); ++ return ex_put_init_ext(exoid, &par); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_ext.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_ext.c +index e4d7b75725..5df092d7c5 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_ext.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_ext.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2025 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -28,25 +28,15 @@ + static void write_dummy_names(int exoid, ex_entity_type obj_type, int num) + { + if (num > 0) { +- size_t start[3], count[3]; +- char * text = ""; + int varid; + size_t num_entity; +- size_t i; +- +- ex__get_dimension(exoid, ex__dim_num_objects(obj_type), ex_name_of_object(obj_type), ++ exi_get_dimension(exoid, exi_dim_num_objects(obj_type), ex_name_of_object(obj_type), + &num_entity, &varid, __func__); + +- for (i = 0; i < num_entity; i++) { +- start[0] = i; +- count[0] = 1; +- +- start[1] = 0; +- count[1] = 1; +- +- start[2] = 0; +- count[2] = 1; +- ++ char *text = ""; ++ for (size_t i = 0; i < num_entity; i++) { ++ size_t start[] = {i, 0, 0}; ++ size_t count[] = {1, 1, 1}; + nc_put_vara_text(exoid, varid, start, count, text); + } + } +@@ -55,61 +45,58 @@ static void write_dummy_names(int exoid, ex_entity_type obj_type, int num) + static int ex_write_object_names(int exoid, const char *type, const char *dimension_name, + int dimension_var, int string_dimension, int count) + { +- int dim[2]; +- int status; +- int varid; +- char errmsg[MAX_ERR_LENGTH]; +-#if NC_HAS_HDF5 +- int fill = NC_FILL_CHAR; +-#endif + + if (count > 0) { +- dim[0] = dimension_var; +- dim[1] = string_dimension; +- ++ int dim[] = {dimension_var, string_dimension}; ++ int status; ++ int varid; + if ((status = nc_def_var(exoid, dimension_name, NC_CHAR, 2, dim, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define %s name array in file id %d", type, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); /* exit define mode and return */ ++ return status; /* exit define mode and return */ + } +- ex__set_compact_storage(exoid, varid); +-#if NC_HAS_HDF5 ++ exi_set_compact_storage(exoid, varid); ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) ++ int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, varid, 0, &fill); + #endif + } +- return (NC_NOERR); ++ return EX_NOERR; + } + + static int ex_write_object_params(int exoid, const char *type, const char *dimension_name, + const char *status_dim_name, const char *id_array_dim_name, + size_t count, int *dimension) + { +- int dim[2]; +- int varid; +- int status; +- char errmsg[MAX_ERR_LENGTH]; +- int sixty_four_kb = 64 * 1024; + + /* Can have nonzero model->num_elem_blk even if model->num_elem == 0 */ + if (count > 0) { ++ int status; + if ((status = nc_def_dim(exoid, dimension_name, count, dimension)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define number of %ss in file id %d", type, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); /* exit define mode and return */ ++ return status; /* exit define mode and return */ + } + /* ...and some variables */ + /* element block id status array */ ++ int dim[2]; ++ int varid; + dim[0] = *dimension; + if ((status = nc_def_var(exoid, status_dim_name, NC_INT, 1, dim, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define %s status array in file id %d", + type, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); /* exit define mode and return */ ++ return status; /* exit define mode and return */ + } ++ ++ size_t sixty_four_kb = 64 * 1024; // Compact storage can only be used for < 64KiByte data sizes + if (4 * count < sixty_four_kb) { +- ex__set_compact_storage(exoid, varid); ++ exi_set_compact_storage(exoid, varid); + } + + /* type id array */ +@@ -121,33 +108,31 @@ static int ex_write_object_params(int exoid, const char *type, const char *dimen + } + + if ((status = nc_def_var(exoid, id_array_dim_name, int_type, 1, dim, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define %s id array in file id %d", type, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); /* exit define mode and return */ ++ return status; /* exit define mode and return */ + } + if (int_size * count < sixty_four_kb) { +- ex__set_compact_storage(exoid, varid); ++ exi_set_compact_storage(exoid, varid); + } + + /* store property name as attribute of property array variable */ + if ((status = nc_put_att_text(exoid, varid, ATT_PROP_NAME, 3, "ID")) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to store %s property name %s in file id %d", + type, "ID", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); ++ return status; + } + } +- return (NC_NOERR); ++ return EX_NOERR; + } + + static int ex_write_map_params(int exoid, const char *map_name, const char *map_dim_name, + const char *map_id_name, size_t map_count, int *map_dimension) + { +- int dim[2]; +- int varid; +- int status; +- char errmsg[MAX_ERR_LENGTH]; + + int int_type = NC_INT; + if (ex_int64_status(exoid) & EX_IDS_INT64_DB) { +@@ -156,54 +141,58 @@ static int ex_write_map_params(int exoid, const char *map_name, const char *map_ + + /* Can have nonzero model->num_XXXX_map even if model->num_XXXX == 0 */ + if ((map_count) > 0) { ++ int status; + if ((status = nc_def_dim(exoid, map_dim_name, map_count, map_dimension)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define number of %ss in file id %d", + map_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); /* exit define mode and return */ ++ return status; /* exit define mode and return */ + } + +- dim[0] = *map_dimension; ++ int dim[] = {*map_dimension}; + + /* map_name id array */ ++ int varid; + if ((status = nc_def_var(exoid, map_id_name, int_type, 1, dim, &varid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define %s id array in file id %d", + map_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (status); /* exit define mode and return */ ++ return status; /* exit define mode and return */ + } + + /* store property name as attribute of property array variable */ + if ((status = nc_put_att_text(exoid, varid, ATT_PROP_NAME, 3, "ID")) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to store %s property name %s in file id %d", + map_name, "ID", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } +- return (NC_NOERR); ++ return EX_NOERR; + } + + static void invalidate_id_status(int exoid, const char *var_stat, const char *var_id, int count, + int *ids) + { +- int i; +- int id_var, stat_var; +- + if (count > 0) { +- if (var_id != 0) { +- for (i = 0; i < count; i++) { ++ if (var_id != NULL) { ++ for (int i = 0; i < count; i++) { + ids[i] = EX_INVALID_ID; + } ++ int id_var; + (void)nc_inq_varid(exoid, var_id, &id_var); + (void)nc_put_var_int(exoid, id_var, ids); + } + +- if (var_stat != 0) { +- for (i = 0; i < count; i++) { ++ if (var_stat != NULL) { ++ for (int i = 0; i < count; i++) { + ids[i] = 0; + } + ++ int stat_var; + (void)nc_inq_varid(exoid, var_stat, &stat_var); + (void)nc_put_var_int(exoid, stat_var, ids); + } +@@ -220,31 +209,43 @@ static void invalidate_id_status(int exoid, const char *var_stat, const char *va + + int ex_put_init_ext(int exoid, const ex_init_params *model) + { +- int numdimdim, numnoddim, elblkdim, edblkdim, fablkdim, esetdim, fsetdim, elsetdim, nsetdim, +- ssetdim, dim_str_name, dim[2], temp; +- int nmapdim, edmapdim, famapdim, emapdim, timedim; +- int status; +- int title_len; +-#if 0 +- /* used for header size calculations which are turned off for now */ +- int header_size, fixed_var_size, iows; +-#endif +- char errmsg[MAX_ERR_LENGTH]; ++ int numdimdim = 0; ++ int numnoddim = 0; ++ int elblkdim = 0; ++ int edblkdim = 0; ++ int fablkdim = 0; ++ int esetdim = 0; ++ int fsetdim = 0; ++ int elsetdim = 0; ++ int nsetdim = 0; ++ int ssetdim = 0; ++ int dim_str_name = 0; ++ int dim[2]; ++ int temp = 0; ++ int nmapdim = 0; ++ int edmapdim = 0; ++ int famapdim = 0; ++ int emapdim = 0; ++ int timedim = 0; ++ int status = 0; ++ int title_len = 0; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + int rootid = exoid & EX_FILE_ID_MASK; + + if (rootid == exoid && nc_inq_dimid(exoid, DIM_NUM_DIM, &temp) == NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: initialization already done for file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MSG); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* put file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -254,6 +255,7 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + title_len = strlen(model->title) < MAX_LINE_LENGTH ? strlen(model->title) : MAX_LINE_LENGTH; + if ((status = nc_put_att_text(rootid, NC_GLOBAL, (const char *)ATT_TITLE, title_len + 1, + model->title)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define model->title attribute to file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -264,7 +266,8 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + + /* create name string length dimension */ + if (nc_inq_dimid(rootid, DIM_STR_NAME, &dim_str_name) != NC_NOERR) { +- if ((status = nc_def_dim(rootid, DIM_STR_NAME, NC_MAX_NAME, &dim_str_name)) != NC_NOERR) { ++ if ((status = nc_def_dim(rootid, DIM_STR_NAME, EX_MAX_NAME, &dim_str_name)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define name string length in file id %d", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -273,6 +276,7 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + } + + if ((status = nc_def_dim(exoid, DIM_TIME, NC_UNLIMITED, &timedim)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define time dimension in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; +@@ -280,19 +284,29 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + + dim[0] = timedim; + if ((status = nc_def_var(exoid, VAR_WHOLE_TIME, nc_flt_code(exoid), 1, dim, &temp)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define whole time step variable in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; + } ++ + { +- struct ex__file_item *file = ex__find_file_item(exoid); +- file->time_varid = temp; ++ struct exi_file_item *file = exi_find_file_item(exoid); ++ if (!file) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d.", exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); ++ goto error_ret; ++ } ++ file->time_varid = temp; + } +- ex__compress_variable(exoid, temp, 2); ++ ++ exi_compress_variable(exoid, temp, -2); /* Don't compress, but do set collective io */ + + if (model->num_dim > 0) { + if ((status = nc_def_dim(exoid, DIM_NUM_DIM, model->num_dim, &numdimdim)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define number of dimensions in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -308,8 +322,23 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + * non-zero node count. + */ + ++ int int_size = ex_int64_status(exoid) & EX_IDS_INT64_DB ? 8 : 4; ++ size_t twoGiB = 1ul << 31; ++ + if (model->num_nodes > 0) { ++ // If file is using 32-bit integers, check what node count is in range... ++ if (int_size == 4 && model->num_nodes >= twoGiB) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: File is using 32-bit integers, but the node count exceeds the integer " ++ "capacity (%" PRId64 ") in file id %d", ++ model->num_nodes, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ goto error_ret; ++ } ++ + if ((status = nc_def_dim(exoid, DIM_NUM_NODES, model->num_nodes, &numnoddim)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define number of nodes in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -319,6 +348,7 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + + if (model->num_elem > 0) { + if (model->num_nodes <= 0) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: Cannot have non-zero element count if node count " + "is zero.in file id %d", +@@ -327,7 +357,18 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + goto error_ret; /* exit define mode and return */ + } + ++ if (int_size == 4 && model->num_elem >= twoGiB) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: File is using 32-bit integers, but the element count exceeds the integer " ++ "capacity (%" PRId64 ") in file id %d", ++ model->num_elem, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ goto error_ret; ++ } ++ + if ((status = nc_def_dim(exoid, DIM_NUM_ELEM, model->num_elem, &temp)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define number of elements in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -337,6 +378,7 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + + if (model->num_edge > 0) { + if (model->num_nodes <= 0) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: Cannot have non-zero edge count if node count is " + "zero.in file id %d", +@@ -346,6 +388,7 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + } + + if ((status = nc_def_dim(exoid, DIM_NUM_EDGE, model->num_edge, &temp)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define number of edges in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -355,6 +398,7 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + + if (model->num_face > 0) { + if (model->num_nodes <= 0) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: Cannot have non-zero face count if node count is " + "zero.in file id %d", +@@ -364,6 +408,7 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + } + + if ((status = nc_def_dim(exoid, DIM_NUM_FACE, model->num_face, &temp)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define number of faces in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -427,34 +472,37 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + if (model->num_dim > 0) { + if ((status = nc_def_var(exoid, VAR_COORD_X, nc_flt_code(exoid), 1, dim, &temp)) != + NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define node x coordinate array in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, temp, 2); ++ exi_compress_variable(exoid, temp, 2); + } + + if (model->num_dim > 1) { + if ((status = nc_def_var(exoid, VAR_COORD_Y, nc_flt_code(exoid), 1, dim, &temp)) != + NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define node y coordinate array in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, temp, 2); ++ exi_compress_variable(exoid, temp, 2); + } + + if (model->num_dim > 2) { + if ((status = nc_def_var(exoid, VAR_COORD_Z, nc_flt_code(exoid), 1, dim, &temp)) != + NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to define node z coordinate array in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, temp, 2); ++ exi_compress_variable(exoid, temp, 2); + } + } + +@@ -514,14 +562,17 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Fill the id and status arrays with EX_INVALID_ID */ + { +- int * invalid_ids = NULL; +- size_t maxset = model->num_elem_blk; ++ int *invalid_ids = NULL; ++ int64_t maxset = model->num_elem_blk; + if (maxset < model->num_edge_blk) { + maxset = model->num_edge_blk; + } +@@ -558,6 +609,7 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + + /* allocate space for id/status array */ + if (!(invalid_ids = malloc(maxset * sizeof(int)))) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate memory for id/status array for file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +@@ -601,6 +653,6 @@ int ex_put_init_ext(int exoid, const ex_init_params *model) + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_global.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_global.c +index 542fe3b0ec..f6731cd164 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_global.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_global.c +@@ -32,7 +32,7 @@ + /*****************************************************************************/ + + #include // for ex_err, etc +-#include // for ex__leavedef, EX_FATAL, etc ++#include // for exi_leavedef, EX_FATAL, etc + + /*! + * \ingroup ModelDescription +@@ -49,7 +49,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + + /*-----------------------------Execution begins-----------------------------*/ + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -60,14 +60,14 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + id_type = NC_INT64; + } + /* Put NetCDF file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file ID %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Output the file version */ +- if ((status = ex__put_nemesis_version(exoid)) < 0) { ++ if ((status = exi_put_nemesis_version(exoid)) < 0) { + EX_FUNC_LEAVE(status); + } + +@@ -77,7 +77,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + DIM_NUM_NODES_GLOBAL, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -88,7 +88,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + DIM_NUM_ELEMS_GLOBAL, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -103,7 +103,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + DIM_NUM_ELBLK_GLOBAL, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -115,7 +115,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + VAR_ELBLK_IDS_GLOBAL, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -127,7 +127,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + VAR_ELBLK_CNT_GLOBAL, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -143,7 +143,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + DIM_NUM_NS_GLOBAL, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -156,7 +156,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + ex_err_fn(exoid, __func__, errmsg, status); + + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -169,7 +169,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + VAR_NS_NODE_CNT_GLOBAL, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -185,7 +185,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + VAR_NS_DF_CNT_GLOBAL, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -203,7 +203,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + DIM_NUM_SS_GLOBAL, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -216,7 +216,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + ex_err_fn(exoid, __func__, errmsg, status); + + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -233,7 +233,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + ex_err_fn(exoid, __func__, errmsg, status); + + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -250,7 +250,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + ex_err_fn(exoid, __func__, errmsg, status); + + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -258,7 +258,7 @@ int ex_put_init_global(int exoid, int64_t num_nodes_g, int64_t num_elems_g, int6 + } /* End "if (num_side_sets_g > 0)" */ + + /* End define mode */ +- if (ex__leavedef(exoid, __func__) != EX_NOERR) { ++ if (exi_leavedef(exoid, __func__) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_info.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_info.c +index 43c1ed9b5a..29c55db5eb 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_info.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_init_info.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -31,7 +31,7 @@ + * \ingroup ModelDescription + * \undoc + */ +-int ex_put_init_info(int exoid, int num_proc, int num_proc_in_f, char *ftype) ++int ex_put_init_info(int exoid, int num_proc, int num_proc_in_f, const char *ftype) + { + int dimid, varid; + int ltempsv; +@@ -41,7 +41,7 @@ int ex_put_init_info(int exoid, int num_proc, int num_proc_in_f, char *ftype) + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -68,21 +68,21 @@ int ex_put_init_info(int exoid, int num_proc, int num_proc_in_f, char *ftype) + } + + /* Put file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file ID %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Define dimension for the number of processors */ +- if ((status = nc_inq_dimid(exoid, DIM_NUM_PROCS, &dimid)) != NC_NOERR) { ++ if (nc_inq_dimid(exoid, DIM_NUM_PROCS, &dimid) != NC_NOERR) { + ltempsv = num_proc; + if ((status = nc_def_dim(exoid, DIM_NUM_PROCS, ltempsv, &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to dimension \"%s\" in file ID %d", + DIM_NUM_PROCS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -97,7 +97,7 @@ int ex_put_init_info(int exoid, int num_proc, int num_proc_in_f, char *ftype) + ex_err_fn(exoid, __func__, errmsg, status); + + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -110,12 +110,12 @@ int ex_put_init_info(int exoid, int num_proc, int num_proc_in_f, char *ftype) + ex_err_fn(exoid, __func__, errmsg, status); + + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__leavedef(exoid, __func__) != EX_NOERR) { ++ if (exi_leavedef(exoid, __func__) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -128,7 +128,7 @@ int ex_put_init_info(int exoid, int num_proc, int num_proc_in_f, char *ftype) + } + } + else { +- if (ex__leavedef(exoid, __func__) != EX_NOERR) { ++ if (exi_leavedef(exoid, __func__) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_loadbal_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_loadbal_param.c +index 1ad8419be7..9307850593 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_loadbal_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_loadbal_param.c +@@ -29,7 +29,7 @@ + /*****************************************************************************/ + + #include // for ex_err, etc +-#include // for ex__leavedef, EX_FATAL, etc ++#include // for exi_leavedef, EX_FATAL, etc + + /*! + * \ingroup ModelDescription +@@ -60,12 +60,12 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Get the file type */ +- if (ex__get_file_type(exoid, ftype) != EX_NOERR) { ++ if (exi_get_file_type(exoid, ftype) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get file type from file ID %d\n", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + EX_FUNC_LEAVE(EX_FATAL); +@@ -91,15 +91,15 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + } + + /* Put NetCDF file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Output the file version */ +- if ((status = ex__put_nemesis_version(exoid)) < 0) { +- ex__leavedef(exoid, __func__); ++ if ((status = exi_put_nemesis_version(exoid)) < 0) { ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(status); + } + +@@ -110,7 +110,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_INT_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -123,7 +123,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_BOR_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -135,7 +135,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_EXT_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -148,7 +148,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_INT_E_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -160,7 +160,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_BOR_E_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -172,7 +172,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_INT_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -182,7 +182,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_BOR_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -192,7 +192,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_EXT_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -205,7 +205,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + DIM_NUM_INT_ELEMS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -215,11 +215,11 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_ELEM_MAP_INT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + } /* End "if (num_int_elems > 0)" */ + +@@ -229,7 +229,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_INT_E_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -239,7 +239,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_BOR_E_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -252,7 +252,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + DIM_NUM_BOR_ELEMS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -262,11 +262,11 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_ELEM_MAP_BOR, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + } /* End "if (num_bor_elems > 0)" */ + +@@ -278,7 +278,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + DIM_NUM_INT_NODES, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -289,11 +289,11 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_NODE_MAP_INT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + } /* End "if (num_int_nodes > 0)" */ + +@@ -305,7 +305,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + DIM_NUM_BOR_NODES, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -316,11 +316,11 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_NODE_MAP_BOR, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + } /* End "if (num_bor_nodes > 0)" */ + +@@ -332,7 +332,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + DIM_NUM_EXT_NODES, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -343,11 +343,11 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_NODE_MAP_EXT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + } /* End "if (num_ext_nodes > 0)" */ + +@@ -359,7 +359,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + DIM_NUM_N_CMAPS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -370,11 +370,11 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_N_COMM_IDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + /* Add the status vector */ + if ((status = nc_def_var(exoid, VAR_N_COMM_STAT, NC_INT, 1, dimid, &varid)) != NC_NOERR) { +@@ -382,7 +382,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_N_COMM_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -397,7 +397,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + DIM_NUM_E_CMAPS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -408,18 +408,18 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + VAR_E_COMM_IDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + if ((status = nc_def_var(exoid, VAR_E_COMM_STAT, NC_INT, 1, dimid, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define variable \"%s\" in file ID %d", + VAR_E_COMM_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -427,7 +427,7 @@ int ex_put_loadbal_param(int exoid, int64_t num_int_nodes, int64_t num_bor_nodes + } /* End "if (num_elem_cmaps > 0)" */ + + /* Leave define mode */ +- if (ex__leavedef(exoid, __func__) != EX_NOERR) { ++ if (exi_leavedef(exoid, __func__) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_loadbal_param_cc.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_loadbal_param_cc.c +index b2e78d8a81..dc1d9dc358 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_loadbal_param_cc.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_loadbal_param_cc.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -36,7 +36,7 @@ + /*****************************************************************************/ + + #include // for ex_err, etc +-#include // for ex__leavedef, EX_FATAL, etc ++#include // for exi_leavedef, EX_FATAL, etc + + #ifndef NC_INT64 + #define NC_INT64 NC_INT +@@ -46,10 +46,10 @@ + * \ingroup ModelDescription + * \undoc + */ +-int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bor_nodes, +- void_int *num_ext_nodes, void_int *num_int_elems, +- void_int *num_bor_elems, void_int *num_node_cmaps, +- void_int *num_elem_cmaps) ++int ex_put_loadbal_param_cc(int exoid, const void_int *num_int_nodes, const void_int *num_bor_nodes, ++ const void_int *num_ext_nodes, const void_int *num_int_elems, ++ const void_int *num_bor_elems, const void_int *num_node_cmaps, ++ const void_int *num_elem_cmaps) + { + int status; + int iproc, varid, dimid_npf, dimid[3]; +@@ -82,7 +82,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + + /*-----------------------------Execution begins-----------------------------*/ + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -120,7 +120,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + } + + /* Put NetCDF file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -134,7 +134,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + } + + /* Output the file version */ +- if ((status = ex__put_nemesis_version(exoid)) < 0) { ++ if ((status = exi_put_nemesis_version(exoid)) < 0) { + EX_FUNC_LEAVE(status); + } + +@@ -145,7 +145,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + ex_err_fn(exoid, __func__, errmsg, status); + + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -158,7 +158,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_INT_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -171,7 +171,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_BOR_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -183,7 +183,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_EXT_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -196,7 +196,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_INT_E_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -206,8 +206,9 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + if ((status = nc_def_var(exoid, VAR_BOR_E_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Failed to define variable \"%s\" in file ID %d", + VAR_BOR_E_STAT, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -219,7 +220,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_INT_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -229,7 +230,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_BOR_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -239,7 +240,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_EXT_N_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -250,7 +251,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_INT_E_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -260,7 +261,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_BOR_E_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -300,7 +301,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + DIM_NUM_INT_ELEMS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -310,11 +311,11 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_ELEM_MAP_INT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + /* and the index variable */ + if ((status = nc_def_var(exoid, VAR_ELEM_MAP_INT_IDX, index_type, 1, &dimid_npf, +@@ -323,7 +324,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_ELEM_MAP_INT_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -336,7 +337,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + DIM_NUM_BOR_ELEMS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -346,11 +347,11 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_ELEM_MAP_BOR, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + /* and the index variable */ + if ((status = nc_def_var(exoid, VAR_ELEM_MAP_BOR_IDX, index_type, 1, &dimid_npf, +@@ -359,7 +360,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_ELEM_MAP_BOR_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -373,7 +374,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + DIM_NUM_INT_NODES, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -384,11 +385,11 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_NODE_MAP_INT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + /* and the index variable */ + if ((status = nc_def_var(exoid, VAR_NODE_MAP_INT_IDX, index_type, 1, &dimid_npf, +@@ -397,7 +398,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_NODE_MAP_INT_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -411,7 +412,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + DIM_NUM_BOR_NODES, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -422,11 +423,11 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_NODE_MAP_BOR, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + /* and the index variable */ + if ((status = nc_def_var(exoid, VAR_NODE_MAP_BOR_IDX, index_type, 1, &dimid_npf, +@@ -435,7 +436,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_NODE_MAP_BOR_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -449,7 +450,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + DIM_NUM_EXT_NODES, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -460,11 +461,11 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_NODE_MAP_EXT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + /* and the index variable */ + if ((status = nc_def_var(exoid, VAR_NODE_MAP_EXT_IDX, index_type, 1, &dimid_npf, +@@ -473,7 +474,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_NODE_MAP_EXT_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -487,7 +488,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + DIM_NUM_N_CMAPS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -498,7 +499,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_N_COMM_IDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -508,7 +509,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_N_COMM_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -520,7 +521,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_N_COMM_INFO_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -533,7 +534,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + DIM_NUM_E_CMAPS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -544,7 +545,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_E_COMM_IDS, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -554,7 +555,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_E_COMM_STAT, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -566,7 +567,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + VAR_E_COMM_INFO_IDX, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + /* Leave define mode before returning */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -574,7 +575,7 @@ int ex_put_loadbal_param_cc(int exoid, void_int *num_int_nodes, void_int *num_bo + } /* End "if (num_e_cmaps > 0)" */ + + /* Leave define mode */ +- if (ex__leavedef(exoid, __func__) != EX_NOERR) { ++ if (exi_leavedef(exoid, __func__) != EX_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_map.c +index 231abb06c7..f03881a42f 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_map.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -63,7 +63,7 @@ int ex_put_map(int exoid, const void_int *elem_map) + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -75,7 +75,7 @@ int ex_put_map(int exoid, const void_int *elem_map) + } + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -101,10 +101,12 @@ int ex_put_map(int exoid, const void_int *elem_map) + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, mapid, 1); ++ exi_compress_variable(exoid, mapid, 1); + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -126,6 +128,6 @@ int ex_put_map(int exoid, const void_int *elem_map) + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_map_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_map_param.c +index cb69581686..8347e5c4b2 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_map_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_map_param.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -42,12 +42,9 @@ int ex_put_map_param(int exoid, int num_node_maps, int num_elem_maps) + char errmsg[MAX_ERR_LENGTH]; + int id_type = NC_INT; + int int_type = NC_INT; +-#if NC_HAS_HDF5 +- int fill = NC_FILL_CHAR; +-#endif + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -76,7 +73,7 @@ int ex_put_map_param(int exoid, int num_node_maps, int num_elem_maps) + } + + /* put file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -119,7 +116,8 @@ int ex_put_map_param(int exoid, int num_node_maps, int num_elem_maps) + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +-#if NC_HAS_HDF5 ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) ++ int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, varid, 0, &fill); + #endif + +@@ -149,7 +147,7 @@ int ex_put_map_param(int exoid, int num_node_maps, int num_elem_maps) + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + } + } + +@@ -189,10 +187,10 @@ int ex_put_map_param(int exoid, int num_node_maps, int num_elem_maps) + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +-#if NC_HAS_HDF5 ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) ++ int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, varid, 0, &fill); + #endif +- + /* determine number of elements */ + if ((status = nc_inq_dimid(exoid, DIM_NUM_ELEM, &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, +@@ -218,12 +216,14 @@ int ex_put_map_param(int exoid, int num_node_maps, int num_elem_maps) + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + } + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -268,6 +268,6 @@ int ex_put_map_param(int exoid, int num_node_maps, int num_elem_maps) + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_name.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_name.c +index 659587365d..c0dc4a93af 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_name.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_name.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -26,7 +26,51 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__id_lkup, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_id_lkup, etc ++ ++int exi_put_assembly_name(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, ++ const char *name) ++{ ++ /* Internal function to handle renaming of an existing assembly. ++ Note that assembly must exist or an error will be returned. ++ */ ++ /* See if an assembly with this id has already been defined or exists on file... */ ++ int entlst_id = 0; ++ char errmsg[MAX_ERR_LENGTH]; ++ if (nc_inq_varid(exoid, VAR_ENTITY_ASSEMBLY(entity_id), &entlst_id) == NC_NOERR) { ++ int status; ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ size_t length = strlen(name) + 1; ++ if ((status = nc_put_att_text(exoid, entlst_id, EX_ATTRIBUTE_NAME, length, name)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to store assembly name %s in file id %d", ++ name, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ } ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ /* Update the maximum_name_length attribute on the file. */ ++ exi_update_max_name_length(exoid, length - 1); ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ EX_FUNC_LEAVE(EX_NOERR); ++ } ++ ++ /* Assembly not found... */ ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: %s id %" PRId64 " not found in file id %d", ++ ex_name_of_object(obj_type), entity_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_LOOKUPFAIL); ++ EX_FUNC_LEAVE(EX_FATAL); ++} + + /*! + * writes the name of the specified entity to the database. The entity +@@ -46,17 +90,12 @@ int ex_put_name(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, cons + const char *vobj; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + switch (obj_type) { +- case EX_ASSEMBLY: +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: Assembly name is written using `ex_put_assembly()` function"); +- ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- EX_FUNC_LEAVE(EX_FATAL); +- break; ++ case EX_ASSEMBLY: return exi_put_assembly_name(exoid, obj_type, entity_id, name); + case EX_EDGE_BLOCK: vobj = VAR_NAME_ED_BLK; break; + case EX_FACE_BLOCK: vobj = VAR_NAME_FA_BLK; break; + case EX_ELEM_BLOCK: vobj = VAR_NAME_EL_BLK; break; +@@ -82,24 +121,29 @@ int ex_put_name(int exoid, ex_entity_type obj_type, ex_entity_id entity_id, cons + EX_FUNC_LEAVE(EX_FATAL); + } + +- ent_ndx = ex__id_lkup(exoid, obj_type, entity_id); +- +- if (ent_ndx == -EX_LOOKUPFAIL) { /* could not find the element block id */ +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: %s id %" PRId64 " not found in file id %d", +- ex_name_of_object(obj_type), entity_id, exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_LOOKUPFAIL); +- EX_FUNC_LEAVE(EX_FATAL); ++ ent_ndx = exi_id_lkup(exoid, obj_type, entity_id); ++ if (ent_ndx == -EX_LOOKUPFAIL) { /* could not find the entity with `entity_id` */ ++ if (obj_type == EX_NODE_MAP || obj_type == EX_ELEM_MAP || obj_type == EX_FACE_MAP || ++ obj_type == EX_EDGE_MAP) { ++ ent_ndx = entity_id; ++ } ++ else { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: %s id %" PRId64 " not found in file id %d", ++ ex_name_of_object(obj_type), entity_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_LOOKUPFAIL); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } + } + + /* If this is a null entity, then 'ent_ndx' will be negative. +- * We don't care in this __func__, so make it positive and continue... ++ * We don't care in this function, so make it positive and continue... + */ + if (ent_ndx < 0) { + ent_ndx = -ent_ndx; + } + + /* write EXODUS entityname */ +- status = ex__put_name(exoid, varid, ent_ndx - 1, name, obj_type, "", __func__); ++ status = exi_put_name(exoid, varid, ent_ndx - 1, name, obj_type, "", __func__); + + EX_FUNC_LEAVE(status); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_names.c +index e5393a2c8c..ab7ed91475 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_names.c +@@ -34,7 +34,7 @@ + * \param names ptr array of entity names + */ + +-int ex_put_names(int exoid, ex_entity_type obj_type, char *names[]) ++int ex_put_names(int exoid, ex_entity_type obj_type, char *const names[]) + { + int status; + int varid; +@@ -44,7 +44,7 @@ int ex_put_names(int exoid, ex_entity_type obj_type, char *names[]) + const char *vname = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -82,7 +82,7 @@ int ex_put_names(int exoid, ex_entity_type obj_type, char *names[]) + EX_FUNC_LEAVE(EX_FATAL); + } + +- ex__get_dimension(exoid, ex__dim_num_objects(obj_type), ex_name_of_object(obj_type), &num_entity, ++ exi_get_dimension(exoid, exi_dim_num_objects(obj_type), ex_name_of_object(obj_type), &num_entity, + &varid, __func__); + + if ((status = nc_inq_varid(exoid, vname, &varid)) != NC_NOERR) { +@@ -93,7 +93,7 @@ int ex_put_names(int exoid, ex_entity_type obj_type, char *names[]) + } + + /* write EXODUS entitynames */ +- status = ex__put_names(exoid, varid, num_entity, names, obj_type, "", __func__); ++ status = exi_put_names(exoid, varid, num_entity, names, obj_type, "", __func__); + + EX_FUNC_LEAVE(status); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_nodal_var.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_nodal_var.c +index d7d0814a21..3ab1242494 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_nodal_var.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_nodal_var.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_WARN, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_WARN, exi_comp_ws, etc + + /*! + \deprecated Use ex_put_var()(exoid, time_step, EX_NODAL, nodal_var_index, 1, num_nodes, +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_node_cmap.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_node_cmap.c +index 3551f479d3..580251542b 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_node_cmap.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_node_cmap.c +@@ -30,8 +30,8 @@ + #include // for ex_err, etc + #include // for EX_FATAL, DIM_NCNT_CMAP, etc + +-int ex_put_node_cmap(int exoid, ex_entity_id map_id, void_int *node_ids, void_int *proc_ids, +- int processor) ++int ex_put_node_cmap(int exoid, ex_entity_id map_id, const void_int *node_ids, ++ const void_int *proc_ids, int processor) + { + int map_idx, varid, dimid, status; + size_t start[1], count[1], ret_val; +@@ -42,7 +42,7 @@ int ex_put_node_cmap(int exoid, ex_entity_id map_id, void_int *node_ids, void_in + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -56,7 +56,7 @@ int ex_put_node_cmap(int exoid, ex_entity_id map_id, void_int *node_ids, void_in + } + + /* Get the index for this map_id */ +- if ((map_idx = ne__id_lkup(exoid, VAR_N_COMM_IDS, varidx, map_id)) == -1) { ++ if ((map_idx = nei_id_lkup(exoid, VAR_N_COMM_IDS, varidx, map_id)) == -1) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find index for variable \"%s\" in file ID %d", VAR_N_COMM_IDS, + exoid); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_ns_param_global.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_ns_param_global.c +index 8cb690febb..899a7359d7 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_ns_param_global.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_ns_param_global.c +@@ -29,7 +29,8 @@ + #include + #include + +-int ex_put_ns_param_global(int exoid, void_int *global_ids, void_int *node_cnts, void_int *df_cnts) ++int ex_put_ns_param_global(int exoid, const void_int *global_ids, const void_int *node_cnts, ++ const void_int *df_cnts) + { + int varid, status; + +@@ -37,7 +38,7 @@ int ex_put_ns_param_global(int exoid, void_int *global_ids, void_int *node_cnts, + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_num_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_num_map.c +index 6f55f0de53..85a5c9d73f 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_num_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_num_map.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -37,25 +37,19 @@ + + int ex_put_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, const void_int *map) + { +- int dimid, varid; +- int map_int_type; +- size_t start[1]; +- int ldum; +- int num_maps; +- size_t num_entries; +- int cur_num_maps; +- char errmsg[MAX_ERR_LENGTH]; +- const char *dnumentries; +- const char *dnummaps; +- const char *vmapids; +- const char *vmap; +- int status; ++ size_t start[1]; ++ char errmsg[MAX_ERR_LENGTH]; ++ int status; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++ const char *dnumentries; ++ const char *dnummaps; ++ const char *vmapids; ++ + switch (map_type) { + case EX_NODE_MAP: + dnumentries = DIM_NUM_NODES; +@@ -85,6 +79,7 @@ int ex_put_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, cons + } + + /* Make sure the file contains entries */ ++ int dimid; + if (nc_inq_dimid(exoid, dnumentries, &dimid) != NC_NOERR) { + EX_FUNC_LEAVE(EX_NOERR); + } +@@ -97,44 +92,60 @@ int ex_put_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, cons + EX_FUNC_LEAVE(EX_FATAL); + } + ++ /* If the `map_id` is negative, then that specifies a specific location for that map */ ++ bool overwrite_map = false; ++ bool id_is_index = map_id < 0; ++ if (id_is_index) { ++ map_id = -map_id; ++ } ++ + /* Check for duplicate map id entry */ +- status = ex__id_lkup(exoid, map_type, map_id); ++ status = exi_id_lkup(exoid, map_type, map_id); + if (status != -EX_LOOKUPFAIL) { /* found the map id */ +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: %s %" PRId64 " already defined in file id %d", ++ snprintf(errmsg, MAX_ERR_LENGTH, "Warning: %s %" PRId64 " already defined in file id %d", + ex_name_of_object(map_type), map_id, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- EX_FUNC_LEAVE(EX_FATAL); ++ id_is_index = true; ++ overwrite_map = true; + } + + /* Get number of maps initialized for this file */ ++ size_t num_entries; + if ((status = nc_inq_dimlen(exoid, dimid, &num_entries)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of %ss in file id %d", + ex_name_of_object(map_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } +- num_maps = num_entries; + + /* Keep track of the total number of maps defined using a counter stored + in a linked list keyed by exoid. +- NOTE: ex__get_file_item is used to find the number of maps ++ NOTE: exi_get_file_item is used to find the number of maps + for a specific file and returns that value. + */ +- cur_num_maps = ex__get_file_item(exoid, ex__get_counter_list(map_type)); +- if (cur_num_maps >= num_maps) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: exceeded number of %ss (%d) specified in file id %d", +- ex_name_of_object(map_type), num_maps, exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- EX_FUNC_LEAVE(EX_FATAL); ++ int cur_num_maps = exi_get_file_item(exoid, exi_get_counter_list(map_type)); ++ if (!overwrite_map) { ++ int num_maps = num_entries; ++ if (cur_num_maps >= num_maps) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: exceeded number of %ss (%d) specified in file id %d", ++ ex_name_of_object(map_type), num_maps, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ /* NOTE: exi_inc_file_item is used to find the number of maps ++ for a specific file and returns that value incremented. */ ++ cur_num_maps = exi_inc_file_item(exoid, exi_get_counter_list(map_type)); + } + +- /* NOTE: ex__inc_file_item is used to find the number of maps +- for a specific file and returns that value incremented. */ +- cur_num_maps = ex__inc_file_item(exoid, ex__get_counter_list(map_type)); ++ if (id_is_index) { ++ cur_num_maps = map_id - 1; ++ } + + /* write out information to previously defined variable */ + + /* first get id of variable */ ++ int varid; + if ((status = nc_inq_varid(exoid, vmapids, &varid)) == -1) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s ids in file id %d", + ex_name_of_object(map_type), exoid); +@@ -145,7 +156,7 @@ int ex_put_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, cons + /* then, write out map id */ + start[0] = cur_num_maps; + +- ldum = (int)map_id; ++ int ldum = (int)map_id; + if ((status = nc_put_var1_int(exoid, varid, start, &ldum)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to store %s id %" PRId64 " in file id %d", + ex_name_of_object(map_type), map_id, exoid); +@@ -153,6 +164,7 @@ int ex_put_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, cons + EX_FUNC_LEAVE(EX_FATAL); + } + ++ const char *vmap; + switch (map_type) { + case EX_NODE_MAP: vmap = VAR_NODE_MAP(cur_num_maps + 1); break; + case EX_EDGE_MAP: vmap = VAR_EDGE_MAP(cur_num_maps + 1); break; +@@ -166,7 +178,7 @@ int ex_put_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, cons + } + + /* locate variable array in which to store the map */ +- if ((status = nc_inq_varid(exoid, vmap, &varid)) != NC_NOERR) { ++ if (nc_inq_varid(exoid, vmap, &varid) != NC_NOERR) { + int dims[2]; + + /* determine number of entries */ +@@ -178,14 +190,14 @@ int ex_put_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, cons + EX_FUNC_LEAVE(EX_FATAL); + } + +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Check type to be used for maps... */ +- map_int_type = NC_INT; ++ int map_int_type = NC_INT; + if (ex_int64_status(exoid) & EX_MAPS_INT64_DB) { + map_int_type = NC_INT64; + } +@@ -195,10 +207,12 @@ int ex_put_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_id, cons + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define map %s in file id %d", vmap, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { /* exit define mode */ +- varid = -1; /* force early exit */ ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { /* exit define mode */ ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ varid = -1; /* force early exit */ + } + + if (varid == -1) { /* we couldn't define variable and have prepared error message. */ +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_one_attr.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_one_attr.c +index b519f25c95..962bea8eed 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_one_attr.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_one_attr.c +@@ -23,7 +23,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__get_dimension, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_get_dimension, etc + + /*! + * writes the specified attribute for a block +@@ -48,13 +48,13 @@ int ex_put_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int + const char *vattrbname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Determine index of obj_id in id array */ + if (obj_type != EX_NODAL) { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + if (status != 0) { +@@ -128,12 +128,12 @@ int ex_put_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int + } + + /* inquire id's of previously defined dimensions */ +- if (ex__get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != ++ if (exi_get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != + NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { ++ if (exi_get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -165,7 +165,7 @@ int ex_put_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int + stride[0] = 1; + stride[1] = num_attr; + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vars_float(exoid, attrid, start, count, stride, attrib); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_attr.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_attr.c +index 1b42173049..079c56e4d3 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_attr.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_attr.c +@@ -24,7 +24,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /*! + * writes the attributes for an edge/face/element block +@@ -48,13 +48,13 @@ int ex_put_partial_attr(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + if (blk_type != EX_NODAL) { + /* Determine index of blk_id in VAR_ID_EL_BLK array */ +- blk_id_ndx = ex__id_lkup(exoid, blk_type, blk_id); ++ blk_id_ndx = exi_id_lkup(exoid, blk_type, blk_id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -151,7 +151,7 @@ int ex_put_partial_attr(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, + start[0] = 0; + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vara_float(exoid, attrid, start, count, attrib); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_conn.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_conn.c +index 75456f2199..5bbc8cf12d 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_conn.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_conn.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -28,7 +28,7 @@ + * + */ + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /* + * reads the connectivity array for an element block +@@ -75,13 +75,13 @@ int ex_put_partial_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + } + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Locate index of element block id in VAR_ID_EL_BLK array */ + +- blk_id_ndx = ex__id_lkup(exoid, blk_type, blk_id); ++ blk_id_ndx = exi_id_lkup(exoid, blk_type, blk_id); + if (blk_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -105,19 +105,19 @@ int ex_put_partial_conn(int exoid, ex_entity_type blk_type, ex_entity_id blk_id, + switch (blk_type) { + case EX_EDGE_BLOCK: + dnumnodent = DIM_NUM_NOD_PER_ED(blk_id_ndx); +- dnumedgent = 0; +- dnumfacent = 0; ++ dnumedgent = NULL; ++ dnumfacent = NULL; + vnodeconn = VAR_EBCONN(blk_id_ndx); +- vedgeconn = 0; +- vfaceconn = 0; ++ vedgeconn = NULL; ++ vfaceconn = NULL; + break; + case EX_FACE_BLOCK: + dnumnodent = DIM_NUM_NOD_PER_FA(blk_id_ndx); +- dnumedgent = 0; +- dnumfacent = 0; ++ dnumedgent = NULL; ++ dnumfacent = NULL; + vnodeconn = VAR_FBCONN(blk_id_ndx); +- vedgeconn = 0; +- vfaceconn = 0; ++ vedgeconn = NULL; ++ vfaceconn = NULL; + break; + case EX_ELEM_BLOCK: + dnumnodent = DIM_NUM_NOD_PER_EL(blk_id_ndx); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_coord.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_coord.c +index e73663e703..58a34cffd6 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_coord.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_coord.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -28,7 +28,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_comp_ws, etc + + /*! + * writes the coordinates of some of the nodes in the model +@@ -55,13 +55,13 @@ int ex_put_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, c + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire id's of previously defined dimensions */ + +- if ((status = nc_inq_dimid(exoid, DIM_NUM_NODES, &numnoddim)) != NC_NOERR) { ++ if (nc_inq_dimid(exoid, DIM_NUM_NODES, &numnoddim) != NC_NOERR) { + /* If not found, then this file is storing 0 nodes. + Return immediately */ + EX_FUNC_LEAVE(EX_NOERR); +@@ -140,7 +140,7 @@ int ex_put_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, c + /* write out the coordinates */ + for (i = 0; i < num_dim; i++) { + const void *coor = NULL; +- char * which = NULL; ++ char *which = NULL; + + start[0] = start_node_num; + count[0] = num_nodes; +@@ -165,7 +165,7 @@ int ex_put_partial_coord(int exoid, int64_t start_node_num, int64_t num_nodes, c + } + + if (coor != NULL && coordid != -1) { +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vara_float(exoid, coordid, start, count, coor); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_coord_component.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_coord_component.c +index 21daa55094..83e8b7f030 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_coord_component.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_coord_component.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_comp_ws, etc + + /*! + * writes the coordinates of some of the nodes in the model for the specified component +@@ -22,30 +22,26 @@ + int ex_put_partial_coord_component(int exoid, int64_t start_node_num, int64_t num_nodes, + int component, const void *coor) + { +- int status; +- int coordid; +- +- int numnoddim, ndimdim; +- int64_t num_nod; +- size_t num_dim, start[2], count[2]; +- char errmsg[MAX_ERR_LENGTH]; +- + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire id's of previously defined dimensions */ + +- if ((status = nc_inq_dimid(exoid, DIM_NUM_NODES, &numnoddim)) != NC_NOERR) { ++ int status; ++ int numnoddim; ++ if (nc_inq_dimid(exoid, DIM_NUM_NODES, &numnoddim) != NC_NOERR) { + /* If not found, then this file is storing 0 nodes. + Return immediately */ + EX_FUNC_LEAVE(EX_NOERR); + } + ++ int64_t num_nod; + { + size_t tmp; + if ((status = nc_inq_dimlen(exoid, numnoddim, &tmp)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: inquire failed to return number of nodes in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -54,14 +50,18 @@ int ex_put_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + num_nod = tmp; + } + ++ int ndimdim; + if ((status = nc_inq_dimid(exoid, DIM_NUM_DIM, &ndimdim)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate number of dimensions in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + ++ size_t num_dim; + if ((status = nc_inq_dimlen(exoid, ndimdim, &num_dim)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get number of dimensions in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -70,6 +70,7 @@ int ex_put_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + + --start_node_num; + if (start_node_num + num_nodes > num_nod) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: start index (%" PRId64 ") + node count (%" PRId64 + ") is larger than total number of nodes (%" PRId64 ") in file id %d", +@@ -78,7 +79,8 @@ int ex_put_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (component > num_dim) { ++ if (component > (int)num_dim) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: Component (%d) is larger than number of dimensions (%zu) in file id %d", + component, num_dim, exoid); +@@ -92,8 +94,8 @@ int ex_put_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + char *which = NULL; + char *comp = NULL; + +- start[0] = start_node_num; +- count[0] = num_nodes; ++ size_t start[] = {start_node_num}; ++ size_t count[] = {num_nodes}; + if (count[0] == 0) { + start[0] = 0; + } +@@ -111,14 +113,16 @@ int ex_put_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + comp = VAR_COORD_Z; + } + ++ int coordid; + if ((status = nc_inq_varid(exoid, comp, &coordid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s nodal coordinates in file id %d", + which, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vara_float(exoid, coordid, start, count, coor); + } + else { +@@ -126,6 +130,7 @@ int ex_put_partial_coord_component(int exoid, int64_t start_node_num, int64_t nu + } + + if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put %s coord array in file id %d", which, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_id_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_id_map.c +index 4f9de67c27..6a97fd8ee0 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_id_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_id_map.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2021 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -48,11 +48,11 @@ int ex_put_partial_id_map(int exoid, ex_entity_type map_type, int64_t start_enti + const char *vmap = NULL; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (num_entities == 0 && !ex__is_parallel(exoid)) { ++ if (num_entities == 0 && !exi_is_parallel(exoid)) { + EX_FUNC_LEAVE(EX_NOERR); + } + +@@ -106,7 +106,7 @@ int ex_put_partial_id_map(int exoid, ex_entity_type map_type, int64_t start_enti + + /* define the map if it doesn't already exist... */ + if (nc_inq_varid(exoid, vmap, &mapid) != NC_NOERR) { +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -135,10 +135,12 @@ int ex_put_partial_id_map(int exoid, ex_entity_type map_type, int64_t start_enti + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, mapid, 1); ++ exi_compress_variable(exoid, mapid, 1); + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -169,6 +171,6 @@ int ex_put_partial_id_map(int exoid, ex_entity_type map_type, int64_t start_enti + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_nodal_var_int.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_nodal_var_int.c +index d43f74f5f3..83b91fd9e7 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_nodal_var_int.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_nodal_var_int.c +@@ -26,7 +26,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_WARN, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_WARN, exi_comp_ws, etc + + /*! + \internal +@@ -45,7 +45,7 @@ + * \param nodal_var_vals array of nodal variable values + */ + +-int ex__put_partial_nodal_var(int exoid, int time_step, int nodal_var_index, int64_t start_node, ++int exi_put_partial_nodal_var(int exoid, int time_step, int nodal_var_index, int64_t start_node, + int64_t num_nodes, const void *nodal_var_vals) + + { +@@ -55,7 +55,7 @@ int ex__put_partial_nodal_var(int exoid, int time_step, int nodal_var_index, int + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -75,7 +75,7 @@ int ex__put_partial_nodal_var(int exoid, int time_step, int nodal_var_index, int + start[1] = 0; + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vara_float(exoid, varid, start, count, nodal_var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_node_cmap.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_node_cmap.c +index d4367c92d1..d533b7b61b 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_node_cmap.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_node_cmap.c +@@ -40,8 +40,8 @@ + */ + + int ex_put_partial_node_cmap(int exoid, ex_entity_id map_id, int64_t start_entity_num, +- int64_t num_entities, void_int *node_ids, void_int *proc_ids, +- int processor) ++ int64_t num_entities, const void_int *node_ids, ++ const void_int *proc_ids, int processor) + { + int map_idx, varid, dimid, status; + size_t start[1], count[1], ret_val; +@@ -52,7 +52,7 @@ int ex_put_partial_node_cmap(int exoid, ex_entity_id map_id, int64_t start_entit + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -66,7 +66,7 @@ int ex_put_partial_node_cmap(int exoid, ex_entity_id map_id, int64_t start_entit + } + + /* Get the index for this map_id */ +- if ((map_idx = ne__id_lkup(exoid, VAR_N_COMM_IDS, varidx, map_id)) == -1) { ++ if ((map_idx = nei_id_lkup(exoid, VAR_N_COMM_IDS, varidx, map_id)) == -1) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to find index for variable \"%s\" in file ID %d", VAR_N_COMM_IDS, + exoid); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_num_map.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_num_map.c +index 0374797ef4..e1569edd3d 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_num_map.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_num_map.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -35,7 +35,7 @@ int ex_put_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + int64_t ent_start, int64_t ent_count, const void_int *map) + { + int status; +- int dimid, varid, map_ndx, map_exists; ++ int dimid, varid, map_exists; + size_t start[1]; + size_t num_maps, num_mobj, count[1]; + int cur_num_maps; +@@ -46,7 +46,7 @@ int ex_put_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + const char *vmap; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -91,8 +91,14 @@ int ex_put_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + EX_FUNC_LEAVE(EX_FATAL); + } + ++ /* If the `map_id` is negative, then that specifies a specific location for that map */ ++ bool id_is_index = map_id < 0; ++ if (id_is_index) { ++ map_id = -map_id; ++ } ++ + /* Check for duplicate map id entry */ +- status = ex__id_lkup(exoid, map_type, map_id); ++ status = exi_id_lkup(exoid, map_type, map_id); + if (status == -EX_LOOKUPFAIL) { /* did not find the map id */ + map_exists = 0; /* Map is being defined */ + } +@@ -112,10 +118,10 @@ int ex_put_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + + /* Keep track of the total number of maps defined using a + counter stored in a linked list keyed by exoid. NOTE: +- ex__get_file_item is used to find the number of element maps for a ++ exi_get_file_item is used to find the number of element maps for a + specific file and returns that value. + */ +- cur_num_maps = ex__get_file_item(exoid, ex__get_counter_list(map_type)); ++ cur_num_maps = exi_get_file_item(exoid, exi_get_counter_list(map_type)); + if (cur_num_maps >= (int)num_maps) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: exceeded number of %ss (%zu) specified in file id %d", +@@ -124,12 +130,16 @@ int ex_put_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + EX_FUNC_LEAVE(EX_FATAL); + } + +- /* NOTE: ex__inc_file_item is used to find the number of element maps ++ /* NOTE: exi_inc_file_item is used to find the number of element maps + for a specific file and returns that value incremented. */ +- cur_num_maps = ex__inc_file_item(exoid, ex__get_counter_list(map_type)); ++ cur_num_maps = exi_inc_file_item(exoid, exi_get_counter_list(map_type)); ++ ++ if (id_is_index) { ++ cur_num_maps = map_id - 1; ++ } + } + else { +- map_ndx = ex__id_lkup(exoid, map_type, map_id); ++ int map_ndx = exi_id_lkup(exoid, map_type, map_id); + cur_num_maps = map_ndx - 1; + } + +@@ -149,7 +159,11 @@ int ex_put_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + } + + /* Check input parameters for a valid range of numbers */ +- if (ent_start <= 0 || ent_start > num_mobj) { ++ if (ent_count == 0) { ++ ent_start = 0; ++ } ++ ++ if (ent_start < 0 || ent_start > (int64_t)num_mobj) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: start count is invalid in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + EX_FUNC_LEAVE(EX_FATAL); +@@ -159,7 +173,7 @@ int ex_put_partial_num_map(int exoid, ex_entity_type map_type, ex_entity_id map_ + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + EX_FUNC_LEAVE(EX_FATAL); + } +- if (ent_start + ent_count - 1 > num_mobj) { ++ if (ent_count > 0 && (ent_start + ent_count - 1 > (int64_t)num_mobj)) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: start+count-1 is larger than mesh object count in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_one_attr.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_one_attr.c +index 903c03c273..20febe5484 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_one_attr.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_one_attr.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -23,7 +23,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__get_dimension, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_get_dimension, etc + + /*! + * writes the specified attribute for a block +@@ -51,13 +51,13 @@ int ex_put_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj + const char *vattrbname; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Determine index of obj_id in id array */ + if (obj_type != EX_NODAL) { +- obj_id_ndx = ex__id_lkup(exoid, obj_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, obj_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -132,12 +132,12 @@ int ex_put_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj + } + + /* inquire id's of previously defined dimensions */ +- if (ex__get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != ++ if (exi_get_dimension(exoid, dnumobjent, "entries", &num_entries_this_obj, &temp, __func__) != + NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (start_num + num_ent - 1 > num_entries_this_obj) { ++ if (start_num + num_ent - 1 > (int64_t)num_entries_this_obj) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: start index (%" PRId64 ") + count (%" PRId64 + ") is larger than total number of entities (%zu) in file id %d", +@@ -146,7 +146,7 @@ int ex_put_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj + EX_FUNC_LEAVE(EX_FATAL); + } + +- if (ex__get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { ++ if (exi_get_dimension(exoid, dnumobjatt, "attributes", &num_attr, &temp, __func__) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -182,7 +182,7 @@ int ex_put_partial_one_attr(int exoid, ex_entity_type obj_type, ex_entity_id obj + start[0] = 0; + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vars_float(exoid, attrid, start, count, stride, attrib); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_set.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_set.c +index 32ae4cbcdc..ceb274eaab 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_set.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_set.c +@@ -25,7 +25,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__is_parallel, etc ++#include "exodusII_int.h" // for exi_is_parallel, etc + + /*! + * writes the set entry list and set extra list for a single set +@@ -48,17 +48,17 @@ int ex_put_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + int entry_list_id, extra_list_id, set_id_ndx; + size_t start[1], count[1]; + char errmsg[MAX_ERR_LENGTH]; +- char * entryptr = NULL; +- char * extraptr = NULL; ++ char *entryptr = NULL; ++ char *extraptr = NULL; + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no %ss defined in file id %d", + ex_name_of_object(set_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -66,7 +66,7 @@ int ex_put_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + + /* Lookup index of set id in VAR_*S_IDS array */ +- set_id_ndx = ex__id_lkup(exoid, set_type, set_id); ++ set_id_ndx = exi_id_lkup(exoid, set_type, set_id); + if (set_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -116,7 +116,7 @@ int ex_put_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + + /* write out the entry list and extra list arrays */ +- if (set_entry_list != NULL || ex__is_parallel(exoid)) { ++ if (set_entry_list != NULL || exi_is_parallel(exoid)) { + start[0] = offset - 1; + count[0] = num_to_put; + if (count[0] == 0) { +@@ -140,7 +140,7 @@ int ex_put_partial_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + + /* only do for edge, face and side sets */ +- if (extraptr && (set_extra_list != NULL || ex__is_parallel(exoid))) { ++ if (extraptr && (set_extra_list != NULL || exi_is_parallel(exoid))) { + if ((status = nc_inq_varid(exoid, extraptr, &extra_list_id)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate extra list for %s %" PRId64 " in file id %d", +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_set_dist_fact.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_set_dist_fact.c +index 910fe76314..d2252c3700 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_set_dist_fact.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_set_dist_fact.c +@@ -27,7 +27,7 @@ write + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /*! + * writes the partial distribution factors for a single set +@@ -47,16 +47,16 @@ int ex_put_partial_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_i + int dist_id; + size_t start[1], count[1]; + char errmsg[MAX_ERR_LENGTH]; +- char * factptr = NULL; ++ char *factptr = NULL; + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no %ss specified in file id %d", + ex_name_of_object(set_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -64,7 +64,7 @@ int ex_put_partial_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_i + } + + /* Lookup index of set id in VAR_*S_IDS array */ +- set_id_ndx = ex__id_lkup(exoid, set_type, set_id); ++ set_id_ndx = exi_id_lkup(exoid, set_type, set_id); + if (set_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -129,7 +129,7 @@ int ex_put_partial_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_i + } + + /* write out the distribution factors array */ +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vara_float(exoid, dist_id, start, count, set_dist_fact); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_var.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_var.c +index a31f08c79e..a0b6066a02 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_var.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_partial_var.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,9 +7,9 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__get_dimension, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_get_dimension, etc + +-static int ex__look_up_var(int exoid, ex_entity_type var_type, int var_index, ex_entity_id obj_id, ++static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex_entity_id obj_id, + const char *VOBJID, const char *VOBJTAB, const char *DNUMOBJ, + const char *DNUMOBJVAR, int *varid) + { +@@ -31,7 +31,7 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, int var_index, ex + "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", + ex_name_of_object(var_type), obj_id, VOBJID, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + obj_id_ndx = obj_id; + } +@@ -42,13 +42,13 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, int var_index, ex + "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", + ex_name_of_object(var_type), obj_id, VOBJID, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + obj_id_ndx = obj_id; + } + else { + /* Determine index of obj_id in VOBJID array */ +- obj_id_ndx = ex__id_lkup(exoid, var_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, var_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -58,34 +58,34 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, int var_index, ex + "Warning: no variables allowed for NULL block %" PRId64 " in file id %d", obj_id, + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_NULLENTITY); +- return (EX_WARN); ++ return EX_WARN; + } + + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", + ex_name_of_object(var_type), obj_id, VOBJID, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + } + +- if ((status = nc_inq_varid(exoid, ex__name_var_of_object(var_type, var_index, obj_id_ndx), ++ if ((status = nc_inq_varid(exoid, exi_name_var_of_object(var_type, var_index, obj_id_ndx), + varid)) != NC_NOERR) { + if (status == NC_ENOTVAR) { /* variable doesn't exist, create it! */ + /* check for the existence of an TNAME variable truth table */ + if (nc_inq_varid(exoid, VOBJTAB, varid) == NC_NOERR) { + /* find out number of TNAMEs and TNAME variables */ +- status = ex__get_dimension(exoid, DNUMOBJ, ex_name_of_object(var_type), &num_obj, &dimid, ++ status = exi_get_dimension(exoid, DNUMOBJ, ex_name_of_object(var_type), &num_obj, &dimid, + __func__); + if (status != NC_NOERR) { +- return (status); ++ return status; + } + +- status = ex__get_dimension(exoid, DNUMOBJVAR, ex_name_of_object(var_type), &num_obj_var, ++ status = exi_get_dimension(exoid, DNUMOBJVAR, ex_name_of_object(var_type), &num_obj_var, + &dimid, __func__); + if (status != NC_NOERR) { +- return (status); ++ return status; + } + + if (!(obj_var_truth_tab = malloc(num_obj * num_obj_var * sizeof(int)))) { +@@ -94,7 +94,7 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, int var_index, ex + "truth table in file id %d", + ex_name_of_object(var_type), exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* read in the TNAME variable truth table */ +@@ -102,7 +102,7 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, int var_index, ex + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get truth table from file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if (obj_var_truth_tab[num_obj_var * (obj_id_ndx - 1) + var_index - 1] == 0L) { +@@ -111,7 +111,7 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, int var_index, ex + errmsg, MAX_ERR_LENGTH, "ERROR: Invalid %s variable %d, %s %" PRId64 " in file id %d", + ex_name_of_object(var_type), var_index, ex_name_of_object(var_type), obj_id, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } + free(obj_var_truth_tab); + } +@@ -123,47 +123,47 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, int var_index, ex + goto error_ret; /* exit define mode and return */ + } + +- ex__get_dimension(exoid, ex__dim_num_entries_in_object(var_type, obj_id_ndx), ++ exi_get_dimension(exoid, exi_dim_num_entries_in_object(var_type, obj_id_ndx), + ex_name_of_object(var_type), &num_entity, &numobjdim, __func__); + + /* variable doesn't exist so put file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* define netCDF variable to store TNAME variable values */ + dims[0] = time_dim; + dims[1] = numobjdim; +- if ((status = nc_def_var(exoid, ex__name_var_of_object(var_type, var_index, obj_id_ndx), ++ if ((status = nc_def_var(exoid, exi_name_var_of_object(var_type, var_index, obj_id_ndx), + nc_flt_code(exoid), 2, dims, varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define %s variable %d in file id %d", + ex_name_of_object(var_type), var_index, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; + } +- ex__compress_variable(exoid, *varid, 2); ++ exi_compress_variable(exoid, *varid, 2); + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { +- return (EX_FATAL); ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ return EX_FATAL; + } + } + else { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s variable %s in file id %d", +- ex_name_of_object(var_type), ex__name_var_of_object(var_type, var_index, obj_id_ndx), ++ ex_name_of_object(var_type), exi_name_var_of_object(var_type, var_index, obj_id_ndx), + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } +- return (EX_NOERR); ++ return EX_NOERR; + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); +- return (EX_FATAL); ++ exi_leavedef(exoid, __func__); ++ return EX_FATAL; + } + + /*! +@@ -192,7 +192,7 @@ int ex_put_partial_var(int exoid, int time_step, ex_entity_type var_type, int va + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -222,47 +222,47 @@ int ex_put_partial_var(int exoid, int time_step, ex_entity_type var_type, int va + break; + case EX_NODAL: + status = +- ex__put_partial_nodal_var(exoid, time_step, var_index, start_index, num_entities, var_vals); ++ exi_put_partial_nodal_var(exoid, time_step, var_index, start_index, num_entities, var_vals); + EX_FUNC_LEAVE(status); + break; + case EX_ASSEMBLY: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, "", VAR_ASSEMBLY_TAB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, "", VAR_ASSEMBLY_TAB, + DIM_NUM_ASSEMBLY, DIM_NUM_ASSEMBLY_VAR, &varid); + break; + case EX_BLOB: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, "", VAR_BLOB_TAB, DIM_NUM_BLOB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, "", VAR_BLOB_TAB, DIM_NUM_BLOB, + DIM_NUM_BLOB_VAR, &varid); + break; + case EX_EDGE_BLOCK: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_ED_BLK, VAR_EBLK_TAB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_ED_BLK, VAR_EBLK_TAB, + DIM_NUM_ED_BLK, DIM_NUM_EDG_VAR, &varid); + break; + case EX_FACE_BLOCK: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_FA_BLK, VAR_FBLK_TAB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_FA_BLK, VAR_FBLK_TAB, + DIM_NUM_FA_BLK, DIM_NUM_FAC_VAR, &varid); + break; + case EX_ELEM_BLOCK: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_EL_BLK, VAR_ELEM_TAB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_EL_BLK, VAR_ELEM_TAB, + DIM_NUM_EL_BLK, DIM_NUM_ELE_VAR, &varid); + break; + case EX_NODE_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_NS_IDS, VAR_NSET_TAB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_NS_IDS, VAR_NSET_TAB, + DIM_NUM_NS, DIM_NUM_NSET_VAR, &varid); + break; + case EX_EDGE_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ES_IDS, VAR_ESET_TAB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ES_IDS, VAR_ESET_TAB, + DIM_NUM_ES, DIM_NUM_ESET_VAR, &varid); + break; + case EX_FACE_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_FS_IDS, VAR_FSET_TAB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_FS_IDS, VAR_FSET_TAB, + DIM_NUM_FS, DIM_NUM_FSET_VAR, &varid); + break; + case EX_SIDE_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_SS_IDS, VAR_SSET_TAB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_SS_IDS, VAR_SSET_TAB, + DIM_NUM_SS, DIM_NUM_SSET_VAR, &varid); + break; + case EX_ELEM_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ELS_IDS, VAR_ELSET_TAB, ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ELS_IDS, VAR_ELSET_TAB, + DIM_NUM_ELS, DIM_NUM_ELSET_VAR, &varid); + break; + default: +@@ -296,7 +296,7 @@ int ex_put_partial_var(int exoid, int time_step, ex_entity_type var_type, int va + start[1] = 0; + } + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vara_float(exoid, varid, start, count, var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_processor_elem_maps.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_processor_elem_maps.c +index 8d170ed446..8d6437f1f8 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_processor_elem_maps.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_processor_elem_maps.c +@@ -26,7 +26,8 @@ + #include // for ex_err, etc + #include // for EX_FATAL, DIM_NUM_BOR_ELEMS, etc + +-int ex_put_processor_elem_maps(int exoid, void_int *elem_mapi, void_int *elem_mapb, int processor) ++int ex_put_processor_elem_maps(int exoid, const void_int *elem_mapi, const void_int *elem_mapb, ++ int processor) + { + char ftype[2]; + int status, dimid, varid; +@@ -38,12 +39,12 @@ int ex_put_processor_elem_maps(int exoid, void_int *elem_mapi, void_int *elem_ma + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Get the file type */ +- if (ex__get_file_type(exoid, ftype) != EX_NOERR) { ++ if (exi_get_file_type(exoid, ftype) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unable to find file type for file ID %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_processor_node_maps.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_processor_node_maps.c +index 0fa313742c..10e427ae83 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_processor_node_maps.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_processor_node_maps.c +@@ -26,8 +26,8 @@ + #include // for ex_err, etc + #include // for EX_FATAL, DIM_NUM_BOR_NODES, etc + +-int ex_put_processor_node_maps(int exoid, void_int *node_mapi, void_int *node_mapb, +- void_int *node_mape, int proc_id) ++int ex_put_processor_node_maps(int exoid, const void_int *node_mapi, const void_int *node_mapb, ++ const void_int *node_mape, int proc_id) + { + int status, varid, dimid; + char ftype[2]; +@@ -39,12 +39,12 @@ int ex_put_processor_node_maps(int exoid, void_int *node_mapi, void_int *node_ma + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Get the file type */ +- if (ex__get_file_type(exoid, ftype) != EX_NOERR) { ++ if (exi_get_file_type(exoid, ftype) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unable to find file type for file ID %d", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop.c +index 2b661d3142..9f6ed4b779 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__id_lkup, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_id_lkup, etc + #include + + /*! +@@ -85,15 +85,15 @@ int ex_put_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const c + int int_type; + size_t start[1]; + size_t prop_name_len, name_length; +- char * name; ++ char *name; + char tmpstr[MAX_STR_LENGTH + 1]; +- char * dim_name; ++ char *dim_name; + long long vals[1]; + + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -152,7 +152,7 @@ int ex_put_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const c + name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH) + 1; + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -243,7 +243,8 @@ int ex_put_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const c + vals[0] = 0; /* fill value */ + /* create attribute to cause variable to fill with zeros per routine spec + */ +- if ((status = nc_put_att_longlong(exoid, propid, _FillValue, int_type, 1, vals)) != NC_NOERR) { ++ if ((status = nc_put_att_longlong(exoid, propid, NC_FillValue, int_type, 1, vals)) != ++ NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to create property name fill attribute in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -269,10 +270,10 @@ int ex_put_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const c + goto error_ret; /* Exit define mode and return */ + } + +- ex__update_max_name_length(exoid, prop_name_len - 1); ++ exi_update_max_name_length(exoid, prop_name_len - 1); + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -280,12 +281,12 @@ int ex_put_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const c + } + + /* find index into property array using obj_id; put value in property */ +- /* array at proper index; ex__id_lkup returns an index that is 1-based,*/ ++ /* array at proper index; exi_id_lkup returns an index that is 1-based,*/ + /* but netcdf expects 0-based arrays so subtract 1 */ + + /* special case: property name ID - check for duplicate ID assignment */ + if (strcmp("ID", prop_name) == 0) { +- int indx = ex__id_lkup(exoid, obj_type, value); ++ int indx = exi_id_lkup(exoid, obj_type, value); + if (indx != -EX_LOOKUPFAIL) { /* found the id */ + snprintf(errmsg, MAX_ERR_LENGTH, + "Warning: attempt to assign duplicate %s ID %" PRId64 " in file id %d", +@@ -295,7 +296,7 @@ int ex_put_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const c + } + } + +- status = ex__id_lkup(exoid, obj_type, obj_id); ++ status = exi_id_lkup(exoid, obj_type, obj_id); + if (status > 0) { + start[0] = status - 1; + } +@@ -334,6 +335,6 @@ int ex_put_prop(int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const c + error_ret: + nc_set_fill(exoid, oldfill, &temp); /* default: nofill */ + +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_array.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_array.c +index 3c79911f2e..c49cedcc53 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_array.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_array.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -77,13 +77,13 @@ int ex_put_prop_array(int exoid, ex_entity_type obj_type, const char *prop_name, + bool found = false; + int int_type; + size_t num_obj; +- char * name; ++ char *name; + char tmpstr[MAX_STR_LENGTH + 1]; + + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -92,7 +92,7 @@ int ex_put_prop_array(int exoid, ex_entity_type obj_type, const char *prop_name, + num_props = ex_get_num_props(exoid, obj_type); + + /* inquire id of previously defined dimension (number of objects) */ +- status = ex__get_dimension(exoid, ex__dim_num_objects(obj_type), ex_name_of_object(obj_type), ++ status = exi_get_dimension(exoid, exi_dim_num_objects(obj_type), ex_name_of_object(obj_type), + &num_obj, &dimid, __func__); + if (status != NC_NOERR) { + EX_FUNC_LEAVE(status); +@@ -144,7 +144,7 @@ int ex_put_prop_array(int exoid, ex_entity_type obj_type, const char *prop_name, + if (!found) { + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -199,7 +199,9 @@ int ex_put_prop_array(int exoid, ex_entity_type obj_type, const char *prop_name, + + /* leave define mode */ + +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -223,6 +225,6 @@ int ex_put_prop_array(int exoid, ex_entity_type obj_type, const char *prop_name, + /* Fatal error: exit definition mode and return */ + error_ret: + nc_set_fill(exoid, oldfill, &temp); /* default: nofill */ +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_names.c +index 9d2223dc11..5a8816e19e 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_prop_names.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -100,7 +100,7 @@ int ex_put_prop_names(int exoid, ex_entity_type obj_type, int num_props, char ** + int oldfill, temp; + int i, propid, dimid, dims[1]; + size_t name_length, prop_name_len; +- char * name; ++ char *name; + long long vals[1]; + size_t max_name_len = 0; + int int_type = NC_INT; +@@ -108,7 +108,7 @@ int ex_put_prop_names(int exoid, ex_entity_type obj_type, int num_props, char ** + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -120,7 +120,7 @@ int ex_put_prop_names(int exoid, ex_entity_type obj_type, int num_props, char ** + name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH) + 1; + + /* inquire id of previously defined dimension (number of objects) */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(obj_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(obj_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate number of %s in file id %d", + ex_name_of_object(obj_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -130,7 +130,7 @@ int ex_put_prop_names(int exoid, ex_entity_type obj_type, int num_props, char ** + nc_set_fill(exoid, NC_FILL, &oldfill); /* fill with zeros per routine spec */ + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to place file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -172,7 +172,8 @@ int ex_put_prop_names(int exoid, ex_entity_type obj_type, int num_props, char ** + + /* create attribute to cause variable to fill with zeros per routine spec + */ +- if ((status = nc_put_att_longlong(exoid, propid, _FillValue, int_type, 1, vals)) != NC_NOERR) { ++ if ((status = nc_put_att_longlong(exoid, propid, NC_FillValue, int_type, 1, vals)) != ++ NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to create property name fill attribute in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -204,18 +205,20 @@ int ex_put_prop_names(int exoid, ex_entity_type obj_type, int num_props, char ** + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + + /* Update the maximum_name_length attribute on the file. */ +- ex__update_max_name_length(exoid, max_name_len - 1); ++ exi_update_max_name_length(exoid, max_name_len - 1); + + nc_set_fill(exoid, oldfill, &temp); /* default: turn off fill */ + EX_FUNC_LEAVE(EX_NOERR); + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_qa.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_qa.c +index aee0c8c78a..a4efa37936 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_qa.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_qa.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -71,7 +71,7 @@ int ex_put_qa(int exoid, int num_qa_records, char *qa_record[][4]) + EX_FUNC_ENTER(); + int rootid = exoid & EX_FILE_ID_MASK; + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -86,7 +86,7 @@ int ex_put_qa(int exoid, int num_qa_records, char *qa_record[][4]) + if (status != NC_NOERR) { + + /* put file into define mode */ +- if ((status = nc_redef(rootid)) != NC_NOERR) { ++ if ((status = exi_redef(rootid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", + rootid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -140,10 +140,21 @@ int ex_put_qa(int exoid, int num_qa_records, char *qa_record[][4]) + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__set_compact_storage(rootid, varid); ++ /* In parallel, only rank=0 will write the QA records. ++ * Should be able to take advantage of HDF5 handling identical data on all ranks ++ * or use the compact storage, but we had issues on some NFS filesystems and some ++ * compilers/mpi so are doing it this way... ++ */ ++#if defined(PARALLEL_AWARE_EXODUS) ++ if (exi_is_parallel(rootid)) { ++ nc_var_par_access(rootid, varid, NC_INDEPENDENT); ++ } ++#endif + + /* leave define mode */ +- if ((status = ex__leavedef(rootid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(rootid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + } +@@ -179,22 +190,17 @@ int ex_put_qa(int exoid, int num_qa_records, char *qa_record[][4]) + } + } + } +- else if (ex__is_parallel(rootid)) { +- /* In case we are in a collective mode, all processors need to call */ +- const char dummy[] = " "; +- for (i = 0; i < num_qa_records; i++) { +- for (j = 0; j < 4; j++) { +- start[0] = start[1] = start[2] = 0; +- count[0] = count[1] = count[2] = 0; +- nc_put_vara_text(rootid, varid, start, count, dummy); +- } +- } ++ /* PnetCDF applies setting to entire file, so put back to collective... */ ++#if defined(PARALLEL_AWARE_EXODUS) ++ if (exi_is_parallel(rootid)) { ++ nc_var_par_access(rootid, varid, NC_COLLECTIVE); + } ++#endif + } + EX_FUNC_LEAVE(EX_NOERR); + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(rootid, __func__); ++ exi_leavedef(rootid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_name.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_name.c +index 7baacca09d..bf823cd794 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_name.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_name.c +@@ -46,7 +46,7 @@ int ex_put_reduction_variable_name(int exoid, ex_entity_type obj_type, int var_n + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -76,7 +76,7 @@ int ex_put_reduction_variable_name(int exoid, ex_entity_type obj_type, int var_n + } + + /* write EXODUS variable name */ +- status = ex__put_name(exoid, varid, var_num - 1, var_name, obj_type, "variable", __func__); ++ status = exi_put_name(exoid, varid, var_num - 1, var_name, obj_type, "variable", __func__); + + EX_FUNC_LEAVE(status); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_names.c +index 318981a8ea..ca17283ca8 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_names.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -29,9 +29,8 @@ + static int ex_put_var_names_int(int exoid, ex_entity_type obj_type, int num_vars, char *tname, + char *dnumvar, char *vnames, int *varid) + { +- int status; +- int dimid; +- char errmsg[MAX_ERR_LENGTH]; ++ int status; ++ int dimid; + + if ((status = nc_inq_dimid(exoid, dnumvar, &dimid)) != NC_NOERR) { + if (status != NC_NOERR) { +@@ -44,18 +43,20 @@ static int ex_put_var_names_int(int exoid, ex_entity_type obj_type, int num_vars + + if ((status = nc_inq_varid(exoid, vnames, varid)) != NC_NOERR) { + if (status == NC_ENOTVAR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no %s variable names defined in file id %d", tname, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } + else { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: %s name variable names not found in file id %d", + tname, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } +- return (EX_FATAL); ++ return EX_FATAL; + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + /*! +@@ -119,13 +120,12 @@ error = ex_put_variable_names (exoid, EX_NODAL, num_nod_vars, var_names); + */ + + int ex_put_reduction_variable_names(int exoid, ex_entity_type obj_type, int num_vars, +- char *var_names[]) ++ char *const var_names[]) + { +- int varid, status; +- char errmsg[MAX_ERR_LENGTH]; ++ int varid; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -174,15 +174,16 @@ int ex_put_reduction_variable_names(int exoid, ex_entity_type obj_type, int num_ + ex_put_var_names_int(exoid, obj_type, num_vars, "element set", DIM_NUM_ELSET_RED_VAR, + VAR_NAME_ELSET_RED_VAR, &varid); + break; +- default: ++ default: { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Invalid variable type %d specified in file id %d", + obj_type, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + EX_FUNC_LEAVE(EX_FATAL); + } ++ } + + /* write EXODUS variable names */ +- status = ex__put_names(exoid, varid, num_vars, var_names, obj_type, "variable", __func__); +- ++ int status = exi_put_names(exoid, varid, num_vars, var_names, obj_type, "variable", __func__); + EX_FUNC_LEAVE(status); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_param.c +index dae6fb7ec4..f4b6b26db2 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_variable_param.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,10 +7,10 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__compress_variable, etc ++#include "exodusII_int.h" // for exi_compress_variable, etc + + /*! \cond INTERNAL */ +-static int ex__prepare_result_var(int exoid, int num_vars, char *type_name, char *dim_name, ++static int exi_prepare_result_var(int exoid, int num_vars, char *type_name, char *dim_name, + char *variable_name) + { + int status; +@@ -18,9 +18,6 @@ static int ex__prepare_result_var(int exoid, int num_vars, char *type_name, char + int varid; + int dims[2]; + int dim_str_name; +-#if NC_HAS_HDF5 +- int fill = NC_FILL_CHAR; +-#endif + + char errmsg[MAX_ERR_LENGTH]; + +@@ -37,14 +34,14 @@ static int ex__prepare_result_var(int exoid, int num_vars, char *type_name, char + "ERROR: failed to define number of %s variables in file id %d", type_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } +- return (EX_FATAL); /* exit define mode and return */ ++ return EX_FATAL; /* exit define mode and return */ + } + + /* Now define type_name variable name variable */ + if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &dim_str_name)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get string length in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + dims[0] = dimid; +@@ -60,12 +57,13 @@ static int ex__prepare_result_var(int exoid, int num_vars, char *type_name, char + type_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } +- return (EX_FATAL); /* exit define mode and return */ ++ return EX_FATAL; /* exit define mode and return */ + } +-#if NC_HAS_HDF5 ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) ++ int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, varid, 0, &fill); + #endif +- return (EX_NOERR); ++ return EX_NOERR; + } + /*! \endcond */ + +@@ -129,7 +127,7 @@ int ex_put_reduction_variable_param(int exoid, ex_entity_type obj_type, int num_ + int status; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -167,7 +165,7 @@ int ex_put_reduction_variable_param(int exoid, ex_entity_type obj_type, int num_ + } + + /* put file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -175,8 +173,8 @@ int ex_put_reduction_variable_param(int exoid, ex_entity_type obj_type, int num_ + + /* define dimensions and variables */ + if (obj_type == EX_GLOBAL) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "global", DIM_NUM_GLO_VAR, +- VAR_NAME_GLO_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "global", DIM_NUM_GLO_VAR, VAR_NAME_GLO_VAR) != ++ EX_NOERR) { + goto error_ret; + } + +@@ -195,7 +193,7 @@ int ex_put_reduction_variable_param(int exoid, ex_entity_type obj_type, int num_ + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + } + + /* netCDF variables in which to store the EXODUS obj_type variable values will +@@ -204,68 +202,70 @@ int ex_put_reduction_variable_param(int exoid, ex_entity_type obj_type, int num_ + * (the info that is stored in the obj_type variable truth table) + */ + else if (obj_type == EX_ELEM_BLOCK) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "element", DIM_NUM_ELE_RED_VAR, +- VAR_NAME_ELE_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "element", DIM_NUM_ELE_RED_VAR, ++ VAR_NAME_ELE_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_NODE_SET) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "nodeset", DIM_NUM_NSET_RED_VAR, +- VAR_NAME_NSET_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "nodeset", DIM_NUM_NSET_RED_VAR, ++ VAR_NAME_NSET_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_SIDE_SET) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "sideset", DIM_NUM_SSET_RED_VAR, +- VAR_NAME_SSET_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "sideset", DIM_NUM_SSET_RED_VAR, ++ VAR_NAME_SSET_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_ASSEMBLY) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "assembly", DIM_NUM_ASSEMBLY_RED_VAR, +- VAR_NAME_ASSEMBLY_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "assembly", DIM_NUM_ASSEMBLY_RED_VAR, ++ VAR_NAME_ASSEMBLY_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_BLOB) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "blob", DIM_NUM_BLOB_RED_VAR, +- VAR_NAME_BLOB_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "blob", DIM_NUM_BLOB_RED_VAR, ++ VAR_NAME_BLOB_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_EDGE_BLOCK) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "edge", DIM_NUM_EDG_RED_VAR, +- VAR_NAME_EDG_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "edge", DIM_NUM_EDG_RED_VAR, ++ VAR_NAME_EDG_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_FACE_BLOCK) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "face", DIM_NUM_FAC_RED_VAR, +- VAR_NAME_FAC_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "face", DIM_NUM_FAC_RED_VAR, ++ VAR_NAME_FAC_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_EDGE_SET) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "edgeset", DIM_NUM_ESET_RED_VAR, +- VAR_NAME_ESET_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "edgeset", DIM_NUM_ESET_RED_VAR, ++ VAR_NAME_ESET_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_FACE_SET) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "faceset", DIM_NUM_FSET_RED_VAR, +- VAR_NAME_FSET_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "faceset", DIM_NUM_FSET_RED_VAR, ++ VAR_NAME_FSET_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_ELEM_SET) { +- if ((status = ex__prepare_result_var(exoid, num_vars, "elementset", DIM_NUM_ELSET_RED_VAR, +- VAR_NAME_ELSET_RED_VAR)) != EX_NOERR) { ++ if (exi_prepare_result_var(exoid, num_vars, "elementset", DIM_NUM_ELSET_RED_VAR, ++ VAR_NAME_ELSET_RED_VAR) != EX_NOERR) { + goto error_ret; + } + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -273,6 +273,6 @@ int ex_put_reduction_variable_param(int exoid, ex_entity_type obj_type, int num_ + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_vars.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_vars.c +index 0f28a158a3..301f032a37 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_vars.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_reduction_vars.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -9,14 +9,12 @@ + #include "exodusII.h" + #include "exodusII_int.h" + +-static int ex__look_up_var(int exoid, ex_entity_type var_type, ex_entity_id obj_id, ++static int exi_look_up_var(int exoid, ex_entity_type var_type, ex_entity_id obj_id, + const char *var_obj_id, const char *dim_num_obj_var, int *varid) + { +- int status; +- int obj_id_ndx; +- int time_dim, numvardim, dims[2]; +- size_t num_obj_var; +- char errmsg[MAX_ERR_LENGTH]; ++ int status; ++ int obj_id_ndx; ++ char errmsg[MAX_ERR_LENGTH]; + + if (var_type == EX_ASSEMBLY) { + status = nc_inq_varid(exoid, VAR_ENTITY_ASSEMBLY(obj_id), varid); +@@ -25,7 +23,7 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, ex_entity_id obj_ + "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", + ex_name_of_object(var_type), obj_id, var_obj_id, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + obj_id_ndx = obj_id; + } +@@ -36,13 +34,13 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, ex_entity_id obj_ + "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", + ex_name_of_object(var_type), obj_id, var_obj_id, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + obj_id_ndx = obj_id; + } + else { + /* Determine index of obj_id in var_obj_id array */ +- obj_id_ndx = ex__id_lkup(exoid, var_type, obj_id); ++ obj_id_ndx = exi_id_lkup(exoid, var_type, obj_id); + if (obj_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -52,20 +50,21 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, ex_entity_id obj_ + "Warning: no variables allowed for NULL block %" PRId64 " in file id %d", obj_id, + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_NULLENTITY); +- return (EX_WARN); ++ return EX_WARN; + } + + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", + ex_name_of_object(var_type), obj_id, var_obj_id, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + } +- if ((status = nc_inq_varid(exoid, ex__name_red_var_of_object(var_type, obj_id_ndx), varid)) != ++ if ((status = nc_inq_varid(exoid, exi_name_red_var_of_object(var_type, obj_id_ndx), varid)) != + NC_NOERR) { + if (status == NC_ENOTVAR) { /* variable doesn't exist, create it! */ ++ int time_dim; + if ((status = nc_inq_dimid(exoid, DIM_TIME, &time_dim)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate time dimension in file id %d", + exoid); +@@ -73,7 +72,9 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, ex_entity_id obj_ + return EX_FATAL; + } + +- if ((status = ex__get_dimension(exoid, dim_num_obj_var, ex_name_of_object(var_type), ++ size_t num_obj_var; ++ int numvardim; ++ if ((status = exi_get_dimension(exoid, dim_num_obj_var, ex_name_of_object(var_type), + &num_obj_var, &numvardim, __func__)) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to inquire number of %s reduction variables in file id %d", +@@ -83,39 +84,38 @@ static int ex__look_up_var(int exoid, ex_entity_type var_type, ex_entity_id obj_ + } + + /* variable doesn't exist so put file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* define NetCDF variable to store reduction variable values */ +- dims[0] = time_dim; +- dims[1] = numvardim; +- if ((status = nc_def_var(exoid, ex__name_red_var_of_object(var_type, obj_id_ndx), ++ int dims[] = {time_dim, numvardim}; ++ if ((status = nc_def_var(exoid, exi_name_red_var_of_object(var_type, obj_id_ndx), + nc_flt_code(exoid), 2, dims, varid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define %s in file id %d", + ex_name_of_object(var_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- ex__leavedef(exoid, __func__); +- return (EX_FATAL); ++ exi_leavedef(exoid, __func__); ++ return EX_FATAL; + } +- ex__compress_variable(exoid, *varid, 2); ++ exi_compress_variable(exoid, *varid, 2); + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { +- return (EX_FATAL); ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ return EX_FATAL; + } + } + else { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s %s in file id %d", +- ex_name_of_object(var_type), ex__name_red_var_of_object(var_type, obj_id_ndx), ++ ex_name_of_object(var_type), exi_name_red_var_of_object(var_type, obj_id_ndx), + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + /*! +@@ -189,7 +189,7 @@ int ex_put_reduction_vars(int exoid, int time_step, ex_entity_type var_type, ex_ + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -200,34 +200,34 @@ int ex_put_reduction_vars(int exoid, int time_step, ex_entity_type var_type, ex_ + return ex_put_var(exoid, time_step, var_type, 1, 1, num_variables, var_vals); + break; + case EX_ASSEMBLY: +- status = ex__look_up_var(exoid, var_type, obj_id, "assembly", DIM_NUM_ASSEMBLY_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, "assembly", DIM_NUM_ASSEMBLY_RED_VAR, &varid); + break; + case EX_BLOB: +- status = ex__look_up_var(exoid, var_type, obj_id, "blob", DIM_NUM_BLOB_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, "blob", DIM_NUM_BLOB_RED_VAR, &varid); + break; + case EX_EDGE_BLOCK: +- status = ex__look_up_var(exoid, var_type, obj_id, VAR_ID_ED_BLK, DIM_NUM_EDG_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, VAR_ID_ED_BLK, DIM_NUM_EDG_RED_VAR, &varid); + break; + case EX_FACE_BLOCK: +- status = ex__look_up_var(exoid, var_type, obj_id, VAR_ID_FA_BLK, DIM_NUM_FAC_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, VAR_ID_FA_BLK, DIM_NUM_FAC_RED_VAR, &varid); + break; + case EX_ELEM_BLOCK: +- status = ex__look_up_var(exoid, var_type, obj_id, VAR_ID_EL_BLK, DIM_NUM_ELE_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, VAR_ID_EL_BLK, DIM_NUM_ELE_RED_VAR, &varid); + break; + case EX_NODE_SET: +- status = ex__look_up_var(exoid, var_type, obj_id, VAR_NS_IDS, DIM_NUM_NSET_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, VAR_NS_IDS, DIM_NUM_NSET_RED_VAR, &varid); + break; + case EX_EDGE_SET: +- status = ex__look_up_var(exoid, var_type, obj_id, VAR_ES_IDS, DIM_NUM_ESET_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, VAR_ES_IDS, DIM_NUM_ESET_RED_VAR, &varid); + break; + case EX_FACE_SET: +- status = ex__look_up_var(exoid, var_type, obj_id, VAR_FS_IDS, DIM_NUM_FSET_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, VAR_FS_IDS, DIM_NUM_FSET_RED_VAR, &varid); + break; + case EX_SIDE_SET: +- status = ex__look_up_var(exoid, var_type, obj_id, VAR_SS_IDS, DIM_NUM_SSET_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, VAR_SS_IDS, DIM_NUM_SSET_RED_VAR, &varid); + break; + case EX_ELEM_SET: +- status = ex__look_up_var(exoid, var_type, obj_id, VAR_ELS_IDS, DIM_NUM_ELSET_RED_VAR, &varid); ++ status = exi_look_up_var(exoid, var_type, obj_id, VAR_ELS_IDS, DIM_NUM_ELSET_RED_VAR, &varid); + break; + default: + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: invalid variable type (%d) specified for file id %d", +@@ -247,7 +247,7 @@ int ex_put_reduction_vars(int exoid, int time_step, ex_entity_type var_type, ex_ + start[1] = 0; + count[1] = num_variables; + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_vara_float(exoid, varid, start, count, var_vals); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_set.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_set.c +index 0fb9352070..6988759724 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_set.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_set.c +@@ -25,7 +25,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, ex_name_of_object, etc +-#include "exodusII_int.h" // for ex__check_valid_file_id, etc ++#include "exodusII_int.h" // for exi_check_valid_file_id, etc + + /*! + * writes the set entry list and set extra list for a single set +@@ -49,12 +49,12 @@ int ex_put_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no %ss defined in file id %d", + ex_name_of_object(set_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -62,7 +62,7 @@ int ex_put_set(int exoid, ex_entity_type set_type, ex_entity_id set_id, + } + + /* Lookup index of set id in VAR_*S_IDS array */ +- set_id_ndx = ex__id_lkup(exoid, set_type, set_id); ++ set_id_ndx = exi_id_lkup(exoid, set_type, set_id); + if (set_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_set_dist_fact.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_set_dist_fact.c +index 43fa07561f..728500bef8 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_set_dist_fact.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_set_dist_fact.c +@@ -45,12 +45,12 @@ int ex_put_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_id set_id + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(set_type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(set_type), &dimid)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no %ss specified in file id %d", + ex_name_of_object(set_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -58,7 +58,7 @@ int ex_put_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_id set_id + } + + /* Lookup index of set id in VAR_*S_IDS array */ +- set_id_ndx = ex__id_lkup(exoid, set_type, set_id); ++ set_id_ndx = exi_id_lkup(exoid, set_type, set_id); + if (set_id_ndx <= 0) { + ex_get_err(NULL, NULL, &status); + +@@ -117,7 +117,7 @@ int ex_put_set_dist_fact(int exoid, ex_entity_type set_type, ex_entity_id set_id + } + + /* write out the distribution factors array */ +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_var_float(exoid, dist_id, set_dist_fact); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_sets.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_sets.c +index c67debd7cf..7729946462 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_sets.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_sets.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -26,20 +26,20 @@ int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets) + size_t start[1]; + int cur_num_sets; + char errmsg[MAX_ERR_LENGTH]; +- int * sets_to_define = NULL; +- char * numentryptr = NULL; +- char * entryptr = NULL; +- char * extraptr = NULL; +- char * idsptr = NULL; +- char * statptr = NULL; +- char * numdfptr = NULL; +- char * factptr = NULL; ++ int *sets_to_define = NULL; ++ char *numentryptr = NULL; ++ char *entryptr = NULL; ++ char *extraptr = NULL; ++ char *idsptr = NULL; ++ char *statptr = NULL; ++ char *numdfptr = NULL; ++ char *factptr = NULL; + + int int_type; + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -59,7 +59,7 @@ int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets) + */ + for (i = 0; i < set_count; i++) { + /* first check if any sets are specified */ +- if ((status = nc_inq_dimid(exoid, ex__dim_num_objects(sets[i].type), &dimid)) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_dim_num_objects(sets[i].type), &dimid)) != NC_NOERR) { + if (status == NC_EBADDIM) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no %ss defined for file id %d", + ex_name_of_object(sets[i].type), exoid); +@@ -83,7 +83,7 @@ int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets) + sets_to_define[i] = -1; + } + else { +- status = ex__id_lkup(exoid, sets[i].type, sets[i].id); ++ status = exi_id_lkup(exoid, sets[i].type, sets[i].id); + if (status != -EX_LOOKUPFAIL) { /* found the side set id, so set is already defined... */ + sets_to_define[i] = 0; + } +@@ -96,7 +96,7 @@ int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets) + + if (needs_define > 0) { + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(sets_to_define); +@@ -109,14 +109,14 @@ int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets) + } + + if (sets_to_define[i] > 0) { +- /* NOTE: ex__inc_file_item finds the current number of sets defined ++ /* NOTE: exi_inc_file_item finds the current number of sets defined + for a specific file and returns that value incremented. */ +- cur_num_sets = ex__inc_file_item(exoid, ex__get_counter_list(sets[i].type)); ++ cur_num_sets = exi_inc_file_item(exoid, exi_get_counter_list(sets[i].type)); + set_id_ndx = cur_num_sets + 1; + sets_to_define[i] = set_id_ndx; + } + else { +- cur_num_sets = ex__get_file_item(exoid, ex__get_counter_list(sets[i].type)); ++ cur_num_sets = exi_get_file_item(exoid, exi_get_counter_list(sets[i].type)); + set_id_ndx = cur_num_sets - set_count + i + 1; + sets_to_define[i] = set_id_ndx; + } +@@ -202,7 +202,7 @@ int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets) + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + + if (extraptr) { + if ((status = nc_def_var(exoid, extraptr, int_type, 1, dims, &varid)) != NC_NOERR) { +@@ -220,7 +220,7 @@ int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets) + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 1); ++ exi_compress_variable(exoid, varid, 1); + } + + /* Create distribution factors variable if required */ +@@ -268,12 +268,14 @@ int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets) + } + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + } + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + free(sets_to_define); + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -379,6 +381,6 @@ int ex_put_sets(int exoid, size_t set_count, const struct ex_set *sets) + error_ret: + free(sets_to_define); + +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_ss_param_global.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_ss_param_global.c +index ab5bd68604..4cb15c6119 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_ss_param_global.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_ss_param_global.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2025 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -29,16 +29,17 @@ + #include + #include + +-int ex_put_ss_param_global(int exoid, void_int *global_ids, void_int *side_cnts, void_int *df_cnts) ++int ex_put_ss_param_global(int exoid, const void_int *global_ids, const void_int *side_cnts, ++ const void_int *df_cnts) + { +- int varid; ++ int varid = 0; + +- int status; ++ int status = 0; + char errmsg[MAX_ERR_LENGTH]; + /*-----------------------------Execution begins-----------------------------*/ + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_time.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_time.c +index 1e36091125..9bae4c7816 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_time.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_time.c +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for EX_FATAL, ex__comp_ws, etc ++#include "exodusII_int.h" // for EX_FATAL, exi_comp_ws, etc + + /*! + \ingroup ResultsData +@@ -54,11 +54,11 @@ int ex_put_time(int exoid, int time_step, const void *time_value) + int varid; + size_t start[1]; + char errmsg[MAX_ERR_LENGTH]; +- struct ex__file_item *file = NULL; ++ struct exi_file_item *file = NULL; + + EX_FUNC_ENTER(); + +- file = ex__find_file_item(exoid); ++ file = exi_find_file_item(exoid); + if (!file) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d.", exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); +@@ -80,7 +80,7 @@ int ex_put_time(int exoid, int time_step, const void *time_value) + /* store time value */ + start[0] = --time_step; + +- if (ex__comp_ws(exoid) == 4) { ++ if (exi_comp_ws(exoid) == 4) { + status = nc_put_var1_float(exoid, varid, start, time_value); + } + else { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_truth_table.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_truth_table.c +index 9bb4d45de6..09cb4e6973 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_truth_table.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_truth_table.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -25,7 +25,7 @@ + *****************************************************************************/ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__get_dimension, EX_FATAL, etc ++#include "exodusII_int.h" // for exi_get_dimension, EX_FATAL, etc + + /*! + \ingroup ResultsData +@@ -64,14 +64,15 @@ error = ex_put_truth_table(exoid, EX_ELEM_BLOCK, num_elem_blk, num_ele_vars, + ~~~ + */ + +-int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_var, int *var_tab) ++int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_var, ++ const int *var_tab) + { + int numelblkdim, numelvardim, timedim, dims[2], varid; +- char * sta_type = NULL; +- char * tab_type = NULL; ++ char *sta_type = NULL; ++ char *tab_type = NULL; + size_t num_entity = 0; + size_t num_var_db = 0; +- int * stat_vals = NULL; ++ int *stat_vals = NULL; + int i, j, k; + int status; + char errmsg[MAX_ERR_LENGTH]; +@@ -87,15 +88,15 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +- ex__get_dimension(exoid, ex__dim_num_objects(obj_type), ex_name_of_object(obj_type), &num_entity, ++ exi_get_dimension(exoid, exi_dim_num_objects(obj_type), ex_name_of_object(obj_type), &num_entity, + &numelblkdim, __func__); + + if (obj_type == EX_ELEM_BLOCK) { +- ex__get_dimension(exoid, DIM_NUM_ELE_VAR, "element variables", &num_var_db, &numelvardim, ++ exi_get_dimension(exoid, DIM_NUM_ELE_VAR, "element variables", &num_var_db, &numelvardim, + __func__); + var_name = "vals_elem_var"; + ent_type = "eb"; +@@ -104,7 +105,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + tab_type = VAR_ELEM_TAB; + } + else if (obj_type == EX_EDGE_BLOCK) { +- ex__get_dimension(exoid, DIM_NUM_EDG_VAR, "edge block variables", &num_var_db, &numelvardim, ++ exi_get_dimension(exoid, DIM_NUM_EDG_VAR, "edge block variables", &num_var_db, &numelvardim, + __func__); + var_name = "vals_edge_var"; + ent_type = "eb"; +@@ -113,7 +114,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + tab_type = VAR_EBLK_TAB; + } + else if (obj_type == EX_FACE_BLOCK) { +- ex__get_dimension(exoid, DIM_NUM_FAC_VAR, "face block variables", &num_var_db, &numelvardim, ++ exi_get_dimension(exoid, DIM_NUM_FAC_VAR, "face block variables", &num_var_db, &numelvardim, + __func__); + var_name = "vals_face_var"; + ent_type = "fb"; +@@ -122,7 +123,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + tab_type = VAR_FBLK_TAB; + } + else if (obj_type == EX_SIDE_SET) { +- ex__get_dimension(exoid, DIM_NUM_SSET_VAR, "sideset variables", &num_var_db, &numelvardim, ++ exi_get_dimension(exoid, DIM_NUM_SSET_VAR, "sideset variables", &num_var_db, &numelvardim, + __func__); + var_name = "vals_sset_var"; + ent_type = "ss"; +@@ -131,7 +132,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + tab_type = VAR_SSET_TAB; + } + else if (obj_type == EX_NODE_SET) { +- ex__get_dimension(exoid, DIM_NUM_NSET_VAR, "nodeset variables", &num_var_db, &numelvardim, ++ exi_get_dimension(exoid, DIM_NUM_NSET_VAR, "nodeset variables", &num_var_db, &numelvardim, + __func__); + var_name = "vals_nset_var"; + ent_type = "ns"; +@@ -140,7 +141,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + tab_type = VAR_NSET_TAB; + } + else if (obj_type == EX_EDGE_SET) { +- ex__get_dimension(exoid, DIM_NUM_ESET_VAR, "edge set variables", &num_var_db, &numelvardim, ++ exi_get_dimension(exoid, DIM_NUM_ESET_VAR, "edge set variables", &num_var_db, &numelvardim, + __func__); + var_name = "vals_eset_var"; + ent_type = "es"; +@@ -149,7 +150,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + tab_type = VAR_ESET_TAB; + } + else if (obj_type == EX_FACE_SET) { +- ex__get_dimension(exoid, DIM_NUM_FSET_VAR, "face set variables", &num_var_db, &numelvardim, ++ exi_get_dimension(exoid, DIM_NUM_FSET_VAR, "face set variables", &num_var_db, &numelvardim, + __func__); + var_name = "vals_fset_var"; + ent_type = "fs"; +@@ -158,7 +159,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + tab_type = VAR_FSET_TAB; + } + else if (obj_type == EX_ELEM_SET) { +- ex__get_dimension(exoid, DIM_NUM_ELSET_VAR, "element set variables", &num_var_db, &numelvardim, ++ exi_get_dimension(exoid, DIM_NUM_ELSET_VAR, "element set variables", &num_var_db, &numelvardim, + __func__); + var_name = "vals_elset_var"; + ent_type = "es"; +@@ -167,7 +168,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + tab_type = VAR_ELSET_TAB; + } + else if (obj_type == EX_BLOB) { +- ex__get_dimension(exoid, DIM_NUM_BLOB_VAR, "blob variables", &num_var_db, &numelvardim, ++ exi_get_dimension(exoid, DIM_NUM_BLOB_VAR, "blob variables", &num_var_db, &numelvardim, + __func__); + var_name = "vals_blob_var"; + ent_type = "blob"; +@@ -235,7 +236,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + } + + /* put netcdf file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + free(stat_vals); + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -270,7 +271,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + dims[0] = timedim; + + /* Determine number of entities in block */ +- if ((status = nc_inq_dimid(exoid, ex__catstr(ent_size, (i + 1)), &dims[1])) != NC_NOERR) { ++ if ((status = nc_inq_dimid(exoid, exi_catstr(ent_size, (i + 1)), &dims[1])) != NC_NOERR) { + free(stat_vals); + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate number of entities in " +@@ -287,7 +288,7 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + * instead of 0 + */ + +- if ((status = nc_def_var(exoid, ex__catstr2(var_name, j, ent_type, i + 1), ++ if ((status = nc_def_var(exoid, exi_catstr2(var_name, j, ent_type, i + 1), + nc_flt_code(exoid), 2, dims, &varid)) != NC_NOERR) { + if (status != NC_ENAMEINUSE) { + free(stat_vals); +@@ -297,13 +298,13 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + } + } +- } /* if */ ++ } /* if */ + k++; /* increment element truth table pointer */ +- } /* for j */ +- } /* for i */ ++ } /* for j */ ++ } /* for i */ + + free(stat_vals); + +@@ -323,7 +324,9 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -341,6 +344,6 @@ int ex_put_truth_table(int exoid, ex_entity_type obj_type, int num_blk, int num_ + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_var.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_var.c +index 600be23f9f..2795aac99c 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_var.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_var.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2023 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -9,163 +9,6 @@ + #include "exodusII.h" // for ex_err, etc + #include "exodusII_int.h" // for EX_FATAL, etc + +-static int ex__look_up_var(int exoid, ex_entity_type var_type, int var_index, ex_entity_id obj_id, +- const char *VOBJID, const char *VOBJTAB, const char *DNUMOBJ, +- const char *DNUMOBJVAR, int *varid) +-{ +- int status; +- int obj_id_ndx; +- int dimid, time_dim, numobjdim, dims[2]; +- +- size_t num_obj; +- size_t num_obj_var; +- size_t num_entity; +- +- int *obj_var_truth_tab; +- char errmsg[MAX_ERR_LENGTH]; +- +- if (var_type == EX_ASSEMBLY) { +- status = nc_inq_varid(exoid, VAR_ENTITY_ASSEMBLY(obj_id), varid); +- if (status != 0) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", +- ex_name_of_object(var_type), obj_id, VOBJID, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); +- } +- obj_id_ndx = obj_id; +- } +- else if (var_type == EX_BLOB) { +- status = nc_inq_varid(exoid, VAR_ENTITY_BLOB(obj_id), varid); +- if (status != 0) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", +- ex_name_of_object(var_type), obj_id, VOBJID, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); +- } +- obj_id_ndx = obj_id; +- } +- else { +- /* Determine index of obj_id in VOBJID array */ +- obj_id_ndx = ex__id_lkup(exoid, var_type, obj_id); +- if (obj_id_ndx <= 0) { +- ex_get_err(NULL, NULL, &status); +- +- if (status != 0) { +- if (status == EX_NULLENTITY) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "Warning: no variables allowed for NULL block %" PRId64 " in file id %d", obj_id, +- exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_NULLENTITY); +- return (EX_WARN); +- } +- +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", +- ex_name_of_object(var_type), obj_id, VOBJID, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); +- } +- } +- } +- +- if ((status = nc_inq_varid(exoid, ex__name_var_of_object(var_type, var_index, obj_id_ndx), +- varid)) != NC_NOERR) { +- if (status == NC_ENOTVAR) { /* variable doesn't exist, create it! */ +- /* check for the existence of an TNAME variable truth table */ +- if (nc_inq_varid(exoid, VOBJTAB, varid) == NC_NOERR) { +- /* find out number of TNAMEs and TNAME variables */ +- status = ex__get_dimension(exoid, DNUMOBJ, ex_name_of_object(var_type), &num_obj, &dimid, +- __func__); +- if (status != NC_NOERR) { +- return (status); +- } +- +- status = ex__get_dimension(exoid, DNUMOBJVAR, ex_name_of_object(var_type), &num_obj_var, +- &dimid, __func__); +- if (status != NC_NOERR) { +- return (status); +- } +- +- if (!(obj_var_truth_tab = malloc(num_obj * num_obj_var * sizeof(int)))) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to allocate memory for %s variable " +- "truth table in file id %d", +- ex_name_of_object(var_type), exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (EX_FATAL); +- } +- +- /* read in the TNAME variable truth table */ +- if ((status = nc_get_var_int(exoid, *varid, obj_var_truth_tab)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get truth table from file id %d", +- exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); +- } +- +- if (obj_var_truth_tab[num_obj_var * (obj_id_ndx - 1) + var_index - 1] == 0L) { +- free(obj_var_truth_tab); +- snprintf( +- errmsg, MAX_ERR_LENGTH, "ERROR: Invalid %s variable %d, %s %" PRId64 " in file id %d", +- ex_name_of_object(var_type), var_index, ex_name_of_object(var_type), obj_id, exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); +- } +- free(obj_var_truth_tab); +- } +- +- if ((status = nc_inq_dimid(exoid, DIM_TIME, &time_dim)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate time dimension in file id %d", +- exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- goto error_ret; /* exit define mode and return */ +- } +- +- ex__get_dimension(exoid, ex__dim_num_entries_in_object(var_type, obj_id_ndx), +- ex_name_of_object(var_type), &num_entity, &numobjdim, __func__); +- +- /* variable doesn't exist so put file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); +- } +- +- /* define netCDF variable to store TNAME variable values */ +- dims[0] = time_dim; +- dims[1] = numobjdim; +- if ((status = nc_def_var(exoid, ex__name_var_of_object(var_type, var_index, obj_id_ndx), +- nc_flt_code(exoid), 2, dims, varid)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define %s variable %d in file id %d", +- ex_name_of_object(var_type), var_index, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- goto error_ret; +- } +- ex__compress_variable(exoid, *varid, 2); +- +- /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { +- return (EX_FATAL); +- } +- } +- else { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s variable %s in file id %d", +- ex_name_of_object(var_type), ex__name_var_of_object(var_type, var_index, obj_id_ndx), +- exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); +- } +- } +- return (EX_NOERR); +- +-/* Fatal error: exit definition mode and return */ +-error_ret: +- ex__leavedef(exoid, __func__); +- return (EX_FATAL); +-} +- + /*! + \ingroup ResultsData + writes the values of a single variable of the specified type for a +@@ -234,128 +77,6 @@ for (k=1; k <= num_nod_vars; k++) { + int ex_put_var(int exoid, int time_step, ex_entity_type var_type, int var_index, + ex_entity_id obj_id, int64_t num_entries_this_obj, const void *var_vals) + { +- int varid; +- size_t start[2], count[2]; +- int status; +- char errmsg[MAX_ERR_LENGTH]; +- +- EX_FUNC_ENTER(); +- +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { +- EX_FUNC_LEAVE(EX_FATAL); +- } +- +- switch (var_type) { +- case EX_GLOBAL: +- if (num_entries_this_obj <= 0) { +- snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no global variables specified for file id %d", +- exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- +- EX_FUNC_LEAVE(EX_WARN); +- } +- +- /* inquire previously defined variable */ +- if ((status = nc_inq_varid(exoid, VAR_GLO_VAR, &varid)) != NC_NOERR) { +- if (status == NC_ENOTVAR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no global variables defined in file id %d", exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- } +- else { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to get global variables parameters in file id %d", exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- } +- EX_FUNC_LEAVE(EX_FATAL); +- } +- break; +- case EX_NODAL: +- status = ex__put_nodal_var(exoid, time_step, var_index, num_entries_this_obj, var_vals); +- EX_FUNC_LEAVE(status); +- break; +- case EX_ASSEMBLY: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, "", VAR_ASSEMBLY_TAB, +- DIM_NUM_ASSEMBLY, DIM_NUM_ASSEMBLY_VAR, &varid); +- break; +- case EX_BLOB: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, "", VAR_BLOB_TAB, DIM_NUM_BLOB, +- DIM_NUM_BLOB_VAR, &varid); +- break; +- case EX_EDGE_BLOCK: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_ED_BLK, VAR_EBLK_TAB, +- DIM_NUM_ED_BLK, DIM_NUM_EDG_VAR, &varid); +- break; +- case EX_FACE_BLOCK: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_FA_BLK, VAR_FBLK_TAB, +- DIM_NUM_FA_BLK, DIM_NUM_FAC_VAR, &varid); +- break; +- case EX_ELEM_BLOCK: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_EL_BLK, VAR_ELEM_TAB, +- DIM_NUM_EL_BLK, DIM_NUM_ELE_VAR, &varid); +- break; +- case EX_NODE_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_NS_IDS, VAR_NSET_TAB, +- DIM_NUM_NS, DIM_NUM_NSET_VAR, &varid); +- break; +- case EX_EDGE_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ES_IDS, VAR_ESET_TAB, +- DIM_NUM_ES, DIM_NUM_ESET_VAR, &varid); +- break; +- case EX_FACE_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_FS_IDS, VAR_FSET_TAB, +- DIM_NUM_FS, DIM_NUM_FSET_VAR, &varid); +- break; +- case EX_SIDE_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_SS_IDS, VAR_SSET_TAB, +- DIM_NUM_SS, DIM_NUM_SSET_VAR, &varid); +- break; +- case EX_ELEM_SET: +- status = ex__look_up_var(exoid, var_type, var_index, obj_id, VAR_ELS_IDS, VAR_ELSET_TAB, +- DIM_NUM_ELS, DIM_NUM_ELSET_VAR, &varid); +- break; +- default: +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: invalid variable type (%d) specified for file id %d", +- var_type, exoid); +- ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- EX_FUNC_LEAVE(EX_FATAL); +- } +- +- if (status != EX_NOERR) { +- EX_FUNC_LEAVE(status); +- } +- +- /* store element variable values */ +- start[0] = time_step - 1; +- start[1] = 0; +- +- if (var_type == EX_GLOBAL) { +- /* global variables may be written +- * - all at once (by setting var_index to 1 and num_entries_this_obj to +- * num_glob, or +- * - one at a time (by setting var_index to the desired index and +- * num_entries_this_obj to 1. +- */ +- count[0] = var_index; +- } +- else { +- count[0] = 1; +- } +- count[1] = num_entries_this_obj; +- +- if (ex__comp_ws(exoid) == 4) { +- status = nc_put_vara_float(exoid, varid, start, count, var_vals); +- } +- else { +- status = nc_put_vara_double(exoid, varid, start, count, var_vals); +- } +- +- if (status != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: failed to store %s %" PRId64 " variable %d at step %d in file id %d", +- ex_name_of_object(var_type), obj_id, var_index, time_step, exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- EX_FUNC_LEAVE(EX_FATAL); +- } +- +- EX_FUNC_LEAVE(EX_NOERR); ++ return ex_put_var_multi_time(exoid, var_type, var_index, obj_id, num_entries_this_obj, time_step, ++ time_step, var_vals); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_var_multi_time.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_var_multi_time.c +new file mode 100644 +index 0000000000..a34123f5fb +--- /dev/null ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_var_multi_time.c +@@ -0,0 +1,366 @@ ++/* ++ * Copyright(C) 1999-2020, 2023, 2024 National Technology & Engineering Solutions ++ * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with ++ * NTESS, the U.S. Government retains certain rights in this software. ++ * ++ * See packages/seacas/LICENSE for details ++ */ ++ ++#include "exodusII.h" // for ex_err, etc ++#include "exodusII_int.h" // for EX_FATAL, etc ++ ++static int exi_look_up_var(int exoid, ex_entity_type var_type, int var_index, ex_entity_id obj_id, ++ const char *VOBJID, const char *VOBJTAB, const char *DNUMOBJ, ++ const char *DNUMOBJVAR, int *varid) ++{ ++ int status; ++ int dimid, time_dim, numobjdim, dims[2]; ++ ++ int obj_id_ndx = 0; ++ ++ int *obj_var_truth_tab; ++ char errmsg[MAX_ERR_LENGTH]; ++ ++ if (var_type == EX_ASSEMBLY) { ++ status = nc_inq_varid(exoid, VAR_ENTITY_ASSEMBLY(obj_id), varid); ++ if (status != 0) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", ++ ex_name_of_object(var_type), obj_id, VOBJID, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ obj_id_ndx = obj_id; ++ } ++ else if (var_type == EX_BLOB) { ++ status = nc_inq_varid(exoid, VAR_ENTITY_BLOB(obj_id), varid); ++ if (status != 0) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", ++ ex_name_of_object(var_type), obj_id, VOBJID, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ obj_id_ndx = obj_id; ++ } ++ else { ++ /* Determine index of obj_id in VOBJID array */ ++ obj_id_ndx = exi_id_lkup(exoid, var_type, obj_id); ++ if (obj_id_ndx <= 0) { ++ ex_get_err(NULL, NULL, &status); ++ ++ if (status != 0) { ++ if (status == EX_NULLENTITY) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "Warning: no variables allowed for NULL block %" PRId64 " in file id %d", obj_id, ++ exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_NULLENTITY); ++ return EX_WARN; ++ } ++ ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to locate %s id %" PRId64 " in %s array in file id %d", ++ ex_name_of_object(var_type), obj_id, VOBJID, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ } ++ } ++ ++ if ((status = nc_inq_varid(exoid, exi_name_var_of_object(var_type, var_index, obj_id_ndx), ++ varid)) != NC_NOERR) { ++ if (status == NC_ENOTVAR) { /* variable doesn't exist, create it! */ ++ /* check for the existence of an TNAME variable truth table */ ++ if (nc_inq_varid(exoid, VOBJTAB, varid) == NC_NOERR) { ++ /* find out number of TNAMEs and TNAME variables */ ++ size_t num_obj = 0; ++ size_t num_obj_var = 0; ++ ++ status = exi_get_dimension(exoid, DNUMOBJ, ex_name_of_object(var_type), &num_obj, &dimid, ++ __func__); ++ if (status != NC_NOERR) { ++ return status; ++ } ++ ++ status = exi_get_dimension(exoid, DNUMOBJVAR, ex_name_of_object(var_type), &num_obj_var, ++ &dimid, __func__); ++ if (status != NC_NOERR) { ++ return status; ++ } ++ ++ if (!(obj_var_truth_tab = malloc(num_obj * num_obj_var * sizeof(int)))) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to allocate memory for %s variable " ++ "truth table in file id %d", ++ ex_name_of_object(var_type), exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); ++ return EX_FATAL; ++ } ++ ++ /* read in the TNAME variable truth table */ ++ if ((status = nc_get_var_int(exoid, *varid, obj_var_truth_tab)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get truth table from file id %d", ++ exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ ++ if (obj_var_truth_tab[num_obj_var * (obj_id_ndx - 1) + var_index - 1] == 0L) { ++ free(obj_var_truth_tab); ++ snprintf( ++ errmsg, MAX_ERR_LENGTH, "ERROR: Invalid %s variable %d, %s %" PRId64 " in file id %d", ++ ex_name_of_object(var_type), var_index, ex_name_of_object(var_type), obj_id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ return EX_FATAL; ++ } ++ free(obj_var_truth_tab); ++ } ++ ++ if ((status = nc_inq_dimid(exoid, DIM_TIME, &time_dim)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate time dimension in file id %d", ++ exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ goto error_ret; /* exit define mode and return */ ++ } ++ ++ size_t num_entity = 0; ++ exi_get_dimension(exoid, exi_dim_num_entries_in_object(var_type, obj_id_ndx), ++ ex_name_of_object(var_type), &num_entity, &numobjdim, __func__); ++ ++ /* variable doesn't exist so put file into define mode */ ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ ++ /* define netCDF variable to store TNAME variable values */ ++ dims[0] = time_dim; ++ dims[1] = numobjdim; ++ if ((status = nc_def_var(exoid, exi_name_var_of_object(var_type, var_index, obj_id_ndx), ++ nc_flt_code(exoid), 2, dims, varid)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to define %s variable %d in file id %d", ++ ex_name_of_object(var_type), var_index, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ goto error_ret; ++ } ++ exi_compress_variable(exoid, *varid, 2); ++ ++ /* leave define mode */ ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ return EX_FATAL; ++ } ++ } ++ else { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s variable %s in file id %d", ++ ex_name_of_object(var_type), exi_name_var_of_object(var_type, var_index, obj_id_ndx), ++ exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ } ++ return EX_NOERR; ++ ++/* Fatal error: exit definition mode and return */ ++error_ret: ++ exi_leavedef(exoid, __func__); ++ return EX_FATAL; ++} ++ ++/*! ++\ingroup ResultsData ++writes the values of a single variable of the specified type for a ++single time step. The function ex_put_variable_param() must be invoked ++before this call is made. ++ ++Because variables are floating point values, the application ++code must declare the array passed to be the appropriate type ++(float or double) to match the compute word size passed in ++ex_create() or ex_open(). ++ ++\return In case of an error, ex_put_var() returns a negative number; a ++warning will return a positive number. Possible causes of errors ++include: ++ - data file not properly opened with call to ex_create() or ex_open() ++ - data file opened for read only. ++ - data file not initialized properly with call to ex_put_init(). ++ - ex_put_variable_param() not called previously specifying the number of ++variables. ++ ++\param[in] exoid ++exodus file ID returned from a previous call to ++ex_create() or ex_open(). ++ ++\param[in] var_type ++type (edge block, face block, edge set, ... ) ++ ++\param[in] var_index ++The index of the variable. The first variable has an index of 1. ++ ++\param[in] obj_id ++entity block/set id (ignored for global and nodal variables) ++ ++\param[in] num_entries_this_obj ++The number of items in this block/set ++ ++\param[in] beg_time_step ++The beginning time step number, as described under ex_put_time(). This ++is essentially a counter that is incremented when results variables ++are output. The first time step is 1. ++ ++\param[in] end_time_step ++The last step number to put values. The first time step is 1. ++ ++\param[in] var_vals ++Array of `num_entries_this_obj` values of the `var_index`-th variable for the requested time ++step(s). ++ ++As an example, the following code segment writes all the nodal ++variables for a single time step: ++ ++~~~{.c} ++int num_nod_vars, num_nodes, error, exoid, beg_time_step, end_time_step; ++float *nodal_var_vals; ++ ++\comment{write nodal variables} ++nodal_var_vals = (float *) calloc(num_nodes*num_steps, sizeof(float)); ++for (k=1; k <= num_nod_vars; k++) { ++ for (t=1, t < num_steps; t++) { ++ for (j=0; j < num_nodes; j++) { ++ \comment{application code fills in this array} ++ nodal_var_vals[j] = 10.0; ++ } ++ } ++ error = ex_put_var(exoid, EX_NODAL, 0, k, num_nodes, ++ 1, 1+num_steps, nodal_var_vals); ++} ++~~~ ++ */ ++ ++int ex_put_var_multi_time(int exoid, ex_entity_type var_type, int var_index, ex_entity_id obj_id, ++ int64_t num_entries_this_obj, int beg_time_step, int end_time_step, ++ const void *var_vals) ++{ ++ int varid; ++ size_t start[2], count[2]; ++ int status; ++ char errmsg[MAX_ERR_LENGTH]; ++ ++ EX_FUNC_ENTER(); ++ ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ switch (var_type) { ++ case EX_GLOBAL: ++ if (num_entries_this_obj <= 0) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no global variables specified for file id %d", ++ exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ ++ EX_FUNC_LEAVE(EX_WARN); ++ } ++ ++ /* inquire previously defined variable */ ++ if ((status = nc_inq_varid(exoid, VAR_GLO_VAR, &varid)) != NC_NOERR) { ++ if (status == NC_ENOTVAR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: no global variables defined in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ } ++ else { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to get global variables parameters in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ } ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ break; ++ case EX_NODAL: ++ status = exi_put_nodal_var_time(exoid, var_index, num_entries_this_obj, beg_time_step, ++ end_time_step, var_vals); ++ EX_FUNC_LEAVE(status); ++ case EX_ASSEMBLY: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, "", VAR_ASSEMBLY_TAB, ++ DIM_NUM_ASSEMBLY, DIM_NUM_ASSEMBLY_VAR, &varid); ++ break; ++ case EX_BLOB: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, "", VAR_BLOB_TAB, DIM_NUM_BLOB, ++ DIM_NUM_BLOB_VAR, &varid); ++ break; ++ case EX_EDGE_BLOCK: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_ED_BLK, VAR_EBLK_TAB, ++ DIM_NUM_ED_BLK, DIM_NUM_EDG_VAR, &varid); ++ break; ++ case EX_FACE_BLOCK: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_FA_BLK, VAR_FBLK_TAB, ++ DIM_NUM_FA_BLK, DIM_NUM_FAC_VAR, &varid); ++ break; ++ case EX_ELEM_BLOCK: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ID_EL_BLK, VAR_ELEM_TAB, ++ DIM_NUM_EL_BLK, DIM_NUM_ELE_VAR, &varid); ++ break; ++ case EX_NODE_SET: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_NS_IDS, VAR_NSET_TAB, ++ DIM_NUM_NS, DIM_NUM_NSET_VAR, &varid); ++ break; ++ case EX_EDGE_SET: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ES_IDS, VAR_ESET_TAB, ++ DIM_NUM_ES, DIM_NUM_ESET_VAR, &varid); ++ break; ++ case EX_FACE_SET: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_FS_IDS, VAR_FSET_TAB, ++ DIM_NUM_FS, DIM_NUM_FSET_VAR, &varid); ++ break; ++ case EX_SIDE_SET: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_SS_IDS, VAR_SSET_TAB, ++ DIM_NUM_SS, DIM_NUM_SSET_VAR, &varid); ++ break; ++ case EX_ELEM_SET: ++ status = exi_look_up_var(exoid, var_type, var_index, obj_id, VAR_ELS_IDS, VAR_ELSET_TAB, ++ DIM_NUM_ELS, DIM_NUM_ELSET_VAR, &varid); ++ break; ++ default: ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: invalid variable type (%d) specified for file id %d", ++ var_type, exoid); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (status != EX_NOERR) { ++ EX_FUNC_LEAVE(status); ++ } ++ ++ /* store element variable values */ ++ start[0] = beg_time_step - 1; ++ start[1] = 0; ++ ++ if (var_type == EX_GLOBAL) { ++ /* global variables may be written ++ * - all at once (by setting var_index to 1 and num_entries_this_obj to ++ * num_glob, or ++ * - one at a time (by setting var_index to the desired index and ++ * num_entries_this_obj to 1. ++ */ ++ start[1] = var_index - 1; ++ } ++ count[0] = end_time_step - beg_time_step + 1; ++ count[1] = num_entries_this_obj; ++ ++ if (exi_comp_ws(exoid) == 4) { ++ status = nc_put_vara_float(exoid, varid, start, count, var_vals); ++ } ++ else { ++ status = nc_put_vara_double(exoid, varid, start, count, var_vals); ++ } ++ ++ if (status != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to store %s %" PRId64 " variable %d at steps %d to %d in file id %d", ++ ex_name_of_object(var_type), obj_id, var_index, beg_time_step, end_time_step, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ EX_FUNC_LEAVE(EX_NOERR); ++} +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_name.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_name.c +index 579f33cab2..780d53a695 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_name.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_name.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2025 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -38,14 +38,14 @@ + + int ex_put_variable_name(int exoid, ex_entity_type obj_type, int var_num, const char *var_name) + { +- int status; +- int varid; ++ int status = 0; ++ int varid = 0; + char errmsg[MAX_ERR_LENGTH]; +- const char *vname; ++ const char *vname = NULL; + + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -78,7 +78,7 @@ int ex_put_variable_name(int exoid, ex_entity_type obj_type, int var_num, const + } + + /* write EXODUS variable name */ +- status = ex__put_name(exoid, varid, var_num - 1, var_name, obj_type, "variable", __func__); ++ status = exi_put_name(exoid, varid, var_num - 1, var_name, obj_type, "variable", __func__); + + EX_FUNC_LEAVE(status); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_names.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_names.c +index c085241df5..58248c8b99 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_names.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_names.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -43,7 +43,7 @@ static int ex_put_var_names_int(int exoid, char *tname, char *dnumvar, char *vna + "ERROR: failed to locate number of %s variables in file id %d", tname, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } +- return (EX_FATAL); ++ return EX_FATAL; + } + + if ((status = nc_inq_varid(exoid, vnames, varid)) != NC_NOERR) { +@@ -57,9 +57,9 @@ static int ex_put_var_names_int(int exoid, char *tname, char *dnumvar, char *vna + tname, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } +- return (EX_FATAL); ++ return EX_FATAL; + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + /*! +@@ -122,14 +122,14 @@ error = ex_put_variable_names (exoid, EX_NODAL, num_nod_vars, var_names); + + */ + +-int ex_put_variable_names(int exoid, ex_entity_type obj_type, int num_vars, char *var_names[]) ++int ex_put_variable_names(int exoid, ex_entity_type obj_type, int num_vars, char *const var_names[]) + { + int varid = 0; + int status = 0; + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -178,7 +178,7 @@ int ex_put_variable_names(int exoid, ex_entity_type obj_type, int num_vars, char + } + + /* write EXODUS variable names */ +- status = ex__put_names(exoid, varid, num_vars, var_names, obj_type, "variable", __func__); ++ status = exi_put_names(exoid, varid, num_vars, var_names, obj_type, "variable", __func__); + + EX_FUNC_LEAVE(status); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_param.c b/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_param.c +index f899d1c95a..3e48464c3c 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_param.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_put_variable_param.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -7,7 +7,7 @@ + */ + + #include "exodusII.h" // for ex_err, etc +-#include "exodusII_int.h" // for ex__compress_variable, etc ++#include "exodusII_int.h" // for exi_compress_variable, etc + + /*! \cond INTERNAL */ + static int ex_prepare_result_var(int exoid, int num_vars, char *type_name, char *dim_name, +@@ -18,9 +18,6 @@ static int ex_prepare_result_var(int exoid, int num_vars, char *type_name, char + int varid; + int dims[2]; + int dim_str_name; +-#if NC_HAS_HDF5 +- int fill = NC_FILL_CHAR; +-#endif + + char errmsg[MAX_ERR_LENGTH]; + +@@ -37,14 +34,14 @@ static int ex_prepare_result_var(int exoid, int num_vars, char *type_name, char + "ERROR: failed to define number of %s variables in file id %d", type_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } +- return (EX_FATAL); /* exit define mode and return */ ++ return EX_FATAL; /* exit define mode and return */ + } + + /* Now define type_name variable name variable */ + if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &dim_str_name)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get string length in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + dims[0] = dimid; +@@ -60,13 +57,14 @@ static int ex_prepare_result_var(int exoid, int num_vars, char *type_name, char + type_name, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } +- return (EX_FATAL); /* exit define mode and return */ ++ return EX_FATAL; /* exit define mode and return */ + } +- ex__set_compact_storage(exoid, varid); +-#if NC_HAS_HDF5 ++ exi_set_compact_storage(exoid, varid); ++#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) ++ int fill = NC_FILL_CHAR; + nc_def_var_fill(exoid, varid, 0, &fill); + #endif +- return (EX_NOERR); ++ return EX_NOERR; + } + /*! \endcond */ + +@@ -131,7 +129,7 @@ int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars) + int status; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -162,7 +160,7 @@ int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars) + } + + if (obj_type == EX_NODAL) { +- if ((status = nc_inq_dimid(exoid, DIM_NUM_NODES, &num_nod_dim)) != NC_NOERR) { ++ if (nc_inq_dimid(exoid, DIM_NUM_NODES, &num_nod_dim) != NC_NOERR) { + EX_FUNC_LEAVE(EX_NOERR); /* Probably no nodes on database (e.g., badly + load-balanced parallel run) */ + } +@@ -176,7 +174,7 @@ int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars) + } + + /* put file into define mode */ +- if ((status = nc_redef(exoid)) != NC_NOERR) { ++ if ((status = exi_redef(exoid, __func__)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to put file id %d into define mode", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +@@ -184,8 +182,8 @@ int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars) + + /* define dimensions and variables */ + if (obj_type == EX_GLOBAL) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "global", DIM_NUM_GLO_VAR, +- VAR_NAME_GLO_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "global", DIM_NUM_GLO_VAR, VAR_NAME_GLO_VAR) != ++ EX_NOERR) { + goto error_ret; + } + +@@ -204,14 +202,14 @@ int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars) + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + if (num_vars * 8 < 64 * 1024) { +- ex__set_compact_storage(exoid, varid); ++ exi_set_compact_storage(exoid, varid); + } + } + else if (obj_type == EX_NODAL) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "nodal", DIM_NUM_NOD_VAR, +- VAR_NAME_NOD_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "nodal", DIM_NUM_NOD_VAR, VAR_NAME_NOD_VAR) != ++ EX_NOERR) { + goto error_ret; + } + +@@ -226,7 +224,7 @@ int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars) + ex_err_fn(exoid, __func__, errmsg, status); + goto error_ret; /* exit define mode and return */ + } +- ex__compress_variable(exoid, varid, 2); ++ exi_compress_variable(exoid, varid, 2); + } + } + +@@ -236,68 +234,70 @@ int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars) + * (the info that is stored in the obj_type variable truth table) + */ + else if (obj_type == EX_ELEM_BLOCK) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "element", DIM_NUM_ELE_VAR, +- VAR_NAME_ELE_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "element", DIM_NUM_ELE_VAR, VAR_NAME_ELE_VAR) != ++ EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_NODE_SET) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "nodeset", DIM_NUM_NSET_VAR, +- VAR_NAME_NSET_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "nodeset", DIM_NUM_NSET_VAR, VAR_NAME_NSET_VAR) != ++ EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_SIDE_SET) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "sideset", DIM_NUM_SSET_VAR, +- VAR_NAME_SSET_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "sideset", DIM_NUM_SSET_VAR, VAR_NAME_SSET_VAR) != ++ EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_ASSEMBLY) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "assembly", DIM_NUM_ASSEMBLY_VAR, +- VAR_NAME_ASSEMBLY_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "assembly", DIM_NUM_ASSEMBLY_VAR, ++ VAR_NAME_ASSEMBLY_VAR) != EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_BLOB) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "blob", DIM_NUM_BLOB_VAR, +- VAR_NAME_BLOB_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "blob", DIM_NUM_BLOB_VAR, VAR_NAME_BLOB_VAR) != ++ EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_EDGE_BLOCK) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "edge", DIM_NUM_EDG_VAR, +- VAR_NAME_EDG_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "edge", DIM_NUM_EDG_VAR, VAR_NAME_EDG_VAR) != ++ EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_FACE_BLOCK) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "face", DIM_NUM_FAC_VAR, +- VAR_NAME_FAC_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "face", DIM_NUM_FAC_VAR, VAR_NAME_FAC_VAR) != ++ EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_EDGE_SET) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "edgeset", DIM_NUM_ESET_VAR, +- VAR_NAME_ESET_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "edgeset", DIM_NUM_ESET_VAR, VAR_NAME_ESET_VAR) != ++ EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_FACE_SET) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "faceset", DIM_NUM_FSET_VAR, +- VAR_NAME_FSET_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "faceset", DIM_NUM_FSET_VAR, VAR_NAME_FSET_VAR) != ++ EX_NOERR) { + goto error_ret; + } + } + else if (obj_type == EX_ELEM_SET) { +- if ((status = ex_prepare_result_var(exoid, num_vars, "elementset", DIM_NUM_ELSET_VAR, +- VAR_NAME_ELSET_VAR)) != EX_NOERR) { ++ if (ex_prepare_result_var(exoid, num_vars, "elementset", DIM_NUM_ELSET_VAR, ++ VAR_NAME_ELSET_VAR) != EX_NOERR) { + goto error_ret; + } + } + + /* leave define mode */ +- if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) { ++ if ((status = exi_leavedef(exoid, __func__)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode"); ++ ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); + } + +@@ -305,6 +305,6 @@ int ex_put_variable_param(int exoid, ex_entity_type obj_type, int num_vars) + + /* Fatal error: exit definition mode and return */ + error_ret: +- ex__leavedef(exoid, __func__); ++ exi_leavedef(exoid, __func__); + EX_FUNC_LEAVE(EX_FATAL); + } +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_threadsafe.c b/ThirdParty/exodusII/vtkexodusII/src/ex_threadsafe.c +index b334069d1f..f68cea4bf6 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_threadsafe.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_threadsafe.c +@@ -36,7 +36,7 @@ static void ex_key_destructor(void *key_val) + abort(); \ + } while (0) + +-void ex__pthread_first_thread_init(void) ++void exi_pthread_first_thread_init(void) + { + int err = pthread_mutexattr_init(&EX_g.attribute); + if (err != 0) { +@@ -60,7 +60,7 @@ void ex__pthread_first_thread_init(void) + } + } + +-int ex__mutex_lock(EX_mutex_t *mutex) ++int exi_mutex_lock(EX_mutex_t *mutex) + { + int ret_value = pthread_mutex_lock(&mutex->atomic_lock); + if (ret_value != 0) { +@@ -69,7 +69,7 @@ int ex__mutex_lock(EX_mutex_t *mutex) + return ret_value; + } + +-int ex__mutex_unlock(EX_mutex_t *mutex, const char *func, int line) ++int exi_mutex_unlock(EX_mutex_t *mutex, const char *func, int line) + { + int ret_value = pthread_mutex_unlock(&mutex->atomic_lock); + if (ret_value != 0) { +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_update.c b/ThirdParty/exodusII/vtkexodusII/src/ex_update.c +index 88cb746e9d..52b0d91013 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_update.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_update.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2021, 2024 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -20,7 +20,7 @@ + + #include "exodusII.h" // for ex_err, etc + #include "exodusII_int.h" // for EX_FATAL, EX_NOERR +- ++#include + /*! + * \ingroup Utilities + * updates an opened EXODUS file (or EXODUS history file) +@@ -29,16 +29,20 @@ + + int ex_update(int exoid) + { +- char errmsg[MAX_ERR_LENGTH]; +- int status; +- + EX_FUNC_ENTER(); + +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + ++#ifndef NDEBUG ++ struct exi_file_item *file = exi_find_file_item(exoid); ++ assert(!file->in_define_mode && file->persist_define_mode == 0); ++#endif ++ ++ int status; + if ((status = nc_sync(exoid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to update file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); + EX_FUNC_LEAVE(EX_FATAL); +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c b/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c +index 3b477e7841..e7b4ad2735 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c +@@ -1,5 +1,5 @@ + /* +- * Copyright(C) 1999-2020 National Technology & Engineering Solutions ++ * Copyright(C) 1999-2025 National Technology & Engineering Solutions + * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with + * NTESS, the U.S. Government retains certain rights in this software. + * +@@ -11,8 +11,8 @@ + * + *****************************************************************************/ + +-#if defined(DEBUG_QSORT) +-#endif ++#define _GNU_SOURCE ++#include + + #include + #include +@@ -20,25 +20,25 @@ + #include "exodusII.h" + #include "exodusII_int.h" + +-struct ex__obj_stats *exoII_eb = 0; +-struct ex__obj_stats *exoII_ed = 0; +-struct ex__obj_stats *exoII_fa = 0; +-struct ex__obj_stats *exoII_ns = 0; +-struct ex__obj_stats *exoII_es = 0; +-struct ex__obj_stats *exoII_fs = 0; +-struct ex__obj_stats *exoII_ss = 0; +-struct ex__obj_stats *exoII_els = 0; +-struct ex__obj_stats *exoII_em = 0; +-struct ex__obj_stats *exoII_edm = 0; +-struct ex__obj_stats *exoII_fam = 0; +-struct ex__obj_stats *exoII_nm = 0; +-struct ex__obj_stats *exoII_ass = 0; ++struct exi_obj_stats *exoII_eb = NULL; ++struct exi_obj_stats *exoII_ed = NULL; ++struct exi_obj_stats *exoII_fa = NULL; ++struct exi_obj_stats *exoII_ns = NULL; ++struct exi_obj_stats *exoII_es = NULL; ++struct exi_obj_stats *exoII_fs = NULL; ++struct exi_obj_stats *exoII_ss = NULL; ++struct exi_obj_stats *exoII_els = NULL; ++struct exi_obj_stats *exoII_em = NULL; ++struct exi_obj_stats *exoII_edm = NULL; ++struct exi_obj_stats *exoII_fam = NULL; ++struct exi_obj_stats *exoII_nm = NULL; ++struct exi_obj_stats *exoII_ass = NULL; + + /***************************************************************************** + * + * utility routines for string conversions +- * ex__catstr - concatenate string/number (where number is converted to ASCII) +- * ex__catstr2 - concatenate string1/number1/string2/number2 " ++ * exi_catstr - concatenate string/number (where number is converted to ASCII) ++ * exi_catstr2 - concatenate string1/number1/string2/number2 " + * + * NOTE: these routines reuse the same storage over and over to build + * concatenated strings, because the strings are just passed to netCDF +@@ -50,15 +50,22 @@ struct ex__obj_stats *exoII_ass = 0; + static char ret_string[10 * (MAX_VAR_NAME_LENGTH + 1)]; + static char *cur_string = &ret_string[0]; + +-#ifndef _MSC_VER ++#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || \ ++ defined(__MINGW32__) || defined(_WIN64) || defined(__MINGW64__) ++#define WINDOWS__ 1 ++#endif ++ ++#ifndef WINDOWS__ + #if NC_HAS_HDF5 +-extern int H5get_libversion(unsigned *, unsigned *, unsigned *); ++extern int NC4_hdf5get_libversion(unsigned *, unsigned *, unsigned *); + #endif + #endif + ++#if 0 + #if NC_HAS_PNETCDF + extern char *ncmpi_inq_libvers(); + #endif ++#endif + + /*! + \ingroup Utilities +@@ -67,89 +74,107 @@ extern char *ncmpi_inq_libvers(); + const char *ex_config(void) + { + static char buffer[2048]; +- int j = +- sprintf(buffer, "\tExodus Version %s, Released %s\n", EXODUS_VERSION, EXODUS_RELEASE_DATE); ++ int buffer_size = sizeof(buffer) / sizeof(buffer[0]); ++ ++ int j = snprintf(buffer, buffer_size, "\tExodus Version %s, Released %s\n", EXODUS_VERSION, ++ EXODUS_RELEASE_DATE); + #if defined(PARALLEL_AWARE_EXODUS) +- j += sprintf(buffer + j, "\t\tParallel enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tParallel enabled\n"); + #else +- j += sprintf(buffer + j, "\t\tParallel NOT enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tParallel NOT enabled\n"); + #endif + #if defined(EXODUS_THREADSAFE) +- j += sprintf(buffer + j, "\t\tThread Safe enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tThread Safe enabled\n"); + #else +- j += sprintf(buffer + j, "\t\tThread Safe NOT enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tThread Safe NOT enabled\n"); + #endif + #if defined(SEACAS_HIDE_DEPRECATED_CODE) +- j += sprintf(buffer + j, "\t\tDeprecated Functions NOT built\n\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tDeprecated Functions NOT built\n\n"); + #else +- j += sprintf(buffer + j, "\t\tDeprecated Functions available\n\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tDeprecated Functions available\n\n"); + #endif + #if defined(NC_VERSION) +- j += sprintf(buffer + j, "\tNetCDF Version %s\n", NC_VERSION); ++ j += snprintf(buffer + j, buffer_size - j, "\tNetCDF Version %s\n", NC_VERSION); + #else +- j += sprintf(buffer + j, "\tNetCDF Version < 4.3.3\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\tNetCDF Version < 4.3.3\n"); + #endif + #if NC_HAS_CDF5 +- j += sprintf(buffer + j, "\t\tCDF5 enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tCDF5 enabled\n"); + #endif +-#ifndef _MSC_VER ++#ifndef WINDOWS__ + #if NC_HAS_HDF5 + { + unsigned major, minor, release; +- H5get_libversion(&major, &minor, &release); +- j += sprintf(buffer + j, "\t\tHDF5 enabled (%u.%u.%u)\n", major, minor, release); ++ NC4_hdf5get_libversion(&major, &minor, &release); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tHDF5 enabled (%u.%u.%u)\n", major, minor, ++ release); + } +- j += sprintf(buffer + j, "\t\tZlib Compression (read/write) enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tZlib Compression (read/write) enabled\n"); + #if NC_HAS_SZIP_WRITE == 1 +- j += sprintf(buffer + j, "\t\tSZip Compression (read/write) enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tSZip Compression (read/write) enabled\n"); + #else +- j += sprintf(buffer + j, "\t\tSZip Compression (read/write) NOT enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tSZip Compression (read/write) NOT enabled\n"); ++#endif ++#if NC_HAS_ZSTD == 1 ++ j += snprintf(buffer + j, buffer_size - j, "\t\tZstd Compression enabled\n"); ++#else ++ j += snprintf(buffer + j, buffer_size - j, "\t\tZstd Compression NOT enabled\n"); ++#endif ++#if NC_HAS_QUANTIZE == 1 ++ j += snprintf(buffer + j, buffer_size - j, "\t\tQuantization support enabled\n"); ++#else ++ j += snprintf(buffer + j, buffer_size - j, "\t\tQuantization support NOT enabled\n"); + #endif + #endif + #endif + #if defined(PARALLEL_AWARE_EXODUS) + #if NC_HAS_PARALLEL +- j += sprintf(buffer + j, "\t\tParallel IO enabled via HDF5 and/or PnetCDF\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tParallel IO enabled via HDF5 and/or PnetCDF\n"); + #else +- j += sprintf(buffer + j, ++ j += ++ snprintf(buffer + j, buffer_size - j, + "\t\tParallel IO *NOT* enabled via HDF5 and/or PnetCDF (PROBABLY A BUILD ERROR!)\n"); + #endif + #if NC_HAS_PARALLEL4 +- j += sprintf(buffer + j, "\t\tParallel IO enabled via HDF5\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tParallel IO enabled via HDF5\n"); + #else +- j += sprintf(buffer + j, "\t\tParallel IO *NOT* enabled via HDF5\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tParallel IO *NOT* enabled via HDF5\n"); + #endif + #if NC_HAS_PAR_FILTERS +- j += sprintf(buffer + j, "\t\tParallel IO supports filters\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tParallel IO supports filters\n"); + #endif + #if NC_HAS_PNETCDF + { ++#if 0 + char *libver = ncmpi_inq_libvers(); +- j += sprintf(buffer + j, "\t\tParallel IO enabled via PnetCDF (%s)\n", libver); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tParallel IO enabled via PnetCDF (%s)\n", libver); ++#else ++ j += snprintf(buffer + j, buffer_size - j, "\t\tParallel IO enabled via PnetCDF.\n"); ++#endif + } + #else +- j += sprintf(buffer + j, "\t\tParallel IO *NOT* enabled via PnetCDF\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tParallel IO *NOT* enabled via PnetCDF\n"); + #endif + #endif /* PARALLEL_AWARE_EXODUS */ + + #if NC_HAS_ERANGE_FILL +- j += sprintf(buffer + j, "\t\tERANGE_FILL support\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tERANGE_FILL support\n"); + #endif + #if NC_RELAX_COORD_BOUND +- j += sprintf(buffer + j, "\t\tRELAX_COORD_BOUND defined\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tRELAX_COORD_BOUND defined\n"); + #endif + #if defined(NC_COMPACT) +- j += sprintf(buffer + j, "\t\tNC_COMPACT defined\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tNC_COMPACT defined\n"); + #endif + #if defined(NC_HAVE_META_H) +- j += sprintf(buffer + j, "\t\tNC_HAVE_META_H defined\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tNC_HAVE_META_H defined\n"); + #endif + #if NC_HAS_NC2 +- j += sprintf(buffer + j, "\t\tAPI Version 2 support enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tAPI Version 2 support enabled\n"); + #else +- j += sprintf(buffer + j, "\t\tAPI Version 2 support NOT enabled\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\t\tAPI Version 2 support NOT enabled\n"); + #endif +- j += sprintf(buffer + j, "\n"); ++ j += snprintf(buffer + j, buffer_size - j, "\n"); + + assert(j < 2048); + return buffer; +@@ -160,7 +185,7 @@ void ex_print_config(void) { fprintf(stderr, "%s\n", ex_config()); } + \ingroup Utilities + \undoc + */ +-int ex__check_file_type(const char *path, int *type) ++int exi_check_file_type(const char *path, int *type) + { + /* Based on (stolen from?) NC_check_file_type from netcdf sources. + +@@ -173,7 +198,7 @@ int ex__check_file_type(const char *path, int *type) + + #define MAGIC_NUMBER_LEN 4 + +- char magic[MAGIC_NUMBER_LEN+1]; ++ char magic[MAGIC_NUMBER_LEN + 1]; + EX_FUNC_ENTER(); + + *type = 0; +@@ -181,22 +206,21 @@ int ex__check_file_type(const char *path, int *type) + /* Get the 4-byte magic from the beginning of the file. */ + { + FILE *fp; +- int i; +- + if (!(fp = fopen(path, "r"))) { + char errmsg[MAX_ERR_LENGTH]; +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Could not open file '%s', error = %s.", path, ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Could not open file '%s',\n\t\terror = %s.", path, + strerror(errno)); + ex_err(__func__, errmsg, EX_WRONGFILETYPE); + EX_FUNC_LEAVE(EX_FATAL); + } +- i = fread(magic, MAGIC_NUMBER_LEN, 1, fp); ++ int i = fread(magic, 1, MAGIC_NUMBER_LEN, fp); + magic[MAGIC_NUMBER_LEN] = '\0'; + fclose(fp); +- if (i != 1) { ++ if (i != MAGIC_NUMBER_LEN) { + char errmsg[MAX_ERR_LENGTH]; +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: Could not read magic data from file '%s', err = %s.", +- path, strerror(errno)); ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Could not read magic data from file '%s',\n\t\terror = %s.", path, ++ strerror(errno)); + ex_err(__func__, errmsg, EX_WRONGFILETYPE); + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -238,7 +262,7 @@ int ex_set_max_name_length(int exoid, int length) + char errmsg[MAX_ERR_LENGTH]; + + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + if (length <= 0) { +@@ -246,9 +270,9 @@ int ex_set_max_name_length(int exoid, int length) + ex_err_fn(exoid, __func__, errmsg, NC_EMAXNAME); + EX_FUNC_LEAVE(EX_FATAL); + } +- if (length > NC_MAX_NAME) { ++ if (length > EX_MAX_NAME) { + snprintf(errmsg, MAX_ERR_LENGTH, +- "ERROR: Max name length (%d) exceeds netcdf max name size (%d).", length, NC_MAX_NAME); ++ "ERROR: Max name length (%d) exceeds netcdf max name size (%d).", length, EX_MAX_NAME); + ex_err_fn(exoid, __func__, errmsg, NC_EMAXNAME); + EX_FUNC_LEAVE(EX_FATAL); + } +@@ -262,18 +286,17 @@ int ex_set_max_name_length(int exoid, int length) + \ingroup Utilities + \undoc + */ +-void ex__update_max_name_length(int exoid, int length) ++void exi_update_max_name_length(int exoid, int length) + { +- int status; +- int db_length = 0; +- int rootid = exoid & EX_FILE_ID_MASK; +- + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_VOID(); + } + + /* Get current value of the maximum_name_length attribute... */ ++ int status; ++ int db_length = 0; ++ int rootid = exoid & EX_FILE_ID_MASK; + if ((status = nc_get_att_int(rootid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &db_length)) != NC_NOERR) { + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, +@@ -301,27 +324,19 @@ void ex__update_max_name_length(int exoid, int length) + \internal + \undoc + */ +-int ex__put_names(int exoid, int varid, size_t num_names, char **names, ex_entity_type obj_type, +- const char *subtype, const char *routine) ++int exi_put_names(int exoid, int varid, size_t num_names, char *const *names, ++ ex_entity_type obj_type, const char *subtype, const char *routine) + { +- size_t i; +- int status; +- char errmsg[MAX_ERR_LENGTH]; +- int max_name_len = 0; +- size_t name_length; +- size_t length; +- char * int_names = NULL; +- size_t idx = 0; +- int found_name = 0; +- + EX_FUNC_ENTER(); +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + /* inquire previously defined dimensions */ +- name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH) + 1; ++ size_t name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH) + 1; + ++ char *int_names = NULL; + if (!(int_names = calloc(num_names * name_length, 1))) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate memory for internal int_names " + "array in file id %d", +@@ -330,12 +345,15 @@ int ex__put_names(int exoid, int varid, size_t num_names, char **names, ex_entit + EX_FUNC_LEAVE(EX_FATAL); + } + +- for (i = 0; i < num_names; i++) { ++ size_t idx = 0; ++ int max_name_len = 0; ++ int found_name = 0; ++ for (size_t i = 0; i < num_names; i++) { + if (names != NULL && *names != NULL && *names[i] != '\0') { + found_name = 1; + ex_copy_string(&int_names[idx], names[i], name_length); +- length = strlen(names[i]) + 1; +- if (length > name_length) { ++ size_t length = strlen(names[i]) + 1; ++ if (length > (size_t)name_length) { + fprintf(stderr, + "Warning: The %s %s name '%s' is too long.\n\tIt will " + "be truncated from %d to %d characters. [Called from %s]\n", +@@ -344,15 +362,17 @@ int ex__put_names(int exoid, int varid, size_t num_names, char **names, ex_entit + length = name_length; + } + +- if (length > max_name_len) { ++ if (length > (size_t)max_name_len) { + max_name_len = length; + } + } + idx += name_length; + } + ++ int status; + if ((status = nc_put_var_text(exoid, varid, int_names)) != NC_NOERR) { + free(int_names); ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to store %s names in file id %d", + ex_name_of_object(obj_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +@@ -362,7 +382,7 @@ int ex__put_names(int exoid, int varid, size_t num_names, char **names, ex_entit + if (found_name) { + + /* Update the maximum_name_length attribute on the file. */ +- ex__update_max_name_length(exoid, max_name_len - 1); ++ exi_update_max_name_length(exoid, max_name_len - 1); + } + free(int_names); + +@@ -373,25 +393,21 @@ int ex__put_names(int exoid, int varid, size_t num_names, char **names, ex_entit + \internal + \undoc + */ +-int ex__put_name(int exoid, int varid, size_t index, const char *name, ex_entity_type obj_type, ++int exi_put_name(int exoid, int varid, size_t index, const char *name, ex_entity_type obj_type, + const char *subtype, const char *routine) + { +- int status; +- size_t start[2], count[2]; +- char errmsg[MAX_ERR_LENGTH]; +- size_t name_length; +- +- if (ex__check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { + EX_FUNC_LEAVE(EX_FATAL); + } + + /* inquire previously defined dimensions */ +- name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH) + 1; ++ size_t name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH) + 1; + + if (name != NULL && *name != '\0') { +- int too_long = 0; +- start[0] = index; +- start[1] = 0; ++ size_t start[2], count[2]; ++ int too_long = 0; ++ start[0] = index; ++ start[1] = 0; + + count[0] = 1; + count[1] = strlen(name) + 1; +@@ -406,11 +422,13 @@ int ex__put_name(int exoid, int varid, size_t index, const char *name, ex_entity + too_long = 1; + } + ++ int status; + if ((status = nc_put_vara_text(exoid, varid, start, count, name)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to store %s name in file id %d", + ex_name_of_object(obj_type), exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* Add the trailing null if the variable name was too long */ +@@ -420,21 +438,18 @@ int ex__put_name(int exoid, int varid, size_t index, const char *name, ex_entity + } + + /* Update the maximum_name_length attribute on the file. */ +- ex__update_max_name_length(exoid, count[1] - 1); ++ exi_update_max_name_length(exoid, count[1] - 1); + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + /*! + \internal + \undoc + */ +-int ex__get_names(int exoid, int varid, size_t num_names, char **names, ex_entity_type obj_type, ++int exi_get_names(int exoid, int varid, size_t num_names, char **names, ex_entity_type obj_type, + const char *routine) + { +- size_t i; +- int status; +- + /* Query size of names on file + * Use the smaller of the size on file or user-specified length + */ +@@ -442,71 +457,65 @@ int ex__get_names(int exoid, int varid, size_t num_names, char **names, ex_entit + int api_name_size = ex_inquire_int(exoid, EX_INQ_MAX_READ_NAME_LENGTH); + int name_size = db_name_size < api_name_size ? db_name_size : api_name_size; + +- for (i = 0; i < num_names; i++) { +- status = ex__get_name(exoid, varid, i, names[i], name_size, obj_type, routine); ++ for (size_t i = 0; i < num_names; i++) { ++ int status = exi_get_name(exoid, varid, i, names[i], name_size, obj_type, routine); + if (status != NC_NOERR) { +- return (status); ++ return status; + } + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + /*! + \internal + \undoc + */ +-int ex__get_name(int exoid, int varid, size_t index, char *name, int name_size, ++int exi_get_name(int exoid, int varid, size_t index, char *name, int name_size, + ex_entity_type obj_type, const char *routine) + { +- size_t start[2], count[2]; +- int status; +- char errmsg[MAX_ERR_LENGTH]; +- int api_name_size = 0; +- +- api_name_size = ex_inquire_int(exoid, EX_INQ_MAX_READ_NAME_LENGTH); + + /* read the name */ ++ size_t start[2], count[2]; + start[0] = index; + count[0] = 1; + start[1] = 0; + count[1] = name_size + 1; + +- status = nc_get_vara_text(exoid, varid, start, count, name); ++ int status = nc_get_vara_text(exoid, varid, start, count, name); + if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get %s name at index %d from file id %d [Called from %s]", + ex_name_of_object(obj_type), (int)index, exoid, routine); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + ++ int api_name_size = ex_inquire_int(exoid, EX_INQ_MAX_READ_NAME_LENGTH); + name[api_name_size] = '\0'; + +- ex__trim(name); +- return (EX_NOERR); ++ exi_trim(name); ++ return EX_NOERR; + } + + /*! + \internal + \undoc + */ +-void ex__trim(char *name) ++void exi_trim(char *name) + { + /* Thread-safe, reentrant */ + /* Trim trailing spaces... */ +- size_t size; +- char * end; +- + if (name == NULL) { + return; + } + +- size = strlen(name); ++ size_t size = strlen(name); + if (size == 0) { + return; + } + +- end = name + size - 1; ++ char *end = name + size - 1; + while (end >= name && isspace(*end)) { + end--; + } +@@ -514,37 +523,38 @@ void ex__trim(char *name) + *(end + 1) = '\0'; + } + +-/** ex__catstr - concatenate string/number (where number is converted to ASCII) ++/** exi_catstr - concatenate string/number (where number is converted to ASCII) + */ + /*! + \internal + \undoc + */ +-char *ex__catstr(const char *string, int num) ++char *exi_catstr(const char *string, int num) + { + /* Only called from an already locked function */ + char *tmp_string = cur_string; +- cur_string += sprintf(cur_string, "%s%d", string, num) + 1; ++ cur_string += snprintf(cur_string, MAX_VAR_NAME_LENGTH + 1, "%s%d", string, num) + 1; + if (cur_string - ret_string > 9 * (MAX_VAR_NAME_LENGTH + 1)) { + cur_string = ret_string; + } +- return (tmp_string); ++ return tmp_string; + } + +-/** ex__catstr2 - concatenate string1num1string2num2 */ ++/** exi_catstr2 - concatenate string1num1string2num2 */ + /*! + \internal + \undoc + */ +-char *ex__catstr2(const char *string1, int num1, const char *string2, int num2) ++char *exi_catstr2(const char *string1, int num1, const char *string2, int num2) + { + /* Only called from an already locked function */ + char *tmp_string = cur_string; +- cur_string += sprintf(cur_string, "%s%d%s%d", string1, num1, string2, num2) + 1; ++ cur_string += ++ snprintf(cur_string, MAX_VAR_NAME_LENGTH + 1, "%s%d%s%d", string1, num1, string2, num2) + 1; + if (cur_string - ret_string > 9 * (MAX_VAR_NAME_LENGTH + 1)) { + cur_string = ret_string; + } +- return (tmp_string); ++ return tmp_string; + } + + /*! +@@ -623,7 +633,7 @@ ex_entity_type ex_var_type_to_ex_entity_type(char var_type) + \internal + \undoc + */ +-char *ex__dim_num_objects(ex_entity_type obj_type) ++char *exi_dim_num_objects(ex_entity_type obj_type) + { + switch (obj_type) { + case EX_NODAL: return DIM_NUM_NODES; +@@ -646,7 +656,7 @@ char *ex__dim_num_objects(ex_entity_type obj_type) + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: object type %d not supported in call to %s", obj_type, + __func__); + ex_err(__func__, errmsg, EX_BADPARAM); +- return (NULL); ++ return NULL; + } + } + } +@@ -655,7 +665,7 @@ char *ex__dim_num_objects(ex_entity_type obj_type) + \internal + \undoc + */ +-char *ex__dim_num_entries_in_object(ex_entity_type obj_type, int idx) ++char *exi_dim_num_entries_in_object(ex_entity_type obj_type, int idx) + { + switch (obj_type) { + case EX_NODAL: return DIM_NUM_NODES; +@@ -683,7 +693,7 @@ char *ex__dim_num_entries_in_object(ex_entity_type obj_type, int idx) + \internal + \undoc + */ +-char *ex__name_var_of_object(ex_entity_type obj_type, int i, int j) ++char *exi_name_var_of_object(ex_entity_type obj_type, int i, int j) + { + switch (obj_type) { + case EX_ASSEMBLY: return VAR_ASSEMBLY_VAR(i, j); +@@ -701,7 +711,7 @@ char *ex__name_var_of_object(ex_entity_type obj_type, int i, int j) + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: object type %d not supported in call to %s", obj_type, + __func__); + ex_err(__func__, errmsg, EX_BADPARAM); +- return (NULL); ++ return NULL; + } + } + } +@@ -710,7 +720,7 @@ char *ex__name_var_of_object(ex_entity_type obj_type, int i, int j) + \internal + \undoc + */ +-char *ex__name_red_var_of_object(ex_entity_type obj_type, int id) ++char *exi_name_red_var_of_object(ex_entity_type obj_type, int id) + { + switch (obj_type) { + case EX_ASSEMBLY: return VAR_ASSEMBLY_RED_VAR(id); +@@ -728,7 +738,7 @@ char *ex__name_red_var_of_object(ex_entity_type obj_type, int id) + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: object type %d not supported in call to %s", obj_type, + __func__); + ex_err(__func__, errmsg, EX_BADPARAM); +- return (NULL); ++ return NULL; + } + } + } +@@ -737,7 +747,7 @@ char *ex__name_red_var_of_object(ex_entity_type obj_type, int id) + \internal + \undoc + */ +-char *ex__name_of_map(ex_entity_type map_type, int map_index) ++char *exi_name_of_map(ex_entity_type map_type, int map_index) + { + switch (map_type) { + case EX_NODE_MAP: return VAR_NODE_MAP(map_index); +@@ -750,7 +760,7 @@ char *ex__name_of_map(ex_entity_type map_type, int map_index) + + /***************************************************************************** + * +-* ex__id_lkup - look up id ++* exi_id_lkup - look up id + * + * entry conditions - + * input parameters: +@@ -770,105 +780,104 @@ char *ex__name_of_map(ex_entity_type map_type, int map_index) + \internal + \undoc + */ +-int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) ++int exi_id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + { +- char * id_table; +- char * id_dim; +- char * stat_table; ++ char *id_table = NULL; ++ char *id_dim = NULL; ++ char *stat_table = NULL; + int varid, dimid; +- size_t dim_len, j; ++ size_t dim_len; + int64_t i; + int64_t *id_vals = NULL; +- int * stat_vals = NULL; ++ int *stat_vals = NULL; + +- static bool filled = false; + static bool sequential = false; +- struct ex__obj_stats *tmp_stats; ++ struct exi_obj_stats *tmp_stats; + int status; + char errmsg[MAX_ERR_LENGTH]; + + switch (id_type) { +- case EX_NODAL: return (0); +- case EX_GLOBAL: return (0); ++ case EX_NODAL: return 0; ++ case EX_GLOBAL: return 0; + case EX_ASSEMBLY: return num; + case EX_BLOB: return num; + case EX_ELEM_BLOCK: + id_table = VAR_ID_EL_BLK; /* id array name */ + id_dim = DIM_NUM_EL_BLK; /* id array dimension name*/ + stat_table = VAR_STAT_EL_BLK; /* id status array name */ +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_eb); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_eb); + break; + case EX_NODE_SET: + id_table = VAR_NS_IDS; + id_dim = DIM_NUM_NS; + stat_table = VAR_NS_STAT; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_ns); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_ns); + break; + case EX_SIDE_SET: + id_table = VAR_SS_IDS; + id_dim = DIM_NUM_SS; + stat_table = VAR_SS_STAT; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_ss); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_ss); + break; + case EX_EDGE_BLOCK: + id_table = VAR_ID_ED_BLK; + id_dim = DIM_NUM_ED_BLK; + stat_table = VAR_STAT_ED_BLK; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_ed); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_ed); + break; + case EX_FACE_BLOCK: + id_table = VAR_ID_FA_BLK; + id_dim = DIM_NUM_FA_BLK; + stat_table = VAR_STAT_FA_BLK; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_fa); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_fa); + break; + case EX_EDGE_SET: + id_table = VAR_ES_IDS; + id_dim = DIM_NUM_ES; + stat_table = VAR_ES_STAT; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_es); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_es); + break; + case EX_FACE_SET: + id_table = VAR_FS_IDS; + id_dim = DIM_NUM_FS; + stat_table = VAR_FS_STAT; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_fs); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_fs); + break; + case EX_ELEM_SET: + id_table = VAR_ELS_IDS; + id_dim = DIM_NUM_ELS; + stat_table = VAR_ELS_STAT; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_els); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_els); + break; + case EX_NODE_MAP: + id_table = VAR_NM_PROP(1); + id_dim = DIM_NUM_NM; + stat_table = ""; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_nm); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_nm); + break; + case EX_EDGE_MAP: + id_table = VAR_EDM_PROP(1); + id_dim = DIM_NUM_EDM; + stat_table = ""; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_edm); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_edm); + break; + case EX_FACE_MAP: + id_table = VAR_FAM_PROP(1); + id_dim = DIM_NUM_FAM; + stat_table = ""; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_fam); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_fam); + break; + case EX_ELEM_MAP: + id_table = VAR_EM_PROP(1); + id_dim = DIM_NUM_EM; + stat_table = ""; +- tmp_stats = ex__get_stat_ptr(exoid, &exoII_em); ++ tmp_stats = exi_get_stat_ptr(exoid, &exoII_em); + break; + default: + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unsupported id array type %d for file id %d", id_type, + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if ((tmp_stats->id_vals == NULL) || (!(tmp_stats->valid_ids))) { +@@ -882,7 +891,7 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate id array dimension in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* Next get value of dimension */ +@@ -890,7 +899,7 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s array length in file id %d", + id_table, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* get variable id of id array */ +@@ -898,7 +907,7 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate %s array in file id %d", id_table, + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* allocate space for id array and initialize to zero to ensure +@@ -907,7 +916,7 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate memory for %s array for file id %d", id_table, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (EX_FATAL); ++ return EX_FATAL; + } + + if (ex_int64_status(exoid) & EX_IDS_INT64_API) { +@@ -922,12 +931,12 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); + free(id_vals); +- return (EX_FATAL); ++ return EX_FATAL; + } + status = nc_get_var_int(exoid, varid, id_vals_int); + if (status == NC_NOERR) { +- for (i = 0; i < dim_len; i++) { +- id_vals[i] = (int64_t)id_vals_int[i]; ++ for (size_t iii = 0; iii < dim_len; iii++) { ++ id_vals[iii] = (int64_t)id_vals_int[iii]; + } + } + free(id_vals_int); +@@ -938,17 +947,17 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + exoid); + ex_err_fn(exoid, __func__, errmsg, status); + free(id_vals); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* check if values in stored arrays are filled with non-zeroes */ +- filled = true; +- sequential = true; +- for (i = 0; i < dim_len; i++) { +- if (id_vals[i] != i + 1) { ++ bool filled = true; ++ sequential = true; ++ for (size_t iii = 0; iii < dim_len; iii++) { ++ if (id_vals[iii] != (int64_t)iii + 1) { + sequential = false; + } +- if (id_vals[i] == EX_INVALID_ID || id_vals[i] == NC_FILL_INT) { ++ if (id_vals[iii] == EX_INVALID_ID || id_vals[iii] == NC_FILL_INT) { + filled = false; + sequential = false; + break; /* id array hasn't been completely filled with valid ids yet */ +@@ -968,19 +977,19 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + sequential = tmp_stats->sequential; + } + +- if (sequential && num < dim_len) { ++ if (sequential && (size_t)num < dim_len) { + i = num - 1; + } + else { + /* Do a linear search through the id array to find the array value + corresponding to the passed index number */ +- for (i = 0; i < dim_len; i++) { ++ for (i = 0; i < (int64_t)dim_len; i++) { + if (id_vals[i] == num) { + break; /* found the id requested */ + } + } + } +- if (i >= dim_len) /* failed to find id number */ ++ if (i >= (int64_t)dim_len) /* failed to find id number */ + { + if (!(tmp_stats->valid_ids)) { + free(id_vals); +@@ -988,7 +997,7 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to locate id %" PRId64 " for file id %d", num, + exoid); + ex_set_err(__func__, errmsg, EX_LOOKUPFAIL); +- return (-EX_LOOKUPFAIL); /*if we got here, the id array value doesn't exist */ ++ return -EX_LOOKUPFAIL; /*if we got here, the id array value doesn't exist */ + } + + /* Now check status array to see if object is null */ +@@ -1000,7 +1009,7 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to allocate memory for %s array for file id %d", id_table, exoid); + ex_err_fn(exoid, __func__, errmsg, EX_MEMFAIL); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* first time through or status arrays haven't been filled yet */ +@@ -1015,11 +1024,11 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to get %s array from file id %d", + stat_table, exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + else { +- for (j = 0; j < dim_len; j++) { ++ for (size_t j = 0; j < dim_len; j++) { + stat_vals[j] = 1; + } + } +@@ -1043,31 +1052,32 @@ int ex__id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num) + if (!(tmp_stats->valid_stat)) { + free(stat_vals); + } +- return (-((int)i + 1)); /* return index into id array (1-based) */ ++ return -((int)i + 1); /* return index into id array (1-based) */ + } + if (!(tmp_stats->valid_stat)) { + free(stat_vals); + } +- return (i + 1); /* return index into id array (1-based) */ ++ return i + 1; /* return index into id array (1-based) */ + } + + /****************************************************************************** + * +- * ex__get_stat_ptr - returns a pointer to a structure of object ids ++ * exi_get_stat_ptr - returns a pointer to a structure of object ids + * + *****************************************************************************/ + + /*! this routine returns a pointer to a structure containing the ids of + * element blocks, node sets, or side sets according to exoid; if there +- * is not a structure that matches the exoid, one is created ++ * is not a structure that matches the exoid, one is created. ++ * ++ * NOTE: If this file contains `groups` or `change sets`, then each ++ * group will have its own stat_ptr set of lists... + * \internal + */ + +-struct ex__obj_stats *ex__get_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr) ++struct exi_obj_stats *exi_get_stat_ptr(int exoid, struct exi_obj_stats **obj_ptr) + { +- struct ex__obj_stats *tmp_ptr; +- +- tmp_ptr = *obj_ptr; ++ struct exi_obj_stats *tmp_ptr = *obj_ptr; + + while (tmp_ptr) { + if ((tmp_ptr)->exoid == exoid) { +@@ -1077,7 +1087,7 @@ struct ex__obj_stats *ex__get_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr + } + + if (!tmp_ptr) { /* exoid not found */ +- tmp_ptr = (struct ex__obj_stats *)calloc(1, sizeof(struct ex__obj_stats)); ++ tmp_ptr = (struct exi_obj_stats *)calloc(1, sizeof(struct exi_obj_stats)); + tmp_ptr->exoid = exoid; + tmp_ptr->next = *obj_ptr; + tmp_ptr->id_vals = 0; +@@ -1092,7 +1102,7 @@ struct ex__obj_stats *ex__get_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr + + /****************************************************************************** + * +- * ex__rm_stat_ptr - removes a pointer to a structure of object ids ++ * exi_rm_stat_ptr - removes a pointer to a structure of object ids + * + *****************************************************************************/ + +@@ -1100,63 +1110,69 @@ struct ex__obj_stats *ex__get_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr + * element blocks, node sets, or side sets according to exoid; this + * is necessary to clean up because netCDF reuses file ids; should be + * called from ex_close ++ * ++ * NOTE: If this file contains `groups` or `change sets`, then each ++ * group will have its own stat_ptr set of lists. However, ++ * this routine is called from ex_close which only closes the ++ * root id, so we need to iterate the entire list to see if there ++ * are any subgroups of the root group. + * \internal + */ + +-void ex__rm_stat_ptr(int exoid, struct ex__obj_stats **obj_ptr) ++void exi_rm_stat_ptr(int exoid, struct exi_obj_stats **obj_ptr) + { +- struct ex__obj_stats *last_head_list_ptr, *tmp_ptr; +- +- tmp_ptr = *obj_ptr; +- last_head_list_ptr = *obj_ptr; /* save last head pointer */ +- +- while (tmp_ptr) /* Walk linked list of file ids/vals */ +- { +- if (exoid == tmp_ptr->exoid) /* linear search for exodus file id */ +- { +- if (tmp_ptr == *obj_ptr) { /* Are we at the head of the list? */ +- *obj_ptr = (*obj_ptr)->next; /* yes, reset ptr to head of list */ ++ struct exi_obj_stats *tmp_ptr = *obj_ptr; ++ struct exi_obj_stats *last_head_list_ptr = *obj_ptr; /* save last head pointer */ ++ ++ int root_id = exoid & EX_FILE_ID_MASK; ++ while (tmp_ptr) { /* Walk linked list of file ids/vals */ ++ if (root_id == (tmp_ptr->exoid & EX_FILE_ID_MASK)) { /* linear search for exodus file id */ ++ if (tmp_ptr == *obj_ptr) { /* Are we at the head of the list? */ ++ *obj_ptr = (*obj_ptr)->next; /* yes, reset ptr to head of list */ + } + else { /* no, remove this record from chain*/ + last_head_list_ptr->next = tmp_ptr->next; + } +- free(tmp_ptr->id_vals); /* free up memory */ +- free(tmp_ptr->stat_vals); +- free(tmp_ptr); +- break; /* Quit if found */ ++ struct exi_obj_stats *tmp = tmp_ptr; ++ tmp_ptr = tmp_ptr->next; ++ free(tmp->id_vals); /* free up memory */ ++ free(tmp->stat_vals); ++ free(tmp); ++ } ++ else { ++ last_head_list_ptr = tmp_ptr; /* save last head pointer */ ++ tmp_ptr = tmp_ptr->next; /* Loop back if not */ + } +- last_head_list_ptr = tmp_ptr; /* save last head pointer */ +- tmp_ptr = tmp_ptr->next; /* Loop back if not */ + } + } + + /* structures to hold number of blocks of that type for each file id */ +-static struct ex__list_item *ed_ctr_list = 0; /* edge blocks */ +-static struct ex__list_item *fa_ctr_list = 0; /* face blocks */ +-static struct ex__list_item *eb_ctr_list = 0; /* element blocks */ ++static struct exi_list_item *ed_ctr_list = NULL; /* edge blocks */ ++static struct exi_list_item *fa_ctr_list = NULL; /* face blocks */ ++static struct exi_list_item *eb_ctr_list = NULL; /* element blocks */ + + /* structures to hold number of sets of that type for each file id */ +-static struct ex__list_item *ns_ctr_list = 0; /* node sets */ +-static struct ex__list_item *es_ctr_list = 0; /* edge sets */ +-static struct ex__list_item *fs_ctr_list = 0; /* face sets */ +-static struct ex__list_item *ss_ctr_list = 0; /* side sets */ +-static struct ex__list_item *els_ctr_list = 0; /* element sets */ ++static struct exi_list_item *ns_ctr_list = NULL; /* node sets */ ++static struct exi_list_item *es_ctr_list = NULL; /* edge sets */ ++static struct exi_list_item *fs_ctr_list = NULL; /* face sets */ ++static struct exi_list_item *ss_ctr_list = NULL; /* side sets */ ++static struct exi_list_item *els_ctr_list = NULL; /* element sets */ + + /* structures to hold number of blobs/assemblies for each file id */ +-static struct ex__list_item *assm_ctr_list = 0; /* assemblies */ +-static struct ex__list_item *blob_ctr_list = 0; /* blobs */ ++static struct exi_list_item *assm_ctr_list = NULL; /* assemblies */ ++static struct exi_list_item *blob_ctr_list = NULL; /* blobs */ + + /* structures to hold number of maps of that type for each file id */ +-static struct ex__list_item *nm_ctr_list = 0; /* node maps */ +-static struct ex__list_item *edm_ctr_list = 0; /* edge maps */ +-static struct ex__list_item *fam_ctr_list = 0; /* face maps */ +-static struct ex__list_item *em_ctr_list = 0; /* element maps */ ++static struct exi_list_item *nm_ctr_list = NULL; /* node maps */ ++static struct exi_list_item *edm_ctr_list = NULL; /* edge maps */ ++static struct exi_list_item *fam_ctr_list = NULL; /* face maps */ ++static struct exi_list_item *em_ctr_list = NULL; /* element maps */ + + /*! + \internal + \undoc + */ +-struct ex__list_item **ex__get_counter_list(ex_entity_type obj_type) ++struct exi_list_item **exi_get_counter_list(ex_entity_type obj_type) + { + /* Thread-safe, but is dealing with globals */ + /* Only called from a routine which will be using locks */ +@@ -1175,13 +1191,13 @@ struct ex__list_item **ex__get_counter_list(ex_entity_type obj_type) + case EX_ELEM_SET: return &els_ctr_list; + case EX_EDGE_MAP: return &edm_ctr_list; + case EX_FACE_MAP: return &fam_ctr_list; +- default: return (NULL); ++ default: return NULL; + } + } + + /****************************************************************************** + * +- * ex__inc_file_item - increment file item ++ * exi_inc_file_item - increment file item + * + *****************************************************************************/ + +@@ -1207,10 +1223,13 @@ struct ex__list_item **ex__get_counter_list(ex_entity_type obj_type) + * \internal + */ + +-int ex__inc_file_item(int exoid, /* file id */ +- struct ex__list_item **list_ptr) /* ptr to ptr to list_item */ ++/* NOTE: If this is done for a file which contains `groups` or `change sets`, then ++ * the exoid refers to the specific group id and not the `root_id`... ++ */ ++int exi_inc_file_item(int exoid, /* file id */ ++ struct exi_list_item **list_ptr) /* ptr to ptr to list_item */ + { +- struct ex__list_item *tlist_ptr = *list_ptr; /* use temp list ptr to walk linked list */ ++ struct exi_list_item *tlist_ptr = *list_ptr; /* use temp list ptr to walk linked list */ + while (tlist_ptr) { /* Walk linked list of file ids/vals */ + if (exoid == tlist_ptr->exo_id) { /* linear search for exodus file id */ + break; /* Quit if found */ +@@ -1220,17 +1239,17 @@ int ex__inc_file_item(int exoid, /* file id */ + + if (!tlist_ptr) { /* ptr NULL? */ + /* allocate space for new structure record */ +- tlist_ptr = (struct ex__list_item *)calloc(1, sizeof(struct ex__list_item)); ++ tlist_ptr = (struct exi_list_item *)calloc(1, sizeof(struct exi_list_item)); + tlist_ptr->exo_id = exoid; /* insert file id */ + tlist_ptr->next = *list_ptr; /* insert into head of list */ + *list_ptr = tlist_ptr; /* fix up new head of list */ + } +- return (tlist_ptr->value++); ++ return tlist_ptr->value++; + } + + /***************************************************************************** + * +- * ex__get_file_item - return count ++ * exi_get_file_item - return count + * + *****************************************************************************/ + +@@ -1256,14 +1275,14 @@ int ex__inc_file_item(int exoid, /* file id */ + * \internal + */ + +-int ex__get_file_item(int exoid, /* file id */ +- struct ex__list_item **list_ptr) /* ptr to ptr to list_item */ ++int exi_get_file_item(int exoid, /* file id */ ++ struct exi_list_item **list_ptr) /* ptr to ptr to list_item */ + { + /* Not thread-safe: list_ptr passed in is a global + * Would probably work ok with multiple threads since read-only, + * but possible that list_ptr will be modified while being used + */ +- struct ex__list_item *tlist_ptr = *list_ptr; /* use temp list ptr to walk linked list */ ++ struct exi_list_item *tlist_ptr = *list_ptr; /* use temp list ptr to walk linked list */ + while (tlist_ptr) { /* Walk linked list of file ids/vals */ + if (exoid == tlist_ptr->exo_id) { /* linear search for exodus file id */ + break; /* Quit if found */ +@@ -1272,15 +1291,15 @@ int ex__get_file_item(int exoid, /* file id */ + } + + if (!tlist_ptr) { /* ptr NULL? */ +- return (-1); ++ return -1; + } + +- return (tlist_ptr->value); ++ return tlist_ptr->value; + } + + /***************************************************************************** + * +- * ex__rm_file_item - remove file item ++ * exi_rm_file_item - remove file item + * + *****************************************************************************/ + +@@ -1300,29 +1319,38 @@ int ex__get_file_item(int exoid, /* file id */ + * number of files in one application, items must be taken out of the + * linked lists in each of the above routines. these should be called + * after ncclose(). ++ * ++ * NOTE: this is called from `ex_close` which only closes the root file and ++ * not each group or change set within that `root` file. If the file ++ * contains groups, then we need to check the entire list... + * \internal + */ + +-void ex__rm_file_item(int exoid, /* file id */ +- struct ex__list_item **list_ptr) /* ptr to ptr to list_item */ ++void exi_rm_file_item(int exoid, /* file id */ ++ struct exi_list_item **list_ptr) /* ptr to ptr to list_item */ + + { +- struct ex__list_item *last_head_list_ptr = *list_ptr; /* save last head pointer */ ++ struct exi_list_item *last_head_list_ptr = *list_ptr; /* save last head pointer */ + +- struct ex__list_item *tlist_ptr = *list_ptr; +- while (tlist_ptr) { /* Walk linked list of file ids/vals */ +- if (exoid == tlist_ptr->exo_id) { /* linear search for exodus file id */ +- if (tlist_ptr == *list_ptr) { /* Are we at the head of the list? */ +- *list_ptr = (*list_ptr)->next; /* yes, reset ptr to head of list */ ++ int root_id = exoid & EX_FILE_ID_MASK; ++ ++ struct exi_list_item *tlist_ptr = *list_ptr; ++ while (tlist_ptr) { /* Walk linked list of file ids/vals */ ++ if (root_id == (tlist_ptr->exo_id & EX_FILE_ID_MASK)) { /* linear search for exodus file id */ ++ if (tlist_ptr == *list_ptr) { /* Are we at the head of the list? */ ++ *list_ptr = (*list_ptr)->next; /* yes, reset ptr to head of list */ + } + else { /* no, remove this record from chain*/ + last_head_list_ptr->next = tlist_ptr->next; + } +- free(tlist_ptr); /* free up memory */ +- break; /* Quit if found */ ++ struct exi_list_item *temp = tlist_ptr; ++ tlist_ptr = tlist_ptr->next; ++ free(temp); /* free up memory */ ++ } ++ else { ++ last_head_list_ptr = tlist_ptr; /* save last head pointer */ ++ tlist_ptr = tlist_ptr->next; /* Loop back if not */ + } +- last_head_list_ptr = tlist_ptr; /* save last head pointer */ +- tlist_ptr = tlist_ptr->next; /* Loop back if not */ + } + } + +@@ -1378,7 +1406,7 @@ int ex_get_num_props(int exoid, ex_entity_type obj_type) + \ingroup Utilities + \undoc + */ +-int ex__get_cpu_ws(void) { return (sizeof(float)); } ++int exi_get_cpu_ws(void) { return sizeof(float); } + + /* swap - interchange v[i] and v[j] */ + /*! +@@ -1388,11 +1416,9 @@ int ex__get_cpu_ws(void) { return (sizeof(float)); } + static void ex_swap(int v[], int64_t i, int64_t j) + { + /* Thread-safe, reentrant */ +- int temp; +- +- temp = v[i]; +- v[i] = v[j]; +- v[j] = temp; ++ int temp = v[i]; ++ v[i] = v[j]; ++ v[j] = temp; + } + + /*! +@@ -1402,11 +1428,9 @@ static void ex_swap(int v[], int64_t i, int64_t j) + static void ex_swap64(int64_t v[], int64_t i, int64_t j) + { + /* Thread-safe, reentrant */ +- int64_t temp; +- +- temp = v[i]; +- v[i] = v[j]; +- v[j] = temp; ++ int64_t temp = v[i]; ++ v[i] = v[j]; ++ v[j] = temp; + } + + #define EX_QSORT_CUTOFF 12 +@@ -1418,8 +1442,7 @@ static void ex_swap64(int64_t v[], int64_t i, int64_t j) + static int ex_int_median3(int v[], int iv[], int64_t left, int64_t right) + { + /* Thread-safe, reentrant */ +- int64_t center; +- center = (left + right) / 2; ++ int64_t center = (left + right) / 2; + + if (v[iv[left]] > v[iv[center]]) { + ex_swap(iv, left, center); +@@ -1442,8 +1465,7 @@ static int ex_int_median3(int v[], int iv[], int64_t left, int64_t right) + static int64_t ex_int_median3_64(int64_t v[], int64_t iv[], int64_t left, int64_t right) + { + /* Thread-safe, reentrant */ +- int64_t center; +- center = (left + right) / 2; ++ int64_t center = (left + right) / 2; + + if (v[iv[left]] > v[iv[center]]) { + ex_swap64(iv, left, center); +@@ -1466,13 +1488,10 @@ static int64_t ex_int_median3_64(int64_t v[], int64_t iv[], int64_t left, int64_ + static void ex_int_iqsort(int v[], int iv[], int left, int right) + { + /* Thread-safe, reentrant */ +- int pivot; +- int i, j; +- + if (left + EX_QSORT_CUTOFF <= right) { +- pivot = ex_int_median3(v, iv, left, right); +- i = left; +- j = right - 1; ++ int pivot = ex_int_median3(v, iv, left, right); ++ int i = left; ++ int j = right - 1; + + for (;;) { + while (v[iv[++i]] < v[pivot]) { +@@ -1502,13 +1521,10 @@ static void ex_int_iqsort(int v[], int iv[], int left, int right) + static void ex_int_iqsort64(int64_t v[], int64_t iv[], int64_t left, int64_t right) + { + /* Thread-safe, reentrant */ +- int64_t pivot; +- int64_t i, j; +- + if (left + EX_QSORT_CUTOFF <= right) { +- pivot = ex_int_median3_64(v, iv, left, right); +- i = left; +- j = right - 1; ++ int64_t pivot = ex_int_median3_64(v, iv, left, right); ++ int64_t i = left; ++ int64_t j = right - 1; + + for (;;) { + while (v[iv[++i]] < v[pivot]) { +@@ -1538,13 +1554,9 @@ static void ex_int_iqsort64(int64_t v[], int64_t iv[], int64_t left, int64_t rig + static void ex_int_iisort(int v[], int iv[], int N) + { + /* Thread-safe, reentrant */ +- int i, j; +- int ndx = 0; +- int small; +- int tmp; +- +- small = v[iv[0]]; +- for (i = 1; i < N; i++) { ++ int ndx = 0; ++ int small = v[iv[0]]; ++ for (int i = 1; i < N; i++) { + if (v[iv[i]] < small) { + small = v[iv[i]]; + ndx = i; +@@ -1553,8 +1565,9 @@ static void ex_int_iisort(int v[], int iv[], int N) + /* Put smallest value in slot 0 */ + ex_swap(iv, 0, ndx); + +- for (i = 1; i < N; i++) { +- tmp = iv[i]; ++ for (int i = 1; i < N; i++) { ++ int tmp = iv[i]; ++ int j; + for (j = i; v[tmp] < v[iv[j - 1]]; j--) { + iv[j] = iv[j - 1]; + } +@@ -1569,13 +1582,9 @@ static void ex_int_iisort(int v[], int iv[], int N) + static void ex_int_iisort64(int64_t v[], int64_t iv[], int64_t N) + { + /* Thread-safe, reentrant */ +- int64_t i, j; +- int64_t ndx = 0; +- int64_t small; +- int64_t tmp; +- +- small = v[iv[0]]; +- for (i = 1; i < N; i++) { ++ int64_t ndx = 0; ++ int64_t small = v[iv[0]]; ++ for (int64_t i = 1; i < N; i++) { + if (v[iv[i]] < small) { + small = v[iv[i]]; + ndx = i; +@@ -1584,8 +1593,9 @@ static void ex_int_iisort64(int64_t v[], int64_t iv[], int64_t N) + /* Put smallest value in slot 0 */ + ex_swap64(iv, 0, ndx); + +- for (i = 1; i < N; i++) { +- tmp = iv[i]; ++ for (int64_t i = 1; i < N; i++) { ++ int64_t tmp = iv[i]; ++ int64_t j; + for (j = i; v[tmp] < v[iv[j - 1]]; j--) { + iv[j] = iv[j - 1]; + } +@@ -1598,7 +1608,7 @@ static void ex_int_iisort64(int64_t v[], int64_t iv[], int64_t N) + * \internal + * The following 'indexed qsort' routine is modified from Sedgewicks + * algorithm It selects the pivot based on the median of the left, +- * right, and center values to try to avoid degenerate cases ocurring ++ * right, and center values to try to avoid degenerate cases occurring + * when a single value is chosen. It performs a quicksort on + * intervals down to the #EX_QSORT_CUTOFF size and then performs a final + * insertion sort on the almost sorted final array. Based on data in +@@ -1613,14 +1623,14 @@ static void ex_int_iisort64(int64_t v[], int64_t iv[], int64_t N) + * representable as 'int'. + * \internal + */ +-void ex__iqsort(int v[], int iv[], int N) ++void exi_iqsort(int v[], int iv[], size_t N) + { + /* Thread-safe, reentrant */ + ex_int_iqsort(v, iv, 0, N - 1); + ex_int_iisort(v, iv, N); + + #if defined(DEBUG_QSORT) +- fprintf(stderr, "Checking sort of %d values\n", N + 1); ++ fprintf(stderr, "Checking sort of %zu values\n", N + 1); + int i; + for (i = 1; i < N; i++) { + assert(v[iv[i - 1]] <= v[iv[i]]); +@@ -1628,8 +1638,8 @@ void ex__iqsort(int v[], int iv[], int N) + #endif + } + +-/*! \sa ex__iqsort() */ +-void ex__iqsort64(int64_t v[], int64_t iv[], int64_t N) ++/*! \sa exi_iqsort() */ ++void exi_iqsort64(int64_t v[], int64_t iv[], int64_t N) + { + /* Thread-safe, reentrant */ + ex_int_iqsort64(v, iv, 0, N - 1); +@@ -1656,7 +1666,7 @@ void ex__iqsort64(int64_t v[], int64_t iv[], int64_t N) + int ex_large_model(int exoid) + { + if (exoid < 0) { +- return (EXODUS_DEFAULT_SIZE); /* Specified in exodusII_int.h */ ++ return EXODUS_DEFAULT_SIZE; /* Specified in exodusII_int.h */ + } + + /* See if the ATT_FILESIZE attribute is defined in the file */ +@@ -1674,11 +1684,10 @@ int ex_large_model(int exoid) + \internal + \undoc + */ +-int ex__get_dimension(int exoid, const char *DIMENSION, const char *label, size_t *count, ++int exi_get_dimension(int exoid, const char *DIMENSION, const char *label, size_t *count, + int *dimid, const char *routine) + { +- char errmsg[MAX_ERR_LENGTH]; +- int status; ++ int status; + + *count = 0; + *dimid = -1; +@@ -1686,11 +1695,13 @@ int ex__get_dimension(int exoid, const char *DIMENSION, const char *label, size_ + if ((status = nc_inq_dimid(exoid, DIMENSION, dimid)) != NC_NOERR) { + if (routine != NULL) { + if (status == NC_EBADDIM) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, "Warning: no dimension defining '%s' found in file id %d", + label, exoid); + ex_err_fn(exoid, __func__, errmsg, status); + } + else { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to locate dimension defining number of '%s' in file id %d", label, + exoid); +@@ -1702,6 +1713,7 @@ int ex__get_dimension(int exoid, const char *DIMENSION, const char *label, size_ + + if ((status = nc_inq_dimlen(exoid, *dimid, count)) != NC_NOERR) { + if (routine != NULL) { ++ char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to get length of dimension defining number of '%s' in file id %d", + label, exoid); +@@ -1721,7 +1733,7 @@ size_t ex_header_size(int exoid) + return 0; + } + +-void ex__set_compact_storage(int exoid, int varid) ++void exi_set_compact_storage(int exoid, int varid) + { + /* Capability was released in version 4.7.4 + Only applicable to netcdf-4 files, but will +@@ -1735,31 +1747,37 @@ void ex__set_compact_storage(int exoid, int varid) + #endif + } + +-/* type = 1 for integer, 2 for real, 3 for character */ ++/* ++ * type = 1 for integer, 2 for real, 3 for character ++ * If type < 0, then don't compress, but do set collective on parallel ++ */ ++ + /*! + \internal + \undoc + */ +-void ex__compress_variable(int exoid, int varid, int type) ++ ++void exi_compress_variable(int exoid, int varid, int type) + { + #if NC_HAS_HDF5 +- struct ex__file_item *file = ex__find_file_item(exoid); ++ struct exi_file_item *file = exi_find_file_item(exoid); + + if (!file) { + char errmsg[MAX_ERR_LENGTH]; +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d for ex__compress_variable().", ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d for exi_compress_variable().", + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); + } + else { + /* Compression only supported on HDF5 (NetCDF-4) files; Do not try to compress character data */ +- if (type != 3 && file->is_hdf5) { ++ int status = NC_NOERR; ++ if ((type == 1 || type == 2) && file->is_hdf5) { + if (file->compression_algorithm == EX_COMPRESS_GZIP) { + int deflate_level = file->compression_level; +- int compress = 1; +- int shuffle = file->shuffle; + if (deflate_level > 0) { +- nc_def_var_deflate(exoid, varid, shuffle, compress, deflate_level); ++ int compress = 1; ++ int shuffle = file->shuffle; ++ status = nc_def_var_deflate(exoid, varid, shuffle, compress, deflate_level); + } + } + else if (file->compression_algorithm == EX_COMPRESS_SZIP) { +@@ -1769,14 +1787,16 @@ void ex__compress_variable(int exoid, int varid, int type) + for details on SZIP library and parameters. + */ + +- /* const int NC_SZIP_EC = 4; */ /* Selects entropy coding method for szip. */ +-#ifndef NC_SZIP_NN +- const int NC_SZIP_NN = 32; /* Selects nearest neighbor coding method for szip. */ ++#if !defined(NC_SZIP_EC) ++ const int NC_SZIP_EC = 4; /* Selects entropy coding method for szip. */ ++#endif ++#if !defined(NC_SZIP_NN) ++ const int NC_SZIP_NN = 32; /* Selects nearest neighbor coding method for szip. */ + #endif + /* Even and between 4 and 32; typical values are 8, 10, 16, 32 */ + const int SZIP_PIXELS_PER_BLOCK = + file->compression_level == 0 ? 32 : file->compression_level; +- nc_def_var_szip(exoid, varid, NC_SZIP_NN, SZIP_PIXELS_PER_BLOCK); ++ status = nc_def_var_szip(exoid, varid, NC_SZIP_NN, SZIP_PIXELS_PER_BLOCK); + #else + char errmsg[MAX_ERR_LENGTH]; + snprintf(errmsg, MAX_ERR_LENGTH, +@@ -1784,13 +1804,58 @@ void ex__compress_variable(int exoid, int varid, int type) + ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + #endif + } +- +-#if defined(PARALLEL_AWARE_EXODUS) +- if (file->is_parallel && file->is_hdf5) { +- nc_var_par_access(exoid, varid, NC_COLLECTIVE); ++ else if (file->compression_algorithm == EX_COMPRESS_ZSTD) { ++#if NC_HAS_ZSTD == 1 ++ status = nc_def_var_zstandard(exoid, varid, file->compression_level); ++#else ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Compression algorithm ZSTANDARD is not supported in this version of the " ++ "netCDF library."); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++#endif + } ++ else if (file->compression_algorithm == EX_COMPRESS_BZ2) { ++#if NC_HAS_BZ2 == 1 ++ status = nc_def_var_bzip2(exoid, varid, file->compression_level); ++#else ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Compression algorithm BZIP2 / BZ2 is not supported in this version of the " ++ "netCDF library."); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); + #endif ++ } ++ if (status != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to set compression attribute on variable in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ } ++ ++ if (type == 2 && file->quantize_nsd > 0) { ++#if NC_HAS_QUANTIZE == 1 ++ // Lossy compression using netCDF quantize methods. ++ if ((status = nc_def_var_quantize(exoid, varid, NC_QUANTIZE_GRANULARBR, ++ file->quantize_nsd)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to set quanitzation method on variable in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ } ++#else ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: Quanitzation is not supported in this version of netCDF library."); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADPARAM); ++#endif ++ } + } ++#if defined(PARALLEL_AWARE_EXODUS) ++ if (file->is_parallel) { ++ nc_var_par_access(exoid, varid, NC_COLLECTIVE); ++ } ++#endif + } + #endif + } +@@ -1799,23 +1864,121 @@ void ex__compress_variable(int exoid, int varid, int type) + \internal + \undoc + */ +-int ex__leavedef(int exoid, const char *call_rout) ++int exi_leavedef(int exoid, const char *call_func) + { +- char errmsg[MAX_ERR_LENGTH]; +- int status; ++ int status; + +- if ((status = nc_enddef(exoid)) != NC_NOERR) { +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to complete definition for file id %d", exoid); +- ex_err_fn(exoid, call_rout, errmsg, status); ++ struct exi_file_item *file = exi_find_file_item(exoid); ++ if (!file) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d for %s called from %s.", exoid, ++ __func__, call_func); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); ++ return EX_FATAL; ++ } ++ ++ if (!file->persist_define_mode && file->in_define_mode) { ++ if ((status = nc_enddef(exoid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to complete definition for file id %d", ++ exoid); ++ ex_err_fn(exoid, call_func, errmsg, status); ++ ++ return EX_FATAL; ++ } ++ file->in_define_mode = 0; ++ } ++ return EX_NOERR; ++} ++ ++int exi_redef(int exoid, const char *call_func) ++{ ++ int status; ++ ++ struct exi_file_item *file = exi_find_file_item(exoid); ++ ++ if (!file) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d for %s called from %s.", exoid, ++ __func__, call_func); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); ++ return EX_FATAL; ++ } ++ ++ if (!file->in_define_mode) { ++ if ((status = nc_redef(exoid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to put file %d into definition mode in exi_redef called from %s", ++ exoid, call_func); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ file->in_define_mode = 1; ++ } ++ return EX_NOERR; ++} ++ ++int exi_persist_redef(int exoid, const char *call_func) ++{ ++ int status; + +- return (EX_FATAL); ++ struct exi_file_item *file = exi_find_file_item(exoid); ++ ++ if (!file) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d for %s called from %s.", exoid, ++ __func__, call_func); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); ++ return EX_FATAL; ++ } ++ ++ if ((++file->persist_define_mode == 1) && !file->in_define_mode) { ++ if ((status = nc_redef(exoid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf( ++ errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to put file %d into definition mode in exi_persist_redef called from %s", ++ exoid, call_func); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ file->in_define_mode = 1; ++ } ++ return EX_NOERR; ++} ++ ++int exi_persist_leavedef(int exoid, const char *call_func) ++{ ++ int status; ++ ++ struct exi_file_item *file = exi_find_file_item(exoid); ++ if (!file) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: unknown file id %d for %s called from %s.", exoid, ++ __func__, call_func); ++ ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); ++ return EX_FATAL; ++ } ++ ++ if ((file->persist_define_mode-- == 1) && file->in_define_mode) { ++ if ((status = nc_enddef(exoid)) != NC_NOERR) { ++ char errmsg[MAX_ERR_LENGTH]; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to complete definition for file id %d", ++ exoid); ++ ex_err_fn(exoid, call_func, errmsg, status); ++ ++ return EX_FATAL; ++ } ++ file->in_define_mode = 0; ++ file->persist_define_mode = 0; + } +- return (EX_NOERR); ++ return EX_NOERR; + } + + static int warning_output = 0; + +-int ex__check_version(int run_version) ++int exi_check_version(int run_version) + { + if (run_version != EX_API_VERS_NODOT && warning_output == 0) { + int run_version_major = run_version / 100; +@@ -1837,7 +2000,7 @@ int ex__check_version(int run_version) + \internal + \undoc + */ +-int ex__handle_mode(unsigned int my_mode, int is_parallel, int run_version) ++int exi_handle_mode(unsigned int my_mode, int is_parallel, int run_version) + { + char errmsg[MAX_ERR_LENGTH]; + int nc_mode = 0; +@@ -1854,7 +2017,7 @@ int ex__handle_mode(unsigned int my_mode, int is_parallel, int run_version) + /* Do not include EX_64BIT_DATA in this list */ + static unsigned int all_modes = EX_NORMAL_MODEL | EX_64BIT_OFFSET | EX_NETCDF4 | EX_PNETCDF; + +- ex__check_version(run_version); ++ exi_check_version(run_version); + + /* + * See if specified mode is supported in the version of netcdf we +@@ -2112,9 +2275,16 @@ int ex__handle_mode(unsigned int my_mode, int is_parallel, int run_version) + * unless specified differently via environment. + */ + { +- char *option = getenv("EXODUS_VERBOSE"); +- if (option != NULL) { +- exoptval = EX_VERBOSE; ++ if (exoptval != EX_VERBOSE) { ++ /* Avoid getenv call if already in verbose mode */ ++ char *option = getenv("EXODUS_VERBOSE"); ++ if (option != NULL) { ++ exoptval = EX_VERBOSE; ++ if (option[0] != 'q') { ++ fprintf(stderr, "EXODUS: Setting EX_VERBOSE mode since EXODUS_VERBOSE environment " ++ "variable is set.\n"); ++ } ++ } + } + ex_opts(exoptval); /* call required to set ncopts first time through */ + } +@@ -2143,7 +2313,7 @@ int ex__handle_mode(unsigned int my_mode, int is_parallel, int run_version) + \internal + \undoc + */ +-int ex__populate_header(int exoid, const char *path, int my_mode, int is_parallel, int *comp_ws, ++int exi_populate_header(int exoid, const char *path, int my_mode, int is_parallel, int *comp_ws, + int *io_ws) + { + int status; +@@ -2164,7 +2334,7 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + if ((status = nc_set_fill(exoid, NC_NOFILL, &old_fill)) != NC_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to set nofill mode in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* Verify that there is not an existing file_item struct for this +@@ -2175,7 +2345,7 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + not know that file was closed and possibly new file opened for + this exoid + */ +- if (ex__find_file_item(exoid) != NULL) { ++ if (exi_find_file_item(exoid) != NULL) { + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: There is an existing file already using the file " + "id %d which was also assigned to file %s.\n\tWas " +@@ -2184,7 +2354,7 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + exoid, path); + ex_err_fn(exoid, __func__, errmsg, EX_BADFILEID); + nc_close(exoid); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* initialize floating point size conversion. since creating new file, +@@ -2202,12 +2372,12 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + is_hdf5 = true; + } + +- if (ex__conv_init(exoid, comp_ws, io_ws, 0, int64_status, is_parallel, is_hdf5, is_pnetcdf, ++ if (exi_conv_init(exoid, comp_ws, io_ws, 0, int64_status, is_parallel, is_hdf5, is_pnetcdf, + my_mode & EX_WRITE) != EX_NOERR) { + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to init conversion routines in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, EX_LASTERR); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* put the EXODUS version number, and i/o floating point word size as +@@ -2224,7 +2394,7 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to store Exodus II API version attribute in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + +@@ -2238,7 +2408,7 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to store Exodus II file version attribute in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + +@@ -2251,7 +2421,7 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + "attribute in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + /* store Exodus file size (1=large, 0=normal) as an attribute */ +@@ -2259,7 +2429,7 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to store Exodus II file size attribute in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + + { +@@ -2269,7 +2439,7 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + snprintf(errmsg, MAX_ERR_LENGTH, + "ERROR: failed to add maximum_name_length attribute in file id %d", exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + +@@ -2280,7 +2450,7 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to add int64_status attribute in file id %d", + exoid); + ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); ++ return EX_FATAL; + } + } + +@@ -2290,11 +2460,11 @@ int ex__populate_header(int exoid, const char *path, int my_mode, int is_paralle + #else + if ((status = nc_enddef(exoid)) != NC_NOERR) { + #endif +- snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to complete definition for file id %d", exoid); +- ex_err_fn(exoid, __func__, errmsg, status); +- return (EX_FATAL); +-} +-return EX_NOERR; ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to complete definition for file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ return EX_NOERR; + } + + /*! +@@ -2311,3 +2481,171 @@ char *ex_copy_string(char *dest, char const *source, size_t elements) + *d = '\0'; + return d; + } ++ ++/* Used by the entity attribute code `ex_get_attribute(s)` and `ex_put_attribute(s)` */ ++int exi_get_varid(int exoid, ex_entity_type obj_type, ex_entity_id id) ++{ ++ if (exi_check_valid_file_id(exoid, __func__) == EX_FATAL) { ++ EX_FUNC_LEAVE(EX_FATAL); ++ } ++ ++ if (obj_type == EX_GLOBAL) { ++ return NC_GLOBAL; ++ } ++ ++ int status = 0; ++ char errmsg[MAX_ERR_LENGTH]; ++ ++ if (obj_type == EX_NODAL) { ++ /* For the nodal entity attributes, we store it on the ++ "coor_names" variable. Not exactly logical, but it exists in any ++ model that has nodes, so it at least gives us a place to put the ++ attribute. Another possibility would be the nodal x-coordinate ++ variable... ++ */ ++ int varid = 0; ++ if ((status = nc_inq_varid(exoid, VAR_NAME_COOR, &varid)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to locate node block variable id in file id %d", exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ return varid; ++ } ++ ++ /* Everything else ... */ ++ /* First, locate index of this objects id `obj_type` id array */ ++ /* First, locate index of this objects id `obj_type` id array */ ++ int id_ndx = exi_id_lkup(exoid, obj_type, id); ++ if (id_ndx <= 0) { ++ ex_get_err(NULL, NULL, &status); ++ if (status != 0) { ++ if (status == EX_NULLENTITY) { /* NULL object? */ ++ return EX_NOERR; ++ } ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to locate %s id %" PRId64 " in id array in file id %d", ++ ex_name_of_object(obj_type), id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ } ++ ++ const char *entryptr = NULL; ++ switch (obj_type) { ++ case EX_ASSEMBLY: entryptr = VAR_ENTITY_ASSEMBLY(id_ndx); break; ++ case EX_BLOB: entryptr = VAR_ENTITY_BLOB(id_ndx); break; ++ case EX_NODE_SET: entryptr = VAR_NODE_NS(id_ndx); break; ++ case EX_EDGE_SET: entryptr = VAR_EDGE_ES(id_ndx); break; ++ case EX_FACE_SET: entryptr = VAR_FACE_FS(id_ndx); break; ++ case EX_SIDE_SET: entryptr = VAR_ELEM_SS(id_ndx); break; ++ case EX_ELEM_SET: entryptr = VAR_ELEM_ELS(id_ndx); break; ++ case EX_EDGE_BLOCK: entryptr = VAR_EBCONN(id_ndx); break; ++ case EX_FACE_BLOCK: entryptr = VAR_FBCONN(id_ndx); break; ++ case EX_ELEM_BLOCK: entryptr = VAR_CONN(id_ndx); break; ++ default: ++ snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: object type %d not supported in call to %s", obj_type, ++ __func__); ++ ex_err(__func__, errmsg, EX_BADPARAM); ++ return EX_FATAL; ++ } ++ ++ int varid = 0; ++ if ((status = nc_inq_varid(exoid, entryptr, &varid)) != NC_NOERR) { ++ snprintf(errmsg, MAX_ERR_LENGTH, ++ "ERROR: failed to locate entity list array for %s %" PRId64 " in file id %d", ++ ex_name_of_object(obj_type), id, exoid); ++ ex_err_fn(exoid, __func__, errmsg, status); ++ return EX_FATAL; ++ } ++ return varid; ++} ++ ++/* ++ * Code from: ++ * https://stackoverflow.com/questions/11034002/how-to-get-absolute-path-of-file-or-directory-that-does-not-exist ++ * ++ * Return the input path in a canonical form. This is achieved by ++ * expanding all symbolic links, resolving references to "." and "..", ++ * and removing duplicate "/" characters. ++ * ++ * If the file exists, its path is canonicalized and returned. If the file, ++ * or parts of the containing directory, do not exist, path components are ++ * removed from the end until an existing path is found. The remainder of the ++ * path is then appended to the canonical form of the existing path, ++ * and returned. Consequently, the returned path may not exist. The portion ++ * of the path which exists, however, is represented in canonical form. ++ * ++ * If successful, this function returns a C-string, which needs to be freed by ++ * the caller using free(). ++ * ++ * ARGUMENTS: ++ * file_path ++ * File path, whose canonical form to return. ++ * ++ * RETURNS: ++ * On success, returns the canonical path to the file, which needs to be freed ++ * by the caller. ++ * ++ * On failure, returns NULL. ++ */ ++char *exi_canonicalize_filename(char const *file_path) ++{ ++#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || \ ++ defined(__MINGW32__) || defined(_WIN64) || defined(__MINGW64__) ++ return _fullpath(NULL, file_path, _MAX_PATH); ++#else ++ char *canonical_file_path = NULL; ++ unsigned int file_path_len = strlen(file_path); ++ ++ if (file_path_len > 0) { ++ canonical_file_path = realpath(file_path, NULL); ++ if (canonical_file_path == NULL && errno == ENOENT) { ++ // The file was not found. Back up to a segment which exists, ++ // and append the remainder of the path to it. ++ char *file_path_copy = NULL; ++ if (file_path[0] == '/' || (strncmp(file_path, "./", 2) == 0) || ++ (strncmp(file_path, "../", 3) == 0)) { ++ // Absolute path, or path starts with "./" or "../" ++ file_path_copy = strdup(file_path); ++ } ++ else { ++ // Relative path ++ file_path_copy = (char *)malloc(strlen(file_path) + 3); ++ strcpy(file_path_copy, "./"); ++ strcat(file_path_copy, file_path); ++ } ++ ++ // Remove path components from the end, until an existing path is found ++ for (int char_idx = strlen(file_path_copy) - 1; char_idx >= 0 && canonical_file_path == NULL; ++ --char_idx) { ++ if (file_path_copy[char_idx] == '/') { ++ // Remove the slash character ++ file_path_copy[char_idx] = '\0'; ++ ++ canonical_file_path = realpath(file_path_copy, NULL); ++ if (canonical_file_path != NULL) { ++ // An existing path was found. Append the remainder of the path ++ // to a canonical form of the existing path. ++ char *combined_file_path = (char *)malloc(strlen(canonical_file_path) + ++ strlen(file_path_copy + char_idx + 1) + 2); ++ strcpy(combined_file_path, canonical_file_path); ++ strcat(combined_file_path, "/"); ++ strcat(combined_file_path, file_path_copy + char_idx + 1); ++ free(canonical_file_path); ++ canonical_file_path = combined_file_path; ++ } ++ else { ++ // The path segment does not exist. Replace the slash character ++ // and keep trying by removing the previous path component. ++ file_path_copy[char_idx] = '/'; ++ } ++ } ++ } ++ ++ free(file_path_copy); ++ } ++ } ++ return canonical_file_path; ++#endif ++} diff --git a/vtk.spec b/vtk.spec index 7d34c4f..11b60eb 100644 --- a/vtk.spec +++ b/vtk.spec @@ -86,6 +86,8 @@ Patch: vtk-chobo-cstdint.patch Patch: vtk-vtkm.patch # Tk 9.0 - based on b7c22497712be6751fbefe155533ae34d5e381f5 Patch: vtk-tk9.patch +# netcdf 4.9.3 support +Patch: vtk-netcdf4.9.3.patch URL: https://vtk.org/ @@ -293,7 +295,7 @@ Provides: bundled(kwsys-systeminformation) Provides: bundled(kwsys-systemtools) # Other bundled libraries Provides: bundled(diy2) -Provides: bundled(exodusII) = 2.0.0 +Provides: bundled(exodusII) = 9.04 Provides: bundled(exprtk) = 2.71 Provides: bundled(fides) %if !%{with fmt}