Skip to content
Snippets Groups Projects
Commit 6ff9fa20 authored by Kitware Robot's avatar Kitware Robot Committed by Shawn Waldon
Browse files

exodusII 2018-02-01 (aa620ee7)

Code extracted from:

    https://gitlab.kitware.com/third-party/seacas.git

at commit aa620ee70773b4d746bd58137c85825037a62ef6 (for/vtk-old).
parents
No related branches found
No related tags found
No related merge requests found
Showing
with 1724 additions and 0 deletions
* -whitespace
set(EXODUSII_BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}")
set(sources
src/deprecated/ex_get_concat_node_sets.c
src/deprecated/ex_get_concat_side_sets.c
src/deprecated/ex_get_elem_attr.c
src/deprecated/ex_get_elem_attr_names.c
src/deprecated/ex_get_elem_blk_ids.c
src/deprecated/ex_get_elem_block.c
src/deprecated/ex_get_elem_conn.c
src/deprecated/ex_get_elem_map.c
src/deprecated/ex_get_elem_num_map.c
src/deprecated/ex_get_elem_var.c
src/deprecated/ex_get_elem_var_tab.c
src/deprecated/ex_get_elem_var_time.c
src/deprecated/ex_get_glob_var_time.c
src/deprecated/ex_get_glob_vars.c
src/deprecated/ex_get_n_attr.c
src/deprecated/ex_get_n_conn.c
src/deprecated/ex_get_n_coord.c
src/deprecated/ex_get_n_elem_attr.c
src/deprecated/ex_get_n_elem_conn.c
src/deprecated/ex_get_n_elem_num_map.c
src/deprecated/ex_get_n_elem_var.c
src/deprecated/ex_get_n_nodal_var.c
src/deprecated/ex_get_n_node_num_map.c
src/deprecated/ex_get_n_node_set.c
src/deprecated/ex_get_n_node_set_df.c
src/deprecated/ex_get_n_one_attr.c
src/deprecated/ex_get_n_side_set.c
src/deprecated/ex_get_n_side_set_df.c
src/deprecated/ex_get_n_var.c
src/deprecated/ex_get_nodal_var.c
src/deprecated/ex_get_nodal_var_time.c
src/deprecated/ex_get_node_map.c
src/deprecated/ex_get_node_num_map.c
src/deprecated/ex_get_node_set.c
src/deprecated/ex_get_node_set_dist_fact.c
src/deprecated/ex_get_node_set_ids.c
src/deprecated/ex_get_node_set_param.c
src/deprecated/ex_get_nset_var.c
src/deprecated/ex_get_nset_var_tab.c
src/deprecated/ex_get_one_elem_attr.c
src/deprecated/ex_get_partial_elem_attr.c
src/deprecated/ex_get_partial_elem_conn.c
src/deprecated/ex_get_partial_elem_map.c
src/deprecated/ex_get_partial_elem_num_map.c
src/deprecated/ex_get_partial_elem_var.c
src/deprecated/ex_get_partial_nodal_var.c
src/deprecated/ex_get_partial_node_num_map.c
src/deprecated/ex_get_partial_node_set.c
src/deprecated/ex_get_partial_node_set_df.c
src/deprecated/ex_get_partial_side_set.c
src/deprecated/ex_get_partial_side_set_df.c
src/deprecated/ex_get_side_set.c
src/deprecated/ex_get_side_set_dist_fact.c
src/deprecated/ex_get_side_set_ids.c
src/deprecated/ex_get_side_set_param.c
src/deprecated/ex_get_sset_var.c
src/deprecated/ex_get_sset_var_tab.c
src/deprecated/ex_get_var_name.c
src/deprecated/ex_get_var_names.c
src/deprecated/ex_get_var_param.c
src/deprecated/ex_get_var_tab.c
src/deprecated/ex_put_concat_node_sets.c
src/deprecated/ex_put_concat_side_sets.c
src/deprecated/ex_put_concat_var_param.c
src/deprecated/ex_put_elem_attr.c
src/deprecated/ex_put_elem_attr_names.c
src/deprecated/ex_put_elem_block.c
src/deprecated/ex_put_elem_conn.c
src/deprecated/ex_put_elem_map.c
src/deprecated/ex_put_elem_num_map.c
src/deprecated/ex_put_elem_var.c
src/deprecated/ex_put_elem_var_slab.c
src/deprecated/ex_put_elem_var_tab.c
src/deprecated/ex_put_glob_vars.c
src/deprecated/ex_put_n_attr.c
src/deprecated/ex_put_n_coord.c
src/deprecated/ex_put_n_elem_attr.c
src/deprecated/ex_put_n_elem_conn.c
src/deprecated/ex_put_n_elem_num_map.c
src/deprecated/ex_put_n_nodal_var.c
src/deprecated/ex_put_n_node_num_map.c
src/deprecated/ex_put_n_node_set.c
src/deprecated/ex_put_n_node_set_df.c
src/deprecated/ex_put_n_one_attr.c
src/deprecated/ex_put_n_side_set.c
src/deprecated/ex_put_n_side_set_df.c
src/deprecated/ex_put_n_var.c
src/deprecated/ex_put_nodal_var_slab.c
src/deprecated/ex_put_node_map.c
src/deprecated/ex_put_node_num_map.c
src/deprecated/ex_put_node_set.c
src/deprecated/ex_put_node_set_dist_fact.c
src/deprecated/ex_put_node_set_param.c
src/deprecated/ex_put_nset_var.c
src/deprecated/ex_put_nset_var_tab.c
src/deprecated/ex_put_one_elem_attr.c
src/deprecated/ex_put_partial_elem_attr.c
src/deprecated/ex_put_partial_elem_conn.c
src/deprecated/ex_put_partial_elem_map.c
src/deprecated/ex_put_partial_elem_num_map.c
src/deprecated/ex_put_partial_nodal_var.c
src/deprecated/ex_put_partial_node_num_map.c
src/deprecated/ex_put_partial_node_set.c
src/deprecated/ex_put_partial_node_set_df.c
src/deprecated/ex_put_partial_side_set.c
src/deprecated/ex_put_partial_side_set_df.c
src/deprecated/ex_put_side_set.c
src/deprecated/ex_put_side_set_dist_fact.c
src/deprecated/ex_put_side_set_param.c
src/deprecated/ex_put_sset_var.c
src/deprecated/ex_put_sset_var_tab.c
src/deprecated/ex_put_var_name.c
src/deprecated/ex_put_var_names.c
src/deprecated/ex_put_var_param.c
src/deprecated/ex_put_var_tab.c
src/ex_add_attr.c
src/ex_close.c
src/ex_conv.c
src/ex_copy.c
src/ex_create.c
src/ex_create_group.c
src/ex_create_par.c
src/ex_cvt_nodes_to_sides.c
src/ex_err.c
src/ex_get_all_times.c
src/ex_get_attr.c
src/ex_get_attr_names.c
src/ex_get_attr_param.c
src/ex_get_block.c
src/ex_get_block_param.c
src/ex_get_block_params.c
src/ex_get_cmap_params.c
src/ex_get_concat_sets.c
src/ex_get_concat_side_set_node_count.c
src/ex_get_conn.c
src/ex_get_coord.c
src/ex_get_coord_names.c
src/ex_get_coordinate_frames.c
src/ex_get_eb_info_global.c
src/ex_get_elem_cmap.c
src/ex_get_elem_type.c
src/ex_get_entity_count_per_polyhedra.c
src/ex_get_glob_var_time_int.c
src/ex_get_glob_vars_int.c
src/ex_get_group_id.c
src/ex_get_group_ids.c
src/ex_get_id_map.c
src/ex_get_ids.c
src/ex_get_info.c
src/ex_get_init.c
src/ex_get_init_ext.c
src/ex_get_init_global.c
src/ex_get_init_info.c
src/ex_get_loadbal_param.c
src/ex_get_map.c
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
src/ex_get_num_map.c
src/ex_get_object_truth_vector.c
src/ex_get_one_attr.c
src/ex_get_partial_attr.c
src/ex_get_partial_conn.c
src/ex_get_partial_coord.c
src/ex_get_partial_coord_component.c
src/ex_get_partial_id_map.c
src/ex_get_partial_nodal_var_int.c
src/ex_get_partial_num_map.c
src/ex_get_partial_one_attr.c
src/ex_get_partial_set.c
src/ex_get_partial_set_dist_fact.c
src/ex_get_partial_var.c
src/ex_get_processor_elem_maps.c
src/ex_get_processor_node_maps.c
src/ex_get_prop.c
src/ex_get_prop_array.c
src/ex_get_prop_names.c
src/ex_get_qa.c
src/ex_get_set.c
src/ex_get_set_dist_fact.c
src/ex_get_set_param.c
src/ex_get_sets.c
src/ex_get_side_set_node_count.c
src/ex_get_side_set_node_list.c
src/ex_get_side_set_node_list_len.c
src/ex_get_ss_param_global.c
src/ex_get_time.c
src/ex_get_truth_table.c
src/ex_get_var.c
src/ex_get_var_time.c
src/ex_get_variable_name.c
src/ex_get_variable_names.c
src/ex_get_variable_param.c
src/ex_inquire.c
src/ex_int_get_block_param.c
src/ex_ne_util.c
src/ex_open.c
src/ex_open_par.c
src/ex_opts.c
src/ex_put_all_var_param.c
src/ex_put_all_var_param_ext.c
src/ex_put_attr.c
src/ex_put_attr_names.c
src/ex_put_attr_param.c
src/ex_put_block.c
src/ex_put_block_param.c
src/ex_put_block_params.c
src/ex_put_cmap_params.c
src/ex_put_cmap_params_cc.c
src/ex_put_concat_all_blocks.c
src/ex_put_concat_elem_block.c
src/ex_put_concat_sets.c
src/ex_put_conn.c
src/ex_put_coord.c
src/ex_put_coord_names.c
src/ex_put_coordinate_frames.c
src/ex_put_eb_info_global.c
src/ex_put_elem_cmap.c
src/ex_put_entity_count_per_polyhedra.c
src/ex_put_id_map.c
src/ex_put_info.c
src/ex_put_init.c
src/ex_put_init_ext.c
src/ex_put_init_global.c
src/ex_put_init_info.c
src/ex_put_loadbal_param.c
src/ex_put_loadbal_param_cc.c
src/ex_put_map.c
src/ex_put_map_param.c
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
src/ex_put_one_attr.c
src/ex_put_partial_attr.c
src/ex_put_partial_conn.c
src/ex_put_partial_coord.c
src/ex_put_partial_coord_component.c
src/ex_put_partial_id_map.c
src/ex_put_partial_nodal_var_int.c
src/ex_put_partial_num_map.c
src/ex_put_partial_one_attr.c
src/ex_put_partial_set.c
src/ex_put_partial_set_dist_fact.c
src/ex_put_partial_var.c
src/ex_put_processor_elem_maps.c
src/ex_put_processor_node_maps.c
src/ex_put_prop.c
src/ex_put_prop_array.c
src/ex_put_prop_names.c
src/ex_put_qa.c
src/ex_put_set.c
src/ex_put_set_dist_fact.c
src/ex_put_set_param.c
src/ex_put_sets.c
src/ex_put_ss_param_global.c
src/ex_put_time.c
src/ex_put_truth_table.c
src/ex_put_var.c
src/ex_put_variable_name.c
src/ex_put_variable_names.c
src/ex_put_variable_param.c
src/ex_threadsafe.c
src/ex_update.c
src/ex_utils.c)
if (WIN32)
set(EXODUS_THREADSAFE 0)
else ()
set(EXODUS_THREADSAFE 1)
endif ()
set(PARALLEL_AWARE_EXODUS 0)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/exodus_config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/exodus_config.h"
@ONLY)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/include/exodusII_cfg.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/exodusII_cfg.h"
@ONLY)
set(headers
include/exodusII.h
include/exodusII_int.h
include/vtk_exodusII_mangle.h
"${CMAKE_CURRENT_BINARY_DIR}/include/exodusII_cfg.h"
"${CMAKE_CURRENT_BINARY_DIR}/include/exodus_config.h")
vtk_add_library(vtkexodusII ${sources} ${headers})
target_link_libraries(vtkexodusII PUBLIC ${vtknetcdf_LIBRARIES})
if (NOT VTK_INSTALL_NO_DEVELOPMENT)
install(FILES
${headers}
DESTINATION "${VTK_INSTALL_INCLUDE_DIR}/vtkexodusII/include"
COMPONENT Development)
endif()
target_compile_definitions(vtkexodusII
PRIVATE
exoIIc_EXPORTS)
target_include_directories(vtkexodusII
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>")
Copyright (c) 2005-2017 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.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of NTESS nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
README 0 → 100644
========================================================================
CONTACT:
Greg Sjaardema,
Sandia-2017 National Laboratories,
gdsjaar@sandia.gov
========================================================================
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 Sandia Corporation Copyright Notice.
2. The BSD License.
We appreciate feedback from users of this package. Please send
comments, suggestions, and bug reports to Greg Sjaardema
<gdsjaar@sandia.gov>.
Please identify the version of the package.
========================================================================
BUILDING
There are 4 methods for building exodus.
1. CMAKE: Edit the cmake-script file to update library and install paths.
The type 'sh cmake-script' to generate the Makefiles
followed by 'make' and then 'make install'
2. SEAMS/SEACAS Build system which is based on imake. If you have a
SEAMS or SEACAS installation, you can use its build system. In the
top-level exodus directory, do 'accmkmf' followed by 'make
Makefiles' and then 'make'
3. Makefile.standalone. Edit the top-level Makefile.standalone file
and specify the compiler and other options as detailed in the
file. Then, do "make -f Makefile.standalone".
4. Building in the Trilinos system as part of the seacas package.
See the Trilinos documentation for more details.
Once you have built the library, you can test it by typing "make
check"
========================================================================
NETCDF
The exodus library uses the netcdf library for low-level data
storage.
Exodus requires NetCDF version 4.2.1.1 or later.
The netcdf library must be modified slightly in order to handle the
exodus datamodel. The specific changes are:
1. include/netcdf.h -- Modify the following defines:
#define NC_MAX_DIMS 65536 /* max dimensions per file */
#define NC_MAX_VARS 524288 /* max variables per file */
#define NC_MAX_VAR_DIMS 8 /* max per variable dimensions */
If these changes are not made, the exodus library will still function
for "normal" size models, but it will fail for "large" models. The
error message from exodus/netcdf should be somewhat clear when this
happens...
2. I typically configure netcdf as follows:
./configure --enable-netcdf-4 --disable-fsync --disable-dap --disable-cdmremote
Replace "--enable-netcdf-4" with "--disable-netcdf-4" to not use the
netcdf4 extensions. They are not necessarily needed for exodus, but
will provide compression, larger model sizes, and may be faster in
some cases.
3. When running the netcdf tests, you may have to do "unlimit
stacksize" (csh/tcsh) to avoid some failures due to the increased define sizes
above.
========================================================================
# ExodusII fork for VTK
This branch contains changes required to embed exodusII into VTK. This
includes changes made primarily to the build system to allow it to be embedded
into another source tree as well as a header to facilitate mangling of the
symbols to avoid conflicts with other copies of the library within a single
process.
* Add attributes to pass commit checks within VTK.
* Use VTK's netcdf library.
* CMake code to integrate with VTK's module system.
* Mangle all exported symbols to have a `vtkexodusII_` prefix.
#cmakedefine EXODUS_THREADSAFE
#cmakedefine PARALLEL_AWARE_EXODUS
@SEACAS_DEPRECATED_DECLARATIONS@
This diff is collapsed.
// Copyright (c) 2005-2017 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.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
//
// * Neither the name of NTESS nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef __exodusII_cfg_h
#define __exodusII_cfg_h
#if defined(_WIN32) && !defined(WIN32)
# define WIN32
#endif
#cmakedefine EXODUSII_BUILD_SHARED_LIBS
#if defined(WIN32) && defined(EXODUSII_BUILD_SHARED_LIBS)
# if defined(exoIIc_EXPORTS)
# define EXODUS_EXPORT __declspec( dllexport ) extern
# else
# define EXODUS_EXPORT __declspec( dllimport ) extern
# endif
#else
# define EXODUS_EXPORT extern
#endif
#endif
This diff is collapsed.
#ifndef vtk_exodusII_mangle_h
#define 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_valid_file_id vtkexodusII_ex_check_valid_file_id
#define ex_close vtkexodusII_ex_close
#define ex_compress_variable vtkexodusII_ex_compress_variable
#define ex_comp_ws vtkexodusII_ex_comp_ws
#define ex_conv_exit vtkexodusII_ex_conv_exit
#define ex_conv_ini vtkexodusII_ex_conv_ini
#define ex_copy vtkexodusII_ex_copy
#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_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 exerrval_get vtkexodusII_exerrval_get
#define ex_find_file_item vtkexodusII_ex_find_file_item
#define ex_get_all_times vtkexodusII_ex_get_all_times
#define ex_get_attr vtkexodusII_ex_get_attr
#define ex_get_attr_names vtkexodusII_ex_get_attr_names
#define ex_get_attr_param vtkexodusII_ex_get_attr_param
#define ex_get_block vtkexodusII_ex_get_block
#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
#define ex_get_concat_node_sets vtkexodusII_ex_get_concat_node_sets
#define ex_get_concat_sets vtkexodusII_ex_get_concat_sets
#define ex_get_concat_side_set_node_count vtkexodusII_ex_get_concat_side_set_node_count
#define ex_get_concat_side_sets vtkexodusII_ex_get_concat_side_sets
#define ex_get_conn vtkexodusII_ex_get_conn
#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
#define ex_get_elem_blk_ids vtkexodusII_ex_get_elem_blk_ids
#define ex_get_elem_block vtkexodusII_ex_get_elem_block
#define ex_get_elem_cmap vtkexodusII_ex_get_elem_cmap
#define ex_get_elem_conn vtkexodusII_ex_get_elem_conn
#define ex_get_elem_map vtkexodusII_ex_get_elem_map
#define ex_get_elem_num_map vtkexodusII_ex_get_elem_num_map
#define ex_get_elem_type vtkexodusII_ex_get_elem_type
#define ex_get_elem_var vtkexodusII_ex_get_elem_var
#define ex_get_elem_var_tab vtkexodusII_ex_get_elem_var_tab
#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_glob_vars_int vtkexodusII_ex_get_glob_vars_int
#define ex_get_glob_var_time vtkexodusII_ex_get_glob_var_time
#define ex_get_glob_var_time_int vtkexodusII_ex_get_glob_var_time_int
#define ex_get_group_id vtkexodusII_ex_get_group_id
#define ex_get_group_ids vtkexodusII_ex_get_group_ids
#define ex_get_id_map vtkexodusII_ex_get_id_map
#define ex_get_ids vtkexodusII_ex_get_ids
#define ex_get_idx vtkexodusII_ex_get_idx
#define ex_get_info vtkexodusII_ex_get_info
#define ex_get_init vtkexodusII_ex_get_init
#define ex_get_init_ext vtkexodusII_ex_get_init_ext
#define ex_get_init_global vtkexodusII_ex_get_init_global
#define ex_get_init_info vtkexodusII_ex_get_init_info
#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_n_attr vtkexodusII_ex_get_n_attr
#define ex_get_n_conn vtkexodusII_ex_get_n_conn
#define ex_get_n_coord vtkexodusII_ex_get_n_coord
#define ex_get_n_elem_attr vtkexodusII_ex_get_n_elem_attr
#define ex_get_n_elem_conn vtkexodusII_ex_get_n_elem_conn
#define ex_get_n_elem_num_map vtkexodusII_ex_get_n_elem_num_map
#define ex_get_n_elem_var vtkexodusII_ex_get_n_elem_var
#define ex_get_n_nodal_var vtkexodusII_ex_get_n_nodal_var
#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_n_one_attr vtkexodusII_ex_get_n_one_attr
#define ex_get_n_side_set vtkexodusII_ex_get_n_side_set
#define ex_get_n_side_set_df vtkexodusII_ex_get_n_side_set_df
#define ex_get_n_var vtkexodusII_ex_get_n_var
#define ex_get_name vtkexodusII_ex_get_name
#define ex_get_name_internal vtkexodusII_ex_get_name_internal
#define ex_get_names vtkexodusII_ex_get_names
#define ex_get_names_internal vtkexodusII_ex_get_names_internal
#define ex_get_nodal_var vtkexodusII_ex_get_nodal_var
#define ex_get_nodal_var_int vtkexodusII_ex_get_nodal_var_int
#define ex_get_nodal_var_time vtkexodusII_ex_get_nodal_var_time
#define ex_get_nodal_var_time_int vtkexodusII_ex_get_nodal_var_time_int
#define ex_get_node_cmap vtkexodusII_ex_get_node_cmap
#define ex_get_node_map vtkexodusII_ex_get_node_map
#define ex_get_node_num_map vtkexodusII_ex_get_node_num_map
#define ex_get_node_set vtkexodusII_ex_get_node_set
#define ex_get_node_set_dist_fact vtkexodusII_ex_get_node_set_dist_fact
#define ex_get_node_set_ids vtkexodusII_ex_get_node_set_ids
#define ex_get_node_set_param vtkexodusII_ex_get_node_set_param
#define ex_get_ns_param_global vtkexodusII_ex_get_ns_param_global
#define ex_get_nset_var vtkexodusII_ex_get_nset_var
#define ex_get_nset_var_tab vtkexodusII_ex_get_nset_var_tab
#define ex_get_num_map vtkexodusII_ex_get_num_map
#define ex_get_num_props vtkexodusII_ex_get_num_props
#define ex_get_object_truth_vector vtkexodusII_ex_get_object_truth_vector
#define ex_get_one_attr vtkexodusII_ex_get_one_attr
#define ex_get_one_elem_attr vtkexodusII_ex_get_one_elem_attr
#define ex_get_partial_attr vtkexodusII_ex_get_partial_attr
#define ex_get_partial_conn vtkexodusII_ex_get_partial_conn
#define ex_get_partial_coord vtkexodusII_ex_get_partial_coord
#define ex_get_partial_coord_component vtkexodusII_ex_get_partial_coord_component
#define ex_get_partial_elem_attr vtkexodusII_ex_get_partial_elem_attr
#define ex_get_partial_elem_conn vtkexodusII_ex_get_partial_elem_conn
#define ex_get_partial_elem_map vtkexodusII_ex_get_partial_elem_map
#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_int vtkexodusII_ex_get_partial_nodal_var_int
#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
#define ex_get_partial_node_set_df vtkexodusII_ex_get_partial_node_set_df
#define ex_get_partial_num_map vtkexodusII_ex_get_partial_num_map
#define ex_get_partial_one_attr vtkexodusII_ex_get_partial_one_attr
#define ex_get_partial_set vtkexodusII_ex_get_partial_set
#define ex_get_partial_set_dist_fact vtkexodusII_ex_get_partial_set_dist_fact
#define ex_get_partial_side_set vtkexodusII_ex_get_partial_side_set
#define ex_get_partial_side_set_df vtkexodusII_ex_get_partial_side_set_df
#define ex_get_partial_var vtkexodusII_ex_get_partial_var
#define ex_get_processor_elem_maps vtkexodusII_ex_get_processor_elem_maps
#define ex_get_processor_node_maps vtkexodusII_ex_get_processor_node_maps
#define ex_get_prop vtkexodusII_ex_get_prop
#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_set vtkexodusII_ex_get_set
#define ex_get_set_dist_fact vtkexodusII_ex_get_set_dist_fact
#define ex_get_set_param vtkexodusII_ex_get_set_param
#define ex_get_sets vtkexodusII_ex_get_sets
#define ex_get_side_set vtkexodusII_ex_get_side_set
#define ex_get_side_set_dist_fact vtkexodusII_ex_get_side_set_dist_fact
#define ex_get_side_set_ids vtkexodusII_ex_get_side_set_ids
#define ex_get_side_set_node_count vtkexodusII_ex_get_side_set_node_count
#define ex_get_side_set_node_list vtkexodusII_ex_get_side_set_node_list
#define ex_get_side_set_node_list_len vtkexodusII_ex_get_side_set_node_list_len
#define ex_get_side_set_param vtkexodusII_ex_get_side_set_param
#define ex_get_ss_param_global vtkexodusII_ex_get_ss_param_global
#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_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_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_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 ex_inquire vtkexodusII_ex_inquire
#define ex_inquire_int vtkexodusII_ex_inquire_int
#define ex_int64_status vtkexodusII_ex_int64_status
#define ex_int_get_block_param vtkexodusII_ex_int_get_block_param
#define ex_iqsort vtkexodusII_ex_iqsort
#define ex_iqsort64 vtkexodusII_ex_iqsort64
#define ex_is_parallel vtkexodusII_ex_is_parallel
#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_var_of_object vtkexodusII_ex_name_var_of_object
#define ex_open_int vtkexodusII_ex_open_int
#define ex_opts vtkexodusII_ex_opts
#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_attr vtkexodusII_ex_put_attr
#define ex_put_attr_names vtkexodusII_ex_put_attr_names
#define ex_put_attr_param vtkexodusII_ex_put_attr_param
#define ex_put_block vtkexodusII_ex_put_block
#define ex_put_block_param vtkexodusII_ex_put_block_param
#define ex_put_block_params vtkexodusII_ex_put_block_params
#define ex_put_cmap_params vtkexodusII_ex_put_cmap_params
#define ex_put_cmap_params_cc vtkexodusII_ex_put_cmap_params_cc
#define ex_put_concat_all_blocks vtkexodusII_ex_put_concat_all_blocks
#define ex_put_concat_elem_block vtkexodusII_ex_put_concat_elem_block
#define ex_put_concat_node_sets vtkexodusII_ex_put_concat_node_sets
#define ex_put_concat_sets vtkexodusII_ex_put_concat_sets
#define ex_put_concat_side_sets vtkexodusII_ex_put_concat_side_sets
#define ex_put_concat_var_param vtkexodusII_ex_put_concat_var_param
#define ex_put_conn vtkexodusII_ex_put_conn
#define ex_put_coord vtkexodusII_ex_put_coord
#define ex_put_coordinate_frames vtkexodusII_ex_put_coordinate_frames
#define ex_put_coord_names vtkexodusII_ex_put_coord_names
#define ex_put_eb_info_global vtkexodusII_ex_put_eb_info_global
#define ex_put_elem_attr vtkexodusII_ex_put_elem_attr
#define ex_put_elem_attr_names vtkexodusII_ex_put_elem_attr_names
#define ex_put_elem_block vtkexodusII_ex_put_elem_block
#define ex_put_elem_cmap vtkexodusII_ex_put_elem_cmap
#define ex_put_elem_conn vtkexodusII_ex_put_elem_conn
#define ex_put_elem_map vtkexodusII_ex_put_elem_map
#define ex_put_elem_num_map vtkexodusII_ex_put_elem_num_map
#define ex_put_elem_var vtkexodusII_ex_put_elem_var
#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_glob_vars vtkexodusII_ex_put_glob_vars
#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
#define ex_put_init_ext vtkexodusII_ex_put_init_ext
#define ex_put_init_global vtkexodusII_ex_put_init_global
#define ex_put_init_info vtkexodusII_ex_put_init_info
#define ex_put_loadbal_param vtkexodusII_ex_put_loadbal_param
#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_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_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_n_one_attr vtkexodusII_ex_put_n_one_attr
#define ex_put_n_side_set vtkexodusII_ex_put_n_side_set
#define ex_put_n_side_set_df vtkexodusII_ex_put_n_side_set_df
#define ex_put_n_var vtkexodusII_ex_put_n_var
#define ex_put_name vtkexodusII_ex_put_name
#define ex_put_name_internal vtkexodusII_ex_put_name_internal
#define ex_put_names vtkexodusII_ex_put_names
#define ex_put_names_internal vtkexodusII_ex_put_names_internal
#define ex_put_nemesis_version vtkexodusII_ex_put_nemesis_version
#define ex_put_nodal_var vtkexodusII_ex_put_nodal_var
#define ex_put_nodal_var_int vtkexodusII_ex_put_nodal_var_int
#define ex_put_nodal_var_slab vtkexodusII_ex_put_nodal_var_slab
#define ex_put_node_cmap vtkexodusII_ex_put_node_cmap
#define ex_put_node_map vtkexodusII_ex_put_node_map
#define ex_put_node_num_map vtkexodusII_ex_put_node_num_map
#define ex_put_node_set vtkexodusII_ex_put_node_set
#define ex_put_node_set_dist_fact vtkexodusII_ex_put_node_set_dist_fact
#define ex_put_node_set_param vtkexodusII_ex_put_node_set_param
#define ex_put_ns_param_global vtkexodusII_ex_put_ns_param_global
#define ex_put_nset_var vtkexodusII_ex_put_nset_var
#define ex_put_nset_var_tab vtkexodusII_ex_put_nset_var_tab
#define ex_put_num_map vtkexodusII_ex_put_num_map
#define ex_put_one_attr vtkexodusII_ex_put_one_attr
#define ex_put_one_elem_attr vtkexodusII_ex_put_one_elem_attr
#define ex_put_partial_attr vtkexodusII_ex_put_partial_attr
#define ex_put_partial_conn vtkexodusII_ex_put_partial_conn
#define ex_put_partial_coord vtkexodusII_ex_put_partial_coord
#define ex_put_partial_coord_component vtkexodusII_ex_put_partial_coord_component
#define ex_put_partial_elem_attr vtkexodusII_ex_put_partial_elem_attr
#define ex_put_partial_elem_conn vtkexodusII_ex_put_partial_elem_conn
#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_int vtkexodusII_ex_put_partial_nodal_var_int
#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
#define ex_put_partial_node_set_df vtkexodusII_ex_put_partial_node_set_df
#define ex_put_partial_num_map vtkexodusII_ex_put_partial_num_map
#define ex_put_partial_one_attr vtkexodusII_ex_put_partial_one_attr
#define ex_put_partial_set vtkexodusII_ex_put_partial_set
#define ex_put_partial_set_dist_fact vtkexodusII_ex_put_partial_set_dist_fact
#define ex_put_partial_side_set vtkexodusII_ex_put_partial_side_set
#define ex_put_partial_side_set_df vtkexodusII_ex_put_partial_side_set_df
#define ex_put_partial_var vtkexodusII_ex_put_partial_var
#define ex_put_processor_elem_maps vtkexodusII_ex_put_processor_elem_maps
#define ex_put_processor_node_maps vtkexodusII_ex_put_processor_node_maps
#define ex_put_prop vtkexodusII_ex_put_prop
#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_set vtkexodusII_ex_put_set
#define ex_put_set_dist_fact vtkexodusII_ex_put_set_dist_fact
#define ex_put_set_param vtkexodusII_ex_put_set_param
#define ex_put_sets vtkexodusII_ex_put_sets
#define ex_put_side_set vtkexodusII_ex_put_side_set
#define ex_put_side_set_dist_fact vtkexodusII_ex_put_side_set_dist_fact
#define ex_put_side_set_param vtkexodusII_ex_put_side_set_param
#define ex_put_ss_param_global vtkexodusII_ex_put_ss_param_global
#define ex_put_sset_var vtkexodusII_ex_put_sset_var
#define ex_put_sset_var_tab vtkexodusII_ex_put_sset_var_tab
#define ex_put_time vtkexodusII_ex_put_time
#define ex_put_truth_table vtkexodusII_ex_put_truth_table
#define ex_put_var vtkexodusII_ex_put_var
#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_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_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_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_strerror vtkexodusII_ex_strerror
#define ex_trim_internal vtkexodusII_ex_trim_internal
#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
#endif /* vtk_exodusII_mangle.h */
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "exodusII.h" // for ex_set_specs, void_int, etc
#include <stddef.h> // for NULL
/*!
\deprecated Use ex_get_concat_sets()(exoid, EX_NODE_SET, set_specs) instead
The function ex_get_concat_node_sets() reads the node set ID's, node
set node count array, node set distribution factors count array, node
set node pointers array, node set distribution factors pointer array,
node set node list, and node set distribution factors for all of the
node sets. ``Concatenated node sets'' refers to the arrays required to
define all of the node sets (ID array, counts arrays, pointers arrays,
node list array, and distribution factors array) as described in
Section 3.10 on page 11.
Because the distribution factors 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().
The length of each of the returned arrays can be determined by
invoking ex_inquire() or ex_inquire_int().
\return In case of an error, ex_get_concat_node_sets() 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()
- a warning value is returned if no node sets are stored in the file.
\param[in] exoid exodus file ID returned from a previous call
to ex_create()
or ex_open().
\param[out] node_set_ids Returned array containing the node set ID for
each set.
\param[out] num_nodes_per_set Returned array containing the number of nodes
for each set.
\param[out] num_df_per_set Returned array containing the number of
distribution factors for each
set.
\param[out] node_sets_node_index Returned array containing the indices into the
node_set_node_list
which are the locations of the first node for
each set. These indices
are 0-based.
\param[out] node_sets_df_index Returned array containing the indices into the
node_set_dist_fact
which are the locations of the first
distribution factor for each
set. These indices are 0-based.
\param[out] node_sets_node_list Returned array containing the nodes for all
sets. Internal node IDs
are used in this list (see Section
LocalNodeIds).
\param[out] node_sets_dist_fact Returned array containing the distribution
factors for all sets.
As an example, the following code segment will read concatenated node
sets:
~~~{.c}
int error, exoid, num_node_sets, list_len, *ids,
*num_nodes_per_set, *num_df_per_set, *node_ind,
*df_ind, *node_list;
float *dist_fact
\comment{read concatenated node sets}
num_node_sets = ex_inquire_int(exoid, EX_INQ_NODE_SETS);
ids = (int *) calloc(num_node_sets, sizeof(int));
num_nodes_per_set = (int *) calloc(num_node_sets, sizeof(int));
num_df_per_set = (int *) calloc(num_node_sets, sizeof(int));
node_ind = (int *) calloc(num_node_sets, sizeof(int));
df_ind = (int *) calloc(num_node_sets, sizeof(int));
list_len = ex_inquire_int(exoid, EX_INQ_NS_NODE_LEN);
node_list = (int *) calloc(list_len, sizeof(int));
list_len = ex_inquire_int(exoid, EX_INQ_NS_DF_LEN);
dist_fact = (float *) calloc(list_len, sizeof(float));
error = ex_get_concat_node_sets (exoid, ids, num_nodes_per_set,
num_df_per_set, node_ind, df_ind,
node_list, dist_fact);
~~~
*/
int ex_get_concat_node_sets(int exoid, void_int *node_set_ids, void_int *num_nodes_per_set,
void_int *num_df_per_set, void_int *node_sets_node_index,
void_int *node_sets_df_index, void_int *node_sets_node_list,
void *node_sets_dist_fact)
{
struct ex_set_specs set_specs;
set_specs.sets_ids = node_set_ids;
set_specs.num_entries_per_set = num_nodes_per_set;
set_specs.num_dist_per_set = num_df_per_set;
set_specs.sets_entry_index = node_sets_node_index;
set_specs.sets_dist_index = node_sets_df_index;
set_specs.sets_entry_list = node_sets_node_list;
set_specs.sets_extra_list = NULL;
set_specs.sets_dist_fact = node_sets_dist_fact;
return ex_get_concat_sets(exoid, EX_NODE_SET, &set_specs);
}
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*****************************************************************************
*
* exgcss - ex_get_concat_side_sets
*
* entry conditions -
* input parameters:
* int exoid exodus file id
*
* exit conditions -
* int *side_set_ids array of side set ids
* int *num_elem_per_set number of elements/sides/faces per set
* int *num_dist_per_set number of distribution factors per set
* int *side_sets_elem_index index array of elements into elem list
* int *side_sets_dist_index index array of df into df list
* int *side_sets_elem_list array of elements
* int *side_sets_side_list array of sides
* void *side_sets_dist_fact array of distribution factors
*
* revision history -
*
*
*****************************************************************************/
#include "exodusII.h" // for ex_set_specs, void_int, etc
/*!
* \undoc reads the side set ID's, side set element count array, side set node
* count
* array, side set element pointers array, side set node pointers array, side
* set element list, side set node list, and side set distribution factors
* \deprecated Use ex_get_concat_sets()(exoid, EX_SIDE_SET, set_specs) instead
*/
int ex_get_concat_side_sets(int exoid, void_int *side_set_ids, void_int *num_elem_per_set,
void_int *num_dist_per_set, void_int *side_sets_elem_index,
void_int *side_sets_dist_index, void_int *side_sets_elem_list,
void_int *side_sets_side_list, void *side_sets_dist_fact)
{
struct ex_set_specs set_specs;
set_specs.sets_ids = side_set_ids;
set_specs.num_entries_per_set = num_elem_per_set;
set_specs.num_dist_per_set = num_dist_per_set;
set_specs.sets_entry_index = side_sets_elem_index;
set_specs.sets_dist_index = side_sets_dist_index;
set_specs.sets_entry_list = side_sets_elem_list;
set_specs.sets_extra_list = side_sets_side_list;
set_specs.sets_dist_fact = side_sets_dist_fact;
return ex_get_concat_sets(exoid, EX_SIDE_SET, &set_specs);
}
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "exodusII.h"
/*!
\deprecated Use ex_get_attr()(exoid, EX_ELEM_BLOCK, elem_blk_id, attrib) instead
The function ex_get_elem_attr() reads the attributes for an element
block. Memory must be allocated for(num_attr x num_elem_this_blk)
attributes before this routine is called.
Because the attributes 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_get_elem_attr() 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()
- invalid element block ID.
- a warning value is returned if no attributes are stored in the file.
\param[in] exoid exodus file ID returned from a previous call to
ex_create() or ex_open().
\param[in] elem_blk_id The element block ID.
\param[out] attrib Size [num_elem_this_blk*num_attr].
Returned list of(num_attr x num_elem_this_blk)
attributes for
the element block, with the num_attr index cycling
faster.
Refer to the code example in ex_get_elem_block() for an example
of reading the element attributes for an element block.
*/
int ex_get_elem_attr(int exoid, ex_entity_id elem_blk_id, void *attrib)
{
return ex_get_attr(exoid, EX_ELEM_BLOCK, elem_blk_id, attrib);
}
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*****************************************************************************
*
* exgeat - ex_get_elem_attr_names
*
* entry conditions -
* input parameters:
* int exoid exodus file id
* int elem_blk_id element block id
*
* exit conditions -
* char* names[] ptr array of attribute names
*
*
*****************************************************************************/
#include "exodusII.h" // for ex_get_attr_names, etc
/*!
* reads the attribute names for an element block
* \deprecated Use ex_get_attr_names()(exoid, EX_ELEM_BLOCK, elem_blk_id, names)
* instead
*/
int ex_get_elem_attr_names(int exoid, ex_entity_id elem_blk_id, char **names)
{
return ex_get_attr_names(exoid, EX_ELEM_BLOCK, elem_blk_id, names);
}
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "exodusII.h"
/*!
\deprecated Use ex_get_ids()(exoid, EX_ELEM_BLOCK, ids) instead
The function ex_get_elem_blk_ids() reads the IDs of all of the element
blocks. Memory must be allocated for the returned array of
({num_elem_blk}) IDs before this function is invoked. The required
size(num_elem_blk) can be determined via a call to ex_inquire() or
ex_inquire_int().
\return In case of an error, ex_get_elem_blk_ids() 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()
\param[in] exoid exodus file ID returned from a previous call to
ex_create() or ex_open().
\param[out] ids Returned array of the element blocks IDs. The order
of the IDs in this
array reflects the sequence that the element blocks
were introduced
into the file.
The following code segment reads all the element block IDs:
~~~{.c}
int error, exoid, *idelbs, num_elem_blk;
idelbs = (int *) calloc(num_elem_blk, sizeof(int));
error = ex_get_elem_blk_ids (exoid, idelbs);
\comment{Same result using non-deprecated functions}
error = ex_get_ids (exoid, EX_ELEM_BLOCK, idelbs);
~~~
*/
int ex_get_elem_blk_ids(int exoid, void_int *ids)
{
/* ex_get_elem_blk_ids should be deprecated. */
return ex_get_ids(exoid, EX_ELEM_BLOCK, ids);
}
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "exodusII.h"
/**
\deprecated Use ex_get_block()(exoid, EX_ELEM_BLOCK, elem_blk_id, elem_type,
num_elem_this_blk, num_nodes_per_elem, num_attr) instead
The function ex_get_elem_block() reads the parameters used to describe
an element block. IDs of all element blocks stored can be determined
by calling ex_get_elem_blk_ids().
\return In case of an error, ex_get_elem_block() 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()
- element block with specified ID is not stored in the data file.
\param[in] exoid exodus file ID returned from a previous call to
ex_create() or ex_open().
\param[in] elem_blk_id The element block ID.
\param[out] elem_type Returned element typetype of elements in the
element block.
The maximum length of this string is \p
MAX_STR_LENGTH .
\param[out] num_elem_this_blk Returned number of elements in the element block.
\param[out] num_nodes_per_elem Returned number of nodes per element in the
element block.
\param[out] num_attr Returned number of attributes per element in the
element block.
As an example, the following code segment will read the parameters for
the element block with an ID of 10 and read the connectivity and
element attributes arrays from an open exodus file :
~~~{.c}
#include "exodusII.h"
int id, error, exoid, num_el_in_blk, num_nod_per_el, num_attr,
*connect;
float *attrib;
char elem_type[MAX_STR_LENGTH+1];
\comment{read element block parameters}
id = 10;
error = ex_get_elem_block(exoid, id, elem_type, &num_el_in_blk,
&num_nod_per_elem, &num_attr);
\comment{read element connectivity}
connect = (int *) calloc(num_nod_per_el*num_el_in_blk,
sizeof(int));
error = ex_get_elem_conn(exoid, id, connect);
\comment{read element block attributes}
attrib = (float *) calloc (num_attr * num_el_in_blk, sizeof(float));
error = ex_get_elem_attr (exoid, id, attrib);
\comment{Same result using non-deprecated functions}
error = ex_get_block(exoid, EX_ELEM_BLOCK, id, elem_type, &num_el_in_blk,
&num_nod_per_elem, 0, 0, &num_attr);
error = ex_get_conn (exoid, EX_ELEM_BLOCK, id, connect);
error = ex_get_attr (exoid, EX_ELEM_BLOCK, id, attrib);
~~~
*/
int ex_get_elem_block(int exoid, ex_entity_id elem_blk_id, char *elem_type,
void_int *num_elem_this_blk, void_int *num_nodes_per_elem, void_int *num_attr)
{
return ex_get_block(exoid, EX_ELEM_BLOCK, elem_blk_id, elem_type, num_elem_this_blk,
num_nodes_per_elem, 0, 0, num_attr);
}
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "exodusII.h"
/*!
\deprecated Use ex_get_conn()(exoid, EX_ELEM_BLOCK, elem_blk_id, connect, 0, 0)
instead
The function ex_get_elem_conn() reads the connectivity array for an
element block. Memory must be allocated for the connectivity array
(num_elem_this_blk * num_nodes_per_elem in length) before
this routine is called.
\return In case of an error, ex_get_elem_conn() returns a negative number; a
warning will return a positive number. Possible causes of errors
include:
- an element block with the specified ID is not stored in the file.
\param[in] exoid exodus file ID returned from a previous call to
ex_create() or ex_open().
\param[in] elem_blk_id The element block ID.
\param[out] connect Size [num_elem_this_blk,num_nodes_per_elem].
Returned connectivity array; a list of nodes (internal
node
IDs; See Section LocalNodeIds) that define each
element. The
node index cycles faster than the element index.
Refer to the code example in ex_get_elem_block() for an example of
reading the connectivity for an element block.
*/
int ex_get_elem_conn(int exoid, ex_entity_id elem_blk_id, void_int *connect)
{
return ex_get_conn(exoid, EX_ELEM_BLOCK, elem_blk_id, connect, 0, 0);
}
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*****************************************************************************
*
* exgem - ex_get_elem_map
*
* entry conditions -
* input parameters:
* int exoid exodus file id
* int map_id element map id
*
* exit conditions -
* int* elem_map element map
*
*****************************************************************************/
#include "exodusII.h" // for ex_get_num_map, etc
/*!
* reads the element map with specified ID
* \deprecated Use ex_get_num_map()(exoid, EX_ELEM_MAP, map_id, elem_map)
* instead
*/
int ex_get_elem_map(int exoid, ex_entity_id map_id, void_int *elem_map)
{
return ex_get_num_map(exoid, EX_ELEM_MAP, map_id, elem_map);
}
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*****************************************************************************
*
* exgenm - ex_get_elem_num_map
*
* entry conditions -
* input parameters:
* int exoid exodus file id
*
* exit conditions -
* int* elem_map element number map array
*
* revision history -
*
*****************************************************************************/
#include "exodusII.h"
/*!
\deprecated Use ex_get_id_map()(exoid, EX_ELEM_MAP, elem_map)
The function ex_get_elem_num_map() reads the optional element number
map from the database. See Section LocalElementIds for a description of
the element number map. If an element number map is not stored in the
data file, a default array (1,2,3,. .. num_elem) is
returned. Memory must be allocated for the element number map array
({num_elem} in length) before this call is made.
\return In case of an error, ex_get_elem_num_map() 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()
- if an element number map is not stored, a default map and a warning value
are returned.
\param[in] exoid exodus file ID returned from a previous call to
ex_create() or ex_open().
\param[out] elem_map Returned element number map.
The following code will read an element number map from an
open exodus file :
~~~{.c}
int *elem_map, error, exoid;
\comment{read element number map}
elem_map = (int *) calloc(num_elem, sizeof(int));
error = ex_get_elem_num_map (exoid, elem_map);
\comment{Equivalent using non-deprecated function}
error = ex_get_id_map(exoid, EX_ELEM_MAP, elem_map);
~~~
*/
int ex_get_elem_num_map(int exoid, void_int *elem_map)
{
return ex_get_id_map(exoid, EX_ELEM_MAP, elem_map);
}
/*
* Copyright (c) 2005-2017 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.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of NTESS nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "exodusII.h" // for ex_get_var, ex_entity_id, etc
#include <stdint.h> // for int64_t
/*!
\deprecated Use ex_get_var()(exoid, time_step, EX_ELEM_BLOCK, elem_var_index,
elem_blk_id, num_elem_this_blk, elem_var_vals) instead
The function ex_get_elem_var() reads the values of a single element
variable for one element block at one time step. Memory must be
allocated for the element variable values array before this function
is invoked.
Because element 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_get_elem_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 element block.
- invalid element block.
\param[in] exoid exodus file ID returned from a previous call to
ex_create() or ex_open().
\param[in] time_step The time step number, as described under
ex_put_time(), at
which the element variable values are desired. This
is essentially an
index (in the time dimension) into the element
variable values array
stored in the database. The first time step is 1.
\param[in] elem_var_index The index of the desired element variable. The first
variable
has an index of 1.
\param[in] elem_blk_id The desired element block ID.
\param[in] num_elem_this_blk The number of elements in this element block.
\param[out] elem_var_vals Returned array of num_elem_this_blk values of the
elem_var_index
element variable for the element block with ID of
elem_blk_id at the time_step time step.
As an example, the following code segment will read the
var_index-th element variable at one time step stored in an exodus
file :
~~~{.c}
int *ids, num_elem_blk, error, exoid, *num_elem_in_block,
step, var_ind;
float *var_vals;
ids = (int *) calloc(num_elem_blk, sizeof(int));
error = ex_get_elem_blk_ids (exoid, ids);
step = 1; \comment{read at the first time step}
for (i=0; i < num_elem_blk; i++) {
var_vals = (float *) calloc (num_elem_in_block[i], sizeof(float));
error = ex_get_elem_var (exoid, step, var_ind, ids[i],
num_elem_in_block[i], var_vals);
\comment{Using non-deprecated function:}
error = ex_get_var (exoid, step, EX_ELEM_BLOCK, var_ind, ids[i],
num_elem_in_block[i], var_vals);
free (var_values);
}
~~~
*/
int ex_get_elem_var(int exoid, int time_step, int elem_var_index, ex_entity_id elem_blk_id,
int64_t num_elem_this_blk, void *elem_var_vals)
{
return ex_get_var(exoid, time_step, EX_ELEM_BLOCK, elem_var_index, elem_blk_id, num_elem_this_blk,
elem_var_vals);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment