[exodus] 03/48: Checkin 5.14
Alastair McKinstry
mckinstry at moszumanska.debian.org
Wed Jul 15 11:35:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository exodus.
commit 73ac1b9bf11669ee4b2351504ac7fac2c20462be
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Thu Oct 6 00:24:05 2011 +0100
Checkin 5.14
---
CVS/Entries | 9 -
CVS/Entries.Log | 3 -
CVS/Repository | 1 -
CVS/Root | 1 -
ChangeLog | 104 +
cbind/CMakeLists.txt | 257 --
cbind/CVS/Entries | 2 -
cbind/CVS/Entries.Log | 3 -
cbind/CVS/Repository | 1 -
cbind/CVS/Root | 1 -
cbind/include/CVS/Entries | 8 -
cbind/include/CVS/Repository | 1 -
cbind/include/CVS/Root | 1 -
cbind/src/CVS/Entries | 178 -
cbind/src/CVS/Repository | 1 -
cbind/src/CVS/Root | 1 -
cbind/src/Makefile.standalone | 41 -
cbind/src/exerr.c | 134 -
cbind/src/exgcns.c | 88 -
cbind/src/exgelb.c | 75 -
cbind/src/exgev.c | 75 -
cbind/src/exgevt.c | 74 -
cbind/src/exinq.c | 790 -----
cbind/src/expcns.c | 97 -
cbind/src/expev.c | 84 -
cbind/src/expnp.c | 71 -
cbind/src/expvtt.c | 81 -
cbind/test/CVS/Entries | 70 -
cbind/test/CVS/Repository | 1 -
cbind/test/CVS/Root | 1 -
doc/CVS/Entries | 2 -
doc/CVS/Repository | 1 -
doc/CVS/Root | 1 -
CMakeLists.txt => exodus/CMakeLists.txt | 4 +-
COPYRIGHT => exodus/COPYRIGHT | 0
DartConfig.cmake => exodus/DartConfig.cmake | 0
Doxyfile => exodus/Doxyfile | 666 +++-
Imakefile => exodus/Imakefile | 14 +-
Makefile.standalone => exodus/Makefile.standalone | 20 +-
README => exodus/README | 23 +-
exodus/cbind/CMakeLists.txt | 271 ++
{cbind => exodus/cbind}/include/Imakefile | 0
{cbind => exodus/cbind}/include/doxygen.h | 25 +
{cbind => exodus/cbind}/include/exodusII.h | 55 +-
{cbind => exodus/cbind}/include/exodusII_cfg.h.in | 0
{cbind => exodus/cbind}/include/exodusII_ext.h | 0
{cbind => exodus/cbind}/include/exodusII_int.h | 27 +-
{cbind => exodus/cbind}/include/exodusII_test.h | 0
{cbind => exodus/cbind}/src/Imakefile | 19 +-
exodus/cbind/src/Makefile.standalone | 193 ++
{cbind => exodus/cbind}/src/ex_conv.c | 0
{cbind => exodus/cbind}/src/ex_utils.c | 261 +-
{cbind => exodus/cbind}/src/exclos.c | 18 +-
{cbind => exodus/cbind}/src/excn2s.c | 113 +-
{cbind => exodus/cbind}/src/excopy.c | 59 +-
{cbind => exodus/cbind}/src/excre.c | 155 +-
exodus/cbind/src/exerr.c | 244 ++
{cbind => exodus/cbind}/src/exgatm.c | 61 +-
{cbind => exodus/cbind}/src/exgatn.c | 41 +-
{cbind => exodus/cbind}/src/exgatt.c | 4 +-
{cbind => exodus/cbind}/src/exgattp.c | 2 +-
{cbind => exodus/cbind}/src/exgblk.c | 4 +-
exodus/cbind/src/exgcns.c | 143 +
{cbind => exodus/cbind}/src/exgcon.c | 94 +-
{cbind => exodus/cbind}/src/exgconn.c | 9 +-
{cbind => exodus/cbind}/src/exgcor.c | 87 +-
{cbind => exodus/cbind}/src/exgcset.c | 14 +-
{cbind => exodus/cbind}/src/exgcss.c | 2 +-
{cbind => exodus/cbind}/src/exgcssc.c | 4 +
{cbind => exodus/cbind}/src/exgean.c | 0
{cbind => exodus/cbind}/src/exgeat.c | 44 +-
{cbind => exodus/cbind}/src/exgebi.c | 52 +-
{cbind => exodus/cbind}/src/exgecpp.c | 0
exodus/cbind/src/exgelb.c | 105 +
{cbind => exodus/cbind}/src/exgelc.c | 41 +-
{cbind => exodus/cbind}/src/exgem.c | 0
{cbind => exodus/cbind}/src/exgenm.c | 36 +-
exodus/cbind/src/exgev.c | 115 +
{cbind => exodus/cbind}/src/exgevid.c | 0
exodus/cbind/src/exgevt.c | 141 +
{cbind => exodus/cbind}/src/exgfrm.c | 0
{cbind => exodus/cbind}/src/exggv.c | 46 +-
{cbind => exodus/cbind}/src/exggvt.c | 78 +-
{cbind => exodus/cbind}/src/exgidm.c | 0
{cbind => exodus/cbind}/src/exgids.c | 0
{cbind => exodus/cbind}/src/exginf.c | 82 +-
{cbind => exodus/cbind}/src/exgini.c | 47 +-
{cbind => exodus/cbind}/src/exginix.c | 130 +-
{cbind => exodus/cbind}/src/exgmap.c | 48 +-
{cbind => exodus/cbind}/src/exgmp.c | 0
{cbind => exodus/cbind}/src/exgnam.c | 37 +-
{cbind => exodus/cbind}/src/exgnams.c | 41 +-
{cbind => exodus/cbind}/src/exgnconn.c | 0
{cbind => exodus/cbind}/src/exgncor.c | 2 +-
{cbind => exodus/cbind}/src/exgnm.c | 0
{cbind => exodus/cbind}/src/exgnmap.c | 0
{cbind => exodus/cbind}/src/exgnnm.c | 39 +-
{cbind => exodus/cbind}/src/exgnnv.c | 0
{cbind => exodus/cbind}/src/exgnoatt.c | 0
{cbind => exodus/cbind}/src/exgnp.c | 69 +-
{cbind => exodus/cbind}/src/exgns.c | 0
{cbind => exodus/cbind}/src/exgnsd.c | 44 +-
{cbind => exodus/cbind}/src/exgnsi.c | 49 +-
{cbind => exodus/cbind}/src/exgnstt.c | 0
{cbind => exodus/cbind}/src/exgnsv.c | 0
{cbind => exodus/cbind}/src/exgnsvid.c | 0
{cbind => exodus/cbind}/src/exgnv.c | 73 +-
{cbind => exodus/cbind}/src/exgnvar.c | 0
{cbind => exodus/cbind}/src/exgnvid.c | 0
{cbind => exodus/cbind}/src/exgnvt.c | 84 +-
{cbind => exodus/cbind}/src/exgnvv.c | 0
{cbind => exodus/cbind}/src/exgoatt.c | 0
{cbind => exodus/cbind}/src/exgoea.c | 0
{cbind => exodus/cbind}/src/exgotv.c | 0
{cbind => exodus/cbind}/src/exgp.c | 75 +-
{cbind => exodus/cbind}/src/exgpa.c | 54 +-
{cbind => exodus/cbind}/src/exgpem.c | 0
{cbind => exodus/cbind}/src/exgpn.c | 106 +-
{cbind => exodus/cbind}/src/exgqa.c | 98 +-
{cbind => exodus/cbind}/src/exgset.c | 24 +-
{cbind => exodus/cbind}/src/exgsetd.c | 0
{cbind => exodus/cbind}/src/exgsetp.c | 0
{cbind => exodus/cbind}/src/exgsnl.c | 4 +-
{cbind => exodus/cbind}/src/exgsp.c | 0
{cbind => exodus/cbind}/src/exgss.c | 0
{cbind => exodus/cbind}/src/exgssc.c | 34 +-
{cbind => exodus/cbind}/src/exgssd.c | 0
{cbind => exodus/cbind}/src/exgssi.c | 0
{cbind => exodus/cbind}/src/exgssn.c | 0
{cbind => exodus/cbind}/src/exgsstt.c | 0
{cbind => exodus/cbind}/src/exgssv.c | 0
{cbind => exodus/cbind}/src/exgssvid.c | 0
{cbind => exodus/cbind}/src/exgtim.c | 54 +-
{cbind => exodus/cbind}/src/exgtt.c | 0
{cbind => exodus/cbind}/src/exgvan.c | 0
{cbind => exodus/cbind}/src/exgvar.c | 0
{cbind => exodus/cbind}/src/exgvarnam.c | 36 +-
{cbind => exodus/cbind}/src/exgvarnams.c | 106 +-
{cbind => exodus/cbind}/src/exgvarparam.c | 42 +-
{cbind => exodus/cbind}/src/exgvart.c | 0
{cbind => exodus/cbind}/src/exgvartab.c | 0
{cbind => exodus/cbind}/src/exgvid.c | 0
{cbind => exodus/cbind}/src/exgvnm.c | 0
{cbind => exodus/cbind}/src/exgvp.c | 0
{cbind => exodus/cbind}/src/exgvtt.c | 43 +-
{cbind => exodus/cbind}/src/exgvv.c | 0
exodus/cbind/src/exinq.c | 1066 ++++++
{cbind => exodus/cbind}/src/exopen.c | 135 +-
{cbind => exodus/cbind}/src/exopts.c | 53 +-
{cbind => exodus/cbind}/src/expatn.c | 25 +-
{cbind => exodus/cbind}/src/expatt.c | 0
{cbind => exodus/cbind}/src/expattp.c | 2 +-
{cbind => exodus/cbind}/src/expblk.c | 24 +-
{cbind => exodus/cbind}/src/expcab.c | 2 +-
{cbind => exodus/cbind}/src/expclb.c | 2 +-
exodus/cbind/src/expcns.c | 147 +
{cbind => exodus/cbind}/src/expcon.c | 75 +-
{cbind => exodus/cbind}/src/expconn.c | 0
{cbind => exodus/cbind}/src/expcor.c | 61 +-
{cbind => exodus/cbind}/src/expcset.c | 0
{cbind => exodus/cbind}/src/expcss.c | 0
{cbind => exodus/cbind}/src/expean.c | 0
{cbind => exodus/cbind}/src/expeat.c | 55 +-
{cbind => exodus/cbind}/src/expecpp.c | 0
{cbind => exodus/cbind}/src/expelb.c | 79 +-
{cbind => exodus/cbind}/src/expelc.c | 33 +-
{cbind => exodus/cbind}/src/expem.c | 0
{cbind => exodus/cbind}/src/expenm.c | 58 +-
exodus/cbind/src/expev.c | 144 +
{cbind => exodus/cbind}/src/expfrm.c | 0
{cbind => exodus/cbind}/src/expgv.c | 58 +-
{cbind => exodus/cbind}/src/expidm.c | 0
{cbind => exodus/cbind}/src/expinf.c | 51 +-
{cbind => exodus/cbind}/src/expini.c | 65 +-
{cbind => exodus/cbind}/src/expinix.c | 410 ++-
{cbind => exodus/cbind}/src/expmap.c | 35 +-
{cbind => exodus/cbind}/src/expmp.c | 73 +-
{cbind => exodus/cbind}/src/expnam.c | 19 +-
{cbind => exodus/cbind}/src/expnams.c | 28 +-
{cbind => exodus/cbind}/src/expncor.c | 0
{cbind => exodus/cbind}/src/expnm.c | 0
{cbind => exodus/cbind}/src/expnmap.c | 0
{cbind => exodus/cbind}/src/expnnm.c | 59 +-
{cbind => exodus/cbind}/src/expnnv.c | 0
{cbind => exodus/cbind}/src/expnoatt.c | 0
exodus/cbind/src/expnp.c | 101 +
{cbind => exodus/cbind}/src/expns.c | 45 +-
{cbind => exodus/cbind}/src/expnsd.c | 50 +-
{cbind => exodus/cbind}/src/expnstt.c | 0
{cbind => exodus/cbind}/src/expnsv.c | 0
{cbind => exodus/cbind}/src/expnv.c | 80 +-
{cbind => exodus/cbind}/src/expnvar.c | 0
{cbind => exodus/cbind}/src/expnvv.c | 0
{cbind => exodus/cbind}/src/expoatt.c | 0
{cbind => exodus/cbind}/src/expoea.c | 0
{cbind => exodus/cbind}/src/expp.c | 107 +-
{cbind => exodus/cbind}/src/exppa.c | 78 +-
{cbind => exodus/cbind}/src/exppem.c | 0
cbind/src/expidm.c => exodus/cbind/src/exppidm.c | 27 +-
{cbind => exodus/cbind}/src/exppn.c | 127 +-
{cbind => exodus/cbind}/src/exppsetd.c | 0
{cbind => exodus/cbind}/src/expqa.c | 64 +-
{cbind => exodus/cbind}/src/expset.c | 38 +-
{cbind => exodus/cbind}/src/expsetd.c | 0
{cbind => exodus/cbind}/src/expsetp.c | 0
{cbind => exodus/cbind}/src/expsp.c | 0
{cbind => exodus/cbind}/src/expss.c | 0
{cbind => exodus/cbind}/src/expssd.c | 0
{cbind => exodus/cbind}/src/expsstt.c | 0
{cbind => exodus/cbind}/src/expssv.c | 0
{cbind => exodus/cbind}/src/exptim.c | 55 +-
{cbind => exodus/cbind}/src/exptt.c | 0
{cbind => exodus/cbind}/src/expvan.c | 0
{cbind => exodus/cbind}/src/expvar.c | 0
{cbind => exodus/cbind}/src/expvarnam.c | 32 +-
{cbind => exodus/cbind}/src/expvarnams.c | 84 +-
{cbind => exodus/cbind}/src/expvarparam.c | 81 +-
{cbind => exodus/cbind}/src/expvartab.c | 0
{cbind => exodus/cbind}/src/expvnm.c | 0
{cbind => exodus/cbind}/src/expvp.c | 0
{cbind => exodus/cbind}/src/expvpa.c | 0
{cbind => exodus/cbind}/src/expvpax.c | 4 +-
{cbind => exodus/cbind}/src/expvpc.c | 0
exodus/cbind/src/expvtt.c | 127 +
{cbind => exodus/cbind}/src/expvv.c | 0
{cbind => exodus/cbind}/src/exupda.c | 0
{cbind => exodus/cbind}/test/CMakeLists.txt | 3 +-
{cbind => exodus/cbind}/test/CreateEdgeFace.c | 38 +-
{cbind => exodus/cbind}/test/Imakefile | 10 +-
{cbind => exodus/cbind}/test/Makefile.standalone | 28 +-
{cbind => exodus/cbind}/test/ReadEdgeFace.c | 6 +-
{cbind => exodus/cbind}/test/create_mesh.c | 4 +-
exodus/cbind/test/exodus_unit_tests.gold | 41 +
{cbind => exodus/cbind}/test/makedmp | 0
{cbind => exodus/cbind}/test/rd_wt_mesh.c | 24 +-
{cbind => exodus/cbind}/test/test.dmp | 44 +-
{cbind => exodus/cbind}/test/test.exo_c | 0
{cbind => exodus/cbind}/test/test1.dmp | 34 +-
{cbind => exodus/cbind}/test/test2-1.dmp | 26 +-
{cbind => exodus/cbind}/test/test2-2.dmp | 26 +-
{cbind => exodus/cbind}/test/test2.dmp | 20 +-
{cbind => exodus/cbind}/test/test_clb.dmp | 34 +-
cbind/test/testall.in => exodus/cbind/test/testall | 81 +-
cbind/test/testall => exodus/cbind/test/testall.in | 88 +-
.../testall.in => exodus/cbind/test/testall.in1 | 79 +-
{cbind => exodus/cbind}/test/testcp.c | 0
{cbind => exodus/cbind}/test/testcp_dd.dmp | 20 +-
{cbind => exodus/cbind}/test/testcp_ds.dmp | 20 +-
{cbind => exodus/cbind}/test/testcp_ln.c | 0
{cbind => exodus/cbind}/test/testcp_ln.dmp | 28 +-
{cbind => exodus/cbind}/test/testcp_nl.c | 0
{cbind => exodus/cbind}/test/testcp_nl.dmp | 28 +-
{cbind => exodus/cbind}/test/testcp_sd.dmp | 28 +-
{cbind => exodus/cbind}/test/testcp_ss.dmp | 28 +-
{cbind => exodus/cbind}/test/testcpd.c | 0
{cbind => exodus/cbind}/test/testd.dmp | 26 +-
.../cbind/test/testrd-long-name.c | 73 +-
.../cbind/test/testrd-long-name.dmp | 41 +-
{cbind => exodus/cbind}/test/testrd-nfaced.c | 0
{cbind => exodus/cbind}/test/testrd-nfaced.dmp | 0
.../cbind/test/testrd-nm32.dmp | 39 +-
{cbind => exodus/cbind}/test/testrd-nsided.c | 26 +-
{cbind => exodus/cbind}/test/testrd-nsided.dmp | 0
{cbind => exodus/cbind}/test/testrd-partial.c | 7 +-
{cbind => exodus/cbind}/test/testrd.c | 24 +-
{cbind => exodus/cbind}/test/testrd.dmp | 7 +-
{cbind => exodus/cbind}/test/testrd1.c | 0
{cbind => exodus/cbind}/test/testrd1.dmp | 0
{cbind => exodus/cbind}/test/testrd_nc.c | 0
{cbind => exodus/cbind}/test/testrd_nc.dmp | 6 +-
{cbind => exodus/cbind}/test/testrd_ss.c | 0
{cbind => exodus/cbind}/test/testrd_ss.dmp | 0
{cbind => exodus/cbind}/test/testrd_zeroe.dmp | 1 +
{cbind => exodus/cbind}/test/testrd_zeron.dmp | 1 +
{cbind => exodus/cbind}/test/testrdd.c | 0
{cbind => exodus/cbind}/test/testrdd.dmp | 0
{cbind => exodus/cbind}/test/testrdv.c | 7 +-
{cbind => exodus/cbind}/test/testrdv.dmp | 6 +-
{cbind => exodus/cbind}/test/testrdwt.c | 0
.../cbind/test/testwt-long-name.c | 133 +-
.../cbind/test/testwt-long-name.dmp | 78 +-
.../cbind/test/testwt-nface-nside.c | 360 +-
{cbind => exodus/cbind}/test/testwt-nfaced.c | 2 +-
{cbind => exodus/cbind}/test/testwt-nfaced.dmp | 8 +-
{cbind => exodus/cbind}/test/testwt-nsided.c | 0
{cbind => exodus/cbind}/test/testwt-nsided.dmp | 24 +-
{cbind => exodus/cbind}/test/testwt-one-attrib.c | 0
{cbind => exodus/cbind}/test/testwt-partial.c | 0
{cbind => exodus/cbind}/test/testwt-zeroe.c | 0
{cbind => exodus/cbind}/test/testwt-zeroe.dmp | 10 +-
{cbind => exodus/cbind}/test/testwt-zeron.c | 0
{cbind => exodus/cbind}/test/testwt-zeron.dmp | 8 +-
{cbind => exodus/cbind}/test/testwt.c | 9 +-
{cbind => exodus/cbind}/test/testwt1.c | 0
{cbind => exodus/cbind}/test/testwt2.c | 0
{cbind => exodus/cbind}/test/testwt_clb.c | 0
{cbind => exodus/cbind}/test/testwt_nc.c | 8 +-
{cbind => exodus/cbind}/test/testwt_nossnsdf.c | 0
{cbind => exodus/cbind}/test/testwt_ss.c | 0
{cbind => exodus/cbind}/test/testwt_ss.dmp | 28 +-
{cbind => exodus/cbind}/test/testwtbig.c | 0
{cbind => exodus/cbind}/test/testwtd.c | 0
{cbind => exodus/cbind}/test/testwtm.c | 0
exodus/customdoxygen.css | 686 ++++
{doc => exodus/doc}/doc.poly.txt | 0
exodus/doc/exodus-face-edge.pdf | Bin 0 -> 720533 bytes
exodus/doc/exodus.pdf | Bin 0 -> 3842894 bytes
exodusii.dsp => exodus/exodusii.dsp | 0
exodus/forbind/CMakeLists.txt | 27 +
{forbind => exodus/forbind}/include/Imakefile | 1 +
exodus/forbind/include/exodusII.inc | 157 +
.../forbind}/include/exodusII_int.inc | 10 +
forbind/src/aix.m4 => exodus/forbind/src/Imakefile | 60 +-
.../forbind/src/Makefile.standalone | 60 +-
exodus/forbind/src/addrwrap.F | 3431 ++++++++++++++++++++
{forbind => exodus/forbind}/src/exo_jack.src | 1176 ++++---
exodus/forbind/test/CMakeLists.txt | 64 +
{forbind => exodus/forbind}/test/Imakefile | 0
.../forbind}/test/Makefile.standalone | 17 +
exodus/forbind/test/exodus_unit_tests.gold | 19 +
{forbind => exodus/forbind}/test/makedmp | 0
{forbind => exodus/forbind}/test/t.f.tmp | 0
{forbind => exodus/forbind}/test/test-nsided.dmp | 19 +-
{forbind => exodus/forbind}/test/test.dmp | 26 +-
{forbind => exodus/forbind}/test/test.exo_f | 0
{forbind => exodus/forbind}/test/test1.dmp | 34 +-
{forbind => exodus/forbind}/test/test2-1.dmp | 26 +-
{forbind => exodus/forbind}/test/test2-2.dmp | 26 +-
{forbind => exodus/forbind}/test/testall | 51 +-
.../test/testall => exodus/forbind/test/testall.in | 51 +-
.../testall => exodus/forbind/test/testall.in1 | 49 +-
{forbind => exodus/forbind}/test/testcp.f | 0
{forbind => exodus/forbind}/test/testcp_dd.dmp | 4 +-
{forbind => exodus/forbind}/test/testcp_ds.dmp | 4 +-
{forbind => exodus/forbind}/test/testcp_sd.dmp | 4 +-
{forbind => exodus/forbind}/test/testcp_ss.dmp | 20 +-
{forbind => exodus/forbind}/test/testcpd.f | 0
{forbind => exodus/forbind}/test/testcpln.dmp | 20 +-
{forbind => exodus/forbind}/test/testcpln.f | 0
{forbind => exodus/forbind}/test/testcpnl.dmp | 20 +-
{forbind => exodus/forbind}/test/testcpnl.f | 0
{forbind => exodus/forbind}/test/testd.dmp | 20 +-
{forbind => exodus/forbind}/test/testrd.dmp | 1 +
{forbind => exodus/forbind}/test/testrd.f | 7 +
{forbind => exodus/forbind}/test/testrd1.dmp | 0
{forbind => exodus/forbind}/test/testrd1.f | 0
{forbind => exodus/forbind}/test/testrd_nsid.dmp | 8 +
{forbind => exodus/forbind}/test/testrd_nsid.f | 44 +
{forbind => exodus/forbind}/test/testrdd.dmp | 0
{forbind => exodus/forbind}/test/testrdd.f | 0
{forbind => exodus/forbind}/test/testwt.f | 10 +-
{forbind => exodus/forbind}/test/testwt1.f | 0
{forbind => exodus/forbind}/test/testwt2.f | 0
{forbind => exodus/forbind}/test/testwt3.f | 0
{forbind => exodus/forbind}/test/testwt_nsid.f | 41 +
{forbind => exodus/forbind}/test/testwtd.f | 0
{forbind => exodus/forbind}/test/testwtm.f | 0
forbind/CVS/Entries | 1 -
forbind/CVS/Entries.Log | 3 -
forbind/CVS/Repository | 1 -
forbind/CVS/Root | 1 -
forbind/include/CVS/Entries | 4 -
forbind/include/CVS/Repository | 1 -
forbind/include/CVS/Root | 1 -
forbind/include/exodusII.inc | 176 -
forbind/src/CVS/Entries | 57 -
forbind/src/CVS/Repository | 1 -
forbind/src/CVS/Root | 1 -
forbind/src/Imakefile | 233 --
forbind/src/Makefile.standalone | 109 -
forbind/src/addrwrap.F | 3325 -------------------
forbind/src/aix0.inc | 29 -
forbind/src/catamount.m4 | 71 -
forbind/src/common.inc | 153 -
forbind/src/common.m4 | 79 -
forbind/src/common2.m4 | 79 -
forbind/src/cougar.m4 | 71 -
forbind/src/cray.m4 | 82 -
forbind/src/darwin.m4 | 73 -
forbind/src/excopy_jack.src | 107 -
forbind/src/exgem_jack.src | 141 -
forbind/src/exgenm_jack.src | 110 -
forbind/src/exgmp_jack.src | 110 -
forbind/src/exgnm_jack.src | 110 -
forbind/src/exgnnm_jack.src | 110 -
forbind/src/exgvnm_jack.src | 154 -
forbind/src/exodus.hh | 186 --
forbind/src/expem_jack.src | 140 -
forbind/src/expenm_jack.src | 108 -
forbind/src/expmp_jack.src | 109 -
forbind/src/expnm_jack.src | 109 -
forbind/src/expnnm_jack.src | 109 -
forbind/src/expvnm_jack.src | 156 -
forbind/src/fortc | 112 -
forbind/src/fortc1.sed | 95 -
forbind/src/fortc2.sed | 44 -
forbind/src/fortc3.sed | 1 -
forbind/src/fortc3_.sed | 1 -
forbind/src/hpux0.inc | 34 -
forbind/src/interix.m4 | 73 -
forbind/src/irix.m4 | 73 -
forbind/src/irix0.inc | 25 -
forbind/src/linux.m4 | 72 -
forbind/src/msoft.m4 | 71 -
forbind/src/msoft0.inc | 29 -
forbind/src/osf.m4 | 73 -
forbind/src/osf0.inc | 25 -
forbind/src/paragon.m4 | 71 -
forbind/src/puma.m4 | 71 -
forbind/src/pumagon.m4 | 71 -
forbind/src/sgi.m4 | 73 -
forbind/src/sunos.m4 | 68 -
forbind/src/sunos0.inc | 29 -
forbind/src/ultrix.m4 | 73 -
forbind/src/ultrix0.inc | 25 -
forbind/src/unicos.m4 | 82 -
forbind/src/unicos0.inc | 29 -
forbind/src/vms.m4 | 74 -
forbind/src/vms0.inc | 29 -
forbind/test/CVS/Entries | 38 -
forbind/test/CVS/Repository | 1 -
forbind/test/CVS/Root | 1 -
nemesis/CMakeLists.txt | 138 +
COPYRIGHT => nemesis/COPYRIGHT | 2 +-
nemesis/Imakefile | 151 +
Makefile.standalone => nemesis/Makefile.standalone | 115 +-
nemesis/README | 27 +
nemesis/doc/nemesis.pdf | Bin 0 -> 376501 bytes
forbind/src/hpux.m4 => nemesis/forbind/Imakefile | 61 +-
.../sun.m4 => nemesis/forbind/Makefile.standalone | 51 +-
nemesis/forbind/addrwrpn.F | 2220 +++++++++++++
nemesis/forbind/ne_jack.src | 1498 +++++++++
nemesis/forbind/ne_test.F | 930 ++++++
nemesis/ne_gcmp.c | 392 +++
nemesis/ne_gebig.c | 122 +
nemesis/ne_gelcm.c | 213 ++
nemesis/ne_gelm.c | 260 ++
nemesis/ne_gelt.c | 127 +
nemesis/ne_gennm.c | 151 +
nemesis/ne_genv.c | 139 +
nemesis/ne_giinf.c | 136 +
nemesis/ne_ginig.c | 195 ++
nemesis/ne_glbp.c | 538 +++
nemesis/ne_gncm.c | 187 ++
nemesis/ne_gncor.c | 216 ++
nemesis/ne_gneat.c | 179 +
nemesis/ne_gnelc.c | 176 +
nemesis/ne_gnm.c | 339 ++
nemesis/ne_gnnnm.c | 142 +
nemesis/ne_gnns.c | 174 +
nemesis/ne_gnnsd.c | 182 ++
cbind/src/exgnv.c => nemesis/ne_gnnv.c | 92 +-
nemesis/ne_gnspg.c | 153 +
nemesis/ne_gnss.c | 202 ++
nemesis/ne_gnssd.c | 176 +
nemesis/ne_gsspg.c | 153 +
nemesis/ne_nemesisI.h | 487 +++
nemesis/ne_nemesisI_int.h | 156 +
nemesis/ne_pcmp.c | 438 +++
nemesis/ne_pcmpc.c | 570 ++++
nemesis/ne_pebig.c | 119 +
nemesis/ne_pelcm.c | 228 ++
nemesis/ne_pelm.c | 260 ++
nemesis/ne_pennm.c | 181 ++
nemesis/ne_pevs.c | 281 ++
nemesis/ne_piinf.c | 183 ++
nemesis/ne_pinig.c | 319 ++
nemesis/ne_plbp.c | 650 ++++
nemesis/ne_plbpc.c | 838 +++++
nemesis/ne_pncm.c | 210 ++
nemesis/ne_pncor.c | 225 ++
nemesis/ne_pneat.c | 186 ++
nemesis/ne_pnelc.c | 176 +
nemesis/ne_pnm.c | 343 ++
nemesis/ne_pnnnm.c | 176 +
nemesis/ne_pnns.c | 172 +
nemesis/ne_pnnsd.c | 193 ++
nemesis/ne_pnspg.c | 148 +
nemesis/ne_pnss.c | 205 ++
nemesis/ne_pnssd.c | 195 ++
cbind/src/expnv.c => nemesis/ne_pnvs.c | 107 +-
nemesis/ne_psspg.c | 150 +
nemesis/ne_test.c | 1044 ++++++
nemesis/ne_util.c | 539 +++
484 files changed, 31761 insertions(+), 13319 deletions(-)
diff --git a/CVS/Entries b/CVS/Entries
deleted file mode 100644
index 58bb019..0000000
--- a/CVS/Entries
+++ /dev/null
@@ -1,9 +0,0 @@
-/CMakeLists.txt/1.2/Mon Feb 16 16:20:57 2009//
-/COPYRIGHT/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/DartConfig.cmake/1.1/Sun Nov 26 05:37:17 2006//
-/Doxyfile/1.3/Tue Jul 20 21:36:58 2010//
-/Imakefile/1.11/Tue Jul 20 21:36:58 2010//
-/Makefile.standalone/1.6/Tue Jul 20 21:36:58 2010//
-/README/1.5/Tue Jul 20 21:36:58 2010//
-/exodusii.dsp/1.1.1.1/Tue Sep 6 15:59:03 2005//
-D
diff --git a/CVS/Entries.Log b/CVS/Entries.Log
deleted file mode 100644
index 3dcfcf9..0000000
--- a/CVS/Entries.Log
+++ /dev/null
@@ -1,3 +0,0 @@
-A D/cbind////
-A D/doc////
-A D/forbind////
diff --git a/CVS/Repository b/CVS/Repository
deleted file mode 100644
index f232f5a..0000000
--- a/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii
diff --git a/CVS/Root b/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..f4262d1
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,104 @@
+========================================================================
+*** Permit 0 as valid entity (block, set, map) id
+
+* Version 5.09 -- Modifications to let zero be a valid entity (element
+ block, nodeset, sideset, map, other sets and blocks). There is a
+ new define EX_INVALID_ID (-1) which now indicates that the id for
+ an entity has not yet been set. All positive integers are now
+ valid id values.
+
+========================================================================
+*** Long Name support.
+
+ Exodus from version 5.08 and later can support names of length up
+ to NC_MAXNAME which is currently 256. The internals of the exodus
+database have changed with the addition of a new 'dimension' and a new
+database attribute.
+
+This has the following implications:
+*. The old library can read a new database if the new database does
+ not use names longer than 32 characters.
+
+*. If the new database uses longer names, the old library will crash.
+
+*. New library with old database will work fine.
+
+*. New library with new database, no code changes. If the database
+ uses long names, they will be truncated (with message to stderr) at
+ 32 characters. An output database will limit names to 32
+ characters by default.
+
+The following code changes are used to work with long names:
+
+========================================
+Reading a database:
+
+* Query a database for the maximum length of a name stored on the
+ database. This does not include the space for the trailing null.
+
+ int max_name_length = ex_inquire_int(exoid,
+ EX_INQ_DB_MAX_USED_NAME_LENGTH);
+
+* Tell the exodus API the maximum name length that your client code
+ can handle. This is the size of the character strings that are
+ passed to the ex_get_names() and similar calls. Note that the
+ maximum_length does not include the trailing null. That means that
+ if you tell the library to give you 32-character names, the memory
+ buffer you pass to the library must be 33 characters.
+
+ int status = ex_set_max_name_length(exoid, maximum_length);
+
+ If this size is less than the length of a name on the database, the
+ name will be truncated and a message printed to stderr.
+
+* Inquire the size set for the max_name_length. Will return 32 by
+ default, or if ex_set_max_name_length was called, it will return the
+ size set in that call.
+
+ int max_name_length = ex_inquire_int(exoid,
+ EX_INQ_CUR_MAX_ALLOWED_NAME_LENGTH);
+
+* Inquire the size that the database used at creation time for the
+ maximum name size. This is the value used for
+ ex_set_max_name_length() when the database was created. This isn't
+ really needed unless you are appending to an existing database and
+ want to know how long of names it will support.
+
+========================================
+Writing a database:
+
+* After the ex_create() call and before the call to ex_put_init() or
+ ex_put_init_ext(), call ex_set_max_name_length(exoid, max_length); to
+ tell the database the maximum size names that you will be
+ outputting. If this isn't called, then it will default to 32
+ character names.
+
+* The code will keep track of the maximum length that was written and
+ will update an attribute on the database with that length. This is
+ queryable via the following function:
+
+ int max_name_length = ex_inquire_int(exoid,
+ EX_INQ_DB_MAX_USED_NAME_LENGTH);
+
+
+========================================
+Names that are included:
+
+* Entity names (element block, nodeset, sideset, faceblock, ...)
+* Attribute names
+* Map names
+* Results variable names
+
+Still 32 characters:
+* QA strings
+* element type in ex_get_block, ex_put_block calls.
+
+Still 80 characters:
+* info records
+* title.
+
+========================================
+Questions / Concerns / Problems:
+
+Greg Sjaardema.
+gdsjaar at sandia.gov or gsjaardema at gmail.com
diff --git a/cbind/CMakeLists.txt b/cbind/CMakeLists.txt
deleted file mode 100644
index 2fdbcdc..0000000
--- a/cbind/CMakeLists.txt
+++ /dev/null
@@ -1,257 +0,0 @@
-
-find_path( NETCDF_INCLUDE_DIR netcdf.h
- $ENV{ACCESS}/inc
- $ENV{NETCDF_DIR}/inc
- $ENV{NETCDF_DIR}/libsrc
-)
-
-find_path( NETCDF_LIBRARY libnetcdf.a
- $ENV{ACCESS}/lib
- $ENV{NETCDF_DIR}/lib
- $ENV{NETCDF_DIR}/libsrc/.libs
-)
-
-find_program (NETCDF_NCDUMP ncdump
- $ENV{ACCESS}/bin
- $ENV{NETCDF_DIR}/bin
- $ENV{NETCDF_DIR}/ncdump
-)
-
-INCLUDE(CheckIncludeFile)
-CHECK_INCLUDE_FILE( malloc.h EX_HAVE_MALLOC_H )
-
-CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/include/exodusII_cfg.h.in
- ${CMAKE_CURRENT_BINARY_DIR}/include/exodusII_cfg.h
- @ONLY IMMEDIATE)
-
-INCLUDE_DIRECTORIES(
- "${CMAKE_CURRENT_SOURCE_DIR}/include"
- "${CMAKE_CURRENT_BINARY_DIR}/include"
- "${NETCDF_INCLUDE_DIR}"
-)
-
-SET(cbind_SRCS
- src/ex_conv.c
- src/ex_utils.c
- src/exclos.c
- src/excn2s.c
- src/excopy.c
- src/excre.c
- src/exerr.c
- src/exgatm.c
- src/exgatn.c
- src/exgatt.c
- src/exgattp.c
- src/exgblk.c
- src/exgcns.c
- src/exgcon.c
- src/exgconn.c
- src/exgcor.c
- src/exgcset.c
- src/exgcss.c
- src/exgcssc.c
- src/exgean.c
- src/exgeat.c
- src/exgebi.c
- src/exgecpp.c
- src/exgelb.c
- src/exgelc.c
- src/exgem.c
- src/exgenm.c
- src/exgev.c
- src/exgevid.c
- src/exgevt.c
- src/exgfrm.c
- src/exggv.c
- src/exggvt.c
- src/exgidm.c
- src/exgids.c
- src/exginf.c
- src/exgini.c
- src/exginix.c
- src/exgmap.c
- src/exgmp.c
- src/exgnam.c
- src/exgnams.c
- src/exgnconn.c
- src/exgncor.c
- src/exgnm.c
- src/exgnmap.c
- src/exgnnm.c
- src/exgnnv.c
- src/exgnoatt.c
- src/exgnp.c
- src/exgns.c
- src/exgnsd.c
- src/exgnsi.c
- src/exgnstt.c
- src/exgnsv.c
- src/exgnsvid.c
- src/exgnv.c
- src/exgnvar.c
- src/exgnvid.c
- src/exgnvt.c
- src/exgnvv.c
- src/exgoatt.c
- src/exgoea.c
- src/exgotv.c
- src/exgp.c
- src/exgpa.c
- src/exgpem.c
- src/exgpn.c
- src/exgqa.c
- src/exgset.c
- src/exgsetd.c
- src/exgsetp.c
- src/exgsnl.c
- src/exgsp.c
- src/exgss.c
- src/exgssc.c
- src/exgssd.c
- src/exgssi.c
- src/exgssn.c
- src/exgsstt.c
- src/exgssv.c
- src/exgssvid.c
- src/exgtim.c
- src/exgtt.c
- src/exgvan.c
- src/exgvar.c
- src/exgvarnam.c
- src/exgvarnams.c
- src/exgvarparam.c
- src/exgvart.c
- src/exgvartab.c
- src/exgvid.c
- src/exgvnm.c
- src/exgvp.c
- src/exgvtt.c
- src/exgvv.c
- src/exinq.c
- src/exopen.c
- src/exopts.c
- src/expatn.c
- src/expatt.c
- src/expattp.c
- src/expblk.c
- src/expcab.c
- src/expclb.c
- src/expcns.c
- src/expcon.c
- src/expconn.c
- src/expcor.c
- src/expcset.c
- src/expcss.c
- src/expean.c
- src/expeat.c
- src/expecpp.c
- src/expelb.c
- src/expelc.c
- src/expem.c
- src/expenm.c
- src/expev.c
- src/expfrm.c
- src/expgv.c
- src/expidm.c
- src/expinf.c
- src/expini.c
- src/expinix.c
- src/expmap.c
- src/expmp.c
- src/expnam.c
- src/expnams.c
- src/expncor.c
- src/expnm.c
- src/expnmap.c
- src/expnnm.c
- src/expnnv.c
- src/expnoatt.c
- src/expnp.c
- src/expns.c
- src/expnsd.c
- src/expnstt.c
- src/expnsv.c
- src/expnv.c
- src/expnvar.c
- src/expnvv.c
- src/expoatt.c
- src/expoea.c
- src/expp.c
- src/exppa.c
- src/exppem.c
- src/exppn.c
- src/exppsetd.c
- src/expqa.c
- src/expset.c
- src/expsetd.c
- src/expsetp.c
- src/expsp.c
- src/expss.c
- src/expssd.c
- src/expsstt.c
- src/expssv.c
- src/exptim.c
- src/exptt.c
- src/expvan.c
- src/expvar.c
- src/expvarnam.c
- src/expvarnams.c
- src/expvarparam.c
- src/expvartab.c
- src/expvnm.c
- src/expvp.c
- src/expvpa.c
- src/expvpax.c
- src/expvpc.c
- src/expvtt.c
- src/expvv.c
- src/exupda.c
-)
-
-SET(cbind_HEADERS
- include/exodusII.h
- include/exodusII_ext.h
- include/exodusII_int.h
-)
-
-IF(APPLE)
- SET_SOURCE_FILES_PROPERTIES(
- src/ex_utils.c
- PROPERTIES
- COMPILE_FLAGS -fno-common)
-ENDIF(APPLE)
-
-ADD_LIBRARY(exoIIv2c ${cbind_SRCS})
-
-TARGET_LINK_LIBRARIES(exoIIv2c ${NETCDF_LIBRARY}/libnetcdf.a)
-
-IF(VTK_LIBRARY_PROPERTIES)
- SET_TARGET_PROPERTIES(exoIIv2c PROPERTIES ${VTK_LIBRARY_PROPERTIES})
-ENDIF(VTK_LIBRARY_PROPERTIES)
-
-IF(NOT VTK_INSTALL_NO_LIBRARIES)
-MESSAGE("cbind_HEADERS=${cbind_HEADERS}")
- IF(VTK_INSTALL_HAS_CMAKE_24)
- INSTALL(TARGETS exoIIv2c
- RUNTIME DESTINATION /lib COMPONENT Runtime
- LIBRARY DESTINATION /lib COMPONENT Runtime
- ARCHIVE DESTINATION /lib COMPONENT Development)
- INSTALL(FILES ${cbind_HEADERS} DESTINATION /include)
- ELSE(VTK_INSTALL_HAS_CMAKE_24)
- INSTALL_TARGETS(/lib exoIIv2c)
- INSTALL_FILES(/include .h ${cbind_HEADERS})
- ENDIF(VTK_INSTALL_HAS_CMAKE_24)
-ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
-
-IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
-# INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR}/vtkexodus2 .h
-ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
-
-INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)
-
-IF (BUILD_TESTING)
- ENABLE_TESTING()
- SUBDIRS(test)
-ENDIF (BUILD_TESTING)
-
diff --git a/cbind/CVS/Entries b/cbind/CVS/Entries
deleted file mode 100644
index 67cebb0..0000000
--- a/cbind/CVS/Entries
+++ /dev/null
@@ -1,2 +0,0 @@
-/CMakeLists.txt/1.11/Mon Oct 4 14:12:11 2010//
-D
diff --git a/cbind/CVS/Entries.Log b/cbind/CVS/Entries.Log
deleted file mode 100644
index 0d7c7bb..0000000
--- a/cbind/CVS/Entries.Log
+++ /dev/null
@@ -1,3 +0,0 @@
-A D/include////
-A D/src////
-A D/test////
diff --git a/cbind/CVS/Repository b/cbind/CVS/Repository
deleted file mode 100644
index 4d19fcc..0000000
--- a/cbind/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii/cbind
diff --git a/cbind/CVS/Root b/cbind/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/cbind/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/cbind/include/CVS/Entries b/cbind/include/CVS/Entries
deleted file mode 100644
index 6831257..0000000
--- a/cbind/include/CVS/Entries
+++ /dev/null
@@ -1,8 +0,0 @@
-/Imakefile/1.9/Wed Jul 15 19:17:37 2009//
-/doxygen.h/1.1/Wed Feb 20 19:49:12 2008//
-/exodusII.h/1.16/Mon Oct 4 13:58:10 2010//
-/exodusII_cfg.h.in/1.2/Wed Feb 20 19:49:12 2008//
-/exodusII_ext.h/1.5/Wed Feb 24 13:48:30 2010//
-/exodusII_int.h/1.13/Wed Feb 24 13:48:30 2010//
-/exodusII_test.h/1.1/Tue Nov 28 14:01:59 2006//
-D
diff --git a/cbind/include/CVS/Repository b/cbind/include/CVS/Repository
deleted file mode 100644
index 5abf188..0000000
--- a/cbind/include/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii/cbind/include
diff --git a/cbind/include/CVS/Root b/cbind/include/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/cbind/include/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/cbind/src/CVS/Entries b/cbind/src/CVS/Entries
deleted file mode 100644
index 151862e..0000000
--- a/cbind/src/CVS/Entries
+++ /dev/null
@@ -1,178 +0,0 @@
-/Imakefile/1.13/Tue Jul 20 21:36:59 2010//
-/Makefile.standalone/1.8/Mon Oct 4 13:58:10 2010//
-/ex_conv.c/1.10/Wed Jul 15 19:17:37 2009//
-/ex_utils.c/1.11/Thu Aug 13 13:34:51 2009//
-/exclos.c/1.11/Sat Jan 23 01:15:16 2010//
-/excn2s.c/1.12/Tue Jul 20 21:36:59 2010//
-/excopy.c/1.6/Thu Aug 13 13:34:51 2009//
-/excre.c/1.12/Sat Oct 10 22:24:41 2009//
-/exerr.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgatm.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgatn.c/1.9/Thu Aug 13 13:34:51 2009//
-/exgatt.c/1.9/Thu Aug 13 13:34:51 2009//
-/exgattp.c/1.2/Wed Feb 20 19:49:25 2008//
-/exgblk.c/1.10/Tue Jul 20 21:36:59 2010//
-/exgcns.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgcon.c/1.11/Thu Aug 13 13:34:51 2009//
-/exgconn.c/1.11/Tue Jul 20 21:36:59 2010//
-/exgcor.c/1.13/Tue Jul 20 21:36:59 2010//
-/exgcset.c/1.9/Sat Jan 23 01:15:16 2010//
-/exgcss.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgcssc.c/1.2/Wed Feb 24 13:48:30 2010//
-/exgean.c/1.9/Wed Jul 15 19:17:37 2009//
-/exgeat.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgebi.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgecpp.c/1.1/Sat Jan 23 01:16:43 2010//
-/exgelb.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgelc.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgem.c/1.4/Wed Feb 20 19:49:25 2008//
-/exgenm.c/1.3/Wed Feb 20 19:49:25 2008//
-/exgev.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgevid.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgevt.c/1.4/Wed Feb 20 19:49:25 2008//
-/exgfrm.c/1.4/Wed Feb 24 13:48:30 2010//
-/exggv.c/1.10/Wed Jul 15 19:17:37 2009//
-/exggvt.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgidm.c/1.2/Thu Aug 13 13:34:51 2009//
-/exgids.c/1.9/Wed Jul 15 19:17:37 2009//
-/exginf.c/1.11/Thu Aug 13 13:34:51 2009//
-/exgini.c/1.10/Wed Jul 15 19:17:37 2009//
-/exginix.c/1.9/Mon Oct 4 13:58:10 2010//
-/exgmap.c/1.11/Thu Aug 13 13:34:51 2009//
-/exgmp.c/1.3/Wed Feb 20 19:49:25 2008//
-/exgnam.c/1.10/Sat Jan 23 01:15:16 2010//
-/exgnams.c/1.10/Thu Aug 13 13:34:51 2009//
-/exgnconn.c/1.1/Wed Feb 24 13:48:30 2010//
-/exgncor.c/1.5/Tue Jul 20 21:36:59 2010//
-/exgnm.c/1.4/Wed Feb 20 19:49:26 2008//
-/exgnmap.c/1.3/Wed Feb 20 19:49:26 2008//
-/exgnnm.c/1.3/Wed Feb 20 19:49:26 2008//
-/exgnnv.c/1.3/Wed Jul 15 19:17:37 2009//
-/exgnoatt.c/1.4/Thu Aug 13 13:34:51 2009//
-/exgnp.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgns.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgnsd.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgnsi.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgnstt.c/1.9/Wed Jul 15 19:17:37 2009//
-/exgnsv.c/1.9/Wed Jul 15 19:17:37 2009//
-/exgnsvid.c/1.9/Wed Jul 15 19:17:37 2009//
-/exgnv.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgnvar.c/1.3/Wed Jul 15 19:17:37 2009//
-/exgnvid.c/1.11/Thu Aug 13 13:34:51 2009//
-/exgnvt.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgnvv.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgoatt.c/1.9/Thu Aug 13 13:34:51 2009//
-/exgoea.c/1.9/Wed Jul 15 19:17:37 2009//
-/exgotv.c/1.11/Thu Aug 13 13:34:51 2009//
-/exgp.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgpa.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgpem.c/1.4/Thu Aug 13 13:34:51 2009//
-/exgpn.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgqa.c/1.11/Thu Aug 13 13:34:51 2009//
-/exgset.c/1.9/Tue Jul 20 21:36:59 2010//
-/exgsetd.c/1.9/Tue Jul 20 21:36:59 2010//
-/exgsetp.c/1.9/Tue Jul 20 21:36:59 2010//
-/exgsnl.c/1.13/Mon Oct 4 13:58:10 2010//
-/exgsp.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgss.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgssc.c/1.11/Thu Aug 13 13:34:51 2009//
-/exgssd.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgssi.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgssn.c/1.13/Tue Jul 20 21:36:59 2010//
-/exgsstt.c/1.9/Wed Jul 15 19:17:37 2009//
-/exgssv.c/1.9/Wed Jul 15 19:17:37 2009//
-/exgssvid.c/1.9/Wed Jul 15 19:17:37 2009//
-/exgtim.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgtt.c/1.9/Wed Jul 15 19:17:37 2009//
-/exgvan.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgvar.c/1.8/Wed Jul 15 19:17:37 2009//
-/exgvarnam.c/1.5/Wed Jul 15 19:17:37 2009//
-/exgvarnams.c/1.6/Thu Aug 13 13:34:51 2009//
-/exgvarparam.c/1.5/Wed Jul 15 19:17:37 2009//
-/exgvart.c/1.9/Thu Aug 13 13:34:51 2009//
-/exgvartab.c/1.5/Wed Jul 15 19:17:37 2009//
-/exgvid.c/1.11/Thu Aug 13 13:34:51 2009//
-/exgvnm.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgvp.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgvtt.c/1.10/Wed Jul 15 19:17:37 2009//
-/exgvv.c/1.10/Wed Jul 15 19:17:37 2009//
-/exinq.c/1.13/Mon Oct 4 13:58:10 2010//
-/exopen.c/1.10/Wed Jul 15 19:17:37 2009//
-/exopts.c/1.10/Wed Jul 15 19:17:37 2009//
-/expatn.c/1.9/Thu Aug 13 13:34:51 2009//
-/expatt.c/1.9/Thu Aug 13 13:34:51 2009//
-/expattp.c/1.2/Wed Feb 20 19:49:27 2008//
-/expblk.c/1.11/Wed Feb 24 13:48:30 2010//
-/expcab.c/1.6/Tue Jul 20 21:36:59 2010//
-/expclb.c/1.7/Sat Oct 10 22:24:41 2009//
-/expcns.c/1.10/Wed Jul 15 19:17:37 2009//
-/expcon.c/1.11/Thu Aug 13 13:34:51 2009//
-/expconn.c/1.11/Tue Jul 20 21:36:59 2010//
-/expcor.c/1.12/Tue Jul 20 21:36:59 2010//
-/expcset.c/1.9/Tue Jul 20 21:36:59 2010//
-/expcss.c/1.10/Wed Jul 15 19:17:37 2009//
-/expean.c/1.9/Wed Jul 15 19:17:37 2009//
-/expeat.c/1.10/Wed Jul 15 19:17:37 2009//
-/expecpp.c/1.2/Tue Jul 20 21:36:59 2010//
-/expelb.c/1.10/Wed Jul 15 19:17:37 2009//
-/expelc.c/1.10/Wed Jul 15 19:17:37 2009//
-/expem.c/1.5/Wed Feb 20 19:49:27 2008//
-/expenm.c/1.5/Wed Feb 20 19:49:28 2008//
-/expev.c/1.10/Wed Jul 15 19:17:37 2009//
-/expfrm.c/1.5/Wed Feb 24 13:48:30 2010//
-/expgv.c/1.10/Wed Jul 15 19:17:37 2009//
-/expidm.c/1.1/Wed Feb 20 19:49:28 2008//
-/expinf.c/1.10/Wed Jul 15 19:17:37 2009//
-/expini.c/1.10/Wed Jul 15 19:17:37 2009//
-/expinix.c/1.11/Mon Oct 4 13:58:10 2010//
-/expmap.c/1.10/Wed Jul 15 19:17:37 2009//
-/expmp.c/1.5/Mon Feb 16 16:20:57 2009//
-/expnam.c/1.9/Wed Jul 15 19:17:37 2009//
-/expnams.c/1.10/Thu Aug 13 13:34:51 2009//
-/expncor.c/1.5/Tue Jul 20 21:36:59 2010//
-/expnm.c/1.5/Wed Feb 20 19:49:28 2008//
-/expnmap.c/1.5/Thu Aug 13 13:34:51 2009//
-/expnnm.c/1.5/Wed Feb 20 19:49:28 2008//
-/expnnv.c/1.3/Wed Jul 15 19:17:37 2009//
-/expnoatt.c/1.4/Thu Aug 13 13:34:51 2009//
-/expnp.c/1.10/Wed Jul 15 19:17:37 2009//
-/expns.c/1.10/Wed Jul 15 19:17:37 2009//
-/expnsd.c/1.10/Wed Jul 15 19:17:37 2009//
-/expnstt.c/1.9/Wed Jul 15 19:17:37 2009//
-/expnsv.c/1.9/Wed Jul 15 19:17:37 2009//
-/expnv.c/1.10/Wed Jul 15 19:17:37 2009//
-/expnvar.c/1.3/Wed Jul 15 19:17:37 2009//
-/expnvv.c/1.10/Wed Jul 15 19:17:37 2009//
-/expoatt.c/1.9/Thu Aug 13 13:34:51 2009//
-/expoea.c/1.9/Wed Jul 15 19:17:37 2009//
-/expp.c/1.10/Wed Jul 15 19:17:37 2009//
-/exppa.c/1.10/Wed Jul 15 19:17:37 2009//
-/exppem.c/1.8/Tue Jul 20 21:36:59 2010//
-/exppn.c/1.10/Wed Jul 15 19:17:37 2009//
-/exppsetd.c/1.2/Tue Jul 20 21:36:59 2010//
-/expqa.c/1.10/Wed Jul 15 19:17:37 2009//
-/expset.c/1.9/Tue Jul 20 21:36:59 2010//
-/expsetd.c/1.9/Tue Jul 20 21:36:59 2010//
-/expsetp.c/1.9/Tue Jul 20 21:36:59 2010//
-/expsp.c/1.10/Wed Jul 15 19:17:37 2009//
-/expss.c/1.10/Wed Jul 15 19:17:37 2009//
-/expssd.c/1.10/Wed Jul 15 19:17:37 2009//
-/expsstt.c/1.9/Wed Jul 15 19:17:37 2009//
-/expssv.c/1.9/Wed Jul 15 19:17:37 2009//
-/exptim.c/1.10/Wed Jul 15 19:17:37 2009//
-/exptt.c/1.9/Wed Jul 15 19:17:37 2009//
-/expvan.c/1.10/Wed Jul 15 19:17:37 2009//
-/expvar.c/1.8/Wed Jul 15 19:17:37 2009//
-/expvarnam.c/1.5/Wed Jul 15 19:17:37 2009//
-/expvarnams.c/1.5/Wed Jul 15 19:17:37 2009//
-/expvarparam.c/1.5/Wed Jul 15 19:17:38 2009//
-/expvartab.c/1.7/Thu Aug 13 13:34:51 2009//
-/expvnm.c/1.10/Wed Jul 15 19:17:38 2009//
-/expvp.c/1.10/Wed Jul 15 19:17:38 2009//
-/expvpa.c/1.9/Wed Jul 15 19:17:38 2009//
-/expvpax.c/1.8/Wed Jul 15 19:17:38 2009//
-/expvpc.c/1.11/Thu Aug 13 13:34:51 2009//
-/expvtt.c/1.10/Wed Jul 15 19:17:38 2009//
-/expvv.c/1.10/Wed Jul 15 19:17:38 2009//
-/exupda.c/1.10/Wed Jul 15 19:17:38 2009//
-D
diff --git a/cbind/src/CVS/Repository b/cbind/src/CVS/Repository
deleted file mode 100644
index 3e9bf61..0000000
--- a/cbind/src/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii/cbind/src
diff --git a/cbind/src/CVS/Root b/cbind/src/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/cbind/src/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/cbind/src/Makefile.standalone b/cbind/src/Makefile.standalone
deleted file mode 100644
index 410e976..0000000
--- a/cbind/src/Makefile.standalone
+++ /dev/null
@@ -1,41 +0,0 @@
-SRCS = exclos.c excn2s.c ex_conv.c excopy.c excre.c exerr.c exgatm.c \
- exgatn.c exgatt.c exgattp.c exgblk.c exgcns.c exgcon.c exgconn.c \
- exgcor.c exgcset.c exgcss.c exgcssc.c exgean.c exgeat.c exgebi.c \
- exgecpp.c exgelb.c exgelc.c exgem.c exgenm.c exgev.c exgevid.c \
- exgevt.c exgfrm.c exggv.c exggvt.c exgidm.c exgids.c exginf.c exgini.c \
- exginix.c exgmap.c exgmp.c exgnam.c exgnams.c exgnconn.c exgncor.c \
- exgnmap.c exgnm.c exgnnm.c exgnnv.c exgnoatt.c exgnp.c exgns.c \
- exgnsd.c exgnsi.c exgnstt.c exgnsv.c exgnsvid.c exgnvar.c exgnv.c \
- exgnvid.c exgnvt.c exgnvv.c exgoatt.c exgoea.c exgotv.c exgpa.c exgp.c \
- exgpem.c exgpn.c exgqa.c exgset.c exgsetd.c exgsetp.c exgsnl.c exgsp.c \
- exgss.c exgssc.c exgssd.c exgssi.c exgssn.c exgsstt.c exgssv.c \
- exgssvid.c exgtim.c exgtt.c exgvan.c exgvar.c exgvarnam.c exgvarnams.c \
- exgvarparam.c exgvartab.c exgvart.c exgvid.c exgvnm.c exgvp.c exgvtt.c \
- exgvv.c exinq.c exopen.c exopts.c expatn.c expatt.c expattp.c expblk.c \
- expcab.c expclb.c expcns.c expcon.c expconn.c expcor.c expcset.c \
- expcss.c expean.c expeat.c expecpp.c expelb.c expelc.c expem.c \
- expenm.c expev.c expfrm.c expgv.c expidm.c expinf.c expini.c expinix.c \
- expmap.c expmp.c expnam.c expnams.c expncor.c expnmap.c expnm.c \
- expnnm.c expnnv.c expnoatt.c expnp.c expns.c expnsd.c expnstt.c \
- expnsv.c expnvar.c expnv.c expnvv.c expoatt.c expoea.c exppa.c expp.c \
- exppem.c exppn.c exppsetd.c expqa.c expset.c expsetd.c expsetp.c \
- expsp.c expss.c expssd.c expsstt.c expssv.c exptim.c exptt.c expvan.c \
- expvar.c expvarnam.c expvarnams.c expvarparam.c expvartab.c expvnm.c \
- expvpa.c expvpax.c expvp.c expvpc.c expvtt.c expvv.c exupda.c \
- ex_utils.c
-
-OBJS = ${SRCS:.c=.o}
-
-all:: libexodus.a
-libexodus.a: $(OBJS)
- $(AR) $@ $?
- $(RANLIB) $@
- cp libexodus.a ../../
-
-clean::
- rm -f *.CKP *.ln *.BAK *.bak *.o *.M *.mod core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"*
-
-.SUFFIXES: .c
-.c.o:
- $(CC) -c $(CFLAGS) $*.c
-
diff --git a/cbind/src/exerr.c b/cbind/src/exerr.c
deleted file mode 100644
index 2ef1609..0000000
--- a/cbind/src/exerr.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* exerr - ex_err
-*
-* entry conditions -
-* input parameters:
-* char* pname procedure name
-* char* err_string error message string
-* int errcode error code
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-int exerrval = 0; /* clear initial global error code value */
-
-static char last_pname[MAX_ERR_LENGTH];
-static char last_errmsg[MAX_ERR_LENGTH];
-static int last_errcode;
-
-/**
- * Generalized error reporting function.
- * global integer used for
- * suppressing error messages and determining the fatality of errors.
- * \param pname string containing the name of the calling function.
- * \param err_string string containing a message explaining the error or problem.
- * If EX_VERBOSE (see ex_opts()) is true, this message will be
- * printed to stderr. Otherwise, nothing will be printed.
- * Maximum length is #MAX_ERR_LENGTH.
-
- * \param errcode code identifying the error. EXODUS II 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
- * exodusII.h, see group \ref ErrorReturnCodes.
- * The predefined constant #EX_PRTLASTMSG will cause the
- * last error message to be output, regardless of the setting of the
- * error reporting level (see ex_opts()).
- */
-void ex_err(const char *pname,
- const char *err_string,
- int errcode)
-{
- if (errcode == 0) /* zero is no error, ignore and return */
- return;
-
- else if (errcode == EX_PRTLASTMSG)
- {
- fprintf(stderr, "[%s] %s\n",last_pname,last_errmsg);
- fprintf(stderr, " exerrval = %d\n",last_errcode);
- return;
- }
-
- else if (exoptval & EX_VERBOSE) /* check see if we really want to hear this */
- {
- fprintf(stderr, "[%s] %s\n",pname,err_string);
- if (exoptval & EX_VERBOSE)
- fprintf(stderr, " exerrval = %d\n",errcode);
- switch (errcode)
- {
- case NC_ESTS:
- fprintf (stderr," In FORTRAN interface, string too small\n");
- break;
- case NC_EMAXNAME:
- fprintf (stderr," length of name exceeds NC_MAX_NAME\n");
- break;
- case EX_MSG:
- break;
- }
- }
- /* save the error message for replays */
- strcpy(last_errmsg, err_string);
- strcpy(last_pname, pname);
- last_errcode = errcode;
-
- fflush(stderr);
-
- /* with netCDF 3.4, (fatal) system error codes are > 0;
- so all EXODUS fatal error codes are > 0 */
- if ((errcode > 0) && (exoptval & EX_ABORT))
- exit (errcode);
-}
-
-void ex_get_err( const char** msg, const char** func, int* errcode )
- {
- (*msg) = last_errmsg;
- (*func) = last_pname;
- (*errcode) = last_errcode;
- }
-
diff --git a/cbind/src/exgcns.c b/cbind/src/exgcns.c
deleted file mode 100644
index 91e8165..0000000
--- a/cbind/src/exgcns.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* exgcns - read concatenated side sets
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* int* node_set_ids array of node set IDs
-* int* num_nodes_per_set number of nodes for each set
-* int* num_df_per_set number of dist factors for each set
-* int* node_sets_index array of indices into node_set_node_list
-* int* df_sets_index array of indices into node_set_dist_fact
-* int* node_sets_node_list array of nodes for all sets
-* float* node_sets_dist_fact array of distribution factors for sets
-*
-* revision history -
-*
-*
-*****************************************************************************/
-
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-/*!
- * reads the node set ID's, node set count array, node set pointers array,
- * node set node list, and node set distribution factors for all of the
- * node sets
- * \deprecated Use ex_get_concat_sets()(exoid, EX_NODE_SET, set_specs) instead
- */
-
-int ex_get_concat_node_sets (int exoid,
- int *node_set_ids,
- int *num_nodes_per_set,
- int *num_df_per_set,
- int *node_sets_node_index,
- int *node_sets_df_index,
- 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);
-}
diff --git a/cbind/src/exgelb.c b/cbind/src/exgelb.c
deleted file mode 100644
index bf81e75..0000000
--- a/cbind/src/exgelb.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2006 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* exgelb - read element block parameters
-*
-* entry conditions -
-* input parameters:
-* int idexo exodus file id
-* int elem_blk_id element block id
-*
-* exit conditions -
-* char* elem_type element type name
-* int* num_elem_this_blk number of elements in this element block
-* int* num_nodes_per_elem number of nodes per element block
-* int* num_attr number of attributes
-*
-* revision history -
-*
-*
-*/
-
-#include <string.h>
-#include <stdio.h>
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-/**
- * reads the parameters used to describe an element block
- * \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
- */
-
-int ex_get_elem_block (int exoid,
- int elem_blk_id,
- char *elem_type,
- int *num_elem_this_blk,
- int *num_nodes_per_elem,
- 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 );
-}
diff --git a/cbind/src/exgev.c b/cbind/src/exgev.c
deleted file mode 100644
index 6a35a9a..0000000
--- a/cbind/src/exgev.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2006 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* exgev - ex_get_elem_var
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int time_step time step number
-* int elem_var_index element variable index
-* int elem_blk_id element block id
-* int num_elem_this_blk number of elements in this block
-*
-*
-* exit conditions -
-* float* elem_var_vals array of element variable values
-*
-*
-* revision history -
-*
-*
-*****************************************************************************/
-
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-/*!
- * reads the values of a single element variable for one element block at
- * one time step in the database; assume the first time step and
- * element variable index is 1
- * \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
- */
-
-int ex_get_elem_var (int exoid,
- int time_step,
- int elem_var_index,
- int elem_blk_id,
- int 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 );
-}
diff --git a/cbind/src/exgevt.c b/cbind/src/exgevt.c
deleted file mode 100644
index cc97573..0000000
--- a/cbind/src/exgevt.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* exgevt - ex_get_elem_var_time
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int elem_var_index element variable index
-* int elem_number element number
-* int beg_time_step time step number
-* int end_time_step time step number
-*
-* exit conditions -
-* float* elem_var_vals array of element variable values
-*
-* revision history -
-* 20061002 - David Thompson - Moved to ex_get_var_time.
-*
-*****************************************************************************/
-
-#include <stdlib.h>
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-/*!
- * reads the values of an element variable for a single element through a
- * specified number of time steps in the database; assume the first element
- * variable index, element number, and time step are 1
- * \deprecated Use ex_get_var_time()(exoid, EX_ELEM_BLOCK, elem_var_index, elem_number, beg_time_step, end_time_step, elem_var_vals)
- */
-
-int ex_get_elem_var_time (int exoid,
- int elem_var_index,
- int elem_number,
- int beg_time_step,
- int end_time_step,
- void *elem_var_vals)
-{
- return ex_get_var_time( exoid, EX_ELEM_BLOCK, elem_var_index, elem_number, beg_time_step, end_time_step, elem_var_vals );
-}
diff --git a/cbind/src/exinq.c b/cbind/src/exinq.c
deleted file mode 100644
index 461c6cc..0000000
--- a/cbind/src/exinq.c
+++ /dev/null
@@ -1,790 +0,0 @@
-/*
- * Copyright (c) 2006 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* exinq - ex_inquire
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int req_info info request code
-*
-* exit conditions -
-* int* ret_int returned integer value
-* float* ret_float returned float value
-* char* ret_char returned character value
-*
-* revision history -
-*
-*
-*****************************************************************************/
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-#define EX_GET_DIMENSION_VALUE(VAR,DEFVAL,DNAME,MISSINGOK) \
- if ((status = nc_inq_dimid( exoid, DNAME, &dimid)) != NC_NOERR) { \
- *VAR = DEFVAL; \
- if ( MISSINGOK ) { \
- return (EX_NOERR); \
- } else { \
- exerrval = status; \
- sprintf( errmsg, \
- "Error: failed to retrieve dimension " DNAME " for file id %d", \
- exoid); \
- ex_err("ex_inquire",errmsg,exerrval); \
- return (EX_FATAL); \
- } \
- } \
- if ((status = nc_inq_dimlen( exoid, dimid, &idum)) != NC_NOERR) { \
- *VAR = DEFVAL; \
- exerrval = status; \
- sprintf( errmsg, \
- "Error: failed to retrieve value for dimension " DNAME " for file id %d", \
- exoid); \
- ex_err("ex_inquire",errmsg,exerrval); \
- return (EX_FATAL); \
- } \
- *VAR = (int)idum;
-
-#define EX_GET_CONCAT_SET_LEN(VAR,TNAME,SETENUM,DNUMSETS,VSETSTAT,DSETSIZE,MISSINGOK) \
- *ret_int = 0; /* default return value */ \
- \
- if ((status = nc_inq_dimid (exoid, DNUMSETS, &dimid)) == NC_NOERR) \
- { \
- if ((status = nc_inq_dimlen (exoid, dimid, &num_sets)) != NC_NOERR) { \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to get number of " TNAME " sets in file id %d", \
- exoid); \
- ex_err("ex_inquire",errmsg,exerrval); \
- return (EX_FATAL); \
- } \
- \
- if (!(ids = malloc(num_sets*sizeof(int)))) { \
- exerrval = EX_MEMFAIL; \
- sprintf(errmsg, \
- "Error: failed to allocate memory for " TNAME " set ids for file id %d", \
- exoid); \
- ex_err("ex_inquire",errmsg,exerrval); \
- return (EX_FATAL); \
- } \
- \
- if (ex_get_ids (exoid, SETENUM, ids) == EX_FATAL) { \
- sprintf(errmsg, \
- "Error: failed to get " TNAME " set ids in file id %d", \
- exoid); \
- ex_err("ex_inquire",errmsg,exerrval); \
- free(ids); \
- return (EX_FATAL); \
- } \
- \
- /* allocate space for stat array */ \
- if (!(stat_vals = malloc((int)num_sets*sizeof(int)))) { \
- exerrval = EX_MEMFAIL; \
- free (ids); \
- sprintf(errmsg, \
- "Error: failed to allocate memory for " TNAME " set status array for file id %d", \
- exoid); \
- ex_err("ex_inquire",errmsg,exerrval); \
- return (EX_FATAL); \
- } \
- \
- /* get variable id of status array */ \
- if ((status = nc_inq_varid (exoid, VSETSTAT, &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) { \
- exerrval = status; \
- free (ids); \
- free(stat_vals); \
- sprintf(errmsg, \
- "Error: failed to get " TNAME " set status array from file id %d", \
- exoid); \
- ex_err("ex_inquire",errmsg,exerrval); \
- return (EX_FATAL); \
- } \
- } else /* default: status is true */ \
- for(i=0;i<num_sets;i++) \
- stat_vals[i]=1; \
- \
- for (i=0; i<num_sets; i++) { \
- if (stat_vals[i] == 0) /* is this object null? */ \
- continue; \
- \
- if ((status = nc_inq_dimid (exoid, DSETSIZE(i+1), &dimid)) != NC_NOERR) { \
- if ( MISSINGOK ) { \
- idum = 0; \
- } else { \
- *ret_int = 0; \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to locate " TNAME " set %d in file id %d", \
- ids[i],exoid); \
- ex_err("ex_inquire",errmsg,exerrval); \
- free(stat_vals); \
- free(ids); \
- return (EX_FATAL); \
- } /* MISSINGOK */ \
- } else { \
- if ((status = nc_inq_dimlen (exoid, dimid, &idum)) != NC_NOERR) { \
- *ret_int = 0; \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to get size of " TNAME " set %d in file id %d", \
- ids[i], exoid); \
- ex_err("ex_inquire",errmsg,exerrval); \
- free(stat_vals); \
- free(ids); \
- return (EX_FATAL); \
- } \
- } \
- \
- *ret_int += (int)idum; \
- } \
- \
- free(stat_vals); \
- free (ids); \
- }
-
-static void flt_cvt(float *xptr,double x)
-{
- *xptr = (float)x;
-}
-
-int ex_inquire_int (int exoid, int req_info)
-{
- char *cdummy = NULL; /* Needed just for function call, unused. */
- float fdummy = 0; /* Needed just for function call, unused. */
- int ret_val = 0;
- int error = ex_inquire(exoid, req_info, &ret_val, &fdummy, cdummy);
- if (error < 0)
- ret_val = error;
-
- return ret_val;
-}
-/*!
- * returns information about the database
- * \param exoid exodus file id
- * \param req_info info request code
- * \param[out] ret_int returned integer value
- * \param[out] ret_float returned float value
- * \param[out] ret_char returned character value
- */
-
-int ex_inquire (int exoid,
- int req_info,
- int *ret_int,
- void *ret_float,
- char *ret_char)
-{
- int dimid, varid, tmp_num, *ids;
- 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];
-
- exerrval = 0; /* clear error code */
-
- if (ret_char) ret_char = '\0';
- if (ret_int) *ret_int = 0;
-
- switch (req_info) {
- case EX_INQ_FILE_TYPE:
-
- /* obsolete call */
- /*returns "r" for regular EXODUS II file or "h" for history EXODUS file*/
- exerrval = EX_BADPARAM;
- sprintf(errmsg,
- "Warning: file type inquire is obsolete");
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_WARN);
-
- case EX_INQ_API_VERS:
- /* returns the EXODUS II API version number */
- if (nc_get_att_float(exoid, NC_GLOBAL, ATT_API_VERSION, ret_float) != NC_NOERR)
- { /* try old (prior to db version 2.02) attribute name */
- if ((status = nc_get_att_float (exoid, NC_GLOBAL, ATT_API_VERSION_BLANK,ret_float)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get EXODUS API version for file id %d", exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
-
- break;
-
- case EX_INQ_DB_VERS:
- /* returns the EXODUS II database version number */
- if ((status = nc_get_att_float (exoid, NC_GLOBAL, ATT_VERSION, ret_float)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get EXODUS database version for file id %d", exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
- break;
-
- case EX_INQ_LIB_VERS:
- /* returns the EXODUS II Library version number */
- if (ret_float)
- flt_cvt((float *)ret_float, EX_API_VERS);
-
- if (ret_int)
- *ret_int = EX_API_VERS_NODOT;
- break;
-
- case EX_INQ_TITLE:
- /* returns the title of the database */
- if ((status = nc_get_att_text (exoid, NC_GLOBAL, ATT_TITLE, tmp_title)) != NC_NOERR) {
- *ret_char = '\0';
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get database title for file id %d", exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- } else {
- strncpy(ret_char, tmp_title, MAX_LINE_LENGTH+1);
- ret_char[MAX_LINE_LENGTH] = '\0';
- }
- break;
-
- 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, "ex_inquire") != NC_NOERR)
- return EX_FATAL;
- *ret_int = ldum;
- break;
-
- case EX_INQ_NODES:
- /* returns the number of nodes */
- if (ex_get_dimension(exoid, DIM_NUM_NODES, "nodes", &ldum, &dimid, NULL) != NC_NOERR)
- *ret_int = 0;
- else
- *ret_int = ldum;
- break;
-
- case EX_INQ_ELEM:
- /* returns the number of elements */
- if (ex_get_dimension(exoid, DIM_NUM_ELEM, "elements", &ldum, &dimid, NULL) != NC_NOERR)
- *ret_int = 0;
- else
- *ret_int = ldum;
- break;
-
- 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) != NC_NOERR)
- *ret_int = 0;
- else
- *ret_int = ldum;
- break;
-
- 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)
- *ret_int = 0;
- else
- *ret_int = ldum;
- break;
-
- case EX_INQ_NS_NODE_LEN:
- /* returns the length of the concatenated node sets node list */
- EX_GET_CONCAT_SET_LEN(ret_int,"node",EX_NODE_SET,DIM_NUM_NS,VAR_NS_STAT,DIM_NUM_NOD_NS,0);
- break;
-
- case EX_INQ_NS_DF_LEN:
- /* returns the length of the concatenated node sets dist factor list */
-
- /*
- Determine the concatenated node sets distribution factor length:
-
- 1. Get the node set ids list.
- 2. Check see if the dist factor variable for a node set id exists.
- 3. If it exists, goto step 4, else the length is zero.
- 4. Get the dimension of the number of nodes in the node set -0
- use this value as the length as by definition they are the same.
- 5. Sum the individual lengths for the total list length.
- */
-
- *ret_int = 0; /* default value if no node sets defined */
-
- if (nc_inq_dimid (exoid, DIM_NUM_NS, &dimid) == NC_NOERR) {
- if ((status = nc_inq_dimlen(exoid, dimid, &num_sets)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get number of node sets in file id %d",
- exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
-
-
- if (!(ids = malloc(num_sets*sizeof(int))))
- {
- exerrval = EX_MEMFAIL;
- sprintf(errmsg,
- "Error: failed to allocate memory for node set ids for file id %d",
- exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
-
- if (ex_get_node_set_ids (exoid, ids) == EX_FATAL)
- {
- sprintf(errmsg,
- "Error: failed to get node sets in file id %d",
- exoid);
- /* pass back error code from ex_get_node_set_ids (in exerrval) */
- ex_err("ex_inquire",errmsg,exerrval);
- free (ids);
- return (EX_FATAL);
- }
-
- for (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 */
- } else {
- *ret_int = 0;
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to locate number of dist fact for node set %d in file id %d",
- ids[i], exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- free (ids);
- return (EX_FATAL);
- }
- } else {
- if ((status = nc_inq_dimid (exoid, DIM_NUM_NOD_NS(i+1), &dimid)) != NC_NOERR) {
- *ret_int = 0;
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to locate number of nodes in node set %d in file id %d",
- ids[i], exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- free (ids);
- return (EX_FATAL);
- }
- if ((status = nc_inq_dimlen (exoid, dimid, &idum)) != NC_NOERR) {
- *ret_int = 0;
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get number of nodes in node set %d in file id %d",
- ids[i],exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- free(ids);
- return (EX_FATAL);
- }
- }
- *ret_int += idum;
- }
- free(ids);
- }
-
- break;
-
- 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)
- *ret_int = 0;
- else
- *ret_int = ldum;
- break;
-
- case EX_INQ_SS_NODE_LEN:
-
- /* returns the length of the concatenated side sets node list */
-
- *ret_int = 0; /* default return value */
-
- if (nc_inq_dimid (exoid, DIM_NUM_SS, &dimid) == NC_NOERR) {
- if ((status = nc_inq_dimlen(exoid, dimid, &num_sets)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get number of side sets in file id %d",
- exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
-
-
- if (!(ids = malloc(num_sets*sizeof(int)))) {
- exerrval = EX_MEMFAIL;
- sprintf(errmsg,
- "Error: failed to allocate memory for side set ids for file id %d",
- exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
-
- if (ex_get_side_set_ids (exoid, ids) == EX_FATAL) {
- sprintf(errmsg,
- "Error: failed to get side set ids in file id %d",
- exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- free(ids);
- return (EX_FATAL);
- }
-
- /* allocate space for stat array */
- if (!(stat_vals = malloc((int)num_sets*sizeof(int)))) {
- exerrval = EX_MEMFAIL;
- free (ids);
- sprintf(errmsg,
- "Error: failed to allocate memory for side set status array for file id %d",
- exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
- /* get variable id of status array */
- if ((status = nc_inq_varid (exoid, VAR_SS_STAT, &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) {
- exerrval = status;
- free (ids);
- free(stat_vals);
- sprintf(errmsg,
- "Error: failed to get element block status array from file id %d",
- exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
- else /* default: status is true */
- for(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++) {
- if (stat_vals[i] == 0) /* is this object null? */
- continue;
-
- if ((status = ex_get_side_set_node_list_len(exoid, ids[i], &tmp_num)) != NC_NOERR) {
- *ret_int = 0;
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to side set %d node length in file id %d",
- ids[i],exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- free(stat_vals);
- free(ids);
- return (EX_FATAL);
- }
- *ret_int += tmp_num;
- }
-
- free(stat_vals);
- free (ids);
- }
-
- break;
-
- case EX_INQ_SS_ELEM_LEN:
- /* returns the length of the concatenated side sets element list */
- EX_GET_CONCAT_SET_LEN(ret_int,"side",EX_SIDE_SET,DIM_NUM_SS,VAR_SS_STAT,DIM_NUM_SIDE_SS,0);
- break;
-
- case EX_INQ_SS_DF_LEN:
-
- /* returns the length of the concatenated side sets dist factor list */
-
- /*
- Determine the concatenated side sets distribution factor length:
-
- 1. Get the side set ids list.
- 2. Check see if the dist factor dimension for a side set id exists.
- 3. If it exists, goto step 4, else set the individual length to zero.
- 4. Sum the dimension value into the running total length.
- */
-
- *ret_int = 0;
-
- /* first check see if any side sets exist */
-
- if (nc_inq_dimid (exoid, DIM_NUM_SS, &dimid) == NC_NOERR) {
- if ((status = nc_inq_dimlen (exoid, dimid, &num_sets)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get number of side sets in file id %d",
- exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
-
-
- if (!(ids = malloc(num_sets*sizeof(int)))) {
- exerrval = EX_MEMFAIL;
- sprintf(errmsg,
- "Error: failed to allocate memory for side set ids for file id %d",
- exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- return (EX_FATAL);
- }
-
- if (ex_get_side_set_ids (exoid, ids) == EX_FATAL) {
- sprintf(errmsg,
- "Error: failed to get side sets in file id %d",
- exoid);
- /* pass back error code from ex_get_side_set_ids (in exerrval) */
- ex_err("ex_inquire",errmsg,exerrval);
- free (ids);
- return (EX_FATAL);
- }
-
- for (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 */
- } else {
- *ret_int = 0;
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to locate number of dist fact for side set %d in file id %d",
- ids[i], exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- free (ids);
- return (EX_FATAL);
- }
- } else {
- if ((status = nc_inq_dimlen (exoid, dimid, &ldum)) != NC_NOERR) {
- *ret_int = 0;
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get number of dist factors in side set %d in file id %d",
- ids[i], exoid);
- ex_err("ex_inquire",errmsg,exerrval);
- free (ids);
- return (EX_FATAL);
- }
- }
- *ret_int += ldum;
- }
- free (ids);
- }
-
- break;
-
- case EX_INQ_QA:
- /* returns the number of QA records */
- if (ex_get_dimension(exoid, DIM_NUM_QA, "QA records", &ldum, &dimid, NULL) != NC_NOERR)
- *ret_int = 0;
- else
- *ret_int = ldum;
- break;
-
- case EX_INQ_INFO:
- /* returns the number of information records */
- if (ex_get_dimension(exoid, DIM_NUM_INFO, "info records", &ldum, &dimid, NULL) != NC_NOERR)
- *ret_int = 0;
- else
- *ret_int = ldum;
- break;
-
- 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, "ex_inquire") != NC_NOERR)
- return EX_FATAL;
- *ret_int = ldum;
- break;
-
- case EX_INQ_EB_PROP:
- /* returns the number of element block properties */
- *ret_int = ex_get_num_props (exoid, EX_ELEM_BLOCK);
- break;
-
- case EX_INQ_NS_PROP:
- /* returns the number of node set properties */
- *ret_int = ex_get_num_props (exoid, EX_NODE_SET);
- break;
-
- case EX_INQ_SS_PROP:
- /* returns the number of side set properties */
- *ret_int = ex_get_num_props (exoid, EX_SIDE_SET);
- break;
-
- 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)
- *ret_int = 0;
- else
- *ret_int = ldum;
- break;
-
- case EX_INQ_EM_PROP:
- /* returns the number of element map properties */
- *ret_int = ex_get_num_props (exoid, EX_ELEM_MAP);
- break;
-
- 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)
- *ret_int = 0;
- else
- *ret_int = ldum;
- break;
-
- case EX_INQ_NM_PROP:
- /* returns the number of node map properties */
- *ret_int = ex_get_num_props (exoid, EX_NODE_MAP);
- break;
-
- case EX_INQ_EDGE:
- /* returns the number of edges (defined across all edge blocks). */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_EDGE, 1);
- break;
-
- case EX_INQ_EDGE_BLK:
- /* returns the number of edge blocks. */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_ED_BLK, 1);
- break;
-
- case EX_INQ_EDGE_SETS:
- /* returns the number of edge sets. */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_ES, 1);
- break;
-
- case EX_INQ_ES_LEN:
- /* returns the length of the concatenated edge set edge list. */
- EX_GET_CONCAT_SET_LEN(ret_int,"edge",EX_EDGE_SET,DIM_NUM_ES,VAR_ES_STAT,DIM_NUM_EDGE_ES,0);
- break;
-
- case EX_INQ_ES_DF_LEN:
- /* returns the length of the concatenated edge set distribution factor list. */
- EX_GET_CONCAT_SET_LEN(ret_int,"edge",EX_EDGE_SET,DIM_NUM_ES,VAR_ES_STAT,DIM_NUM_DF_ES,1);
- break;
-
- case EX_INQ_EDGE_PROP:
- /* returns the number of integer properties stored for each edge block. This includes the "ID" property. */
- *ret_int = ex_get_num_props( exoid, EX_EDGE_BLOCK );
- break;
-
- case EX_INQ_ES_PROP:
- /* returns the number of integer properties stored for each edge set.. This includes the "ID" property */
- *ret_int = ex_get_num_props( exoid, EX_EDGE_SET );
- break;
-
- case EX_INQ_FACE:
- /* returns the number of faces (defined across all face blocks). */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_FACE, 1);
- break;
-
- case EX_INQ_FACE_BLK:
- /* returns the number of face blocks. */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_FA_BLK, 1);
- break;
-
- case EX_INQ_FACE_SETS:
- /* returns the number of face sets. */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_FS, 1);
- break;
-
- case EX_INQ_FS_LEN:
- /* returns the length of the concatenated edge set edge list. */
- EX_GET_CONCAT_SET_LEN(ret_int,"face",EX_FACE_SET,DIM_NUM_FS,VAR_FS_STAT,DIM_NUM_FACE_FS,0);
- break;
-
- case EX_INQ_FS_DF_LEN:
- /* returns the length of the concatenated edge set distribution factor list. */
- EX_GET_CONCAT_SET_LEN(ret_int,"face",EX_FACE_SET,DIM_NUM_FS,VAR_FS_STAT,DIM_NUM_DF_FS,1);
- break;
-
- case EX_INQ_FACE_PROP:
- /* returns the number of integer properties stored for each edge block. This includes the "ID" property. */
- *ret_int = ex_get_num_props( exoid, EX_FACE_BLOCK );
- break;
-
- case EX_INQ_FS_PROP:
- /* returns the number of integer properties stored for each edge set.. This includes the "ID" property */
- *ret_int = ex_get_num_props( exoid, EX_FACE_SET );
- break;
-
- case EX_INQ_ELEM_SETS:
- /* returns the number of element sets. */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_ELS, 1);
- break;
-
- case EX_INQ_ELS_LEN:
- /* returns the length of the concatenated element set element list. */
- EX_GET_CONCAT_SET_LEN(ret_int,"element",EX_ELEM_SET,DIM_NUM_ELS,VAR_ELS_STAT,DIM_NUM_ELE_ELS,0);
- break;
-
- case EX_INQ_ELS_DF_LEN:
- /* returns the length of the concatenated element set distribution factor list. */
- EX_GET_CONCAT_SET_LEN(ret_int,"element",EX_ELEM_SET,DIM_NUM_ELS,VAR_ELS_STAT,DIM_NUM_DF_ELS,1);
- break;
-
- case EX_INQ_ELS_PROP:
- /* returns the number of integer properties stored for each element set. */
- *ret_int = ex_get_num_props( exoid, EX_ELEM_SET );
- break;
-
- case EX_INQ_EDGE_MAP:
- /* returns the number of edge maps. */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_EDM, 1);
- break;
-
- case EX_INQ_FACE_MAP:
- /* returns the number of face maps. */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_FAM, 1);
- break;
-
- case EX_INQ_COORD_FRAMES:
- /* return the number of coordinate frames */
- EX_GET_DIMENSION_VALUE(ret_int, 0, DIM_NUM_CFRAMES, 1);
- break;
-
- default:
- *ret_int = 0;
- exerrval = EX_FATAL;
- sprintf(errmsg, "Error: invalid inquiry %d", req_info);
- ex_err("ex_inquire",errmsg,exerrval);
- return(EX_FATAL);
- }
- return (EX_NOERR);
-}
-
-
-
diff --git a/cbind/src/expcns.c b/cbind/src/expcns.c
deleted file mode 100644
index 2f7416c..0000000
--- a/cbind/src/expcns.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* expcns - ex_put_concat_node_sets
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int* node_set_ids array of node set ids
-* int* num_nodes_per_set array of number of nodes per set
-* int* num_dist_per_set array of number of dist fact per set
-* ----------pass in NULL for remaining args if just want to set params -------------
-* int* node_sets_node_index array of set indices into node list
-* int* node_sets_df_index array of set indices into dist fact list
-* int* node_set_node_list array of node list #'s for node set
-* void* node_set_dist_fact array of dist factors for node set
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-
-#include <stdlib.h>
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-/*!
- * writes the node set ID's, node set count array, node set pointers array,
- * and node set node list for all of the node sets
- * \param exoid exodus file id
- * \param node_set_ids array of node set ids
- * \param num_nodes_per_set array of number of nodes per set
- * \param num_dist_per_set array of number of dist fact per set
- * \param node_sets_node_index array of set indices into node list
- * \param node_sets_df_index array of set indices into dist fact list
- * \param node_sets_node_list array of node list #'s for node set
- * \param node_sets_dist_fact array of dist factors for node set
- * \deprecated Use ex_put_concat_sets()(exoid, EX_NODE_SET, &set_specs)
- */
-
-int ex_put_concat_node_sets (int exoid,
- int *node_set_ids,
- int *num_nodes_per_set,
- int *num_dist_per_set,
- int *node_sets_node_index,
- int *node_sets_df_index,
- 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_dist_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_put_concat_sets(exoid, EX_NODE_SET, &set_specs);
-}
diff --git a/cbind/src/expev.c b/cbind/src/expev.c
deleted file mode 100644
index 59edbeb..0000000
--- a/cbind/src/expev.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* expev - ex_put_elem_var
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int time_step time step number
-* int elem_var_index element variable index
-* int elem_blk_id element block id
-* int num_elem_this_blk number of elements in this block
-*
-* exit conditions -
-*
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-
-#include <stdlib.h>
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-/*!
- * writes the values of a single element variable for one element block at
- * one time step to the database; assume the first time step and
- * element variable index are 1
- * \param exoid exodus file id
- * \param time_step time step number
- * \param elem_var_index element variable index
- * \param elem_blk_id element block id
- * \param num_elem_this_blk number of elements in this block
- * \param elem_var_vals the element bariables to be written
- * \deprecated Use ex_put_var()(exoid, time_step, EX_ELEM_BLOCK, elem_var_index, elem_blk_id, num_elem_this_blk, elem_var_vals)
-
- */
-
-int ex_put_elem_var (int exoid,
- int time_step,
- int elem_var_index,
- int elem_blk_id,
- int num_elem_this_blk,
- const void *elem_var_vals)
-{
- return ex_put_var(exoid, time_step, EX_ELEM_BLOCK, elem_var_index,
- elem_blk_id, num_elem_this_blk, elem_var_vals);
-}
diff --git a/cbind/src/expnp.c b/cbind/src/expnp.c
deleted file mode 100644
index b51bc42..0000000
--- a/cbind/src/expnp.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* expnp - ex_put_node_set_param
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int node_set_id node set id
-* int num_nodes_in_set number of nodes in set
-* int num_dist_in_set number of distribution factors in set
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-/*!
- * writes the information which describes a single node set
- * \param exoid exodus file id
- * \param node_set_id node set id
- * \param num_nodes_in_set number of nodes in set
- * \param num_dist_in_set number of distribution factors in set
- * \deprecated Use ex_put_set_param()(exoid, EX_NODE_SET, node_set_id, num_nodes_in_set, num_dist_in_set)
- */
-
-int ex_put_node_set_param (int exoid,
- int node_set_id,
- int num_nodes_in_set,
- int num_dist_in_set)
-{
- return ex_put_set_param(exoid, EX_NODE_SET, node_set_id, num_nodes_in_set, num_dist_in_set);
-}
diff --git a/cbind/src/expvtt.c b/cbind/src/expvtt.c
deleted file mode 100644
index a02fe42..0000000
--- a/cbind/src/expvtt.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*****************************************************************************
-*
-* expvtt - ex_put_elem_var_tab
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int num_elem_blk number of element blocks
-* int num_elem_var number of element variables
-* int* elem_var_tab element variable truth table array
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-/*!
- * writes the EXODUS II element variable truth table to the database;
- * also, creates netCDF variables in which to store EXODUS II element
- * variable values; although this table isn't required (because the
- * netCDF variables can also be created in ex_put_elem_var), this call
- * will save tremendous time because all of the variables are defined
- * at once while the file is in define mode, rather than going in and out
- * of define mode (causing the entire file to be copied over and over)
- * which is what occurs when the element variable values variables are
- * defined in ex_put_elem_var
- * \param exoid int exodus file id
- * \param num_elem_blk int number of element blocks
- * \param num_elem_var int number of element variables
- * \param elem_var_tab int* element variable truth table array
- * \deprecated Use ex_put_truth_table()(exoid, EX_ELEM_BLOCK, num_elem_blk, num_elem_var, elem_var_tab)
- */
-
-int ex_put_elem_var_tab (int exoid,
- int num_elem_blk,
- int num_elem_var,
- int *elem_var_tab)
-{
- return ex_put_truth_table(exoid, EX_ELEM_BLOCK, num_elem_blk, num_elem_var, elem_var_tab);
-}
diff --git a/cbind/test/CVS/Entries b/cbind/test/CVS/Entries
deleted file mode 100644
index 7aeaa76..0000000
--- a/cbind/test/CVS/Entries
+++ /dev/null
@@ -1,70 +0,0 @@
-/CMakeLists.txt/1.7/Wed Feb 24 13:48:30 2010//
-/CreateEdgeFace.c/1.7/Tue Jul 20 21:36:59 2010//
-/Imakefile/1.10/Tue Jul 20 21:36:59 2010//
-/Makefile.standalone/1.5/Tue Jul 20 21:36:59 2010//
-/ReadEdgeFace.c/1.5/Mon Mar 3 03:46:07 2008//
-/create_mesh.c/1.9/Wed Jul 15 19:17:38 2009//
-/makedmp/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/rd_wt_mesh.c/1.11/Tue Jul 20 21:36:59 2010//
-/test.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/test.exo_c/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/test1.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/test2-1.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/test2-2.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/test2.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/test_clb.dmp/1.10/Wed Feb 24 13:48:30 2010//
-/testall/1.15/Wed Feb 24 13:48:30 2010//
-/testall.in/1.8/Tue Jul 20 21:36:59 2010//
-/testcp.c/1.3/Tue Jul 20 21:36:59 2010//
-/testcp_dd.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testcp_ds.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testcp_ln.c/1.2/Tue Jul 20 21:36:59 2010//
-/testcp_ln.dmp/1.5/Wed Feb 24 13:48:30 2010//
-/testcp_nl.c/1.3/Tue Jul 20 21:36:59 2010//
-/testcp_nl.dmp/1.9/Wed Feb 24 13:48:30 2010//
-/testcp_sd.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testcp_ss.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testcpd.c/1.3/Tue Jul 20 21:36:59 2010//
-/testd.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testrd-nfaced.c/1.2/Tue Jul 20 21:36:59 2010//
-/testrd-nfaced.dmp/1.1/Wed Feb 24 13:48:30 2010//
-/testrd-nsided.c/1.2/Tue Jul 20 21:36:59 2010//
-/testrd-nsided.dmp/1.1/Sat Jan 23 01:15:17 2010//
-/testrd-partial.c/1.4/Tue Jul 20 21:36:59 2010//
-/testrd.c/1.11/Tue Jul 20 21:36:59 2010//
-/testrd.dmp/1.10/Thu Feb 26 20:01:43 2009//
-/testrd1.c/1.11/Tue Jul 20 21:36:59 2010//
-/testrd1.dmp/1.10/Thu Feb 26 20:01:43 2009//
-/testrd_nc.c/1.11/Tue Jul 20 21:36:59 2010//
-/testrd_nc.dmp/1.9/Thu Feb 26 20:01:43 2009//
-/testrd_ss.c/1.4/Tue Jul 20 21:36:59 2010//
-/testrd_ss.dmp/1.10/Thu Feb 26 20:01:43 2009//
-/testrd_zeroe.dmp/1.10/Thu Feb 26 20:01:43 2009//
-/testrd_zeron.dmp/1.10/Thu Feb 26 20:01:43 2009//
-/testrdd.c/1.11/Tue Jul 20 21:36:59 2010//
-/testrdd.dmp/1.8/Thu Feb 26 20:01:43 2009//
-/testrdv.c/1.11/Tue Jul 20 21:36:59 2010//
-/testrdv.dmp/1.10/Thu Feb 26 20:01:43 2009//
-/testrdwt.c/1.5/Tue Jul 20 21:36:59 2010//
-/testwt-nfaced.c/1.2/Tue Jul 20 21:36:59 2010//
-/testwt-nfaced.dmp/1.1/Wed Feb 24 13:48:30 2010//
-/testwt-nsided.c/1.2/Tue Jul 20 21:36:59 2010//
-/testwt-nsided.dmp/1.1/Sat Jan 23 01:15:17 2010//
-/testwt-one-attrib.c/1.4/Wed Feb 24 13:48:30 2010//
-/testwt-partial.c/1.3/Wed Jul 15 19:17:38 2009//
-/testwt-zeroe.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwt-zeroe.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testwt-zeron.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwt-zeron.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testwt.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwt1.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwt2.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwt_clb.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwt_nc.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwt_nossnsdf.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwt_ss.c/1.2/Sun Nov 26 05:37:23 2006//
-/testwt_ss.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testwtbig.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwtd.c/1.10/Wed Jul 15 19:17:38 2009//
-/testwtm.c/1.10/Wed Jul 15 19:17:38 2009//
-D
diff --git a/cbind/test/CVS/Repository b/cbind/test/CVS/Repository
deleted file mode 100644
index b1f01b6..0000000
--- a/cbind/test/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii/cbind/test
diff --git a/cbind/test/CVS/Root b/cbind/test/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/cbind/test/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/doc/CVS/Entries b/doc/CVS/Entries
deleted file mode 100644
index 43f499a..0000000
--- a/doc/CVS/Entries
+++ /dev/null
@@ -1,2 +0,0 @@
-/doc.poly.txt/1.1/Wed Feb 24 13:50:00 2010//
-D
diff --git a/doc/CVS/Repository b/doc/CVS/Repository
deleted file mode 100644
index b6de6ad..0000000
--- a/doc/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii/doc
diff --git a/doc/CVS/Root b/doc/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/doc/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/CMakeLists.txt b/exodus/CMakeLists.txt
similarity index 82%
rename from CMakeLists.txt
rename to exodus/CMakeLists.txt
index 34d91e9..3556579 100644
--- a/CMakeLists.txt
+++ b/exodus/CMakeLists.txt
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 2.6)
PROJECT(ExodusII)
-SET(EXODUSII_VERSION_MAJOR "2")
-SET(EXODUSII_VERSION_MINOR "0")
+SET(EXODUSII_VERSION_MAJOR "5")
+SET(EXODUSII_VERSION_MINOR "14")
SET(EXODUSII_VERSION_PATCH "0")
SET(EXODUSII_VERSION "${EXODUSII_VERSION_MAJOR}.${EXODUSII_VERSION_MINOR}")
SET(EXODUSII_VERSION_FULL "${EXODUSII_VERSION}.${EXODUSII_VERSION_PATCH}")
diff --git a/COPYRIGHT b/exodus/COPYRIGHT
similarity index 100%
copy from COPYRIGHT
copy to exodus/COPYRIGHT
diff --git a/DartConfig.cmake b/exodus/DartConfig.cmake
similarity index 100%
rename from DartConfig.cmake
rename to exodus/DartConfig.cmake
diff --git a/Doxyfile b/exodus/Doxyfile
similarity index 65%
rename from Doxyfile
rename to exodus/Doxyfile
index e19a521..150c85f 100644
--- a/Doxyfile
+++ b/exodus/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.5.3
+# Doxyfile 1.7.3
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
@@ -14,11 +14,11 @@
# Project related configuration options
#---------------------------------------------------------------------------
-# This tag specifies the encoding used for all characters in the config file that
-# follow. The default is UTF-8 which is also the encoding used for all text before
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of
-# possible encodings.
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
DOXYFILE_ENCODING = UTF-8
@@ -31,7 +31,20 @@ PROJECT_NAME = ExodusII
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 4.96
+PROJECT_NUMBER = 4.99
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is
+# included in the documentation. The maximum height of the logo should not
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO =
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@@ -54,10 +67,11 @@ CREATE_SUBDIRS = NO
# information to generate all constant output in the proper language.
# The default language is English, other supported languages are:
# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
OUTPUT_LANGUAGE = English
@@ -125,7 +139,7 @@ STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
+# (but less readable) file names. This can be useful if your file system
# doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = NO
@@ -154,13 +168,6 @@ QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
-# documentation.
-
-DETAILS_AT_TOP = NO
-
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
# member inherits the documentation from any documented member that it
# re-implements.
@@ -176,7 +183,7 @@ SEPARATE_MEMBER_PAGES = NO
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
-TAB_SIZE = 8
+TAB_SIZE = 1
# This tag can be used to specify a number of aliases that acts
# as commands in the documentation. An alias has the form "name=value".
@@ -185,7 +192,11 @@ TAB_SIZE = 8
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
-ALIASES =
+ALIASES = "func{1}=<b>\1</b>" \
+ "fparam{1}=<em>\1</em>" \
+ "file{1}=<tt>\1</tt>" \
+ "comment{1}=...<em>\1</em>" \
+ "undoc=\xrefitem undoc \"Undocumented\" \"Undocumented\""
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.
@@ -195,26 +206,65 @@ ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
-# will look different, etc.
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
OPTIMIZE_OUTPUT_JAVA = NO
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
-# include (a tag file for) the STL sources as input, then you should
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
# set this tag to YES in order to let doxygen match functions declarations and
# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
+# func(std::string) {}). This also makes the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
BUILTIN_STL_SUPPORT = NO
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
CPP_CLI_SUPPORT = NO
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES, then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
@@ -230,6 +280,32 @@ DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penalty.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will roughly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@@ -264,10 +340,11 @@ EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
-# If this flag is set to YES, the members of anonymous namespaces will be extracted
-# and appear in the documentation as a namespace called 'anonymous_namespace{file}',
-# where file will be replaced with the base name of the file that contains the anonymous
-# namespace. By default anonymous namespace are hidden.
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespaces are hidden.
EXTRACT_ANON_NSPACES = NO
@@ -327,6 +404,12 @@ HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES = NO
+
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
@@ -346,16 +429,41 @@ SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
# sorted by fully-qualified names, including namespaces. If set to
# NO (the default), the class list will be sorted only by class name,
# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
# Note: This option applies only to the class list, not to the
# alphabetical list.
SORT_BY_SCOPE_NAME = NO
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
+# do proper type resolution of all parameters of a function it will reject a
+# match between the prototype and the implementation of a member function even
+# if there is only one candidate or it is obvious which candidate to choose
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING = NO
+
# The GENERATE_TODOLIST tag can be used to enable (YES) or
# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
@@ -386,10 +494,10 @@ GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
+# the initial value of a variable or macro consists of for it to appear in
# the documentation. If the initializer consists of more lines than specified
# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
+# The appearance of the initializer of individual variables and macros in the
# documentation can be controlled using \showinitializer or \hideinitializer
# command in the documentation regardless of this setting.
@@ -407,9 +515,21 @@ SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page. This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from the
-# version control system). Doxygen will invoke the program by executing (via
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
# popen()) the command <command> <input-file>, where <command> is the value of
# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
# provided by doxygen. Whatever the program writes to standard output
@@ -417,6 +537,15 @@ SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE =
+
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
@@ -445,13 +574,13 @@ WARN_IF_UNDOCUMENTED = NO
WARN_IF_DOC_ERROR = YES
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for
# functions that are documented, but have no documentation for their parameters
# or return value. If set to NO (the default) doxygen will only warn about
# wrong or incomplete parameter documentation, but not about the absence of
# documentation.
-WARN_NO_PARAMDOC = NO
+WARN_NO_PARAMDOC = YES
# The WARN_FORMAT tag determines the format of the warning messages that
# doxygen can produce. The string should contain the $file, $line, and $text
@@ -460,7 +589,7 @@ WARN_NO_PARAMDOC = NO
# $version, which will be replaced by the version of the file (if it could
# be obtained via FILE_VERSION_FILTER)
-WARN_FORMAT = "$file:$line: $text "
+WARN_FORMAT = "$file:$line: $text"
# The WARN_LOGFILE tag can be used to specify a file to which warning
# and error messages should be written. If left blank the output is written
@@ -481,10 +610,11 @@ INPUT = cbind/include \
cbind/src \
forbind/src
-# This tag can be used to specify the character encoding of the source files that
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
INPUT_ENCODING = UTF-8
@@ -492,8 +622,9 @@ INPUT_ENCODING = UTF-8
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
+# *.f90 *.f *.for *.vhd *.vhdl
FILE_PATTERNS = *.c \
*.h
@@ -511,7 +642,7 @@ RECURSIVE = NO
EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
+# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.
EXCLUDE_SYMLINKS = NO
@@ -525,9 +656,10 @@ EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the output.
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used,
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
EXCLUDE_SYMBOLS =
@@ -571,8 +703,8 @@ INPUT_FILTER =
# basis. Doxygen will compare the file name with each pattern and apply the
# filter if there is a match. The filters are a list of the form:
# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
+# info on how filters are used. If FILTER_PATTERNS is empty or if
+# non of the patterns match the file name, INPUT_FILTER is applied.
FILTER_PATTERNS =
@@ -582,6 +714,14 @@ FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
+# and it is also possible to disable source filtering for a specific pattern
+# using *.ext= (so without naming a filter). This option only has effect when
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS =
+
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
@@ -589,9 +729,7 @@ FILTER_SOURCE_FILES = NO
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
# be generated. Documented entities will be cross-referenced with these sources.
# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH
-# then you must also enable this option. If you don't then doxygen will produce
-# a warning and turn it on anyway
+# VERBATIM_HEADERS is set to NO.
SOURCE_BROWSER = NO
@@ -606,22 +744,22 @@ INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = NO
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# If the REFERENCED_BY_RELATION tag is set to YES
# then for each documented function all documented
# functions referencing it will be listed.
-REFERENCED_BY_RELATION = YES
+REFERENCED_BY_RELATION = NO
-# If the REFERENCES_RELATION tag is set to YES (the default)
+# If the REFERENCES_RELATION tag is set to YES
# then for each documented function all documented entities
# called/used by that function will be listed.
-REFERENCES_RELATION = YES
+REFERENCES_RELATION = NO
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentstion.
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentation.
REFERENCES_LINK_SOURCE = YES
@@ -702,7 +840,38 @@ HTML_FOOTER =
# the style sheet file to the HTML output directory, so don't put your own
# stylesheet in the HTML output directory as well, or it will be erased!
-HTML_STYLESHEET =
+#HTML_STYLESHEET = customdoxygen.css
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE = 224
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT = 93
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP = YES
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
# files or namespaces will be aligned in HTML using tables. If set to
@@ -710,13 +879,6 @@ HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded. For this to work a browser that supports
@@ -725,6 +887,50 @@ GENERATE_HTMLHELP = NO
HTML_DYNAMIC_SECTIONS = NO
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
# be used to specify the file name of the resulting .chm file. You
# can add a path in front of the file if the result should not be
@@ -745,6 +951,12 @@ HHC_LOCATION =
GENERATE_CHI = NO
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
# controls whether a binary table of contents is generated (YES) or a
# normal table of contents (NO) in the .chm file.
@@ -756,32 +968,171 @@ BINARY_TOC = NO
TOC_EXPAND = NO
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
DISABLE_INDEX = NO
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
+# This tag can be used to set the number of enum values (range [0,1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+# Note that a value of 0 will completely suppress the enum values from
+# appearing in the overview section.
ENUM_VALUES_PER_LINE = 4
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
GENERATE_TREEVIEW = YES
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
# used to set the initial width (in pixels) of the frame in which the tree
# is shown.
TREEVIEW_WIDTH = 250
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
+# (see http://www.mathjax.org) which uses client side Javascript for the
+# rendering instead of using prerendered bitmaps. Use this if you do not
+# have LaTeX installed or if you want to formulas look prettier in the HTML
+# output. When enabled you also need to install MathJax separately and
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you need to specify the location relative to the
+# HTML output directory using the MATHJAX_RELPATH option. The destination
+# directory should contain the MathJax.js script. For instance, if the mathjax
+# directory is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the
+# mathjax.org site, so you can quickly see the result without installing
+# MathJax, but it is strongly recommended to install a local copy of MathJax
+# before deployment.
+
+MATHJAX_RELPATH = http://www.mathjax.org/mathjax
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvantages are that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH = NO
+
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
@@ -789,7 +1140,7 @@ TREEVIEW_WIDTH = 250
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
-GENERATE_LATEX = YES
+GENERATE_LATEX = NO
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
@@ -798,7 +1149,10 @@ GENERATE_LATEX = YES
LATEX_OUTPUT = latex
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
LATEX_CMD_NAME = latex
@@ -815,7 +1169,7 @@ MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
+# by the printer. Possible values are: a4, letter, legal and
# executive. If left blank a4wide will be used.
PAPER_TYPE = letter
@@ -837,13 +1191,13 @@ LATEX_HEADER =
# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
-PDF_HYPERLINKS = NO
+PDF_HYPERLINKS = YES
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
# plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation.
-USE_PDFLATEX = NO
+USE_PDFLATEX = YES
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
# command to the generated LaTeX files. This will instruct LaTeX to keep
@@ -858,6 +1212,13 @@ LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
@@ -1009,7 +1370,7 @@ PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
+# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
@@ -1062,20 +1423,20 @@ PREDEFINED =
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
+# Use the PREDEFINED tag if you want to use a different macro definition that
+# overrules the definition found in the source code.
EXPAND_AS_DEFINED = EXODUS_EXPORT
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
+# doxygen's preprocessor will remove all references to function-like macros
+# that are alone on a line, have an all uppercase name, and do not end with a
+# semicolon, because these will confuse the parser if not removed.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration::additions related to external references
#---------------------------------------------------------------------------
# The TAGFILES option can be used to specify one or more tagfiles.
@@ -1087,9 +1448,9 @@ SKIP_FUNCTION_MACROS = YES
# TAGFILES = file1=loc1 "file2 = loc2" ...
# where "loc1" and "loc2" can be relative or absolute paths or
# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
# If a tag file is not located in the directory in which doxygen
# is run, you must also specify the path to the tagfile here.
@@ -1118,23 +1479,23 @@ EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration options related to the dot tool
#---------------------------------------------------------------------------
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
+# this option also works with HAVE_DOT disabled, but it is recommended to
+# install and use dot, since it yields more powerful graphs.
-CLASS_DIAGRAMS = YES
+CLASS_DIAGRAMS = NO
# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
-# be found in the default search path.
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
MSCGEN_PATH =
@@ -1149,21 +1510,51 @@ HIDE_UNDOC_RELATIONS = YES
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)
-HAVE_DOT = YES
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS = 0
+
+# By default doxygen will write a font called Helvetica to the output
+# directory and reference it in all dot files that doxygen generates.
+# When you want a differently looking font you can specify the font name
+# using DOT_FONTNAME. You need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect inheritance relations. Setting this tag to YES will force the
# the CLASS_DIAGRAMS tag to NO.
-CLASS_GRAPH = YES
+CLASS_GRAPH = NO
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect implementation dependencies (inheritance, containment, and
# class references variables) of the class with other documented classes.
-COLLABORATION_GRAPH = YES
+COLLABORATION_GRAPH = NO
# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for groups, showing the direct groups dependencies
@@ -1186,45 +1577,45 @@ TEMPLATE_RELATIONS = NO
# file showing the direct and indirect include dependencies of the file with
# other documented files.
-INCLUDE_GRAPH = YES
+INCLUDE_GRAPH = NO
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
# documented header file showing the documented files that directly or
# indirectly include this file.
-INCLUDED_BY_GRAPH = YES
+INCLUDED_BY_GRAPH = NO
-# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
CALL_GRAPH = NO
-# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
-# generate a caller dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
CALLER_GRAPH = NO
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
+# will generate a graphical hierarchy of all classes instead of a textual one.
-GRAPHICAL_HIERARCHY = YES
+GRAPHICAL_HIERARCHY = NO
# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
+# in a graphical way. The dependency relations are determined by the #include
# relations between the files in the directories.
DIRECTORY_GRAPH = YES
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
+# generated by dot. Possible values are png, svg, gif or svg.
# If left blank png will be used.
DOT_IMAGE_FORMAT = gif
@@ -1232,7 +1623,7 @@ DOT_IMAGE_FORMAT = gif
# The tag DOT_PATH can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
-DOT_PATH =
+DOT_PATH = /opt/local/bin
# The DOTFILE_DIRS tag can be used to specify one or more directories that
# contain dot files that are included in the documentation (see the
@@ -1240,12 +1631,18 @@ DOT_PATH =
DOTFILE_DIRS =
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the
+# \mscfile command).
+
+MSCFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
# nodes that will be shown in the graph. If the number of nodes in a graph
# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the number
-# of direct children of the root node in a graph is already larger than
-# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
DOT_GRAPH_MAX_NODES = 50
@@ -1261,10 +1658,10 @@ DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, which results in a white background.
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
DOT_TRANSPARENT = NO
@@ -1286,12 +1683,3 @@ GENERATE_LEGEND = YES
# the various graphs.
DOT_CLEANUP = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = NO
diff --git a/Imakefile b/exodus/Imakefile
similarity index 93%
rename from Imakefile
rename to exodus/Imakefile
index 0de7b87..e0b3eab 100644
--- a/Imakefile
+++ b/exodus/Imakefile
@@ -41,17 +41,7 @@ XCOMM Building ExodusII libraries for installation
* Building ExodusII libraries for debugging
* % accmkmf
* % make Makefiles
- * % make CDEBUGFLAGS=-g
- *
- * Building ExodusII libraries on Sandias Teraflop machine
- * Service Partition
- * % accmkmf
- * % make Makefiles
- * % make all
- * Service Partition
- * % accmkmf -D PARALLEL
- * % make Makefiles
- * % make all
+ * % make DEBUG=-g
*
*/
@@ -87,7 +77,7 @@ InstallSubdirIncludeList(makeincludes,cbind/include,$(INCLIST1),$(INCDIR))
InstallSubdirIncludeList(makeincludes,forbind/include,$(INCLIST2),$(INCDIR))
/* Directory for exodusII c library */
-NamedTargetSubdirs(libexodus.a,cbind/src,"making exodus ",PassDebugFlags ExtraOptions,libexodus.a)
+NamedTargetSubdirs(libexodus.a,cbind/src,"making exodus ",PassDebugFlags ExtraOptions,all)
/* Directory for exodusII fortran wrappers */
NamedTargetSubdirs(libexoIIv2for.a,forbind/src,"making exoIIv2for ",PassDebugFlags ExtraOptions,libexoIIv2for.a)
diff --git a/Makefile.standalone b/exodus/Makefile.standalone
similarity index 95%
copy from Makefile.standalone
copy to exodus/Makefile.standalone
index 8b42b40..a8e2207 100644
--- a/Makefile.standalone
+++ b/exodus/Makefile.standalone
@@ -75,7 +75,7 @@ endif
ifeq ($(COMPILER),GNU)
CC = gcc
-FC = g77
+FC = gfortran
CCOPTIONS = -O2 -Wall
F77OPTIONS = -O2
endif
@@ -94,7 +94,7 @@ AR = CC -xar -o
ifeq ($(COMPILER),GNU)
BITS = 32
CC = gcc
-FC = g77
+FC = gfortran
CCOPTIONS = -Wall
else
BITS = 32
@@ -176,30 +176,30 @@ endif
# Darwin (Apple OSX)
#========================================================================
ifeq ($(SYSTEM),Darwin)
-BITS = 32
+BITS = 64
RANLIB = ranlib
OS_TYPE = darwin
AR = ar -crsv
CC = gcc
-FC = g77
+FC = gfortran
CCOPTIONS =
-F77OPTIONS =
+F77OPTIONS = -fcray-pointer -fdefault-real-8 -fdefault-integer-8
endif
#========================================================================
OPTIMIZE_FLAG = -O2
-STD_DEFINES = -DVERBOSE
+STD_DEFINES =
CFLAGS = $(OPTIMIZE_FLAG) $(CCOPTIONS) $(STD_DEFINES) $(LOC_EXOII_INC) $(NETCDF_INC)
-FFLAGS = $(OPTIMIZE_FLAG) $(F77OPTIONS) $(LOC_EXOII_INC) $(F77PREC)
+FFLAGS = $(OPTIMIZE_FLAG) $(F77OPTIONS) $(LOC_EXOII_INC) $(F77PREC) -DADDC_
-# Use include files locates in exodusii/cbind/include
+# Use include files locates in exodus/cbind/include
LOC_EXOII_INC = -I../../cbind/include -I../../forbind/include
-NETCDF_INC = -I/usr/local/eng_sci/struct/x86_64/current64-gcc/inc
+NETCDF_INC = -I/Users/gdsjaar/src/SEACAS.git/include
-NETCDF_LIB_DIR = /usr/local/eng_sci/struct/x86_64/current64-gcc/lib
+NETCDF_LIB_DIR = /Users/gdsjaar/src/SEACAS.git/lib
NETCDF_LIB = -L$(NETCDF_LIB_DIR) -lnetcdf
diff --git a/README b/exodus/README
similarity index 79%
rename from README
rename to exodus/README
index aac63cb..60777d9 100644
--- a/README
+++ b/exodus/README
@@ -7,7 +7,7 @@ gdsjaar at sandia.gov
========================================================================
LICENSE:
-The ExodusII library is licensed under the terms of the BSD 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:
@@ -24,11 +24,11 @@ Please identify the version of the package.
========================================================================
BUILDING
-There are 4 methods for building exodusII.
+There are 4 methods for building exodus.
1. 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 exodusii directory, do 'accmkmf' followed by 'make
+top-level exodus directory, do 'accmkmf' followed by 'make
Makefiles' and then 'make'
2. CMAKE: type 'cmake .' or 'cmake -i' to generate the Makefiles
@@ -50,7 +50,7 @@ point to the location of your netcdf installation.
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 Trios package.
+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
@@ -60,15 +60,16 @@ check"
========================================================================
NETCDF
-The exodusII library uses the netcdf library for low-level data
+The exodus library uses the netcdf library for low-level data
storage.
-ExodusII requires NetCDF version 3.6.0 or later with the "large-model
+Exodus requires NetCDF version 3.6.0 or later with the "large-model
modifications". NetCDF version 4.1 or later is highly recommended.
The netcdf library must be modified slightly in order to handle the
-exodusII datamodel. The specific changes are:
+exodus datamodel. The specific changes are:
+PRE netcdf-4.1.2:
1. libsrc/netcdf.h -- Modify the following defines:
libsrc4/netcdf_base.h (netcdf-4.X only)
libsrc4/netcdf.h (netcdf-4.X only if it exists)
@@ -77,6 +78,14 @@ exodusII datamodel. The specific changes are:
#define NC_MAX_VARS 524288 /* max variables per file */
#define NC_MAX_VAR_DIMS 8 /* max per variable dimensions */
+netcdf-4.1.2 or later:
+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
diff --git a/exodus/cbind/CMakeLists.txt b/exodus/cbind/CMakeLists.txt
new file mode 100644
index 0000000..48adf0b
--- /dev/null
+++ b/exodus/cbind/CMakeLists.txt
@@ -0,0 +1,271 @@
+
+find_path( NETCDF_INCLUDE_DIR netcdf.h
+ $ENV{ACCESS}/inc
+ $ENV{NETCDF_DIR}/inc
+ $ENV{NETCDF_DIR}/include
+ $ENV{NETCDF_DIR}/libsrc
+ )
+
+find_library( NETCDF_LIBRARY netcdf
+ $ENV{ACCESS}/lib/shared
+ $ENV{ACCESS}/lib
+ $ENV{NETCDF_DIR}/lib
+ $ENV{NETCDF_DIR}/libsrc/.libs
+ )
+
+find_program (NETCDF_NCDUMP ncdump
+ $ENV{ACCESS}/bin
+ $ENV{NETCDF_DIR}/bin
+ $ENV{NETCDF_DIR}/ncdump
+ )
+
+# Hack for HDF5
+find_library( HDF5_LIBRARY hdf5
+ $ENV{ACCESS}/lib/shared
+ $ENV{ACCESS}/lib
+ $ENV{NETCDF_DIR}/lib
+ $ENV{NETCDF_DIR}/libsrc/.libs
+ /usr/local/hdf5/lib
+ )
+find_library( HDF5HL_LIBRARY hdf5_hl
+ $ENV{ACCESS}/lib/shared
+ $ENV{ACCESS}/lib
+ $ENV{NETCDF_DIR}/lib
+ $ENV{NETCDF_DIR}/libsrc/.libs
+ /usr/local/hdf5/lib
+ )
+
+
+INCLUDE(CheckIncludeFile)
+CHECK_INCLUDE_FILE( malloc.h EX_HAVE_MALLOC_H )
+
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/exodusII_cfg.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/include/exodusII_cfg.h
+ @ONLY IMMEDIATE)
+
+INCLUDE_DIRECTORIES(
+ "${CMAKE_CURRENT_SOURCE_DIR}/include"
+ "${CMAKE_CURRENT_BINARY_DIR}/include"
+ "${NETCDF_INCLUDE_DIR}"
+)
+
+SET(cbind_SRCS
+src/ex_conv.c
+src/ex_utils.c
+src/exclos.c
+src/excn2s.c
+src/excopy.c
+src/excre.c
+src/exerr.c
+src/exgatm.c
+src/exgatn.c
+src/exgatt.c
+src/exgattp.c
+src/exgblk.c
+src/exgcns.c
+src/exgcon.c
+src/exgconn.c
+src/exgcor.c
+src/exgcset.c
+src/exgcss.c
+src/exgcssc.c
+src/exgean.c
+src/exgeat.c
+src/exgebi.c
+src/exgecpp.c
+src/exgelb.c
+src/exgelc.c
+src/exgem.c
+src/exgenm.c
+src/exgev.c
+src/exgevid.c
+src/exgevt.c
+src/exgfrm.c
+src/exggv.c
+src/exggvt.c
+src/exgidm.c
+src/exgids.c
+src/exginf.c
+src/exgini.c
+src/exginix.c
+src/exgmap.c
+src/exgmp.c
+src/exgnam.c
+src/exgnams.c
+src/exgnconn.c
+src/exgncor.c
+src/exgnm.c
+src/exgnmap.c
+src/exgnnm.c
+src/exgnnv.c
+src/exgnoatt.c
+src/exgnp.c
+src/exgns.c
+src/exgnsd.c
+src/exgnsi.c
+src/exgnstt.c
+src/exgnsv.c
+src/exgnsvid.c
+src/exgnv.c
+src/exgnvar.c
+src/exgnvid.c
+src/exgnvt.c
+src/exgnvv.c
+src/exgoatt.c
+src/exgoea.c
+src/exgotv.c
+src/exgp.c
+src/exgpa.c
+src/exgpem.c
+src/exgpn.c
+src/exgqa.c
+src/exgset.c
+src/exgsetd.c
+src/exgsetp.c
+src/exgsnl.c
+src/exgsp.c
+src/exgss.c
+src/exgssc.c
+src/exgssd.c
+src/exgssi.c
+src/exgssn.c
+src/exgsstt.c
+src/exgssv.c
+src/exgssvid.c
+src/exgtim.c
+src/exgtt.c
+src/exgvan.c
+src/exgvar.c
+src/exgvarnam.c
+src/exgvarnams.c
+src/exgvarparam.c
+src/exgvart.c
+src/exgvartab.c
+src/exgvid.c
+src/exgvnm.c
+src/exgvp.c
+src/exgvtt.c
+src/exgvv.c
+src/exinq.c
+src/exopen.c
+src/exopts.c
+src/expatn.c
+src/expatt.c
+src/expattp.c
+src/expblk.c
+src/expcab.c
+src/expclb.c
+src/expcns.c
+src/expcon.c
+src/expconn.c
+src/expcor.c
+src/expcset.c
+src/expcss.c
+src/expean.c
+src/expeat.c
+src/expecpp.c
+src/expelb.c
+src/expelc.c
+src/expem.c
+src/expenm.c
+src/expev.c
+src/expfrm.c
+src/expgv.c
+src/expidm.c
+src/expinf.c
+src/expini.c
+src/expinix.c
+src/expmap.c
+src/expmp.c
+src/expnam.c
+src/expnams.c
+src/expncor.c
+src/expnm.c
+src/expnmap.c
+src/expnnm.c
+src/expnnv.c
+src/expnoatt.c
+src/expnp.c
+src/expns.c
+src/expnsd.c
+src/expnstt.c
+src/expnsv.c
+src/expnv.c
+src/expnvar.c
+src/expnvv.c
+src/expoatt.c
+src/expoea.c
+src/expp.c
+src/exppa.c
+src/exppem.c
+src/exppn.c
+src/exppsetd.c
+src/expqa.c
+src/expset.c
+src/expsetd.c
+src/expsetp.c
+src/expsp.c
+src/expss.c
+src/expssd.c
+src/expsstt.c
+src/expssv.c
+src/exptim.c
+src/exptt.c
+src/expvan.c
+src/expvar.c
+src/expvarnam.c
+src/expvarnams.c
+src/expvarparam.c
+src/expvartab.c
+src/expvnm.c
+src/expvp.c
+src/expvpa.c
+src/expvpax.c
+src/expvpc.c
+src/expvtt.c
+src/expvv.c
+src/exupda.c
+)
+
+SET(cbind_HEADERS
+ include/exodusII.h
+ include/exodusII_ext.h
+ include/exodusII_int.h
+)
+
+IF(APPLE)
+ SET_SOURCE_FILES_PROPERTIES(
+ src/ex_utils.c
+ PROPERTIES
+ COMPILE_FLAGS -fno-common)
+ENDIF(APPLE)
+
+ADD_LIBRARY(exoIIv2c ${cbind_SRCS})
+
+TARGET_LINK_LIBRARIES(exoIIv2c ${NETCDF_LIBRARY} ${HDF5_LIBRARY} ${HDF5HL_LIBRARY})
+
+IF(MSVC)
+ set_target_properties(exoIIv2c PROPERTIES COMPILE_DEFINITIONS _CRT_SECURE_NO_WARNINGS)
+ENDIF(MSVC)
+
+IF(EXODUS_LIBRARY_PROPERTIES)
+ SET_TARGET_PROPERTIES(exoIIv2c PROPERTIES ${EXODUS_LIBRARY_PROPERTIES})
+ENDIF(EXODUS_LIBRARY_PROPERTIES)
+
+IF(NOT EXODUS_INSTALL_NO_LIBRARIES)
+ INSTALL(TARGETS exoIIv2c
+ RUNTIME DESTINATION lib COMPONENT Runtime
+ LIBRARY DESTINATION lib COMPONENT Runtime
+ ARCHIVE DESTINATION lib COMPONENT Development)
+ INSTALL(FILES ${cbind_HEADERS} DESTINATION include COMPONENT Development)
+ENDIF(NOT EXODUS_INSTALL_NO_LIBRARIES)
+
+
+INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)
+
+IF (BUILD_TESTING)
+ ENABLE_TESTING()
+ SUBDIRS(test)
+ENDIF (BUILD_TESTING)
+
diff --git a/cbind/include/Imakefile b/exodus/cbind/include/Imakefile
similarity index 100%
rename from cbind/include/Imakefile
rename to exodus/cbind/include/Imakefile
diff --git a/cbind/include/doxygen.h b/exodus/cbind/include/doxygen.h
similarity index 89%
rename from cbind/include/doxygen.h
rename to exodus/cbind/include/doxygen.h
index a845ce9..4030fb6 100644
--- a/cbind/include/doxygen.h
+++ b/exodus/cbind/include/doxygen.h
@@ -130,4 +130,29 @@ A few conventions and limitations must be cited:
nodes increases, connectivity changes), then the new geometrymust be
output to a new EXODUS II file.
+\defgroup ResultsData Results Data
+@{
+ This section describes data file utility functions for creating /
+ opening a file, initializing a file with global parameters, reading /
+ writing information text, inquiring on parameters stored in the data
+ file, and error reporting.
+@}
+
+\defgroup Utilities Data File Utilities
+ @{
+This section describes data file utility functions for creating /
+opening a file, initializing a file with global parameters, reading /
+writing information text, inquiring on parameters stored in the data
+file, and error reporting.
+ @}
+
+\defgroup ModelDescription Model Description
+ @{
+The routines in this section read and write information which
+describe an exodus finite element model. This includes nodal
+coordinates, element order map, element connectivity arrays,
+element attributes, node sets, side sets, and object properties.
+ @}
+
+
*/
diff --git a/cbind/include/exodusII.h b/exodus/cbind/include/exodusII.h
similarity index 92%
rename from cbind/include/exodusII.h
rename to exodus/cbind/include/exodusII.h
index 119198e..4fe237d 100644
--- a/cbind/include/exodusII.h
+++ b/exodus/cbind/include/exodusII.h
@@ -47,8 +47,8 @@
#include "stddef.h"
/* EXODUS II version number */
-#define EX_API_VERS 4.98
-#define EX_API_VERS_NODOT 498
+#define EX_API_VERS 5.14f
+#define EX_API_VERS_NODOT 514
#define EX_VERS EX_API_VERS
@@ -84,6 +84,7 @@ extern "C" {
#define EX_NETCDF4 8 /**< use the hdf5-based netcdf4 output */
#define EX_NOSHARE 16 /**< Do not open netcdf file in "share" mode */
#define EX_SHARE 32 /**< Do open netcdf file in "share" mode */
+#define EX_NOCLASSIC 64 /**< Do not force netcdf to classic mode in netcdf4 mode */
#define EX_READ 0
#define EX_WRITE 1
@@ -138,6 +139,9 @@ extern "C" {
EX_INQ_EDGE_MAP = 45, /**< inquire number of edge maps */
EX_INQ_FACE_MAP = 46, /**< inquire number of face maps */
EX_INQ_COORD_FRAMES = 47, /**< inquire number of coordinate frames */
+ EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH = 48, /**< inquire size of MAX_NAME_LENGTH dimension on database */
+ EX_INQ_DB_MAX_USED_NAME_LENGTH = 49, /**< inquire size of MAX_NAME_LENGTH dimension on database */
+ EX_INQ_MAX_READ_NAME_LENGTH = 50, /**< inquire client-specified max size of returned names */
EX_INQ_INVALID = -1};
typedef enum ex_inquiry ex_inquiry;
@@ -162,6 +166,7 @@ extern "C" {
EX_FACE_MAP = 12, /**< face map property code */
EX_GLOBAL = 13, /**< global "block" for variables*/
+ EX_COORDINATE = 15, /**< kluge so some internal wrapper functions work */
EX_INVALID = -1};
typedef enum ex_entity_type ex_entity_type;
@@ -176,14 +181,21 @@ extern "C" {
};
typedef enum ex_options ex_options;
+ /** The value used to indicate that an entity (block, nset, sset)
+ has not had its id set to a valid value
+ */
+#define EX_INVALID_ID -1
+
/**
* \defgroup StringLengths maximum string lengths;
* constants that are used as netcdf dimensions must be of type long
* @{
*/
- /** Maximum length of an entity name, attribute name, variable name,
- QA record, element type name */
+ /** Maximum length of QA record, element type name */
#define MAX_STR_LENGTH 32L
+ /** Maximum length of an entity name, attribute name, variable name */
+#define MAX_NAME_LENGTH MAX_STR_LENGTH
+
/** Maximum length of the database title or an information record */
#define MAX_LINE_LENGTH 80L
/** Maximum length of an error message passed to ex_err() function. Typically, internal use only */
@@ -581,6 +593,12 @@ extern "C" {
ex_entity_type obj_type,
const int *map);
+ EXODUS_EXPORT int ex_put_partial_id_map(int exoid,
+ ex_entity_type obj_type,
+ int start_entity_num,
+ int num_entities,
+ const int *map);
+
EXODUS_EXPORT int ex_get_id_map(int exoid,
ex_entity_type obj_type,
int *map);
@@ -792,6 +810,12 @@ extern "C" {
EXODUS_EXPORT int ex_inquire(int exoid, int inquiry, int*, void*, char*);
EXODUS_EXPORT int ex_inquire_int(int exoid, int inquiry);
+ /** Note that the max name length setting is global at this time; not specific
+ * to a particular database; however, the exoid option is passed to give
+ * flexibility in the future to implement this on a database-by-database basis.
+ */
+ EXODUS_EXPORT int ex_set_max_name_length(int exoid, int length);
+
EXODUS_EXPORT int ex_get_varid_var(int exoid,
int time_step,
int varid,
@@ -801,7 +825,28 @@ extern "C" {
/* ERROR CODE DEFINITIONS AND STORAGE */
extern int exerrval; /**< shared error return value */
extern int exoptval; /**< error reporting flag (default is quiet) */
-
+
+ /**
+ * For output databases, the maximum length of any entity, variable,
+ * property, attribute, or coordinate name to be written (not
+ * including the NULL terminator). If a name is longer than this
+ * value, a warning message will be output to stderr and the name
+ * will be truncated. Must be set (via call to
+ * 'ex_set_max_name_length(exoid, int len)' prior to calling ex_create.
+ *
+ * For input databases, the size of the name arrays that the client
+ * code will be passing to API routines that retrieve names (not
+ * including the NULL terminator). This defaults to 32 for
+ * compatibility with older clients. The value used at the time of
+ * creation of the database can be queried by ex_inquire with the
+ * EX_INQ_DB_MAX_NAME_LENGTH argument. The current value for this
+ * variable can be queried with EX_INQ_CUR_MAX_NAME_LENGTH argument.
+ *
+ * Note that this is a global setting for all databases. If you are
+ * accessing multiple databases, they will all use the same value.
+ */
+ extern int ex_max_name_length;
+
char* ex_name_of_object(ex_entity_type obj_type);
ex_entity_type ex_var_type_to_ex_entity_type(char var_type);
diff --git a/cbind/include/exodusII_cfg.h.in b/exodus/cbind/include/exodusII_cfg.h.in
similarity index 100%
rename from cbind/include/exodusII_cfg.h.in
rename to exodus/cbind/include/exodusII_cfg.h.in
diff --git a/cbind/include/exodusII_ext.h b/exodus/cbind/include/exodusII_ext.h
similarity index 100%
rename from cbind/include/exodusII_ext.h
rename to exodus/cbind/include/exodusII_ext.h
diff --git a/cbind/include/exodusII_int.h b/exodus/cbind/include/exodusII_int.h
similarity index 96%
rename from cbind/include/exodusII_int.h
rename to exodus/cbind/include/exodusII_int.h
index f19cc0b..fbab7c4 100644
--- a/cbind/include/exodusII_int.h
+++ b/exodus/cbind/include/exodusII_int.h
@@ -62,7 +62,7 @@
#include <stdio.h>
-#define MAX_VAR_NAME_LENGTH 20 /**< Internal use only */
+#define MAX_VAR_NAME_LENGTH 32 /**< Internal use only */
/* this should be defined in ANSI C and C++, but just in case ... */
#ifndef NULL
@@ -112,6 +112,8 @@
/* point numbers in file */
/* used for db version 2.01 */
/* and earlier */
+#define ATT_MAX_NAME_LENGTH "maximum_name_length"
+
#define DIM_NUM_NODES "num_nodes" /* # of nodes */
#define DIM_NUM_DIM "num_dim" /* # of dimensions; 2- or 3-d*/
#define DIM_NUM_EDGE "num_edge" /* # of edges (over all blks)*/
@@ -441,6 +443,9 @@
#define VAR_HIS_VAR "vals_his_var" /* obsolete */
#define DIM_STR "len_string" /* general dimension of */
/* length MAX_STR_LENGTH */
+ /* used for some string lengths */
+#define DIM_STR_NAME "len_name" /* general dimension of */
+ /* length MAX_NAME_LENGTH */
/* used for name lengths */
#define DIM_LIN "len_line" /* general dimension of */
/* length MAX_LINE_LENGTH */
@@ -493,7 +498,6 @@
#define VAR_FRAME_IDS "frame_ids"
#define VAR_FRAME_TAGS "frame_tags"
-
enum ex_element_type {
EX_EL_UNK = -1, /**< unknown entity */
EX_EL_NULL_ELEMENT= 0,
@@ -512,6 +516,13 @@ enum ex_element_type {
};
typedef enum ex_element_type ex_element_type;
+enum ex_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;
+
/* Internal structure declarations */
struct elem_blk_parm
@@ -581,6 +592,18 @@ struct obj_stats *ex_get_stat_ptr ( int exoid, struct obj_stats** obj_ptr);
void ex_rm_stat_ptr (int exoid, struct obj_stats** obj_ptr);
int ex_id_lkup (int exoid, ex_entity_type id_type, int num);
+int ex_check_file_type(const char *path, int *type);
int ex_get_dimension(int exoid, const char *dimtype, const char *label,
size_t *count, int *dimid, const char *routine);
+
+int ex_get_name_internal(int exoid, int varid, size_t index, char *name, int name_size,
+ ex_entity_type type, const char *routine);
+int ex_get_names_internal(int exoid, int varid, size_t count, char**names,
+ ex_entity_type type, const char *routine);
+int ex_put_name_internal(int exoid, int varid, size_t index, const char *name,
+ ex_entity_type type, const char *subtype, const char *routine);
+int ex_put_names_internal(int exoid, int varid, size_t count, char**names,
+ ex_entity_type type, const char *subtype, const char *routine);
+void ex_trim_internal(char *name);
+void ex_update_max_name_length(int exoid, int length);
#endif
diff --git a/cbind/include/exodusII_test.h b/exodus/cbind/include/exodusII_test.h
similarity index 100%
rename from cbind/include/exodusII_test.h
rename to exodus/cbind/include/exodusII_test.h
diff --git a/cbind/src/Imakefile b/exodus/cbind/src/Imakefile
similarity index 92%
rename from cbind/src/Imakefile
rename to exodus/cbind/src/Imakefile
index 9bd8771..a922781 100644
--- a/cbind/src/Imakefile
+++ b/exodus/cbind/src/Imakefile
@@ -34,8 +34,19 @@
XCOMM Use include files locates in exodusii/cbind/include
INCLUDES = IncRef-I../include
+REQUIREDLIBS = -L$(SHLIBDIR) $(NETCDF)
-DEFINES = -DEX_ERR_STR $(PICFLAGS)
+#ifndef BuildSharedExodusLibrary
+#define BuildSharedExodusLibrary NO
+#endif
+
+#define DoNormalLib YES
+#define DoSharedLib BuildSharedExodusLibrary
+#define LibName exodus
+SOREV = 4
+#define SoRev SOREV
+
+DEFINES = $(PICFLAGS)
SRCS = exclos.c exggvt.c exgpa.c exgvp.c expfrm.c expqa.c \
excn2s.c exgids.c exgp.c exgvv.c expinf.c expset.c \
@@ -75,13 +86,15 @@ SRCS = exclos.c exggvt.c exgpa.c exgvp.c expfrm.c expqa.c \
exgnsi.c expelb.c exgncor.c \
expncor.c exgnoatt.c expnoatt.c \
expnvar.c exgnvar.c expnnv.c exgnnv.c exgcssc.c \
- expecpp.c exgecpp.c
+ expecpp.c exgecpp.c exppidm.c
OBJS = ${SRCS:.c=.o}
+#include <Library.tmpl>
+
LibraryTargetSubdirsCopy(libexodus.a,$(OBJS),../../)
$(OBJS): ../include/exodusII.h ../include/exodusII_int.h ../include/exodusII_ext.h
DependTarget()
-
+LibraryObjectRule()
diff --git a/exodus/cbind/src/Makefile.standalone b/exodus/cbind/src/Makefile.standalone
new file mode 100644
index 0000000..1fa6e35
--- /dev/null
+++ b/exodus/cbind/src/Makefile.standalone
@@ -0,0 +1,193 @@
+SRCS = \
+ ex_conv.c \
+ ex_utils.c \
+ exclos.c \
+ excn2s.c \
+ excopy.c \
+ excre.c \
+ exerr.c \
+ exgatm.c \
+ exgatn.c \
+ exgatt.c \
+ exgattp.c \
+ exgblk.c \
+ exgcns.c \
+ exgcon.c \
+ exgconn.c \
+ exgcor.c \
+ exgcset.c \
+ exgcss.c \
+ exgcssc.c \
+ exgean.c \
+ exgeat.c \
+ exgebi.c \
+ exgecpp.c \
+ exgelb.c \
+ exgelc.c \
+ exgem.c \
+ exgenm.c \
+ exgev.c \
+ exgevid.c \
+ exgevt.c \
+ exgfrm.c \
+ exggv.c \
+ exggvt.c \
+ exgidm.c \
+ exgids.c \
+ exginf.c \
+ exgini.c \
+ exginix.c \
+ exgmap.c \
+ exgmp.c \
+ exgnam.c \
+ exgnams.c \
+ exgnconn.c \
+ exgncor.c \
+ exgnm.c \
+ exgnmap.c \
+ exgnnm.c \
+ exgnnv.c \
+ exgnoatt.c \
+ exgnp.c \
+ exgns.c \
+ exgnsd.c \
+ exgnsi.c \
+ exgnstt.c \
+ exgnsv.c \
+ exgnsvid.c \
+ exgnv.c \
+ exgnvar.c \
+ exgnvid.c \
+ exgnvt.c \
+ exgnvv.c \
+ exgoatt.c \
+ exgoea.c \
+ exgotv.c \
+ exgp.c \
+ exgpa.c \
+ exgpem.c \
+ exgpn.c \
+ exgqa.c \
+ exgset.c \
+ exgsetd.c \
+ exgsetp.c \
+ exgsnl.c \
+ exgsp.c \
+ exgss.c \
+ exgssc.c \
+ exgssd.c \
+ exgssi.c \
+ exgssn.c \
+ exgsstt.c \
+ exgssv.c \
+ exgssvid.c \
+ exgtim.c \
+ exgtt.c \
+ exgvan.c \
+ exgvar.c \
+ exgvarnam.c \
+ exgvarnams.c \
+ exgvarparam.c \
+ exgvart.c \
+ exgvartab.c \
+ exgvid.c \
+ exgvnm.c \
+ exgvp.c \
+ exgvtt.c \
+ exgvv.c \
+ exinq.c \
+ exopen.c \
+ exopts.c \
+ expatn.c \
+ expatt.c \
+ expattp.c \
+ expblk.c \
+ expcab.c \
+ expclb.c \
+ expcns.c \
+ expcon.c \
+ expconn.c \
+ expcor.c \
+ expcset.c \
+ expcss.c \
+ expean.c \
+ expeat.c \
+ expecpp.c \
+ expelb.c \
+ expelc.c \
+ expem.c \
+ expenm.c \
+ expev.c \
+ expfrm.c \
+ expgv.c \
+ expidm.c \
+ expinf.c \
+ expini.c \
+ expinix.c \
+ expmap.c \
+ expmp.c \
+ expnam.c \
+ expnams.c \
+ expncor.c \
+ expnm.c \
+ expnmap.c \
+ expnnm.c \
+ expnnv.c \
+ expnoatt.c \
+ expnp.c \
+ expns.c \
+ expnsd.c \
+ expnstt.c \
+ expnsv.c \
+ expnv.c \
+ expnvar.c \
+ expnvv.c \
+ expoatt.c \
+ expoea.c \
+ expp.c \
+ exppa.c \
+ exppem.c \
+ exppidm.c \
+ exppn.c \
+ exppsetd.c \
+ expqa.c \
+ expset.c \
+ expsetd.c \
+ expsetp.c \
+ expsp.c \
+ expss.c \
+ expssd.c \
+ expsstt.c \
+ expssv.c \
+ exptim.c \
+ exptt.c \
+ expvan.c \
+ expvar.c \
+ expvarnam.c \
+ expvarnams.c \
+ expvarparam.c \
+ expvartab.c \
+ expvnm.c \
+ expvp.c \
+ expvpa.c \
+ expvpax.c \
+ expvpc.c \
+ expvtt.c \
+ expvv.c \
+ exupda.c
+
+OBJS = ${SRCS:.c=.o}
+
+all:: libexodus.a
+libexodus.a: $(OBJS)
+ $(AR) $@ $?
+ $(RANLIB) $@
+ cp libexodus.a ../../
+
+clean::
+ rm -f *.CKP *.ln *.BAK *.bak *.o *.M *.mod core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"*
+
+.SUFFIXES: .c
+.c.o:
+ $(CC) -c $(CFLAGS) $*.c
+
diff --git a/cbind/src/ex_conv.c b/exodus/cbind/src/ex_conv.c
similarity index 100%
rename from cbind/src/ex_conv.c
rename to exodus/cbind/src/ex_conv.c
diff --git a/cbind/src/ex_utils.c b/exodus/cbind/src/ex_utils.c
similarity index 84%
rename from cbind/src/ex_utils.c
rename to exodus/cbind/src/ex_utils.c
index c15518a..030361d 100644
--- a/cbind/src/ex_utils.c
+++ b/exodus/cbind/src/ex_utils.c
@@ -79,6 +79,261 @@ struct obj_stats* exoII_nm = 0;
static char ret_string[10*(MAX_VAR_NAME_LENGTH+1)];
static char* cur_string = &ret_string[0];
+int ex_check_file_type(const char *path, int *type)
+{
+ /* Based on (stolen from?) NC_check_file_type from netcdf sources.
+
+ Type is set to:
+ 1 if this is a netcdf classic file,
+ 2 if this is a netcdf 64-bit offset file,
+ 5 if this is an hdf5 file
+ */
+
+#define MAGIC_NUMBER_LEN 4
+
+ char magic[MAGIC_NUMBER_LEN];
+
+ *type = 0;
+
+ /* Get the 4-byte magic from the beginning of the file. */
+ {
+ FILE *fp;
+ int i;
+
+ if (!(fp = fopen(path, "r")))
+ return errno;
+ i = fread(magic, MAGIC_NUMBER_LEN, 1, fp);
+ fclose(fp);
+ if(i != 1)
+ return errno;
+ }
+
+ /* Ignore the first byte for HDF */
+ if (magic[1] == 'H' && magic[2] == 'D' && magic[3] == 'F')
+ *type = 5;
+ else if (magic[0] == 'C' && magic[1] == 'D' && magic[2] == 'F')
+ {
+ if (magic[3] == '\001')
+ *type = 1;
+ else if(magic[3] == '\002')
+ *type = 2;
+ }
+ return EX_NOERR;
+}
+
+int ex_set_max_name_length(int exoid, int length)
+{
+ char errmsg[MAX_ERR_LENGTH];
+ if (length <= 0) {
+ exerrval = NC_EMAXNAME;
+ sprintf(errmsg, "Error: Max name length must be positive.");
+ ex_err("ex_set_max_name_length",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ else if (length > NC_MAX_NAME) {
+ exerrval = NC_EMAXNAME;
+ sprintf(errmsg, "Error: Max name length (%d) exceeds netcdf max name size (%d).",
+ length, NC_MAX_NAME);
+ ex_err("ex_set_max_name_length",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ else {
+ ex_max_name_length = length;
+ }
+ return EX_NOERR;
+}
+
+void ex_update_max_name_length(int exoid, int length)
+{
+ int status;
+ int db_length = 0;
+ /* Get current value of the maximum_name_length attribute... */
+ if ((status = nc_get_att_int(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &db_length)) != NC_NOERR) {
+ char errmsg[MAX_ERR_LENGTH];
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to update 'max_name_length' attribute in file id %d",
+ exoid);
+ ex_err("ex_update_max_name_length",errmsg,exerrval);
+ }
+
+ if (length > db_length) {
+ /* Update with new value... */
+ nc_put_att_int(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, NC_INT, 1, &length);
+ }
+}
+
+int ex_put_names_internal(int exoid, int varid, size_t num_entity, char **names,
+ ex_entity_type obj_type, const char *subtype, const char *routine)
+{
+ size_t i;
+ int status;
+ size_t start[2], count[2];
+ char errmsg[MAX_ERR_LENGTH];
+ int max_name_len = 0;
+ size_t name_length;
+
+ /* inquire previously defined dimensions */
+ name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH)+1;
+
+ for (i=0; i<num_entity; i++) {
+ if (names[i] != '\0') {
+ int too_long = 0;
+ start[0] = i;
+ start[1] = 0;
+
+ count[0] = 1;
+ count[1] = strlen(names[i]) + 1;
+
+ if (count[1] > name_length) {
+ fprintf(stderr,
+ "Warning: The %s %s name '%s' is too long.\n\tIt will be truncated from %d to %d characters\n",
+ ex_name_of_object(obj_type), subtype, names[i], (int)strlen(names[i]), (int)name_length-1);
+ count[1] = name_length;
+ too_long = 1;
+ }
+
+ if (count[1] > max_name_len)
+ max_name_len = count[1];
+
+ if ((status = nc_put_vara_text(exoid, varid, start, count, names[i])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store %s names in file id %d",
+ ex_name_of_object(obj_type), exoid);
+ ex_err(routine,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Add the trailing null if the variable name was too long */
+ if (too_long) {
+ start[1] = name_length-1;
+ nc_put_var1_text(exoid, varid, start, "\0");
+ }
+ }
+ }
+
+ /* Update the maximum_name_length attribute on the file. */
+ ex_update_max_name_length(exoid, max_name_len-1);
+
+ return (EX_NOERR);
+}
+
+int ex_put_name_internal(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;
+
+ /* inquire previously defined dimensions */
+ name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH)+1;
+
+ if (name != '\0') {
+ int too_long = 0;
+ start[0] = index;
+ start[1] = 0;
+
+ count[0] = 1;
+ count[1] = strlen(name) + 1;
+
+ if (count[1] > name_length) {
+ fprintf(stderr,
+ "Warning: The %s %s name '%s' is too long.\n\tIt will be truncated from %d to %d characters\n",
+ ex_name_of_object(obj_type), subtype, name, (int)strlen(name), (int)name_length-1);
+ count[1] = name_length;
+ too_long = 1;
+ }
+
+ if ((status = nc_put_vara_text(exoid, varid, start, count, name)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store %s name in file id %d",
+ ex_name_of_object(obj_type), exoid);
+ ex_err(routine,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Add the trailing null if the variable name was too long */
+ if (too_long) {
+ start[1] = name_length-1;
+ nc_put_var1_text(exoid, varid, start, "\0");
+ }
+
+ /* Update the maximum_name_length attribute on the file. */
+ ex_update_max_name_length(exoid, count[1]-1);
+ }
+
+ return (EX_NOERR);
+}
+
+int ex_get_names_internal(int exoid, int varid, size_t num_entity, 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 ex_max_name_length
+ */
+ int db_name_size = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH);
+ int name_size = db_name_size < ex_max_name_length ? db_name_size : ex_max_name_length;
+
+ for (i=0; i<num_entity; i++) {
+ status = ex_get_name_internal(exoid, varid, i, names[i], name_size, obj_type, routine);
+ if (status != NC_NOERR)
+ return status;
+ }
+ return EX_NOERR;
+}
+
+int ex_get_name_internal(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];
+
+ /* read the name */
+ start[0] = index; count[0] = 1;
+ start[1] = 0; count[1] = name_size+1;
+
+ status = nc_get_vara_text(exoid, varid, start, count, name);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg, "Error: failed to get %s name at index %d from file id %d",
+ ex_name_of_object(obj_type), (int)index, exoid);
+ ex_err(routine,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ name[ex_max_name_length] = '\0';
+
+ ex_trim_internal(name);
+ return EX_NOERR;
+}
+
+void ex_trim_internal(char *name)
+{
+ /* Trim trailing spaces... */
+ size_t size;
+ char *end;
+
+ if (name == NULL)
+ return;
+
+ size = strlen(name);
+ if (size==0)
+ return;
+
+ end = name + size - 1;
+ while (end >= name && isspace(*end))
+ end--;
+
+ *(end+1) = '\0';
+}
+
/** ex_catstr - concatenate string/number (where number is converted to ASCII) */
char *ex_catstr (const char *string,
int num)
@@ -107,6 +362,8 @@ char *ex_catstr2 (const char *string1,
char* ex_name_of_object(ex_entity_type obj_type)
{
switch (obj_type) {
+ case EX_COORDINATE: /* kluge so some wrapper functions work */
+ return "coordinate";
case EX_NODAL:
return "nodal";
case EX_EDGE_BLOCK:
@@ -464,7 +721,7 @@ int ex_id_lkup( int exoid,
/* check if values in stored arrays are filled with non-zeroes */
filled = TRUE;
for (i=0;i<dim_len;i++) {
- if (id_vals[i] == 0 || id_vals[i] == NC_FILL_INT) {
+ if (id_vals[i] == EX_INVALID_ID || id_vals[i] == NC_FILL_INT) {
filled = FALSE;
break; /* id array hasn't been completely filled with valid ids yet */
}
@@ -546,7 +803,7 @@ int ex_id_lkup( int exoid,
if ( !(tmp_stats->valid_ids) ) {
if (id_vals) free (id_vals);
}
- return(-(i+1)); /* return index into id array (1-based) */
+ return(-((int)i+1)); /* return index into id array (1-based) */
}
}
if ( !(tmp_stats->valid_ids) ) {
diff --git a/cbind/src/exclos.c b/exodus/cbind/src/exclos.c
similarity index 88%
rename from cbind/src/exclos.c
rename to exodus/cbind/src/exclos.c
index d0c1172..306b433 100644
--- a/cbind/src/exclos.c
+++ b/exodus/cbind/src/exclos.c
@@ -53,7 +53,23 @@
extern char *ret_string; /* cf ex_utils.c */
/*!
- * updates and then closes an open EXODUS II file
+
+The function ex_close() updates and then closes an open exodus file.
+
+\return In case of an error, ex_close() 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 exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+
+The following code segment closes an open exodus file:
+
+\code
+int error,exoid;
+error = ex_close (exoid);
+\endcode
+
*/
int ex_close (int exoid)
{
diff --git a/cbind/src/excn2s.c b/exodus/cbind/src/excn2s.c
similarity index 91%
rename from cbind/src/excn2s.c
rename to exodus/cbind/src/excn2s.c
index 53c48fe..97529aa 100644
--- a/cbind/src/excn2s.c
+++ b/exodus/cbind/src/excn2s.c
@@ -32,27 +32,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* excn2s - ex_cvt_nodes_to_sides: convert nodes to sides
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int *num_elem_per_set number of element per set
-* int *num_nodes_per_set number of nodes per set
-* int *side_sets_elem_index index array of elements into elem list
-* int *side_sets_node_index index array of nodes
-* int *side_sets_elem_list array of elements
-* int *side_sets_node_list array of nodes
-*
-* exit conditions -
-* int *side_sets_side_list array of sides/faces
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include <ctype.h>
#include <string.h>
@@ -61,20 +40,84 @@
#include "exodusII_int.h"
/*!
- * This routine is designed to take the results from retrieving the ExodusI
- * style concatenated side sets to the Exodus II V 2.0 definition
- * uses the element id to get the coordinate node list, element block
- * connectivity, element type to
- * convert the side set node list to a side/face list.
-
- * \param exoid exodus file id
- * \param *num_elem_per_set number of element per set
- * \param *num_nodes_per_set number of nodes per set
- * \param *side_sets_elem_index index array of elements into elem list
- * \param *side_sets_node_index index array of nodes
- * \param *side_sets_elem_list array of elements
- * \param *side_sets_node_list array of nodes
- * \param[out] *side_sets_side_list array of sides/faces
+
+The function ex_cvt_nodes_to_sides() is used to convert a side set
+node list to a side set side list. This routine is provided for
+application programs that utilize side sets defined by nodes (as was
+done previous to release 2.0) rather than local faces or edges. The
+application program must allocate memory for the returned array of
+sides. The length of this array is the same as the length of the
+concatenated side sets element list, which can be determined with a
+call to ex_inquire() or ex_inquire_int().
+
+\return In case of an error, ex_cvt_nodes_to_sides() returns a
+negative number; a warning will return a positive number. Possible
+causes of errors include:
+ - a warning value is returned if no side sets are stored in the file.
+ - because the faces of a wedge require a different number of
+ nodes to describe them (quadrilateral vs. triangular faces), the
+ function will abort with a fatal return code if a wedge is
+ encountered in the side set element list.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create()
+ or ex_open().
+
+\param[in] num_elem_per_set Array containing the number of sides for each set. The number
+ of sides is equal to the number of elements for each set.
+
+\param[in] num_nodes_per_set Array containing the number of nodes for each set.
+
+\param[in] side_sets_elem_index Array containing indices into the \c side_sets_elem_list which are
+ the locations of the first element for each set. These indices are
+ 0-based. Unused.
+
+\param[in] side_sets_node_index Array containing indices into the \c side_sets_node_list
+ which are the locations of the first node for each set. These
+ indices are 0-based. Unused.
+
+\param[in] side_sets_elem_list Array containing the elements for all side sets. Internal element IDs
+ are used in this list (see Section LocalElementIds).
+
+\param[in] side_sets_node_list Array containing the nodes for all side sets. Internal node
+ IDs are used in this list (see Section LocalNodeIds).
+
+\param[out] side_sets_side_list Returned array containing the sides for all side sets.
+
+
+The following code segment will convert side sets described
+by nodes to side sets described by local side numbers:
+
+\code
+int error, exoid, ids[2], num_side_per_set[2],
+ num_nodes_per_set[2], elem_ind[2], node_ind[2],
+ elem_list[4], node_list[8], el_lst_len, *side_list;
+
+ids[0] = 30 ; ids[1] = 31;
+num_side_per_set[0] = 2; num_side_per_set[1] = 2;
+num_nodes_per_set[0] = 4; num_nodes_per_set[1] = 4;
+
+elem_ind[0] = 0; elem_ind[1] = 2;
+node_ind[0] = 0; node_ind[1] = 4;
+
+\comment{side set #1}
+elem_list[0] = 2; elem_list[1] = 2;
+node_list[0] = 8; node_list[1] = 5;
+node_list[2] = 6; node_list[3] = 7;
+
+\comment{side set #2}
+elem_list[2] = 1; elem_list[3] = 2;
+node_list[4] = 2; node_list[5] = 3;
+node_list[6] = 7; node_list[7] = 8;
+
+el_lst_len = ex_inquire_int(exoid, EX_INQ_SS_ELEM_LEN);
+
+\comment{side set element list is same length as side list}
+side_list = (int *) calloc (el_lst_len, sizeof(int));
+
+ex_cvt_nodes_to_sides(exoid, num_side_per_set, num_nodes_per_set,
+ elem_ind, node_ind, elem_list,
+ node_list, side_list);
+\endcode
<b>Algorithm:</b>
diff --git a/cbind/src/excopy.c b/exodus/cbind/src/excopy.c
similarity index 96%
rename from cbind/src/excopy.c
rename to exodus/cbind/src/excopy.c
index c6943c4..19ef460 100644
--- a/cbind/src/excopy.c
+++ b/exodus/cbind/src/excopy.c
@@ -32,21 +32,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* excopy - ex_copy
-*
-* entry conditions -
-* input parameters:
-* int in_exoid input exodus file id
-*
-* exit conditions -
-* int out_exoid output exodus file id
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include <assert.h>
#include <stdlib.h>
@@ -54,13 +39,14 @@
#include "exodusII.h"
#include "exodusII_int.h"
+/*! \cond INTERNAL */
struct ncdim { /* dimension */
- char name[MAX_STR_LENGTH];
+ char name[MAX_VAR_NAME_LENGTH];
size_t size;
};
struct ncvar { /* variable */
- char name[MAX_STR_LENGTH];
+ char name[MAX_VAR_NAME_LENGTH];
nc_type type;
int ndims;
int dims[NC_MAX_VAR_DIMS];
@@ -69,7 +55,7 @@ struct ncvar { /* variable */
struct ncatt { /* attribute */
int var;
- char name[MAX_STR_LENGTH];
+ char name[MAX_VAR_NAME_LENGTH];
nc_type type;
size_t len;
void *val;
@@ -84,8 +70,11 @@ static int cpy_coord_def(int in_id,int out_id,int rec_dim_id,
static int cpy_coord_val(int in_id,int out_id,char *var_nm,
int in_large, int out_large);
static void update_internal_structs( int, ex_inquiry, struct list_item** );
+/*! \endcond */
/*!
+ \undoc
+
* efficiently copies all non-transient information (attributes,
* dimensions, and variables from an opened EXODUS file to another
* opened EXODUS file. Will not overwrite a dimension or variable
@@ -107,12 +96,14 @@ int ex_copy (int in_exoid, int out_exoid)
int var_out_id; /* variable id */
struct ncvar var; /* variable */
struct ncatt att; /* attribute */
+ nc_type att_type = NC_NAT;
+ size_t att_len = 0;
size_t i;
size_t numrec;
size_t dim_sz;
char dim_nm[NC_MAX_NAME];
int in_large, out_large;
-
+
exerrval = 0; /* clear error code */
/*
@@ -131,11 +122,9 @@ int ex_copy (int in_exoid, int out_exoid)
nc_inq_dimlen(in_exoid, recdimid, &numrec);
/* put output file into define mode */
-
nc_redef(out_exoid);
/* copy global attributes */
-
for (i = 0; i < (size_t)ngatts; i++) {
nc_inq_attname(in_exoid, NC_GLOBAL, i, att.name);
@@ -197,6 +186,22 @@ int ex_copy (int in_exoid, int out_exoid)
} /* end if */
} /* end loop over dim */
+ /* DIM_STR_NAME is a newly added dimension required by current API.
+ * 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);
+ if (status != NC_NOERR) {
+ /* Not found; set to default value of 32+1. */
+ status = nc_def_dim(out_exoid, DIM_STR_NAME, 33, &dim_out_id);
+ }
+
+ status = nc_inq_att(in_exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &att_type, &att_len);
+ if (status != NC_NOERR) {
+ int max_so_far = 32;
+ status=nc_put_att_int(out_exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, NC_INT, 1, &max_so_far);
+ }
+
/* copy variable definitions and variable attributes */
for (varid = 0; varid < nvars; varid++) {
@@ -336,6 +341,7 @@ int ex_copy (int in_exoid, int out_exoid)
return(EX_NOERR);
}
+/*! \cond INTERNAL */
int cpy_att(int in_id,int out_id,int var_in_id,int var_out_id)
/*
int in_id: input netCDF input-file ID
@@ -360,7 +366,7 @@ 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++) {
- char att_nm[MAX_STR_LENGTH];
+ char att_nm[MAX_VAR_NAME_LENGTH];
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);
@@ -369,6 +375,7 @@ int cpy_att(int in_id,int out_id,int var_in_id,int var_out_id)
return(EX_NOERR);
}
+/*! \internal */
int cpy_coord_def(int in_id,int out_id,int rec_dim_id,char *var_nm,
int in_large, int out_large)
/*
@@ -450,6 +457,7 @@ int cpy_coord_def(int in_id,int out_id,int rec_dim_id,char *var_nm,
return var_out_id;
}
+/*! \internal */
int cpy_var_def(int in_id,int out_id,int rec_dim_id,char *var_nm)
/*
int in_id: input netCDF input-file ID
@@ -534,6 +542,7 @@ int cpy_var_def(int in_id,int out_id,int rec_dim_id,char *var_nm)
return var_out_id;
} /* end cpy_var_def() */
+/*! \internal */
int
cpy_var_val(int in_id,int out_id,char *var_nm)
/*
@@ -671,6 +680,7 @@ cpy_var_val(int in_id,int out_id,char *var_nm)
} /* end cpy_var_val() */
+/*! \internal */
int
cpy_coord_val(int in_id,int out_id,char *var_nm,
int in_large, int out_large)
@@ -691,7 +701,7 @@ cpy_coord_val(int in_id,int out_id,char *var_nm,
size_t start[2], count[2];
nc_type var_type_in, var_type_out;
- void *void_ptr;
+ void *void_ptr = NULL;
/* Handle easiest situation first: in_large matches out_large */
if (in_large == out_large)
@@ -768,6 +778,7 @@ cpy_coord_val(int in_id,int out_id,char *var_nm,
} /* end cpy_coord_val() */
+/*! \internal */
void update_internal_structs( int out_exoid, ex_inquiry inqcode, struct list_item** ctr_list )
{
int i;
@@ -796,3 +807,5 @@ size_t type_size(nc_type type)
else
return 0;
}
+
+/* \endcond */
diff --git a/cbind/src/excre.c b/exodus/cbind/src/excre.c
similarity index 62%
rename from cbind/src/excre.c
rename to exodus/cbind/src/excre.c
index efed293..17e252d 100644
--- a/cbind/src/excre.c
+++ b/exodus/cbind/src/excre.c
@@ -32,43 +32,100 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* excre - ex_create
-*
-* entry conditions -
-* input parameters:
-* char* path file name including path
-* int cmode access mode r/w
-* int* comp_ws compute word size
-* int* io_ws storage word size
-*
-* exit conditions -
-* return value exodus file id
-*
-* revision history -
-*
-*
-*****************************************************************************/
-#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * creates a new EXODUS II file and returns an id that can subsequently
- * be used to refer to the file. This in an internal function; the external
- * name of this function ix ex_create()
- * \param path filename of file to create.
- * \param cmode access mode. Any of the defines in the \ref FileVars group or'd together.
- * \param comp_ws The word size in bytes (0, 4 or 8) of the floating
- * point variables used in the application program. If 0 (zero) is
- * passed, the default sizeof(float) will be used and returned in this
- * variable. WARNING: all EXODUS II functions requiring floats must be
- * passed floats declared with this passed in or returned compute word
- * size (4 or 8).
- * \param io_ws The word size in bytes (4 or 8) of the floating point data as they
- * are to be stored in the EXODUS II file.
- * \param run_version (internally generated) used to verify compatability of libary and include files.
- */
+
+\note The ex_create_int() is an internal function called by
+ex_create(). The user should call ex_create() and not ex_create_int().
+
+The function ex_create() creates a new exodus file and returns an ID
+that can subsequently be used to refer to the file.
+
+All floating point values in an exodus file are stored as either
+4-byte (\c float) or 8-byte (\c double) numbers; no mixing of 4- and
+8-byte numbers in a single file is allowed. An application code can
+compute either 4- or 8-byte values and can designate that the values
+be stored in the exodus file as either 4- or 8-byte numbers;
+conversion between the 4- and 8-byte values is performed automatically
+by the API routines. Thus, there are four possible combinations of
+compute word size and storage (or I/O) word size.
+
+\return In case of an error, ex_create() returns a negative number. Possible
+causes of errors include:
+ - Passing a file name that includes a directory that does not
+ exist.
+ - Specifying a file name of a file that exists and also
+ specifying a no clobber option.
+ - Attempting to create a file in a directory without permission
+ to create files there.
+ - Passing an invalid file clobber mode.
+
+
+\param path The file name of the new exodus file. This can be given as either an
+ absolute path name (from the root of the file system) or a relative
+ path name (from the current directory).
+
+\param cmode Mode. Use one of the following predefined constants:
+\arg \c EX_NOCLOBBER To create the new file only if the given file name does not refer to a
+ file that already exists.
+
+\arg \c EX_CLOBBER To create the new file, regardless of whether a file with the same
+ name already exists. If a file with the same name does exist, its
+ contents will be erased.
+
+\arg \c EX_LARGE_MODEL To create a model that can store individual datasets larger than
+ 2 gigabytes. This modifies the internal storage used by exodusII and
+ also puts the underlying NetCDF file into the \e 64-bit offset'
+ mode. See largemodel for more details on this
+ mode. A large model file will also be created if the
+ environment variable \c EXODUS_LARGE_MODEL is defined
+ in the users environment. A message will be printed to standard output
+ if this environment variable is found.
+
+\arg \c EX_NORMAL_MODEL Create a standard model.
+
+\arg \c EX_NETCDF4 To create a model using the HDF5-based NetCDF-4
+ output. An HDF5-based NetCDF-4 file will also be created if the
+ environment variable \c EXODUS_NETCDF4 is defined in the
+ users environment. A message will be printed to standard output if
+ this environment variable is found.
+
+\arg \c EX_NOSHARE Do not open the underlying NetCDF file in \e share mode. See the
+ NetCDF documentation for more details.
+
+\arg \c EX_SHARE Do open the underlying NetCDF file in \e share mode. See the NetCDF
+ documentation for more details.
+
+\param[in,out] comp_ws The word size in bytes (0, 4 or 8) of the floating point variables
+ used in the application program. If 0 (zero) is passed, the default
+ sizeof(float) will be used and returned in this variable. WARNING: all
+ exodus functions requiring floats must be passed floats declared with
+ this passed in or returned compute word size (4 or 8).}
+
+\param io_ws The word size in bytes (4 or 8) of the floating point
+ data as they are to be stored in the exodus file.
+
+\param run_version (internally generated) used to verify compatability of libary and include files.
+
+The following code segment creates an exodus file called \file{test.exo}:
+
+\code
+#include "exodusII.h"
+int CPU_word_size, IO_word_size, exoid;
+CPU_word_size = sizeof(float); \comment{use float or double}
+IO_word_size = 8; \comment{store variables as doubles}
+
+\comment{create exodus file}
+exoid = ex_create ("test.exo" \comment{filename path}
+ EX_CLOBBER, \comment{create mode}
+ &CPU_word_size, \comment{CPU float word size in bytes}
+ &IO_word_size); \comment{I/O float word size in bytes}
+\endcode
+
+*/
+#include "exodusII.h"
+#include "exodusII_int.h"
+#include <stdlib.h>
int ex_create_int (const char *path,
int cmode,
@@ -76,9 +133,9 @@ int ex_create_int (const char *path,
int *io_ws,
int run_version)
{
- int exoid, time_dim, dims[1];
+ int exoid, dims[1];
int status;
- int dimid;
+ int dimid, time_dim;
int old_fill;
int lio_ws;
int filesiz;
@@ -98,24 +155,27 @@ int ex_create_int (const char *path,
int run_version_minor = run_version % 100;
int lib_version_major = EX_API_VERS_NODOT / 100;
int lib_version_minor = EX_API_VERS_NODOT % 100;
- fprintf(stderr, "EXODUSII: Warning: This code was compiled with exodusII version %d.%02d,\n but was linked with exodusII library version %d.%02d\n This is probably an error in the build process of this code.\n",
+ fprintf(stderr, "EXODUS: Warning: This code was compiled with exodusII version %d.%02d,\n but was linked with exodusII library version %d.%02d\n This is probably an error in the build process of this code.\n",
run_version_major, run_version_minor, lib_version_major, lib_version_minor);
}
#if defined(NC_NETCDF4)
if (cmode & EX_NETCDF4) {
- mode |= (NC_NETCDF4|NC_CLASSIC_MODEL);
+ mode |= (NC_NETCDF4);
} else {
if (netcdf4_mode == -1) {
option = getenv("EXODUS_NETCDF4");
if (option != NULL) {
- fprintf(stderr, "EXODUSII: Using netcdf version 4 selected via EXODUS_NETCDF4 environment variable\n");
- netcdf4_mode = NC_NETCDF4|NC_CLASSIC_MODEL;
+ fprintf(stderr, "EXODUS: Using netcdf version 4 selected via EXODUS_NETCDF4 environment variable\n");
+ netcdf4_mode = NC_NETCDF4;
} else {
netcdf4_mode = 0;
}
}
mode |= netcdf4_mode;
}
+ if (! (cmode & EX_NOCLASSIC)) {
+ mode |= NC_CLASSIC_MODEL;
+ }
#endif
/*
@@ -166,9 +226,15 @@ int ex_create_int (const char *path,
if ((status = nc_create (path, mode, &exoid)) != NC_NOERR) {
exerrval = status;
- sprintf(errmsg,
- "Error: file create failed for %s, mode: %s",
- path, mode_name);
+ if (cmode & EX_NETCDF4) {
+ sprintf(errmsg,
+ "Error: file create failed for %s in NETCDF4 and %s mode.\n\tThis library probably does not support netcdf-4 files.",
+ path, mode_name);
+ } else {
+ sprintf(errmsg,
+ "Error: file create failed for %s, mode: %s",
+ path, mode_name);
+ }
ex_err("ex_create",errmsg,exerrval);
return (EX_FATAL);
}
@@ -258,6 +324,7 @@ int ex_create_int (const char *path,
return (EX_FATAL);
}
+ /* The name string length dimension is delayed until the ex_put_init function */
/* create line length dimension */
if ((status = nc_def_dim(exoid, DIM_LIN, (MAX_LINE_LENGTH+1), &dimid)) != NC_NOERR) {
diff --git a/exodus/cbind/src/exerr.c b/exodus/cbind/src/exerr.c
new file mode 100644
index 0000000..8554782
--- /dev/null
+++ b/exodus/cbind/src/exerr.c
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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 <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+/*!
+\fn{void ex_err(const char *module_name, const char *message, int err_num)}
+
+The function ex_err() logs an error to \c 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
+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] 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 \c 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 \c 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
+ of the error reporting level (see ex_opts()).
+
+The following is an example of the use of this function:
+
+\code
+#include "exodusII.h"
+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;
+ sprintf(errmsg,"Error: cannot open file test.exo");
+ ex_err("prog_name", errmsg, errval);
+}
+\endcode
+
+*/
+
+int exerrval = 0; /* clear initial global error code value */
+
+static char last_pname[MAX_ERR_LENGTH];
+static char last_errmsg[MAX_ERR_LENGTH];
+static int last_err_num;
+
+void ex_err(const char *module_name,
+ const char *message,
+ int err_num)
+{
+ if (err_num == 0) /* zero is no error, ignore and return */
+ return;
+
+ else if (err_num == EX_PRTLASTMSG)
+ {
+ fprintf(stderr, "[%s] %s\n",last_pname,last_errmsg);
+ fprintf(stderr, " exerrval = %d\n",last_err_num);
+ return;
+ }
+
+ else if (exoptval & EX_VERBOSE) /* check see if we really want to hear this */
+ {
+ fprintf(stderr, "Exodus Library Error: [%s]\n\t%s\n",module_name,message);
+ switch (err_num) {
+ case NC_SYSERR:
+ fprintf (stderr,"\t[%d] System error -- Usually disk full or filesystem issue\n", err_num);
+ break;
+ case NC_ESTS:
+ fprintf (stderr,"\t[%d] In FORTRAN interface, string too small\n", err_num);
+ break;
+ case NC_EMAXNAME:
+ fprintf (stderr,"\t[%d] length of name exceeds NC_MAX_NAME\n", err_num);
+ break;
+ case NC_EMAXDIMS:
+ fprintf (stderr,"\t[%d] netcdf constraint NC_MAX_DIMS exceeded\n", err_num);
+ break;
+ case NC_EMAXVARS:
+ fprintf (stderr,"\t[%d] netcdf constraint NC_MAX_VARS exceeded\n", err_num);
+ break;
+ case NC_EBADID:
+ fprintf (stderr,"\t[%d] Not a netcdf id\n", err_num);
+ break;
+ case NC_ENFILE:
+ fprintf (stderr,"\t[%d] Too many exodus (netcdf) files open\n", err_num);
+ break;
+ case NC_EEXIST:
+ fprintf (stderr,"\t[%d] exodus (netcdf) file exists && NC_NOCLOBBER\n", err_num);
+ break;
+ case NC_EINVAL:
+ fprintf (stderr,"\t[%d] Invalid Argument\n", err_num);
+ break;
+ case NC_EPERM:
+ fprintf (stderr,"\t[%d] Write to read only\n", err_num);
+ break;
+ case NC_ENOTINDEFINE:
+ fprintf (stderr,"\t[%d] Operation not allowed in data mode\n", err_num);
+ break;
+ case NC_EINDEFINE:
+ fprintf (stderr,"\t[%d] Operation not allowed in define mode\n", err_num);
+ break;
+ case NC_EINVALCOORDS:
+ fprintf (stderr,"\t[%d] Index exceeds dimension bound\n", err_num);
+ break;
+ case NC_ENAMEINUSE:
+ fprintf (stderr,"\t[%d] String match to name in use\n", err_num);
+ break;
+ case NC_ENOTATT:
+ fprintf (stderr,"\t[%d] Attribute not found\n", err_num);
+ break;
+ case NC_EMAXATTS:
+ fprintf (stderr,"\t[%d] NC_MAX_ATTRS exceeded\n", err_num);
+ break;
+ case NC_EBADTYPE:
+ fprintf (stderr,"\t[%d] Not a netcdf data type\n", err_num);
+ break;
+ case NC_EBADDIM:
+ fprintf (stderr,"\t[%d] Invalid dimension id or name\n", err_num);
+ break;
+ case NC_EUNLIMPOS:
+ fprintf (stderr,"\t[%d] NC_UNLIMITED in the wrong index\n", err_num);
+ break;
+ case NC_ENOTVAR:
+ fprintf (stderr,"\t[%d] Variable not found\n", err_num);
+ break;
+ case NC_EGLOBAL:
+ fprintf (stderr,"\t[%d] Action prohibited on NC_GLOBAL varid\n", err_num);
+ break;
+ case NC_ENOTNC:
+ fprintf (stderr,"\t[%d] Not an exodus (netcdf) file\n", err_num);
+ break;
+ case NC_EUNLIMIT:
+ fprintf (stderr,"\t[%d] NC_UNLIMITED size already in use\n", err_num);
+ break;
+ case NC_ENORECVARS:
+ fprintf (stderr,"\t[%d] nc_rec op when there are no record vars\n", err_num);
+ break;
+ case NC_ECHAR:
+ fprintf (stderr,"\t[%d] Attempt to convert between text & numbers\n", err_num);
+ break;
+ case NC_EEDGE:
+ fprintf (stderr,"\t[%d] Start+count exceeds dimension bound\n", err_num);
+ break;
+ case NC_ESTRIDE:
+ fprintf (stderr,"\t[%d] Illegal stride\n", err_num);
+ break;
+ case NC_EBADNAME:
+ fprintf (stderr,"\t[%d] Attribute or variable name contains illegal characters\n", err_num);
+ break;
+ case NC_ERANGE:
+ fprintf (stderr,"\t[%d] Math result not representable\n", err_num);
+ break;
+ case NC_ENOMEM:
+ fprintf (stderr,"\t[%d] Memory allocation (malloc) failure\n", err_num);
+ break;
+ case NC_EVARSIZE:
+ fprintf (stderr,"\t[%d] One or more variable sizes violate format constraints\n", err_num);
+ break;
+ case NC_EDIMSIZE:
+ fprintf (stderr,"\t[%d] Invalid dimension size\n", err_num);
+ break;
+ case NC_ETRUNC:
+ fprintf (stderr,"\t[%d] File likely truncated or possibly corrupted\n", err_num);
+ break;
+ case NC_EAXISTYPE:
+ fprintf (stderr,"\t[%d] Unknown axis type.\n", err_num);
+ break;
+ case EX_MSG:
+ break;
+ default:
+ if (exoptval & EX_VERBOSE)
+ fprintf(stderr, " exerrval = %d\n",err_num);
+ }
+ }
+ /* save the error message for replays */
+ strcpy(last_errmsg, message);
+ strcpy(last_pname, module_name);
+ last_err_num = err_num;
+
+ fflush(stderr);
+
+ /* with netCDF 3.4, (fatal) system error codes are > 0;
+ so all EXODUS fatal error codes are > 0 */
+ if ((err_num > 0) && (exoptval & EX_ABORT))
+ exit (err_num);
+}
+
+void ex_get_err( const char** msg, const char** func, int* err_num )
+ {
+ (*msg) = last_errmsg;
+ (*func) = last_pname;
+ (*err_num) = last_err_num;
+ }
+
diff --git a/cbind/src/exgatm.c b/exodus/cbind/src/exgatm.c
similarity index 65%
rename from cbind/src/exgatm.c
rename to exodus/cbind/src/exgatm.c
index fe401ef..3b84cb0 100644
--- a/cbind/src/exgatm.c
+++ b/exodus/cbind/src/exgatm.c
@@ -32,34 +32,51 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgatm - get all time values
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* float* time_values array of simulation time values
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include <string.h>
#include "exodusII.h"
#include "exodusII_int.h"
/*!
- * reads the time values for all time steps. Memory must be allocated
- * for the time values array before this function is invoked. The
- * storage requirements (equal to the number of time steps) can be
- * determined by using the ex_inquire() routine.
- * \param exoid exodus file id
- * \param[out] time_values Returned array of time values at all time steps.
- */
+
+The function ex_get_all_times() reads the time values for all time
+steps. Memory must be allocated for the time values array before this
+function is invoked. The storage requirements (equal to the number of
+time steps) can be determined by using the ex_inquire() or
+ex_inquire_int() routines.
+
+Because time values are floating point values, the application code
+must declare the array passed to be the appropriate type (\c float or
+\c double) to match the compute word size passed in ex_create() or
+ex_open().
+
+\return In case of an error, ex_get_all_times() 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()
+ - no time steps have been stored in the file.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[out] time_values Returned array of times. These are the time values at all time steps.
+
+The following code segment will read the time values for all time
+steps stored in the data file:
+
+\code
+#include "exodusII.h"
+int error, exoid, num_time_steps;
+float *time_values;
+
+\comment{determine how many time steps are stored}
+num_time_steps = ex_inquire_int(exoid, EX_INQ_TIME);
+
+\comment{read time values at all time steps}
+time_values = (float *) calloc(num_time_steps, sizeof(float));
+
+error = ex_get_all_times(exoid, time_values);
+\endcode
+
+*/
int ex_get_all_times (int exoid,
void *time_values)
diff --git a/cbind/src/exgatn.c b/exodus/cbind/src/exgatn.c
similarity index 84%
rename from cbind/src/exgatn.c
rename to exodus/cbind/src/exgatn.c
index 9109e53..b00bf10 100644
--- a/cbind/src/exgatn.c
+++ b/exodus/cbind/src/exgatn.c
@@ -53,6 +53,7 @@
#include "exodusII.h"
#include "exodusII_int.h"
+/*! \undoc */
/*
* reads the attribute names for an element block
*/
@@ -63,10 +64,8 @@ int ex_get_attr_names( int exoid,
{
int status;
int varid, numattrdim, obj_id_ndx;
- size_t num_attr, start[2], i;
- char *ptr;
+ size_t num_attr, i;
char errmsg[MAX_ERR_LENGTH];
- int j;
const char* dnumobjatt;
const char* vattrbname;
@@ -166,39 +165,9 @@ int ex_get_attr_names( int exoid,
if (status == NC_NOERR) {
/* read the names */
- for (i=0; i < num_attr; i++) {
- start[0] = i;
- start[1] = 0;
-
- j = 0;
- ptr = names[i];
-
- if ((status = nc_get_var1_text (exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get names for %s %d in file id %d",
- ex_name_of_object(obj_type), obj_id, exoid);
- ex_err("ex_get_attr_names",errmsg,exerrval);
- return (EX_FATAL);
- }
-
- while ((*ptr++ != '\0') && (j < MAX_STR_LENGTH)) {
- start[1] = ++j;
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get names for %s %d in file id %d",
- ex_name_of_object(obj_type), obj_id, exoid);
- ex_err("ex_get_attr_names",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
- --ptr;
- if (ptr > names[i]) {
- /* get rid of trailing blanks */
- while (--ptr >= names[i] && *ptr == ' ');
- }
- *(++ptr) = '\0';
+ status = ex_get_names_internal(exoid, varid, num_attr, names, obj_type, "ex_get_attr_names");
+ if (status != NC_NOERR) {
+ return (EX_FATAL);
}
} else {
/* Names variable does not exist on the database; probably since this is an
diff --git a/cbind/src/exgatt.c b/exodus/cbind/src/exgatt.c
similarity index 98%
rename from cbind/src/exgatt.c
rename to exodus/cbind/src/exgatt.c
index a0e6cec..2191bd5 100644
--- a/cbind/src/exgatt.c
+++ b/exodus/cbind/src/exgatt.c
@@ -53,8 +53,8 @@
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads the attributes for an edge, face, or element block
+/*!
+ * \undoc reads the attributes for an edge, face, or element block
*/
int ex_get_attr( int exoid,
diff --git a/cbind/src/exgattp.c b/exodus/cbind/src/exgattp.c
similarity index 99%
rename from cbind/src/exgattp.c
rename to exodus/cbind/src/exgattp.c
index 7b5a162..ea101a0 100644
--- a/cbind/src/exgattp.c
+++ b/exodus/cbind/src/exgattp.c
@@ -52,7 +52,7 @@
#include "exodusII_int.h"
/*!
- * retrieves the number of attributes.
+ * \undoc retrieves the number of attributes.
*/
int ex_get_attr_param (int exoid,
diff --git a/cbind/src/exgblk.c b/exodus/cbind/src/exgblk.c
similarity index 98%
rename from cbind/src/exgblk.c
rename to exodus/cbind/src/exgblk.c
index fd036b2..6fba0c3 100644
--- a/cbind/src/exgblk.c
+++ b/exodus/cbind/src/exgblk.c
@@ -32,9 +32,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
+/*!
*
-* exgblk - read block parameters
+* \undoc exgblk - read block parameters
*
* entry conditions -
* input parameters:
diff --git a/exodus/cbind/src/exgcns.c b/exodus/cbind/src/exgcns.c
new file mode 100644
index 0000000..368d2a4
--- /dev/null
+++ b/exodus/cbind/src/exgcns.c
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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_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 (\c float or \c 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 \c 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 \c 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:
+
+\code
+#include "exodusII.h"
+
+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);
+\endcode
+*/
+
+int ex_get_concat_node_sets (int exoid,
+ int *node_set_ids,
+ int *num_nodes_per_set,
+ int *num_df_per_set,
+ int *node_sets_node_index,
+ int *node_sets_df_index,
+ 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);
+}
diff --git a/cbind/src/exgcon.c b/exodus/cbind/src/exgcon.c
similarity index 62%
rename from cbind/src/exgcon.c
rename to exodus/cbind/src/exgcon.c
index 48a6bc2..b56d25f 100644
--- a/cbind/src/exgcon.c
+++ b/exodus/cbind/src/exgcon.c
@@ -32,42 +32,49 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgcon - ex_get_coord_names
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* char* coord_names[] ptr array of coord names
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
/*!
- * reads the names (#MAX_STR_LENGTH characters in length) of the
- * coordinate arrays from the database. Memory must be allocated for
- * the character strings before this function is invoked.
- * \param exoid exodus file id
- * \param[out] coord_names Returned pointer to a vector containing
- * 'num_dim' names of the nodal coordinate arrays.
- */
+
+The function ex_get_coord_names() reads the names (\p MAX_STR_LENGTH
+-characters in length) of the coordinate arrays from the
+database. Memory must be allocated for the character strings before
+this function is invoked.
+
+\return In case of an error, ex_get_coord_names() 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 coordinate names were not stored.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[out] coord_names Returned pointer to a vector containing \c num_dim names of the nodal
+ coordinate arrays.
+
+The following code segment will read the coordinate names from an open
+exodus file :
+
+\code
+int error, exoid;
+char *coord_names[3];
+
+for (i=0; i < num_dim; i++) {
+ coord_names[i] = (char *)calloc((MAX_STR_LENGTH+1), sizeof(char));
+}
+
+error = ex_get_coord_names (exoid, coord_names);
+\endcode
+
+*/
int ex_get_coord_names (int exoid,
char **coord_names)
{
int status;
- size_t i;
- int j, ndimdim, varid;
- size_t num_dim, start[2];
- char *ptr;
+ int ndimdim, varid;
+ size_t num_dim;
char errmsg[MAX_ERR_LENGTH];
exerrval = 0;
@@ -103,38 +110,9 @@ int ex_get_coord_names (int exoid,
/* read the coordinate names */
- for (i=0; i<num_dim; i++) {
- start[0] = i;
- start[1] = 0;
-
- j = 0;
- ptr = coord_names[i];
-
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get coordinate names in file id %d", exoid);
- ex_err("ex_get_coord_names",errmsg,exerrval);
- return (EX_FATAL);
- }
-
-
- while ((*ptr++ != '\0') && (j < MAX_STR_LENGTH)) {
- start[1] = ++j;
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get coordinate names in file id %d", exoid);
- ex_err("ex_get_coord_names",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
- --ptr;
- if (ptr > coord_names[i]) {
- /* get rid of trailing blanks */
- while (--ptr >= coord_names[i] && *ptr == ' ');
- }
- *(++ptr) = '\0';
+ status = ex_get_names_internal(exoid, varid, num_dim, coord_names, EX_COORDINATE, "ex_get_coord_names");
+ if (status != NC_NOERR) {
+ return (EX_FATAL);
}
return (EX_NOERR);
}
diff --git a/cbind/src/exgconn.c b/exodus/cbind/src/exgconn.c
similarity index 97%
rename from cbind/src/exgconn.c
rename to exodus/cbind/src/exgconn.c
index 83e0c81..3f4f3a3 100644
--- a/cbind/src/exgconn.c
+++ b/exodus/cbind/src/exgconn.c
@@ -32,9 +32,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
+/*!
*
-* exgconn - exodusII read edge/face/element block connectivity
+* \undoc exgconn - exodusII read edge/face/element block connectivity
*
* entry conditions -
* expelb must be called first to establish element block parameters.
@@ -48,17 +48,12 @@
* int* edgeconn edge connectivity array (where applicable)
* int* faceconn face connectivity array (where applicable)
*
-* revision history -
*
*/
#include <stdlib.h>
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads the connectivity array for an element block
- */
-
int ex_get_conn( int exoid,
ex_entity_type blk_type,
int blk_id,
diff --git a/cbind/src/exgcor.c b/exodus/cbind/src/exgcor.c
similarity index 74%
rename from cbind/src/exgcor.c
rename to exodus/cbind/src/exgcor.c
index 5055157..920e013 100644
--- a/cbind/src/exgcor.c
+++ b/exodus/cbind/src/exgcor.c
@@ -32,43 +32,64 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgcor - ex_get_coord
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* float* x_coord X coord array
-* float* y_coord y coord array
-* float* z_coord z coord array
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
/*!
- * reads the coordinates of the nodes.
- * Memory must be allocated for the coordinate arrays (x_coor, y_coor,
- * and z_coor) before this call is made. The length of each of these
- * arrays is the number of nodes in the mesh. Because the coordinates
- * are floating point values, the application code must declare the
- * arrays passed to be the appropriate type "float" or "double"
- * to match the compute word size passed in ex_create() or ex_open()
- * \param exoid exodus file id
- * \param[out] x_coor Returned X coordinates of the nodes. These are
- * returned only if x_coor is non-NULL.
- * \param[out] y_coor Returned Y coordinates of the nodes. These are
- * returned only if y_coor is non-NULL.
- * \param[out] z_coor Returned Z coordinates of the nodes. These are
- * returned only if z_coor is non-NULL.
- */
+The function ex_get_coord() reads the nodal coordinates of the
+nodes. Memory must be allocated for the coordinate arrays (\c x_coor,
+\c y_coor, and \c z_coor) before this call is made. The length of each
+of these arrays is the number of nodes in the mesh.
+
+Because the coordinates are floating point values, the application
+code must declare the arrays passed to be the appropriate type
+(\c float or \c double) to match the compute word size passed in
+ex_create() or ex_open().
+
+\return
+In case of an error, ex_get_coord() 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 nodal coordinates were not stored.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[out] x_coor Returned X coordinates of the nodes. If this is \c NULL, the
+ X-coordinates will not be read.
+\param[out] y_coor Returned Y coordinates of the nodes. These are returned only if
+ \c num_dim > 1; otherwise, pass in \c NULL. If this
+ is \c NULL, the Y-coordinates will not be read.
+\param[out] z_coor Returned Z coordinates of the nodes. These are returned only if
+ \c num_dim > 2; otherwise, pass in \c NULL. If this
+ is \c NULL, the Z-coordinates will not be read.
+
+The following code segment will read the nodal coordinates
+from an open exodus file :
+
+\code
+int error, exoid;
+
+double *x, *y, *z;
+
+\comment{read nodal coordinates values from database}
+x = (double *)calloc(num_nodes, sizeof(double));
+y = (double *)calloc(num_nodes, sizeof(double));
+if (num_dim >= 3)
+ z = (double *)calloc(num_nodes, sizeof(double));
+else
+ z = 0;
+
+error = ex_get_coord(exoid, x, y, z);
+
+\comment{Do the same as the previous call in three separate calls}
+error = ex_get_coord(exoid, x, NULL, NULL);
+error = ex_get_coord(exoid, NULL, y, NULL);
+if (num_dim >= 3)
+ error = ex_get_coord(exoid, NULL, NULL, z);
+\endcode
+
+*/
int ex_get_coord (int exoid,
void *x_coor,
@@ -225,7 +246,7 @@ int ex_get_coord (int exoid,
exerrval = status;
sprintf(errmsg,
"Error: failed to get %s coord array in file id %d", which, exoid);
- ex_err("ex_put_coord",errmsg,exerrval);
+ ex_err("ex_get_coord",errmsg,exerrval);
return (EX_FATAL);
}
}
diff --git a/cbind/src/exgcset.c b/exodus/cbind/src/exgcset.c
similarity index 96%
rename from cbind/src/exgcset.c
rename to exodus/cbind/src/exgcset.c
index 99c4e5d..248c34f 100644
--- a/cbind/src/exgcset.c
+++ b/exodus/cbind/src/exgcset.c
@@ -32,9 +32,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
+/*!
*
-* exgcss - ex_get_concat_sets
+* \undoc exgcss - ex_get_concat_sets
+*
+* reads the set ID's, set entry count array, set entry pointers
+* array, set entry list, set extra list, and set distribution factors
+* for all sets of the specified type.
*
* entry conditions -
* input parameters:
@@ -52,12 +56,6 @@
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads the set ID's, set entry count array, set entry pointers
- * array, set entry list, set extra list, and set distribution factors
- * for all sets of the specified type.
- */
-
int ex_get_concat_sets (int exoid,
ex_entity_type set_type,
struct ex_set_specs* set_specs)
diff --git a/cbind/src/exgcss.c b/exodus/cbind/src/exgcss.c
similarity index 97%
rename from cbind/src/exgcss.c
rename to exodus/cbind/src/exgcss.c
index 3134396..750cade 100644
--- a/cbind/src/exgcss.c
+++ b/exodus/cbind/src/exgcss.c
@@ -59,7 +59,7 @@
#include "exodusII_int.h"
/*!
- * reads the side set ID's, side set element count array, side set node count
+ * \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
diff --git a/cbind/src/exgcssc.c b/exodus/cbind/src/exgcssc.c
similarity index 99%
rename from cbind/src/exgcssc.c
rename to exodus/cbind/src/exgcssc.c
index 16f26a2..82a2535 100644
--- a/cbind/src/exgcssc.c
+++ b/exodus/cbind/src/exgcssc.c
@@ -32,6 +32,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+
/*****************************************************************************
*
* exgcssc - ex_get_concat_side_set_node_count
@@ -54,6 +55,7 @@
#include "exodusII.h"
#include "exodusII_int.h"
+/*! \cond INTERNAL */
void *safe_free(void *array)
{
if (array != 0) free(array);
@@ -67,7 +69,9 @@ void *safe_free(void *array)
elem_blk_parms[i].num_nodes_per_elem);\
ex_err("ex_get_side_set_node_count",errmsg,EX_MSG);\
return(EX_FATAL);\
+/* \endcond */
+/*! \undoc */
int ex_get_concat_side_set_node_count(int exoid,
int *side_set_node_cnt_list)
{
diff --git a/cbind/src/exgean.c b/exodus/cbind/src/exgean.c
similarity index 100%
rename from cbind/src/exgean.c
rename to exodus/cbind/src/exgean.c
diff --git a/cbind/src/exgeat.c b/exodus/cbind/src/exgeat.c
similarity index 60%
rename from cbind/src/exgeat.c
rename to exodus/cbind/src/exgeat.c
index c381373..5bff46c 100644
--- a/cbind/src/exgeat.c
+++ b/exodus/cbind/src/exgeat.c
@@ -32,27 +32,37 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgeat - ex_get_elem_attr
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int elem_blk_id element block id
-*
-* exit conditions -
-* float* attrib array of attributes
-*
-*
-*****************************************************************************/
#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * reads the attributes for an element block
- * \deprecated Use ex_get_attr()(exoid, EX_ELEM_BLOCK, elem_blk_id, attrib) instead
+\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(\c num_attr x \c 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 (\c float or
+\c 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(\c num_attr x num_elem_this_blk) attributes for
+ the element block, with the \c 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,
diff --git a/cbind/src/exgebi.c b/exodus/cbind/src/exgebi.c
similarity index 61%
rename from cbind/src/exgebi.c
rename to exodus/cbind/src/exgebi.c
index d151925..a2bff26 100644
--- a/cbind/src/exgebi.c
+++ b/exodus/cbind/src/exgebi.c
@@ -32,29 +32,43 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgebi - ex_get_elem_blk_ids
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* int* elem_blk_ids array of element block ids
-*
-* revision history -
-*
-*
-*****************************************************************************/
-#include <stdlib.h>
#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * reads the element block ids from the database
- * \deprecated Use ex_get_ids()(exoid, EX_ELEM_BLOCK, ids) instead
+\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(\c 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:
+
+\code
+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);
+
+\endcode
+
+
*/
int ex_get_elem_blk_ids (int exoid,
diff --git a/cbind/src/exgecpp.c b/exodus/cbind/src/exgecpp.c
similarity index 100%
rename from cbind/src/exgecpp.c
rename to exodus/cbind/src/exgecpp.c
diff --git a/exodus/cbind/src/exgelb.c b/exodus/cbind/src/exgelb.c
new file mode 100644
index 0000000..12987b8
--- /dev/null
+++ b/exodus/cbind/src/exgelb.c
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2006 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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 :
+
+\code
+#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);
+
+\endcode
+
+ */
+
+int ex_get_elem_block (int exoid,
+ int elem_blk_id,
+ char *elem_type,
+ int *num_elem_this_blk,
+ int *num_nodes_per_elem,
+ 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 );
+}
diff --git a/cbind/src/exgelc.c b/exodus/cbind/src/exgelc.c
similarity index 64%
rename from cbind/src/exgelc.c
rename to exodus/cbind/src/exgelc.c
index 62eefb1..025b2ca 100644
--- a/cbind/src/exgelc.c
+++ b/exodus/cbind/src/exgelc.c
@@ -32,28 +32,31 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgelc - exodusII read element block connectivity
-*
-* entry conditions -
-* expelb must be called first to establish element block parameters.
-* input parameters:
-* int exoid exodus file id
-* int elem_blk_id element block id
-*
-* exit conditions -
-* int* connect connectivity array
-*
-*
-*/
-#include <stdlib.h>
#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * reads the connectivity array for an element block
- * \deprecated Use ex_get_conn()(exoid, EX_ELEM_BLOCK, elem_blk_id, connect, 0, 0) instead
+\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(\c
+num_elem_this_blk * \c 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,
diff --git a/cbind/src/exgem.c b/exodus/cbind/src/exgem.c
similarity index 100%
rename from cbind/src/exgem.c
rename to exodus/cbind/src/exgem.c
diff --git a/cbind/src/exgenm.c b/exodus/cbind/src/exgenm.c
similarity index 64%
rename from cbind/src/exgenm.c
rename to exodus/cbind/src/exgenm.c
index 17aff32..f887354 100644
--- a/cbind/src/exgenm.c
+++ b/exodus/cbind/src/exgenm.c
@@ -47,13 +47,39 @@
*
*****************************************************************************/
-#include <stdlib.h>
#include "exodusII.h"
-#include "exodusII_int.h"
-/*
- * reads the element numbering map from the database; allows element numbers
- * to be noncontiguous
+/*!
+\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,. .. \c 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 :
+\code
+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);
+\endcode
*/
int ex_get_elem_num_map (int exoid,
diff --git a/exodus/cbind/src/exgev.c b/exodus/cbind/src/exgev.c
new file mode 100644
index 0000000..5935c97
--- /dev/null
+++ b/exodus/cbind/src/exgev.c
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2006 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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"
+#include "exodusII_int.h"
+
+/*!
+\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 (\c
+float or \c 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 \c num_elem_this_blk values of the \c elem_var_index
+ element variable for the element block with ID of \c elem_blk_id
+ at the \c time_step time step.
+
+
+As an example, the following code segment will read the \c
+var_index-th element variable at one time step stored in an exodus
+file :
+
+\code
+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);
+}
+\endcode
+
+*/
+
+int ex_get_elem_var (int exoid,
+ int time_step,
+ int elem_var_index,
+ int elem_blk_id,
+ int 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 );
+}
diff --git a/cbind/src/exgevid.c b/exodus/cbind/src/exgevid.c
similarity index 100%
rename from cbind/src/exgevid.c
rename to exodus/cbind/src/exgevid.c
diff --git a/exodus/cbind/src/exgevt.c b/exodus/cbind/src/exgevt.c
new file mode 100644
index 0000000..4e03afe
--- /dev/null
+++ b/exodus/cbind/src/exgevt.c
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************
+*
+* exgevt - ex_get_elem_var_time
+*
+* entry conditions -
+* input parameters:
+* int exoid exodus file id
+* int elem_var_index element variable index
+* int elem_number element number
+* int beg_time_step time step number
+* int end_time_step time step number
+*
+* exit conditions -
+* float* elem_var_vals array of element variable values
+*
+* revision history -
+* 20061002 - David Thompson - Moved to ex_get_var_time.
+*
+*****************************************************************************/
+
+#include <stdlib.h>
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+/*!
+\deprecated Use ex_get_var_time()(exoid, EX_ELEM_BLOCK, elem_var_index, elem_number, beg_time_step, end_time_step, elem_var_vals)
+
+The function ex_get_elem_var_time() reads the values of an element
+variable for a single element through a specified number of time
+steps. 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 (\c
+float or \c double) to match the compute word size passed in
+ex_create() or ex_open().
+
+\return In case of an error, ex_get_elem_var_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()
+ - data file not initialized properly with call to ex_put_init().
+ - ex_put_elem_block() not called previously to specify
+ parameters for all element blocks.
+ - variable does not exist for the desired element or results
+ haven't been written.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create()
+ or ex_open().
+\param[in] elem_var_index The index of the desired element variable. The first variable has an
+ index of 1.
+\param[in] elem_number The internal ID (see Section LocalElementIds) of the desired
+ element. The first element is 1.
+\param[in] beg_time_step The beginning time step for which an element variable value is
+ desired. This is not a time value but rather a time step number, as
+ described under ex_put_time(). The first time step is 1.
+\param[in] end_time_step The last time step for which an element variable value is desired. If
+ negative, the last time step in the database will be used. The first
+ time step is 1.
+\param[out] elem_var_vals returned array of(\c end_time_step {-} \c beg_time_step +
+ 1) values of the \c elem_number-th element for the
+ \c elem_var_index-th element variable.
+
+
+For example, the following coding will read the values of the \c
+var_index-th element variable for element number 2 from the first
+time step to the last time step:
+
+\code
+#include "exodusII.h"
+
+int error, exoid, num_time_steps, var_index, elem_num,
+ beg_time, end_time;
+
+float *var_values;
+
+\comment{determine how many time steps are stored}
+num_time_steps = ex_inquire_int(exoid, EX_INQ_TIME);
+
+\comment{read an element variable through time}
+var_values = (float *) calloc (num_time_steps, sizeof(float));
+var_index = 2;
+
+elem_num = 2;
+
+beg_time = 1;
+end_time = -1;
+
+error = ex_get_elem_var_time (exoid, var_index, elem_num,
+ beg_time, end_time, var_values);
+
+\comment{Using non-deprecated function:}
+error = ex_get_elem_var_time (exoid, EX_ELEM_BLOCK, var_index, elem_num,
+ beg_time, end_time, var_values);
+\endcode
+
+ */
+
+int ex_get_elem_var_time (int exoid,
+ int elem_var_index,
+ int elem_number,
+ int beg_time_step,
+ int end_time_step,
+ void *elem_var_vals)
+{
+ return ex_get_var_time( exoid, EX_ELEM_BLOCK, elem_var_index, elem_number, beg_time_step, end_time_step, elem_var_vals );
+}
diff --git a/cbind/src/exgfrm.c b/exodus/cbind/src/exgfrm.c
similarity index 100%
rename from cbind/src/exgfrm.c
rename to exodus/cbind/src/exgfrm.c
diff --git a/cbind/src/exggv.c b/exodus/cbind/src/exggv.c
similarity index 66%
rename from cbind/src/exggv.c
rename to exodus/cbind/src/exggv.c
index aa4a8dc..2a543d2 100644
--- a/cbind/src/exggv.c
+++ b/exodus/cbind/src/exggv.c
@@ -53,9 +53,49 @@
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads the values of all the global variables for a single time step from
- * the database; time step numbers are assumed to start at 1
+/*!
+\ingroup ResultsData
+
+The function ex_get_glob_vars() reads the values of all the
+global variables for a single time step. Memory must be allocated for
+the global variables values array before this function is invoked.
+
+Because global 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_glob_vars() 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()
+ - no global variables stored in the file.
+ - a warning value is returned if no global variables are stored in the file.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+
+\param[in] time_step The time step, as described under ex_put_time(), at
+ which the global variable values are desired. This is essentially
+ an index (in the time dimension) into the global variable values
+ array stored in the database. The first time step is 1.
+
+\param[in] num_glob_vars The number of global variables stored in the database.
+\param[out] glob_var_vals Returned array of num_glob_vars global variable values
+ for the time_step'th time step.
+
+The following is an example code segment that reads all the global
+variables at one time step:
+
+\verbatim
+int num_glo_vars, error, time_step;
+float *var_values;
+
+error = ex_get_variable_param (idexo, EX_GLOBAL, &num_glo_vars);
+var_values = (float *) calloc (num_glo_vars, sizeof(float));
+error = ex_get_glob_vars (idexo, time_step, num_glo_vars,
+ var_values);
+\endverbatim
*/
int ex_get_glob_vars (int exoid,
diff --git a/cbind/src/exggvt.c b/exodus/cbind/src/exggvt.c
similarity index 63%
rename from cbind/src/exggvt.c
rename to exodus/cbind/src/exggvt.c
index 9e38fa9..3ff2a87 100644
--- a/cbind/src/exggvt.c
+++ b/exodus/cbind/src/exggvt.c
@@ -32,33 +32,65 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exggvt - get_glob_var_time
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int glob_var_index global variable index
-* int beg_time_step starting time step
-* int end_time_step ending time step
-*
-* exit conditions -
-* float* glob_var_vals global variable values
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads the values of a single global variable through a specified number
- * of time steps in the database; time step numbers and variable indices
- * are assumed to start at 1
- */
+/*!
+ The function ex_get_glob_var_time() reads the values of a
+ single global variable through a specified number of time
+ steps. Memory must be allocated for the global variable values array
+ before this function is invoked.
+
+ Because global 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_glob_var_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()
+ - specified global variable does not exist.
+ - a warning value is returned if no global variables are stored in the file.
+
+ \param exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+
+ \param glob_var_index The index of the desired global variable. The first variable has an index of 1.
+
+ \param beg_time_step The beginning time step for which a global variable value is desired.
+ This is not a time value but rather a time step number, as
+ described under ex_put_time(). The first time step is 1.
+
+ \param end_time_step The last time step for which a global variable value is desired. If
+ negative, the last time step in the database will be used. The first
+ time step is 1.
+
+ \param[out] glob_var_vals Returned array of (end_time_step - beg_time_step + 1) values
+ for the glob_var_index$^{th}$ global variable.
+
+The following is an example of using this function:
+
+\code
+#include "exodusII.h"
+int error, exoid, num_time_steps, var_index;
+int beg_time, end_time;
+
+float *var_values;
+
+num_time_steps = ex_inquire_int(exoid, EX_INQ_TIME);
+
+var_index = 1;
+beg_time = 1;
+end_time = -1;
+
+var_values = (float *) calloc (num_time_steps, sizeof(float));
+
+error = ex_get_glob_var_time(exoid, var_index, beg_time,
+ end_time, var_values);
+\endcode
+
+*/
int ex_get_glob_var_time (int exoid,
int glob_var_index,
diff --git a/cbind/src/exgidm.c b/exodus/cbind/src/exgidm.c
similarity index 100%
rename from cbind/src/exgidm.c
rename to exodus/cbind/src/exgidm.c
diff --git a/cbind/src/exgids.c b/exodus/cbind/src/exgids.c
similarity index 100%
rename from cbind/src/exgids.c
rename to exodus/cbind/src/exgids.c
diff --git a/cbind/src/exginf.c b/exodus/cbind/src/exginf.c
similarity index 68%
rename from cbind/src/exginf.c
rename to exodus/cbind/src/exginf.c
index 7420739..4a427bc 100644
--- a/cbind/src/exginf.c
+++ b/exodus/cbind/src/exginf.c
@@ -32,27 +32,43 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exginf - ex_get_info
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* char* info[] ptr array of info records
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads information records from the database
+/*!
+
+The function ex_get_info() reads information records from the
+database. The records are \c MAX_LINE_LENGTH-character
+strings. Memory must be allocated for the information records before
+this call is made. The number of records can be determined by invoking
+ex_inquire() or ex_inquire_int().
+
+\returns In case of an error, ex_get_info() 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 information records were stored.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[out] info Returned array containing the information records.
+
+The following code segment will determine the number of information
+records and read them from an open exodus file :
+
+\code
+#include "exodusII.h"
+int error, exoid, num_info;
+char *info[MAXINFO];
+
+\comment{read information records}
+num_info = ex_inquire_int (exoid,EX_INQ_INFO);
+for (i=0; i < num_info; i++) {
+ info[i] = (char *) calloc ((MAX_LINE_LENGTH+1), sizeof(char));
+}
+error = ex_get_info (exoid, info);
+\endcode
+
*/
int ex_get_info (int exoid,
@@ -60,9 +76,8 @@ int ex_get_info (int exoid,
{
int status;
size_t i;
- int j, dimid, varid;
- size_t num_info, start[2];
- char *ptr;
+ int dimid, varid;
+ size_t num_info, start[2], count[2];
char errmsg[MAX_ERR_LENGTH];
exerrval = 0; /* clear error code */
@@ -99,35 +114,18 @@ int ex_get_info (int exoid,
/* read the information records */
for (i=0; i<num_info; i++) {
- start[0] = i;
- start[1] = 0;
-
- j = 0;
- ptr = info[i];
+ start[0] = i; count[0] = 1;
+ start[1] = 0; count[1] = MAX_LINE_LENGTH+1;
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
+ if ((status = nc_get_vara_text(exoid, varid, start, count, info[i])) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to get info record data in file id %d", exoid);
ex_err("ex_get_info",errmsg,exerrval);
return (EX_FATAL);
}
-
-
- while ((*ptr++ != '\0') && (j < MAX_LINE_LENGTH)) {
- start[1] = ++j;
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get info record data in file id %d", exoid);
- ex_err("ex_get_info",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
- /* delete trailing blanks */
- --ptr;
- while ( --ptr >= info[i] && *ptr == ' ' );
- *(++ptr) = '\0';
+ info[i][MAX_LINE_LENGTH] = '\0';
+ ex_trim_internal(info[i]);
}
}
return (EX_NOERR);
diff --git a/cbind/src/exgini.c b/exodus/cbind/src/exgini.c
similarity index 70%
rename from cbind/src/exgini.c
rename to exodus/cbind/src/exgini.c
index 2ff39ed..265a289 100644
--- a/cbind/src/exgini.c
+++ b/exodus/cbind/src/exgini.c
@@ -60,17 +60,42 @@
#include <string.h>
/*!
- * reads the initialization parameters from an opened EXODUS II file
- * \param exoid exodus file id
- * \param[out] title Title of the mesh, String length may be up to #MAX_LINE_LENGTH characters.
- * \param[out] num_dim Dimensionality of the database. This is the number of coordinates per node.
- * \param[out] num_nodes Number of nodes
- * \param[out] num_elem Number of elements
- * \param[out] num_elem_blk Number of element blocks
- * \param[out] num_node_sets Number of node sets
- * \param[out] num_side_sets Number of side sets
- * \sa ex_get_init_ext()
- */
+
+The function ex_get_init() reads the initializationinitialization
+parameters from an opened exodus file.
+
+\return In case of an error, ex_get_init() 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 exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[out] title Returned database title. String length may be up to \c MAX_LINE_LENGTH bytes.
+\param[out] num_dim Returned dimensionality of the database. This is the number of coordinates per node.
+\param[out] num_nodes Returned number of nodal points.
+\param[out] num_elem Returned number of elements
+\param[out] num_elem_blk Returned number of element blocks
+\param[out] num_node_sets Returned number of node sets
+\param[out] num_side_sets Returned number of side sets
+
+\sa ex_get_init_ext()
+
+The following code segment will read the initialization parameters
+from the open exodus file:
+
+\code
+#include "exodusII.h"
+int num_dim, num_nodes, num_elem, num_elem_blk,
+ num_node_sets, num_side_sets, error, exoid;
+
+char title[MAX_LINE_LENGTH+1];
+
+\comment{read database parameters}
+error = ex_get_init (exoid, title, &num_dim, &num_nodes,
+ &num_elem, &num_elem_blk, &num_node_sets, &num_side_sets);
+\endcode
+
+*/
int ex_get_init (int exoid,
char *title,
diff --git a/cbind/src/exginix.c b/exodus/cbind/src/exginix.c
similarity index 54%
rename from cbind/src/exginix.c
rename to exodus/cbind/src/exginix.c
index 505fe1b..93e68fc 100644
--- a/cbind/src/exginix.c
+++ b/exodus/cbind/src/exginix.c
@@ -2,23 +2,23 @@
* Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
* 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.
- *
+ * with the distribution.
+ *
* * Neither the name of Sandia Corporation 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
@@ -30,23 +30,23 @@
* 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.
- *
+ *
*/
/*****************************************************************************
-*
-* exgini - ex_get_init
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* ex_init_params* info parameter information
-*
-* revision history -
-*
-*
-*****************************************************************************/
+ *
+ * exgini - ex_get_init
+ *
+ * entry conditions -
+ * input parameters:
+ * int exoid exodus file id
+ *
+ * exit conditions -
+ * ex_init_params* info parameter information
+ *
+ * revision history -
+ *
+ *
+ *****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
@@ -54,20 +54,28 @@
#include <string.h>
/* Used to reduce repeated code below */
-#define EX_GET_DIM_VALUE(TNAME,DNAME,DIMVAR,SDIMVAL) \
- if ((status = nc_inq_dimid (exoid, DNAME, &DIMVAR)) != NC_NOERR) { \
- /* TNAME are optional and default to zero. */ \
- SDIMVAL = 0; \
- } else { \
- if ((status = nc_inq_dimlen(exoid, DIMVAR, &lnum)) != NC_NOERR) { \
- exerrval = status; \
- sprintf(errmsg, "Error: failed to get number of " TNAME " in file id %d", \
- exoid); \
- ex_err("ex_get_init",errmsg,exerrval); \
- return (EX_FATAL); \
- } \
- SDIMVAL = lnum; \
+static int ex_get_dim_value(int exoid, const char *name, const char *dimension_name,
+ int dimension, int *value)
+{
+ char errmsg[MAX_ERR_LENGTH];
+ int status;
+ size_t lnum;
+
+ if ((status = nc_inq_dimid (exoid, dimension_name, &dimension)) != NC_NOERR) {
+ /* optional and default to zero. */
+ *value = 0;
+ } else {
+ if ((status = nc_inq_dimlen(exoid, dimension, &lnum)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg, "Error: failed to get number of %s in file id %d",
+ name, exoid);
+ ex_err("ex_get_init",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ *value = lnum;
}
+ return EX_NOERR;
+}
/*!
* reads the initialization parameters from an opened EXODUS II file
@@ -89,12 +97,12 @@ int ex_get_init_ext (int exoid,
exerrval = 0; /* clear error code */
if ((status = nc_inq_att(exoid, NC_GLOBAL, ATT_TITLE, &title_type, &title_len)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to inquire title in file id %d", exoid);
- ex_err("ex_get_init",errmsg,exerrval);
- return (EX_FATAL);
- }
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to inquire title in file id %d", exoid);
+ ex_err("ex_get_init",errmsg,exerrval);
+ return (EX_FATAL);
+ }
/* Check title length to avoid overrunning clients memory space; include trailing null */
if (title_len > MAX_LINE_LENGTH+1) {
@@ -111,46 +119,46 @@ int ex_get_init_ext (int exoid,
if (status != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
- "Error: failed to get title in file id %d", exoid);
+ "Error: failed to get title in file id %d", exoid);
ex_err("ex_get_init",errmsg,exerrval);
return (EX_FATAL);
}
-
+
status = ex_get_dimension(exoid, DIM_NUM_DIM, "dimensions", &lnum, &dimid, "ex_get_init");
if (status != NC_NOERR) return status;
info->num_dim = lnum;
/* Handle case with zero-nodes */
- EX_GET_DIM_VALUE( "nodes",DIM_NUM_NODES,dimid,info->num_nodes);
- EX_GET_DIM_VALUE( "edges", DIM_NUM_EDGE,dimid,info->num_edge);
- EX_GET_DIM_VALUE( "faces", DIM_NUM_FACE,dimid,info->num_face);
- EX_GET_DIM_VALUE("elements", DIM_NUM_ELEM,dimid,info->num_elem);
-
- EX_GET_DIM_VALUE("element blocks", DIM_NUM_EL_BLK,dimid,info->num_elem_blk);
+ if (ex_get_dim_value(exoid, "nodes",DIM_NUM_NODES,dimid,&info->num_nodes) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid, "edges", DIM_NUM_EDGE,dimid,&info->num_edge) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid, "faces", DIM_NUM_FACE,dimid,&info->num_face) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid,"elements", DIM_NUM_ELEM,dimid,&info->num_elem) != EX_NOERR) return EX_FATAL;
+
+ if (ex_get_dim_value(exoid,"element blocks", DIM_NUM_EL_BLK,dimid,&info->num_elem_blk) != EX_NOERR) return EX_FATAL;
if (info->num_elem_blk == 0 && info->num_elem > 0) {
exerrval = status;
sprintf(errmsg,
- "Error: failed to locate number of element blocks in file id %d",
- exoid);
+ "Error: failed to locate number of element blocks in file id %d",
+ exoid);
ex_err("ex_get_init",errmsg,exerrval);
return (EX_FATAL);
}
- EX_GET_DIM_VALUE("node sets", DIM_NUM_NS,dimid,info->num_node_sets);
- EX_GET_DIM_VALUE("edge sets", DIM_NUM_ES,dimid,info->num_edge_sets);
- EX_GET_DIM_VALUE("face sets", DIM_NUM_FS,dimid,info->num_face_sets);
- EX_GET_DIM_VALUE("side sets", DIM_NUM_SS,dimid,info->num_side_sets);
- EX_GET_DIM_VALUE("elem sets",DIM_NUM_ELS,dimid,info->num_elem_sets);
+ if (ex_get_dim_value(exoid,"node sets", DIM_NUM_NS,dimid,&info->num_node_sets) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid,"edge sets", DIM_NUM_ES,dimid,&info->num_edge_sets) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid,"face sets", DIM_NUM_FS,dimid,&info->num_face_sets) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid,"side sets", DIM_NUM_SS,dimid,&info->num_side_sets) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid,"elem sets",DIM_NUM_ELS,dimid,&info->num_elem_sets) != EX_NOERR) return EX_FATAL;
- EX_GET_DIM_VALUE("node maps", DIM_NUM_NM,dimid,info->num_node_maps);
- EX_GET_DIM_VALUE("edge maps",DIM_NUM_EDM,dimid,info->num_edge_maps);
- EX_GET_DIM_VALUE("face maps",DIM_NUM_FAM,dimid,info->num_face_maps);
- EX_GET_DIM_VALUE("elem maps", DIM_NUM_EM,dimid,info->num_elem_maps);
+ if (ex_get_dim_value(exoid,"node maps", DIM_NUM_NM,dimid,&info->num_node_maps) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid,"edge maps",DIM_NUM_EDM,dimid,&info->num_edge_maps) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid,"face maps",DIM_NUM_FAM,dimid,&info->num_face_maps) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid,"elem maps", DIM_NUM_EM,dimid,&info->num_elem_maps) != EX_NOERR) return EX_FATAL;
/* Edge and face blocks are also optional (for backwards compatability) */
- EX_GET_DIM_VALUE("edge blocks",DIM_NUM_ED_BLK,dimid,info->num_edge_blk);
- EX_GET_DIM_VALUE("face blocks",DIM_NUM_FA_BLK,dimid,info->num_face_blk);
+ if (ex_get_dim_value(exoid,"edge blocks",DIM_NUM_ED_BLK,dimid,&info->num_edge_blk) != EX_NOERR) return EX_FATAL;
+ if (ex_get_dim_value(exoid,"face blocks",DIM_NUM_FA_BLK,dimid,&info->num_face_blk) != EX_NOERR) return EX_FATAL;
return (EX_NOERR);
}
diff --git a/cbind/src/exgmap.c b/exodus/cbind/src/exgmap.c
similarity index 73%
rename from cbind/src/exgmap.c
rename to exodus/cbind/src/exgmap.c
index 30f60b2..927ff56 100644
--- a/cbind/src/exgmap.c
+++ b/exodus/cbind/src/exgmap.c
@@ -32,29 +32,43 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgmap - ex_get_map
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* int* elem_map element order map array
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include <stdlib.h>
#include "exodusII.h"
#include "exodusII_int.h"
/*!
- * reads the element order map from the database
- * \deprecated Use ex_get_num_map() instead.
+\deprecated Use ex_get_num_map() instead.
+
+The function ex_get_map() reads the element order mapelement order map
+from the database. See #ElementOrderMap for a description of the
+element order map. If an element order map is not stored in the data
+file, a default array (1,2,3,. .. \c num_elem) is returned. Memory
+must be allocated for the element map array ({num_elem} in length)
+before this call is made.
+
+\return In case of an error, ex_get_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 order 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 order map.
+
+The following code will read an element order map from an open exodus
+file :
+
+\code
+int *elem_map, error, exoid;
+
+\comment{read element order map}
+elem_map = (int *)calloc(num_elem, sizeof(int));
+
+error = ex_get_map(exoid, elem_map);
+\endcode
+
*/
int ex_get_map (int exoid,
diff --git a/cbind/src/exgmp.c b/exodus/cbind/src/exgmp.c
similarity index 100%
rename from cbind/src/exgmp.c
rename to exodus/cbind/src/exgmp.c
diff --git a/cbind/src/exgnam.c b/exodus/cbind/src/exgnam.c
similarity index 82%
rename from cbind/src/exgnam.c
rename to exodus/cbind/src/exgnam.c
index cc7572a..bb58c29 100644
--- a/cbind/src/exgnam.c
+++ b/exodus/cbind/src/exgnam.c
@@ -63,9 +63,7 @@ int ex_get_name (int exoid,
char *name)
{
int status;
- int j, varid, ent_ndx;
- size_t start[2];
- char *ptr;
+ int varid, ent_ndx;
char errmsg[MAX_ERR_LENGTH];
char *vobj = NULL;
const char *routine = "ex_get_name";
@@ -125,36 +123,15 @@ int ex_get_name (int exoid,
if (ent_ndx < 0) ent_ndx = -ent_ndx;
/* read the name */
- start[0] = ent_ndx-1;
- start[1] = 0;
-
- j = 0;
- ptr = name;
-
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get entity name for id %d in file id %d",
- ent_ndx, exoid);
- ex_err(routine,errmsg,exerrval);
- return (EX_FATAL);
- }
-
- while ((*ptr++ != '\0') && (j < MAX_STR_LENGTH)) {
- start[1] = ++j;
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get name in file id %d", exoid);
- ex_err(routine,errmsg,exerrval);
+ {
+ int db_name_size = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH);
+ int name_size = db_name_size < ex_max_name_length ? db_name_size : ex_max_name_length;
+
+ status = ex_get_name_internal(exoid, varid, ent_ndx-1, name, name_size, obj_type, routine);
+ if (status != NC_NOERR) {
return (EX_FATAL);
}
}
- --ptr;
- if (ptr > name) {
- while (--ptr >= name && *ptr == ' '); /* get rid of trailing blanks */
- }
- *(++ptr) = '\0';
} else {
/* Name variable does not exist on the database; probably since this is an
* older version of the database. Return an empty array...
diff --git a/cbind/src/exgnams.c b/exodus/cbind/src/exgnams.c
similarity index 84%
rename from cbind/src/exgnams.c
rename to exodus/cbind/src/exgnams.c
index b1cf9e1..4c8cb78 100644
--- a/cbind/src/exgnams.c
+++ b/exodus/cbind/src/exgnams.c
@@ -61,10 +61,8 @@ int ex_get_names (int exoid,
char **names)
{
int status;
- int j, varid, temp;
+ int varid, temp;
size_t num_entity, i;
- size_t start[2];
- char *ptr;
char errmsg[MAX_ERR_LENGTH];
const char *routine = "ex_get_names";
@@ -137,39 +135,10 @@ int ex_get_names (int exoid,
}
if (status == NC_NOERR) {
- /* read the names */
- for (i=0; i<num_entity; i++) {
- start[0] = i;
- start[1] = 0;
-
- j = 0;
- ptr = names[i];
-
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get names in file id %d", exoid);
- ex_err("ex_get_names",errmsg,exerrval);
- return (EX_FATAL);
- }
-
-
- while ((*ptr++ != '\0') && (j < MAX_STR_LENGTH)) {
- start[1] = ++j;
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get names in file id %d", exoid);
- ex_err("ex_get_names",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
- --ptr;
- if (ptr > names[i]) {
- while (--ptr >= names[i] && *ptr == ' '); /* get rid of trailing blanks */
- }
- *(++ptr) = '\0';
- }
+ if ((status = ex_get_names_internal(exoid, varid, num_entity, names,
+ obj_type, "ex_get_names")) != EX_NOERR) {
+ return status;
+ }
} else {
/* Names variable does not exist on the database; probably since this is an
* older version of the database. Return an empty array...
diff --git a/cbind/src/exgnconn.c b/exodus/cbind/src/exgnconn.c
similarity index 100%
rename from cbind/src/exgnconn.c
rename to exodus/cbind/src/exgnconn.c
diff --git a/cbind/src/exgncor.c b/exodus/cbind/src/exgncor.c
similarity index 99%
rename from cbind/src/exgncor.c
rename to exodus/cbind/src/exgncor.c
index bab6e86..23844a9 100644
--- a/cbind/src/exgncor.c
+++ b/exodus/cbind/src/exgncor.c
@@ -245,7 +245,7 @@ int ex_get_n_coord (int exoid,
exerrval = status;
sprintf(errmsg,
"Error: failed to get %s coord array in file id %d", which, exoid);
- ex_err("ex_put_coord",errmsg,exerrval);
+ ex_err("ex_get_coord",errmsg,exerrval);
return (EX_FATAL);
}
}
diff --git a/cbind/src/exgnm.c b/exodus/cbind/src/exgnm.c
similarity index 100%
rename from cbind/src/exgnm.c
rename to exodus/cbind/src/exgnm.c
diff --git a/cbind/src/exgnmap.c b/exodus/cbind/src/exgnmap.c
similarity index 100%
rename from cbind/src/exgnmap.c
rename to exodus/cbind/src/exgnmap.c
diff --git a/cbind/src/exgnnm.c b/exodus/cbind/src/exgnnm.c
similarity index 64%
rename from cbind/src/exgnnm.c
rename to exodus/cbind/src/exgnnm.c
index 10b9912..7f4caee 100644
--- a/cbind/src/exgnnm.c
+++ b/exodus/cbind/src/exgnnm.c
@@ -48,13 +48,42 @@
*
*****************************************************************************/
-#include <stdlib.h>
#include "exodusII.h"
-#include "exodusII_int.h"
-/*
- * reads the node numbering map from the database
- */
+/*!
+\deprecated Use ex_get_id_map()(exoid, EX_NODE_MAP, node_map)
+
+The function ex_get_node_num_map() reads the optional node number
+mapnode number map from the database. See Section LocalNodeIds for a
+description of the node number map. If a node number map is not stored
+in the data file, a default array (1,2,3,. .. \c num_nodes) is
+returned. Memory must be allocated for the node number map array
+(\c num_nodes in length) before this call is made.
+
+\return In case of an error, ex_get_node_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 a node 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] node_map Returned node number map.
+
+The following code will read a node number map from an open exodus
+file :
+
+\code
+int *node_map, error, exoid;
+
+\comment{read node number map}
+node_map = (int *)calloc(num_nodes, sizeof(int));
+error = ex_get_node_num_map(exoid, node_map);
+
+\comment{Equivalent using non-deprecated function}
+error = ex_get_id_map(exoid, EX_NODE_MAP, node_map);
+\endcode
+
+*/
int ex_get_node_num_map (int exoid,
int *node_map)
diff --git a/cbind/src/exgnnv.c b/exodus/cbind/src/exgnnv.c
similarity index 100%
rename from cbind/src/exgnnv.c
rename to exodus/cbind/src/exgnnv.c
diff --git a/cbind/src/exgnoatt.c b/exodus/cbind/src/exgnoatt.c
similarity index 100%
rename from cbind/src/exgnoatt.c
rename to exodus/cbind/src/exgnoatt.c
diff --git a/cbind/src/exgnp.c b/exodus/cbind/src/exgnp.c
similarity index 52%
rename from cbind/src/exgnp.c
rename to exodus/cbind/src/exgnp.c
index dc66524..7f2dbc6 100644
--- a/cbind/src/exgnp.c
+++ b/exodus/cbind/src/exgnp.c
@@ -32,30 +32,59 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgnp - ex_get_node_set_parameters
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int node_set_id node set id
-*
-* exit conditions -
-* int* num_nodes_in_set number of nodes in set
-* int* num_df_in_set number of distribution factors in set
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * reads the information which describe a single node set
- * \deprecated Use ex_get_set_param()(exoid, EX_NODE_SET, node_set_id, num_nodes_in_set, num_df_in_set)
+\deprecated Use ex_get_set_param()(exoid, EX_NODE_SET, node_set_id, num_nodes_in_set, num_df_in_set)
+
+The function ex_get_node_set_param() reads the number of nodes which
+describe a single node set and the number of distribution factors for
+the node set.
+
+\return In case of an error, ex_get_node_set_param() 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.
+ - incorrect node set ID.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] node_set_id The node set ID.
+\param[out] num_nodes_in_set Returned number of nodes in the node set.
+\param[out] num_df_in_set Returned number of distribution factors in the node set.
+
+The following code segment will read a node set from an open exodus
+file :
+\code
+int error, exoid, id, num_nodes_in_set, num_df_in_set, *node_list;
+float *dist_fact;
+
+\comment{read node set parameters}
+id = 100;
+
+error = ex_get_node_set_param(exoid, id, &num_nodes_in_set,
+ &num_df_in_set);
+
+\comment{read node set node list}
+node_list = (int *) calloc(num_nodes_in_set, sizeof(int));
+error = ex_get_node_set(exoid, id, node_list);
+
+\comment{read node set distribution factors}
+if (num_df_in_set > 0) {
+ dist_fact = (float *) calloc(num_nodes_in_set, sizeof(float));
+ error = ex_get_node_set_dist_fact(exoid, id, dist_fact);
+}
+
+\comment{Same result using non-deprecated functions}
+error = ex_get_set_param(exoid, EX_NODE_SET, id, &num_nodes_in_set, &num_df_in_set);
+error = ex_get_set(exoid, EX_NODE_SET, id, node_list);
+if (num_df_in_set > 0) {
+ error = ex_get_set_dist_fact(exoid, EX_NODE_SET, id, dist_fact);
+}
+
+\endcode
+
*/
int ex_get_node_set_param (int exoid,
diff --git a/cbind/src/exgns.c b/exodus/cbind/src/exgns.c
similarity index 100%
rename from cbind/src/exgns.c
rename to exodus/cbind/src/exgns.c
diff --git a/cbind/src/exgnsd.c b/exodus/cbind/src/exgnsd.c
similarity index 63%
rename from cbind/src/exgnsd.c
rename to exodus/cbind/src/exgnsd.c
index 0d7fd05..3c028df 100644
--- a/cbind/src/exgnsd.c
+++ b/exodus/cbind/src/exgnsd.c
@@ -32,30 +32,34 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgnsd - ex_get_node_set_dist_fact
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int node_set_id node set id
-*
-* exit conditions -
-* int* node_set_dist_fact node distribution factors for node set
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * reads the distribution factors for a single node set
- * \deprecated Use ex_get_set_dist_fact()(exoid, EX_NODE_SET, node_set_id, node_set_dist_fact)
- */
+\deprecated Use ex_get_set_dist_fact()(exoid, EX_NODE_SET, node_set_id, node_set_dist_fact)
+
+The function ex_get_node_set_dist_fact() returns the node set
+distribution factors for a single node set. Memory must be allocated
+for the list of distribution factors(\c num_dist_in_set in length)
+before this function is invoked.
+
+Because the distribution factors are floating point values, the
+application code must declare the array passed to be the appropriate
+type (\c float or \c double) to match the compute word size passed in
+ex_create() or ex_open().
+
+\return In case of an error, ex_get_node_set_dist_fact() returns a
+negative number; a warning will return a positive number. Possible
+causes of errors include:
+ - a warning value is returned if no distribution factors were stored.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] node_set_id The node set ID.
+\param[out] node_set_dist_fact Returned array containing the distribution factors in the node set.
+
+Refer to the description of ex_get_node_set_param() for a sample code
+segment to read a node set's distribution factors.
+*/
int ex_get_node_set_dist_fact (int exoid,
int node_set_id,
diff --git a/cbind/src/exgnsi.c b/exodus/cbind/src/exgnsi.c
similarity index 61%
rename from cbind/src/exgnsi.c
rename to exodus/cbind/src/exgnsi.c
index 57306ea..626e49e 100644
--- a/cbind/src/exgnsi.c
+++ b/exodus/cbind/src/exgnsi.c
@@ -32,29 +32,40 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgnsi - ex_get_node_set_ids
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* int node_set_ids array of node set ids
-*
-* revision history -
-*
-*
-*****************************************************************************/
-#include <stdlib.h>
#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * reads the node set ids from the database
- * \deprecated Use ex_get_ids()(exoid, EX_NODE_SET, ids)
+\deprecated Use ex_get_ids()(exoid, EX_NODE_SET, ids)
+
+The function ex_get_node_set_ids() reads the IDs of all of the node
+sets. Memory must be allocated for the returned array of
+({num_node_sets}) IDs before this function is invoked.
+
+\return In case of an error, ex_get_node_set_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()
+ - 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] ids Returned array of the node sets IDs. The order of the IDs in this array
+ reflects the sequence the node sets were introduced into the file.
+
+As an example, the following code will read all of the node set IDs
+from an open data file:
+
+\code
+int *ids, num_node_sets, error, exoid;
+
+\comment{read node sets IDs}
+ids = (int *) calloc(num_node_sets, sizeof(int));
+
+error = ex_get_node_set_ids (exoid, ids);
+
+\comment{Same result using non-deprecated functions.}
+error = ex_get_ids (exoid, EX_NODE_SET, ids);
+\endcode
*/
int ex_get_node_set_ids (int exoid,
diff --git a/cbind/src/exgnstt.c b/exodus/cbind/src/exgnstt.c
similarity index 100%
rename from cbind/src/exgnstt.c
rename to exodus/cbind/src/exgnstt.c
diff --git a/cbind/src/exgnsv.c b/exodus/cbind/src/exgnsv.c
similarity index 100%
rename from cbind/src/exgnsv.c
rename to exodus/cbind/src/exgnsv.c
diff --git a/cbind/src/exgnsvid.c b/exodus/cbind/src/exgnsvid.c
similarity index 100%
rename from cbind/src/exgnsvid.c
rename to exodus/cbind/src/exgnsvid.c
diff --git a/cbind/src/exgnv.c b/exodus/cbind/src/exgnv.c
similarity index 64%
copy from cbind/src/exgnv.c
copy to exodus/cbind/src/exgnv.c
index 1f99629..75903c8 100644
--- a/cbind/src/exgnv.c
+++ b/exodus/cbind/src/exgnv.c
@@ -32,32 +32,61 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgnv - ex_get_nodal_var
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int time_step whole time step number
-* int nodeal_var_index index of desired nodal variable
-* int num_nodes number of nodal points
-*
-* exit conditions -
-* float* nodal_var_vals array of nodal variable values
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads the values of a single nodal variable for a single time step from
- * the database; assume the first time step and nodal variable index is 1
- */
+/*!
+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
+nodal variable values array before this function is invoked.
+
+Because nodal variables are floating point values, the application
+code must declare the array passed to be the appropriate type (\c
+float or \c 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
+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()
+ - specified nodal variable does not exist.
+ - a warning value is returned if no nodal variables are stored in the file.
+
+\param[in] exoid exodus file ID returned from a previous call to 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.
+
+\param[in] num_nodes The number of nodal points.
+
+\param[out] nodal_var_vals Returned array of \c num_nodes values of the \c nodal_var_index-th
+ nodal variable for the \c time_step-th time step.
+
+
+For example, the following demonstrates how this function would be
+used:
+
+\code
+int num_nodes, time_step, var_index;
+float *var_values;
+
+\comment{read the second nodal variable at the first time step}
+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);
+\endcode
+
+*/
int ex_get_nodal_var (int exoid,
int time_step,
diff --git a/cbind/src/exgnvar.c b/exodus/cbind/src/exgnvar.c
similarity index 100%
rename from cbind/src/exgnvar.c
rename to exodus/cbind/src/exgnvar.c
diff --git a/cbind/src/exgnvid.c b/exodus/cbind/src/exgnvid.c
similarity index 100%
rename from cbind/src/exgnvid.c
rename to exodus/cbind/src/exgnvid.c
diff --git a/cbind/src/exgnvt.c b/exodus/cbind/src/exgnvt.c
similarity index 64%
rename from cbind/src/exgnvt.c
rename to exodus/cbind/src/exgnvt.c
index 72dc1b6..07c0019 100644
--- a/cbind/src/exgnvt.c
+++ b/exodus/cbind/src/exgnvt.c
@@ -32,34 +32,70 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgnvt - ex_get_nodal_var_time
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int nodal_var_index index of desired nodal variable
-* int node_number number of desired node
-* int beg_time_step starting time step
-* int end_time_step finishing time step
-*
-* exit conditions -
-* float* nodal_var_vals array of nodal variable values
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads the values of a nodal variable for a single node through a
- * specified number of time steps in the database; assume the first time
- * step, nodal variable index, and node are numbered 1
- */
+/*!
+The function ex_get_nodal_var_time() reads the values of a nodal
+variable for a single node through a specified number of 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
+code must declare the array passed to be the appropriate type (\c
+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_time() returns a
+negative number; a warning will return a positive number. Possible
+causes of errors include:
+ - specified nodal variable does not exist.
+ - a warning value is returned if no nodal variables are stored in the file.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or
+ ex_open().
+
+\param[in] nodal_var_index The index of the desired nodal variable. The first variable has an
+ index of 1.
+
+\param[in] node_number The internal ID (see Section LocalNodeIds) of the desired
+ node. The first node is 1.
+
+\param[in] beg_time_step The beginning time step for which a nodal variable value
+ is desired. This is not a time value but rather a time step number,
+ as described under ex_put_time(). The first time step is 1.
+
+\param[in] end_time_step The last time step for which a nodal variable value is desired. If
+ negative, the last time step in the database will be used. The first
+ time step is 1.
+
+\param[out] nodal_var_vals Returned array of(\c end_time_step {-} \c beg_time_step +1) values
+ of the \c node_number-th node for the \c nodal_var_index-th nodal
+ variable.
+
+
+For example, the following code segment will read the values of the
+first nodal variable for node number one for all time steps stored in
+the data file:
+
+\code
+#include "exodusII.h"
+int num_time_steps, var_index, node_num, beg_time, end_time, error, exoid;
+float *var_values;
+
+\comment{determine how many time steps are stored}
+num_time_steps = ex_inquire_int(exoid, EX_INQ_TIME);
+
+\comment{read a nodal variable through time}
+var_values = (float *) calloc (num_time_steps, sizeof(float));
+
+var_index = 1; node_num = 1; beg_time = 1; end_time = -1;
+error = ex_get_nodal_var_time(exoid, var_index, node_num, beg_time,
+ end_time, var_values);
+
+\endcode
+*/
int ex_get_nodal_var_time (int exoid,
int nodal_var_index,
diff --git a/cbind/src/exgnvv.c b/exodus/cbind/src/exgnvv.c
similarity index 100%
rename from cbind/src/exgnvv.c
rename to exodus/cbind/src/exgnvv.c
diff --git a/cbind/src/exgoatt.c b/exodus/cbind/src/exgoatt.c
similarity index 100%
rename from cbind/src/exgoatt.c
rename to exodus/cbind/src/exgoatt.c
diff --git a/cbind/src/exgoea.c b/exodus/cbind/src/exgoea.c
similarity index 100%
rename from cbind/src/exgoea.c
rename to exodus/cbind/src/exgoea.c
diff --git a/cbind/src/exgotv.c b/exodus/cbind/src/exgotv.c
similarity index 100%
rename from cbind/src/exgotv.c
rename to exodus/cbind/src/exgotv.c
diff --git a/cbind/src/exgp.c b/exodus/cbind/src/exgp.c
similarity index 71%
rename from cbind/src/exgp.c
rename to exodus/cbind/src/exgp.c
index b5346c0..760ab17 100644
--- a/cbind/src/exgp.c
+++ b/exodus/cbind/src/exgp.c
@@ -32,35 +32,49 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expp - ex_get_prop: read object property
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* ex_entity_type obj_type type of object (element block, node
-* set or side set)
-* int obj_id id of object for which value
-* is desired
-* char* prop_name name of the property for which
-* value is desired
-*
-* exit conditions -
-* int* value returned value of the property
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include <string.h>
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads an object property
- */
+/*!
+
+The function ex_get_prop() reads an integer object property value
+stored for a single element block, node set, or side set.
+
+\return In case of an error, ex_get_prop() 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 object type specified.
+ - a warning value is returned if a property with the specified name is not found.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] obj_type Type of object; use one of the options in the table below.
+\param[in] obj_id The element block, node set, or side set ID.
+\param[in] prop_name The name of the property (maximum length is \p MAX_STR_LENGTH ) for
+ which the value is desired.
+\param[out] value Returned value of the property.
+
+<table>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+<tr><td> \c EX_ELEM_MAP </td><td> Element Map entity type </td></tr>
+<tr><td> \c EX_NODE_MAP </td><td> Node Map entity type </td></tr>
+<tr><td> \c EX_EDGE_MAP </td><td> Edge Map entity type </td></tr>
+<tr><td> \c EX_FACE_MAP </td><td> Face Map entity type </td></tr>
+</table>
+
+For an example of code to read an object property, refer to the
+description for ex_get_prop_names().
+
+*/
int ex_get_prop (int exoid,
ex_entity_type obj_type,
@@ -80,8 +94,7 @@ int ex_get_prop (int exoid,
exerrval = 0; /* clear error code */
-/* open appropriate variable, depending on obj_type and prop_name */
-
+ /* open appropriate variable, depending on obj_type and prop_name */
num_props = ex_get_num_props(exoid,obj_type);
for (i=1; i<=num_props; i++) {
@@ -155,8 +168,7 @@ int ex_get_prop (int exoid,
}
}
-/* if property is not found, return warning */
-
+ /* if property is not found, return warning */
if (!found) {
exerrval = EX_BADPARAM;
sprintf(errmsg,
@@ -166,10 +178,9 @@ int ex_get_prop (int exoid,
return (EX_WARN);
}
-/* 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, */
-/* but netcdf expects 0-based arrays so subtract 1 */
-
+ /* 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, */
+ /* but netcdf expects 0-based arrays so subtract 1 */
start[0] = ex_id_lkup (exoid, obj_type, obj_id);
if (exerrval != 0) {
if (exerrval == EX_NULLENTITY) {
diff --git a/cbind/src/exgpa.c b/exodus/cbind/src/exgpa.c
similarity index 70%
rename from cbind/src/exgpa.c
rename to exodus/cbind/src/exgpa.c
index 3b7a1d2..a9977ed 100644
--- a/cbind/src/exgpa.c
+++ b/exodus/cbind/src/exgpa.c
@@ -57,9 +57,57 @@
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads an array of object properties
- */
+/*!
+
+The function ex_get_prop_array() reads an array of integer property
+values for all element blocks, node sets, or side sets. The order of
+the values in the array correspond to the order in which the element
+blocks, node sets, or side sets were introduced into the file. Before
+this function is invoked, memory must be allocated for the returned
+array of(\c num_elem_blk, \c num_node_sets, or {num_side_sets})
+integer values.
+
+
+This function can be used in place of
+ - ex_get_elem_blk_ids(),
+ - ex_get_node_set_ids(), and
+ - ex_get_side_set_ids()
+to get element block, node set, and side set IDs, respectively, by
+requesting the property name \b ID. One should also note that this
+same function can be accomplished with multiple calls to
+ex_get_prop().
+
+\return In case of an error, ex_get_prop_array() 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 object type specified.
+ - a warning value is returned if a property with the specified name is not found.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] obj_type Type of object; use one of the options in the table below.
+\param[in] prop_name The name of the property (maximum length of \p MAX_STR_LENGTH )
+ for which the values are desired.
+\param[out] values Returned array of property values.
+
+<table>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+<tr><td> \c EX_ELEM_MAP </td><td> Element Map entity type </td></tr>
+<tr><td> \c EX_NODE_MAP </td><td> Node Map entity type </td></tr>
+<tr><td> \c EX_EDGE_MAP </td><td> Edge Map entity type </td></tr>
+<tr><td> \c EX_FACE_MAP </td><td> Face Map entity type </td></tr>
+</table>
+
+For an example of code to read an array of object properties, refer to
+the description for ex_get_prop_names().
+*/
int ex_get_prop_array (int exoid,
ex_entity_type obj_type,
diff --git a/cbind/src/exgpem.c b/exodus/cbind/src/exgpem.c
similarity index 100%
rename from cbind/src/exgpem.c
rename to exodus/cbind/src/exgpem.c
diff --git a/cbind/src/exgpn.c b/exodus/cbind/src/exgpn.c
similarity index 53%
rename from cbind/src/exgpn.c
rename to exodus/cbind/src/exgpn.c
index e6b8218..a4b576d 100644
--- a/cbind/src/exgpn.c
+++ b/exodus/cbind/src/exgpn.c
@@ -32,31 +32,72 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgpn - ex_get_prop_names
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int obj_type type of object; element block, node
-* set, or side set
-*
-* exit conditions -
-* char* prop_names[] ptr array of property names
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include <string.h>
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads the names of the property arrays from the database
- */
+/*!
+
+The function ex_get_prop_names() returns names of integer properties
+stored for an element block, node set, or side set. The number of
+properties (needed to allocate space for the property names) can be
+obtained via a call to ex_inquire() or ex_inquire_int().
+
+\return In case of an error, ex_get_prop_names() 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 object type specified.
+
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] obj_type Type of object; use one of the options in the table below.
+\param[out] prop_names Returned array containing \c num_props (obtained from call to
+ ex_inquire() or ex_inquire_int()) names (of maximum length
+ \p MAX_STR_LENGTH ) of properties to be stored. \b ID, a
+ reserved property name, will be the first name in the array.
+
+<table>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+<tr><td> \c EX_ELEM_MAP </td><td> Element Map entity type </td></tr>
+<tr><td> \c EX_NODE_MAP </td><td> Node Map entity type </td></tr>
+<tr><td> \c EX_EDGE_MAP </td><td> Edge Map entity type </td></tr>
+<tr><td> \c EX_FACE_MAP </td><td> Face Map entity type </td></tr>
+</table>
+
+As an example, the following code segment reads in properties assigned
+to node sets:
+
+\code
+#include "exodusII.h";
+int error, exoid, num_props, *prop_values;
+char *prop_names[MAX_PROPS];
+
+\comment{read node set properties}
+num_props = ex_inquire_int(exoid, EX_INQ_NS_PROP);
+
+for (i=0; i < num_props; i++) {
+ prop_names[i] = (char *) malloc ((MAX_STR_LENGTH+1), sizeof(char));
+ prop_values = (int *) malloc (num_node_sets, sizeof(int));
+}
+
+error = ex_get_prop_names(exoid,EX_NODE_SET,prop_names);
+
+for (i=0; i < num_props; i++) {
+ error = ex_get_prop_array(exoid, EX_NODE_SET, prop_names[i],
+ prop_values);
+}
+\endcode
+
+*/
int ex_get_prop_names (int exoid,
ex_entity_type obj_type,
@@ -65,6 +106,8 @@ int ex_get_prop_names (int exoid,
int status;
int i, num_props, propid;
char var_name[12];
+ size_t att_len;
+ nc_type att_type;
char errmsg[MAX_ERR_LENGTH];
@@ -130,10 +173,29 @@ int ex_get_prop_names (int exoid,
}
/* for each property, read the "name" attribute of property array variable */
- if ((status = nc_get_att_text(exoid, propid, ATT_PROP_NAME, prop_names[i])) != NC_NOERR) {
+ if ((status = nc_inq_att(exoid, propid, ATT_PROP_NAME, &att_type, &att_len)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
- "Error: failed to get property name in file id %d", exoid);
+ "Error: failed to get property attributes (type, len) in file id %d", exoid);
+ ex_err("ex_get_prop_names",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (att_len-1 <= ex_max_name_length) {
+ /* 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) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get property name in file id %d", exoid);
+ ex_err("ex_get_prop_names",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+ else {
+ /* FIXME */
+ exerrval = NC_ESTS;
+ sprintf(errmsg,
+ "Error: property name length exceeds space available to store it in file id %d", exoid);
ex_err("ex_get_prop_names",errmsg,exerrval);
return (EX_FATAL);
}
diff --git a/cbind/src/exgqa.c b/exodus/cbind/src/exgqa.c
similarity index 65%
rename from cbind/src/exgqa.c
rename to exodus/cbind/src/exgqa.c
index f07a2e5..3349d25 100644
--- a/cbind/src/exgqa.c
+++ b/exodus/cbind/src/exgqa.c
@@ -32,38 +32,60 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgqa - ex_get_qa
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* char* qa_record[8][4] ptr to qa record ptr array
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
-/*
- * reads the QA records from the database
+/*!
+The function ex_get_qa() reads the QA records from the database. Each
+QA record contains four \c MAX_STR_LENGTH-byte character
+strings. The character strings are:
+ - the analysis code name
+ - the analysis code QA descriptor
+ - the analysis date
+ - the analysis time
+
+Memory must be allocated for the QA records before this call is
+made. The number of QA records can be determined by invoking
+ex_inquire().
+
+\return In case of an error, ex_get_qa() 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 QA records were stored.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[out] qa_record Returned array containing the QA records.
+
+The following will determine the number of QA records and
+read them from the open exodus file:
+
+\code
+#include "exodusII.h"
+int num_qa_rec, error, exoid
+char *qa_record[MAX_QA_REC][4];
+
+\comment{read QA records}
+num_qa_rec = ex_inquire_int(exoid, EX_INQ_QA);
+
+for (i=0; i<num_qa_rec; i++) {
+ for (j=0; j<4; j++)
+ qa_record[i][j] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+}
+error = ex_get_qa (exoid, qa_record);
+\endcode
+
*/
int ex_get_qa (int exoid,
char *qa_record[][4])
{
int status;
- int j, k, dimid, varid;
- size_t i;
- size_t num_qa_records, start[3];
+ int dimid, varid;
+ size_t i, j;
+ size_t num_qa_records, start[3], count[3];
- char *ptr;
char errmsg[MAX_ERR_LENGTH];
exerrval = 0; /* clear error code */
@@ -102,40 +124,18 @@ int ex_get_qa (int exoid,
/* read the QA records */
for (i=0; i<num_qa_records; i++) {
for (j=0; j<4; j++) {
- start[0] = i;
- start[1] = j;
- start[2] = 0;
-
- k = 0;
- ptr = qa_record[i][j];
-
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
+ start[0] = i; count[0] = 1;
+ start[1] = j; count[1] = 1;
+ start[2] = 0; count[2] = MAX_STR_LENGTH+1;
+ if ((status = nc_get_vara_text(exoid, varid, start, count, qa_record[i][j])) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to get qa record data in file id %d", exoid);
ex_err("ex_get_qa",errmsg,exerrval);
return (EX_FATAL);
}
-
-
- while ((*(ptr++) != '\0') && (k < MAX_STR_LENGTH)) {
- start[2] = ++k;
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get qa record data in file id %d", exoid);
- ex_err("ex_get_qa",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
-
- /* remove trailing blanks */
-
- if(start[2] != 0) {
- --ptr;
- while ( --ptr >= qa_record[i][j] && *ptr == ' ' );
- *(++ptr) = '\0';
- }
+ qa_record[i][j][MAX_STR_LENGTH] = '\0';
+ ex_trim_internal(qa_record[i][j]);
}
}
}
diff --git a/cbind/src/exgset.c b/exodus/cbind/src/exgset.c
similarity index 92%
rename from cbind/src/exgset.c
rename to exodus/cbind/src/exgset.c
index d1a17d9..d4c6191 100644
--- a/cbind/src/exgset.c
+++ b/exodus/cbind/src/exgset.c
@@ -69,7 +69,7 @@ int ex_get_set (int exoid,
int dimid, entry_list_id, extra_list_id, status;
int set_id_ndx;
char errmsg[MAX_ERR_LENGTH];
- char* entryptr = NULL ;
+ char* entryptr = NULL;
char* extraptr = NULL;
exerrval = 0; /* clear error code */
@@ -153,16 +153,18 @@ int ex_get_set (int exoid,
}
- /* read in the entry list and extra list arrays */
- status = nc_get_var_int(exoid, entry_list_id, set_entry_list);
-
- if (status != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get entry list for %s %d in file id %d",
- ex_name_of_object(set_type), set_id,exoid);
- ex_err("ex_get_set",errmsg,exerrval);
- return (EX_FATAL);
+ /* read in the entry list and extra list arrays unless they are NULL */
+ if (set_entry_list) {
+ status = nc_get_var_int(exoid, entry_list_id, set_entry_list);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get entry list for %s %d in file id %d",
+ ex_name_of_object(set_type), set_id,exoid);
+ ex_err("ex_get_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
}
/* only do extra list for edge, face and side sets */
diff --git a/cbind/src/exgsetd.c b/exodus/cbind/src/exgsetd.c
similarity index 100%
rename from cbind/src/exgsetd.c
rename to exodus/cbind/src/exgsetd.c
diff --git a/cbind/src/exgsetp.c b/exodus/cbind/src/exgsetp.c
similarity index 100%
rename from cbind/src/exgsetp.c
rename to exodus/cbind/src/exgsetp.c
diff --git a/cbind/src/exgsnl.c b/exodus/cbind/src/exgsnl.c
similarity index 99%
rename from cbind/src/exgsnl.c
rename to exodus/cbind/src/exgsnl.c
index e59722a..14b3741 100644
--- a/cbind/src/exgsnl.c
+++ b/exodus/cbind/src/exgsnl.c
@@ -147,8 +147,8 @@ int ex_get_side_set_node_list_len(int exoid,
if (tot_num_ss_elem == 0) /* NULL side set? */
return (EX_NOERR); /* return zero */
- /* Minor optimization/kluge -- If num_df is nonzero, then assume
- that it matches the number of nodes in the sideset... */
+ /* Minor optimization/kluge -- If num_df is nonzero, or 1 per face
+ then assume that it matches the number of nodes in the sideset... */
if (num_df > 0 && num_df != tot_num_ss_elem) {
*side_set_node_list_len = num_df;
return(EX_NOERR);
diff --git a/cbind/src/exgsp.c b/exodus/cbind/src/exgsp.c
similarity index 100%
rename from cbind/src/exgsp.c
rename to exodus/cbind/src/exgsp.c
diff --git a/cbind/src/exgss.c b/exodus/cbind/src/exgss.c
similarity index 100%
rename from cbind/src/exgss.c
rename to exodus/cbind/src/exgss.c
diff --git a/cbind/src/exgssc.c b/exodus/cbind/src/exgssc.c
similarity index 96%
rename from cbind/src/exgssc.c
rename to exodus/cbind/src/exgssc.c
index f360050..0f586e5 100644
--- a/cbind/src/exgssc.c
+++ b/exodus/cbind/src/exgssc.c
@@ -56,12 +56,16 @@
#include "exodusII_int.h"
/* Generic error message for element type/node count mapping...*/
-#define EL_NODE_COUNT_ERROR sprintf(errmsg, \
- "Error: An element of type '%s' with %d nodes is not valid.",\
- elem_blk_parms[i].elem_type,\
- elem_blk_parms[i].num_nodes_per_elem);\
- ex_err("ex_get_side_set_node_count",errmsg,EX_MSG);\
- return(EX_FATAL);\
+static int el_node_count_error(struct elem_blk_parm elem_blk_parms)
+{
+ char errmsg[MAX_ERR_LENGTH];
+ sprintf(errmsg,
+ "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("ex_get_side_set_node_count",errmsg,EX_MSG);
+ return(EX_FATAL);
+}
int ex_get_side_set_node_count(int exoid,
int side_set_id,
@@ -321,7 +325,7 @@ int ex_get_side_set_node_count(int exoid,
elem_blk_parms[i].num_nodes_per_side[2] = 3;
elem_blk_parms[i].num_nodes_per_side[3] = 3;
} else {
- EL_NODE_COUNT_ERROR;
+ return el_node_count_error(elem_blk_parms[i]);
}
}
else if (strncmp(elem_blk_parms[i].elem_type,"TRIANGLE",3) == 0)
@@ -353,7 +357,7 @@ int ex_get_side_set_node_count(int exoid,
elem_blk_parms[i].num_nodes_per_side[3] = 3;
elem_blk_parms[i].num_nodes_per_side[4] = 3;
} else {
- EL_NODE_COUNT_ERROR;
+ return el_node_count_error(elem_blk_parms[i]);
}
}
}
@@ -385,7 +389,7 @@ int ex_get_side_set_node_count(int exoid,
elem_blk_parms[i].num_nodes_per_side[4] = 3;
elem_blk_parms[i].num_nodes_per_side[5] = 3;
} else {
- EL_NODE_COUNT_ERROR;
+ return el_node_count_error(elem_blk_parms[i]);
}
}
else if (strncmp(elem_blk_parms[i].elem_type,"HEX",3) == 0)
@@ -429,7 +433,7 @@ int ex_get_side_set_node_count(int exoid,
elem_blk_parms[i].num_nodes_per_side[4] = 9;
elem_blk_parms[i].num_nodes_per_side[5] = 9;
} else {
- EL_NODE_COUNT_ERROR;
+ return el_node_count_error(elem_blk_parms[i]);
}
}
else if (strncmp(elem_blk_parms[i].elem_type,"TETRA",3) == 0)
@@ -453,7 +457,7 @@ int ex_get_side_set_node_count(int exoid,
elem_blk_parms[i].num_nodes_per_side[2] = 6;
elem_blk_parms[i].num_nodes_per_side[3] = 6;
} else {
- EL_NODE_COUNT_ERROR;
+ return el_node_count_error(elem_blk_parms[i]);
}
}
else if (strncmp(elem_blk_parms[i].elem_type,"WEDGE",3) == 0)
@@ -473,7 +477,7 @@ int ex_get_side_set_node_count(int exoid,
elem_blk_parms[i].num_nodes_per_side[3] = 6;
elem_blk_parms[i].num_nodes_per_side[4] = 6;
} else {
- EL_NODE_COUNT_ERROR;
+ return el_node_count_error(elem_blk_parms[i]);
}
}
else if (strncmp(elem_blk_parms[i].elem_type,"PYRAMID",3) == 0)
@@ -493,7 +497,7 @@ int ex_get_side_set_node_count(int exoid,
elem_blk_parms[i].num_nodes_per_side[3] = 6;
elem_blk_parms[i].num_nodes_per_side[4] = 8;
} else {
- EL_NODE_COUNT_ERROR;
+ return el_node_count_error(elem_blk_parms[i]);
}
}
else if (strncmp(elem_blk_parms[i].elem_type,"BEAM",3) == 0)
@@ -508,7 +512,7 @@ int ex_get_side_set_node_count(int exoid,
elem_blk_parms[i].num_nodes_per_side[0] = 3;
elem_blk_parms[i].num_nodes_per_side[1] = 3;
} else {
- EL_NODE_COUNT_ERROR;
+ return el_node_count_error(elem_blk_parms[i]);
}
}
else if ( (strncmp(elem_blk_parms[i].elem_type,"TRUSS",3) == 0) ||
@@ -525,7 +529,7 @@ int ex_get_side_set_node_count(int exoid,
elem_blk_parms[i].num_nodes_per_side[0] = 3;
elem_blk_parms[i].num_nodes_per_side[1] = 3;
} else {
- EL_NODE_COUNT_ERROR;
+ return el_node_count_error(elem_blk_parms[i]);
}
}
/* Used for an empty block in a parallel decomposition */
diff --git a/cbind/src/exgssd.c b/exodus/cbind/src/exgssd.c
similarity index 100%
rename from cbind/src/exgssd.c
rename to exodus/cbind/src/exgssd.c
diff --git a/cbind/src/exgssi.c b/exodus/cbind/src/exgssi.c
similarity index 100%
rename from cbind/src/exgssi.c
rename to exodus/cbind/src/exgssi.c
diff --git a/cbind/src/exgssn.c b/exodus/cbind/src/exgssn.c
similarity index 100%
rename from cbind/src/exgssn.c
rename to exodus/cbind/src/exgssn.c
diff --git a/cbind/src/exgsstt.c b/exodus/cbind/src/exgsstt.c
similarity index 100%
rename from cbind/src/exgsstt.c
rename to exodus/cbind/src/exgsstt.c
diff --git a/cbind/src/exgssv.c b/exodus/cbind/src/exgssv.c
similarity index 100%
rename from cbind/src/exgssv.c
rename to exodus/cbind/src/exgssv.c
diff --git a/cbind/src/exgssvid.c b/exodus/cbind/src/exgssvid.c
similarity index 100%
rename from cbind/src/exgssvid.c
rename to exodus/cbind/src/exgssvid.c
diff --git a/cbind/src/exgtim.c b/exodus/cbind/src/exgtim.c
similarity index 70%
rename from cbind/src/exgtim.c
rename to exodus/cbind/src/exgtim.c
index dc54ff5..92d6350 100644
--- a/cbind/src/exgtim.c
+++ b/exodus/cbind/src/exgtim.c
@@ -32,31 +32,47 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exgtim - ex_get_time
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int time_step time step number
-*
-* exit conditions -
-* float time_value simulation time at specified step
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include <string.h>
#include "exodusII.h"
#include "exodusII_int.h"
/*!
- * reads the time value for a specified time step;
- * assume the first time step is 1
- */
+
+The function ex_get_time() reads the time value for a specified time
+step.
+
+Because time values are floating point values, the application code
+must declare the array passed to be the appropriate type (\c float or
+\c double) to match the compute word size passed in ex_create() or
+ex_open().
+
+\return In case of an error, ex_get_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()
+ - no time steps have been stored in the file.
+
+
+\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. This is essentially an index (in the time
+ dimension) into the global, nodal, and element variables arrays stored
+ in the database. The first time step is 1.
+\param[out] time_value Returned time at the specified time step.
+
+As an example, the following coding will read the time value stored in
+the data file for time step n:
+
+\code
+int n, error, exoid;
+float time_value;
+
+\comment{read time value at time step 3}
+n = 3;
+error = ex_get_time (exoid, n, &time_value);
+\endcode
+
+*/
int ex_get_time (int exoid,
int time_step,
diff --git a/cbind/src/exgtt.c b/exodus/cbind/src/exgtt.c
similarity index 100%
rename from cbind/src/exgtt.c
rename to exodus/cbind/src/exgtt.c
diff --git a/cbind/src/exgvan.c b/exodus/cbind/src/exgvan.c
similarity index 100%
rename from cbind/src/exgvan.c
rename to exodus/cbind/src/exgvan.c
diff --git a/cbind/src/exgvar.c b/exodus/cbind/src/exgvar.c
similarity index 100%
rename from cbind/src/exgvar.c
rename to exodus/cbind/src/exgvar.c
diff --git a/cbind/src/exgvarnam.c b/exodus/cbind/src/exgvarnam.c
similarity index 80%
rename from cbind/src/exgvarnam.c
rename to exodus/cbind/src/exgvarnam.c
index 3cde4d7..049d08e 100644
--- a/cbind/src/exgvarnam.c
+++ b/exodus/cbind/src/exgvarnam.c
@@ -63,9 +63,7 @@ int ex_get_variable_name (int exoid,
char *var_name)
{
int status;
- int j, varid;
- size_t start[2];
- char *ptr;
+ int varid;
char errmsg[MAX_ERR_LENGTH];
const char *vname = NULL;
@@ -121,36 +119,14 @@ int ex_get_variable_name (int exoid,
}
/* read the variable name */
- start[0] = var_num-1;
- start[1] = 0;
+ {
+ int db_name_size = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH);
+ int name_size = db_name_size < ex_max_name_length ? db_name_size : ex_max_name_length;
- j = 0;
- ptr=var_name;
-
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {/* get first character */
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get results variable name type %s, index %d from file id %d",
- ex_name_of_object(obj_type), var_num, exoid);
- ex_err("ex_get_variable_name",errmsg,exerrval);
- return (EX_FATAL);
- }
-
- while ((*ptr++ != '\0') && (j < MAX_STR_LENGTH)) {/* get remaining chars */
- start[1] = ++j;
- if ((status = nc_get_var1_text(exoid, varid, start, ptr)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get results variable names from file id %d", exoid);
- ex_err("ex_get_var_names",errmsg,exerrval);
+ status = ex_get_name_internal(exoid, varid, var_num-1, var_name, name_size, obj_type, "ex_get_variable_name");
+ if (status != NC_NOERR) {
return (EX_FATAL);
}
}
-
- if (*(--ptr) != '\0') {
- --ptr;
- while (*(--ptr) == ' '); /* strip right trailing blanks */
- *(++ptr) = '\0';
- }
return (EX_NOERR);
}
diff --git a/cbind/src/exgvarnams.c b/exodus/cbind/src/exgvarnams.c
similarity index 56%
rename from cbind/src/exgvarnams.c
rename to exodus/cbind/src/exgvarnams.c
index 874f16b..24092bd 100644
--- a/cbind/src/exgvarnams.c
+++ b/exodus/cbind/src/exgvarnams.c
@@ -32,23 +32,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* ex_get_variable_names
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int obj_type type of object
-* int num_vars # of variables to read
-*
-* exit conditions -
-* char* var_names ptr array of variable names
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
@@ -56,15 +39,63 @@
#include <ctype.h>
/*!
- * reads the names of the results variables from the database
- */
+The function ex_get_variable_names() reads the names of the results
+variables from the database. Memory must be allocated for the name
+array before this function is invoked. The names are \p
+MAX_STR_LENGTH-characters in length.
+
+\return In case of an error, ex_get_variable_names() 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 variable type specified.
+ - a warning value is returned if no variables of the specified
+ 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] obj_type Variable indicating the type of variable which is described. Use one
+ of the options in the table below.
+\param[in] num_vars The number of \c var_type variables that will be read
+ from the database.
+\param[out] var_names Returned array of pointers to \c num_vars variable names.
+
+<table>
+<tr><td> \c EX_GLOBAL} </td><td> Global entity type </td></tr>
+<tr><td> \c EX_NODAL} </td><td> Nodal entity type </td></tr>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+</table>
+
+As an example, the following code segment will read the names of the
+nodal variables stored in the data file:
+
+\code
+#include "exodusII.h"
+int error, exoid, num_nod_vars;
+char *var_names[10];
+
+\comment{read nodal variables parameters and names}
+error = ex_get_variable_param(exoid, EX_NODAL, &num_nod_vars);
+for (i=0; i < num_nod_vars; i++) {
+ var_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+}
+error = ex_get_variable_names(exoid, EX_NODAL, num_nod_vars, var_names);
+\endcode
+
+*/
int ex_get_variable_names (int exoid,
ex_entity_type obj_type,
int num_vars,
char *var_names[])
{
- int i, varid, status;
+ int varid, status;
char errmsg[MAX_ERR_LENGTH];
const char* vvarname;
@@ -106,7 +137,7 @@ int ex_get_variable_names (int exoid,
sprintf(errmsg,
"Warning: invalid variable type %d requested from file id %d",
obj_type, exoid);
- ex_err("ex_get_var_param",errmsg,exerrval);
+ ex_err("ex_get_variable_names",errmsg,exerrval);
return (EX_WARN);
}
@@ -120,36 +151,9 @@ int ex_get_variable_names (int exoid,
}
/* read the variable names */
-
- /*
- * See if reading into contiguous memory in which case we can load
- * all values in one call. If not, we must load each name individually.
- */
- if ((size_t)(&var_names[num_vars-1][0] - &var_names[0][0]) ==
- sizeof(char)*(MAX_STR_LENGTH+1)*(num_vars-1)) {
- status = nc_get_var_text(exoid, varid, &var_names[0][0]);
- if (status != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get results variable names from file id %d", exoid);
- ex_err("ex_get_var_names",errmsg,exerrval);
- return (EX_FATAL);
- }
- } else {
- for (i=0; i<num_vars; i++) {
- size_t start[2];
- size_t count[2];
- start[0] = i; count[0] = 1;
- start[1] = 0; count[1] = MAX_STR_LENGTH+1;
- status = nc_get_vara_text(exoid, varid, start, count, var_names[i]);
- if (status != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get results variable names from file id %d", exoid);
- ex_err("ex_get_var_names",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
+ status = ex_get_names_internal(exoid, varid, num_vars, var_names, obj_type, "ex_get_variable_names");
+ if (status != NC_NOERR) {
+ return (EX_FATAL);
}
return (EX_NOERR);
}
diff --git a/cbind/src/exgvarparam.c b/exodus/cbind/src/exgvarparam.c
similarity index 70%
rename from cbind/src/exgvarparam.c
rename to exodus/cbind/src/exgvarparam.c
index 7bce8c5..ddc1659 100644
--- a/cbind/src/exgvarparam.c
+++ b/exodus/cbind/src/exgvarparam.c
@@ -55,9 +55,45 @@
#include <ctype.h>
/*!
- * reads the number of global, nodal, or element variables that are
- * stored in the database
- */
+
+The function ex_get_variable_param() reads the number of global,
+nodal, or element variables stored in the database.
+
+\return In case of an error, ex_get_variable_param() 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 variable type specified.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] obj_type Variable indicating the type of variable which is described. Use one
+ of the options in the table below.
+\param[out] num_vars Returned number of \c var_type variables that are stored in the database.
+
+<table>
+<tr><td> \c EX_GLOBAL} </td><td> Global entity type </td></tr>
+<tr><td> \c EX_NODAL} </td><td> Nodal entity type </td></tr>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+</table>
+
+As an example, the following coding will determine the number of
+global variables stored in the data file:
+
+\code
+int num_glo_vars, error, exoid;
+
+\comment{read global variables parameters}
+error = ex_get_variable_param(exoid, EX_GLOBAL, &num_glo_vars);
+\endcode
+
+*/
int ex_get_variable_param (int exoid,
ex_entity_type obj_type,
diff --git a/cbind/src/exgvart.c b/exodus/cbind/src/exgvart.c
similarity index 100%
rename from cbind/src/exgvart.c
rename to exodus/cbind/src/exgvart.c
diff --git a/cbind/src/exgvartab.c b/exodus/cbind/src/exgvartab.c
similarity index 100%
rename from cbind/src/exgvartab.c
rename to exodus/cbind/src/exgvartab.c
diff --git a/cbind/src/exgvid.c b/exodus/cbind/src/exgvid.c
similarity index 100%
rename from cbind/src/exgvid.c
rename to exodus/cbind/src/exgvid.c
diff --git a/cbind/src/exgvnm.c b/exodus/cbind/src/exgvnm.c
similarity index 100%
rename from cbind/src/exgvnm.c
rename to exodus/cbind/src/exgvnm.c
diff --git a/cbind/src/exgvp.c b/exodus/cbind/src/exgvp.c
similarity index 100%
rename from cbind/src/exgvp.c
rename to exodus/cbind/src/exgvp.c
diff --git a/cbind/src/exgvtt.c b/exodus/cbind/src/exgvtt.c
similarity index 57%
rename from cbind/src/exgvtt.c
rename to exodus/cbind/src/exgvtt.c
index 3e19c33..eb2cd33 100644
--- a/cbind/src/exgvtt.c
+++ b/exodus/cbind/src/exgvtt.c
@@ -55,8 +55,47 @@
#include "exodusII_int.h"
/*!
- * reads the EXODUS II element variable truth table from the database
- * \deprecated Use ex_get_truth_table()(exoid, EX_ELEM_BLOCK, num_elem_blk, num_elem_var, elem_var_tab)
+\deprecated Use ex_get_truth_table()(exoid, EX_ELEM_BLOCK, num_elem_blk, num_elem_var, elem_var_tab)
+
+The function ex_get_elem_var_tab() reads the exodus element variable
+truth table from the database. For a description of the truth table,
+see the usage of the function ex_put_elem_var_tab(). Memory must be
+allocated for the truth table(\c num_elem_blk \b x \c
+num_elem_var in length) before this function is invoked. If the truth
+table is not stored in the file, it will be created based on
+information in the file and then returned.
+
+\return In case of an error, ex_get_elem_var_tab() 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 not initialized properly with call to ex_put_init().
+ - the specified number of element blocks is different than the
+ number specified in a call to ex_put_init().
+ - there are no element variables stored in the file or the
+ specified number of element variables doesn't match the number
+ specified in a call to ex_put_variable_param().
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] num_elem_blk The number of element blocks.
+\param[in] num_elem_var The number of element variables.
+\param[out] elem_var_tab Size [num_elem_blk,num_elem_var].
+ Returned 2-dimensional array (with the \c num_elem_var index cycling
+ faster) containing the element variable truth table.
+
+As an example, the following coding will read the element
+variable truth table from an opened exodus file :
+
+\code
+int *truth_tab, num_elem_blk, num_ele_vars, error, exoid;
+
+truth_tab = (int *) calloc ((num_elem_blk*num_ele_vars),
+ sizeof(int));
+
+error = ex_get_elem_var_tab (exoid, num_elem_blk, num_ele_vars,
+ truth_tab);
+\endcode
+
*/
int ex_get_elem_var_tab (int exoid,
diff --git a/cbind/src/exgvv.c b/exodus/cbind/src/exgvv.c
similarity index 100%
rename from cbind/src/exgvv.c
rename to exodus/cbind/src/exgvv.c
diff --git a/exodus/cbind/src/exinq.c b/exodus/cbind/src/exinq.c
new file mode 100644
index 0000000..5e83063
--- /dev/null
+++ b/exodus/cbind/src/exinq.c
@@ -0,0 +1,1066 @@
+/*
+ * Copyright (c) 2006 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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 <stdlib.h>
+#include <string.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+/*!
+\fn{int ex_inquire (int exoid,
+ int req_info,
+ int *ret_int,
+ void *ret_float,
+ char *ret_char)}
+
+The function ex_inquire() is used to inquire values of certain
+data entities in an exodus file. Memory must be allocated for the
+returned values before this function is invoked.query database. \sa ex_inquire_int().
+
+\return In case of an error, ex_inquire() 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().
+ - requested information not stored in the file.
+ - invalid request flag.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] req_info A flag which designates what information is requested. It must be one
+ of the following constants in the table below.
+
+\param[out] ret_int Returned integer, if an integer value is requested (according
+ to \c req_info); otherwise, supply a dummy argument.
+
+\param[out] ret_float Returned float, if a float value is requested
+ (according to \c req_info); otherwise, supply a dummy
+ argument. This argument is always a float even if the database IO
+ and/or CPU word size is a double.
+
+\param[out] ret_char Returned character string, if a character value is requested (according
+ to \c req_info); otherwise, supply a dummy argument.
+
+<table>
+<tr><td>\c EX_INQ_API_VERS</td><td> The exodus API version number is returned
+ in \c ret_float and an undotted version number is returned in
+ \c ret_int. The API version number reflects the release of the
+ function library (i.e., function names, argument list, etc.). The API
+ and LIB version numbers are synchronized and will always
+ match. Initially, it was thought that maintaining the two versions
+ separately would be a benefit, but that was more confusing than
+ helpful, so the numbers were made the same.</td></tr>
+
+ <tr><td> \c EX_INQ_DB_VERS </td><td> The exodus database version number is
+ returned in \c ret_float and an ``undotted'' version number is
+ returned in \c ret_int. The database version number reflects the
+ version of the library that was used to \e write the file pointed to by
+ \c exoid. </td></tr>
+
+ <tr><td> \c EX_INQ_LIB_VERS </td><td>The exodus library version number is
+ returned in \c ret_float and an undotted version number is
+ returned in \c ret_int. The API library version number reflects
+ the version number of the exodus library linked with this
+ application. </td></tr>
+
+ <tr><td> \c EX_INQ_TITLE </td><td>The title stored in the database is returned in \c ret_char. </td></tr>
+
+ <tr><td> \c EX_INQ_DIM </td><td>The dimensionality, or number of coordinates
+ per node (1, 2 or 3), of the database is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_NODES </td><td>The number of nodes is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ELEM </td><td>The number of elements is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ELEM_BLK </td><td>The number of element blocks is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_NODE_SETS </td><td>The number of node sets is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_NS_NODE_LEN </td><td>The length of the concatenated node
+ sets node list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_NS_DF_LEN </td><td>The length of the concatenated node
+ sets distribution list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_SIDE_SETS </td><td>The number of side sets is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_SS_ELEM_LEN </td><td>The length of the concatenated side
+ sets element list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_SS_DF_LEN </td><td>The length of the concatenated side
+ sets distribution factor list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_SS_NODE_LEN </td><td>The aggregate length of all of the
+ side sets node lists is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_EB_PROP </td><td>The number of integer properties stored
+ for each element block is returned in \c ret_int; this number
+ includes the property named \c ID. </td></tr>
+
+ <tr><td> \c EX_INQ_NS_PROP </td><td>The number of integer properties stored
+ for each node set is returned in \c ret_int; this number includes
+ the property named \c ID. </td></tr>
+
+ <tr><td> \c EX_INQ_SS_PROP </td><td>The number of integer properties stored
+ for each side set is returned in \c ret_int; this number includes
+ the property named \c ID. </td></tr>
+
+ <tr><td> \c EX_INQ_QA </td><td>The number of QA records is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_INFO </td><td>The number of information records is returned
+ in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_TIME </td><td>The number of time steps stored in the
+ database is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_EDGE_BLK </td><td>The number of edge blocks is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_EDGE_MAP </td><td>The number of edge maps is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_EDGE_PROP </td><td>The number of properties stored per
+ edge blockis returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_EDGE_SETS </td><td>The number of edge sets is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_EDGE </td><td>The number of edges is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_FACE </td><td>The number of faces is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_EB_PROP </td><td>The number of element block properties is
+ returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ELEM_MAP </td><td>The number of element maps is returned
+ in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ELEM_SETS </td><td>The number of element sets is returned
+ in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ELS_DF_LEN </td><td>The length of the concatenated
+ element set distribution factor list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ELS_LEN </td><td>The length of the concatenated element
+ set element list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ELS_PROP </td><td>The number of properties stored per elem
+ set is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_EM_PROP </td><td>The number of element map properties is
+ returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ES_DF_LEN </td><td>The length of the concatenated edge
+ set distribution factor list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ES_LEN </td><td>The length of the concatenated edge set
+ edge list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_ES_PROP </td><td>The number of properties stored per edge
+ set is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_FACE_BLK </td><td>The number of face blocks is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_FACE_MAP </td><td>The number of face maps is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_FACE_PROP </td><td>The number of properties stored per
+ face block is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_FACE_SETS </td><td>The number of face sets is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_FS_DF_LEN </td><td>The length of the concatenated face
+ set distribution factor list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_FS_LEN </td><td>The length of the concatenated face set
+ face list is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_FS_PROP </td><td>The number of properties stored per face
+ set is returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_NM_PROP </td><td>The number of node map properties is
+ returned in \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_NODE_MAP </td><td>The number of node maps is returned in
+ \c ret_int. </td></tr>
+
+ <tr><td> \c EX_INQ_COORD_FRAMES </td><td>The number of coordinate frames is returned in \c ret_int. </td></tr>
+</table>
+
+As an example, the following will return the number of element
+block properties stored in the exodus file :
+
+\code
+#include "exodusII.h"
+int error, exoid, num_props;
+float fdum;
+char *cdum;
+
+\comment{determine the number of element block properties}
+error = ex_inquire (exoid, EX_INQ_EB_PROP, &num_props,
+ &fdum, cdum);
+...Another way to get the same information
+num_props = ex_inquire_int(exoid, EX_INQ_EB_PROP);
+\endcode
+
+*/
+
+/*! \cond INTERNAL */
+static int ex_get_dimension_value(int exoid, int *var, int default_value, const char *dimension_name, int missing_ok)
+{
+ int status;
+ char errmsg[MAX_ERR_LENGTH];
+ size_t idum;
+ int dimid;
+
+ if ((status = nc_inq_dimid( exoid, dimension_name, &dimid)) != NC_NOERR) {
+ *var = default_value;
+ if ( missing_ok ) {
+ return (EX_NOERR);
+ } else {
+ exerrval = status;
+ sprintf( errmsg,
+ "Error: failed to retrieve dimension %s for file id %d",
+ dimension_name, exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+ if ((status = nc_inq_dimlen( exoid, dimid, &idum)) != NC_NOERR) {
+ *var = default_value;
+ exerrval = status;
+ sprintf( errmsg,
+ "Error: failed to retrieve value for dimension %s for file id %d",
+ dimension_name, exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ *var = (int)idum;
+ return (EX_NOERR);
+}
+
+static int ex_get_concat_set_len(int exoid, int *set_length, const char *set_name,
+ ex_entity_type set_type, 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;
+ int *ids = NULL;
+
+ *set_length = 0; /* default return value */
+
+ if ((status = nc_inq_dimid (exoid, set_num_dim, &dimid)) == NC_NOERR)
+ {
+ if ((status = nc_inq_dimlen (exoid, dimid, &num_sets)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of %s sets in file id %d",
+ set_name, exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (!(ids = malloc(num_sets*sizeof(int)))) {
+ exerrval = EX_MEMFAIL;
+ sprintf(errmsg,
+ "Error: failed to allocate memory for %s set ids for file id %d",
+ set_name, exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ex_get_ids (exoid, set_type, ids) == EX_FATAL) {
+ sprintf(errmsg,
+ "Error: failed to get %s set ids in file id %d",
+ set_name, exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free(ids);
+ return (EX_FATAL);
+ }
+
+ /* Allocate space for stat array */
+ if (!(stat_vals = malloc((int)num_sets*sizeof(int)))) {
+ exerrval = EX_MEMFAIL;
+ free (ids);
+ sprintf(errmsg,
+ "Error: failed to allocate memory for %s set status array for file id %d",
+ set_name, exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* get variable id of status array */
+ if ((status = 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) {
+ exerrval = status;
+ free (ids);
+ free(stat_vals);
+ sprintf(errmsg,
+ "Error: failed to get %s set status array from file id %d",
+ set_name, exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ } else /* default: status is true */
+ for(i=0;i<num_sets;i++)
+ stat_vals[i]=1;
+
+ for (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) {
+ if ( missing_ok ) {
+ idum = 0;
+ } else {
+ *set_length = 0;
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate %s set %d in file id %d",
+ set_name, ids[i],exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free(stat_vals);
+ free(ids);
+ return (EX_FATAL);
+ }
+ } else {
+ if ((status = nc_inq_dimlen (exoid, dimid, &idum)) != NC_NOERR) {
+ *set_length = 0;
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get size of %s set %d in file id %d",
+ set_name, ids[i], exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free(stat_vals);
+ free(ids);
+ return (EX_FATAL);
+ }
+ }
+
+ *set_length += (int)idum;
+ }
+
+ free(stat_vals);
+ free (ids);
+ }
+ return (EX_NOERR);
+}
+
+static void flt_cvt(float *xptr,double x)
+{
+ *xptr = (float)x;
+}
+/*! \endcond */
+
+/*!
+ A variant of ex_inquire() which queries integer-valued information only. \see ex_inquire().
+ \param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+ \param[in] req_info A flag which designates what information is requested.
+ (See ex_inquire() documentation)
+ \return result of inquiry.
+
+ As an example, the following will return the number of nodes,
+ elements, and element blocks stored in the exodus file :
+
+\code
+#include "exodusII.h"
+int exoid;
+int num_nodes = ex_inquire_int(exoid, EX_INQ_NODES);
+int num_elems = ex_inquire_int(exoid, EX_INQ_ELEM);
+int num_block = ex_inquire_int(exoid, EX_INQ_ELEM_BLK);
+\endcode
+
+*/
+
+int ex_inquire_int (int exoid, int req_info)
+{
+ char *cdummy = NULL; /* Needed just for function call, unused. */
+ float fdummy = 0; /* Needed just for function call, unused. */
+ int ret_val = 0;
+ int error = ex_inquire(exoid, req_info, &ret_val, &fdummy, cdummy);
+ if (error < 0)
+ ret_val = error;
+
+ return ret_val;
+}
+
+int ex_inquire (int exoid,
+ int req_info,
+ int *ret_int,
+ void *ret_float,
+ char *ret_char)
+{
+ int dimid, varid, tmp_num, *ids;
+ 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];
+
+ exerrval = 0; /* clear error code */
+
+ if (ret_char) *ret_char = '\0';
+ if (ret_int) *ret_int = 0;
+
+ switch (req_info) {
+ case EX_INQ_FILE_TYPE:
+
+ /* obsolete call */
+ /*returns "r" for regular EXODUS II file or "h" for history EXODUS file*/
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg,
+ "Warning: file type inquire is obsolete");
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_WARN);
+
+ case EX_INQ_API_VERS:
+ /* returns the EXODUS II API version number */
+ if (nc_get_att_float(exoid, NC_GLOBAL, ATT_API_VERSION, ret_float) != NC_NOERR)
+ { /* try old (prior to db version 2.02) attribute name */
+ if ((status = nc_get_att_float (exoid, NC_GLOBAL, ATT_API_VERSION_BLANK,ret_float)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get EXODUS API version for file id %d", exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ break;
+
+ case EX_INQ_DB_VERS:
+ /* returns the EXODUS II database version number */
+ if ((status = nc_get_att_float (exoid, NC_GLOBAL, ATT_VERSION, ret_float)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get EXODUS database version for file id %d", exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ break;
+
+ case EX_INQ_LIB_VERS:
+ /* returns the EXODUS II Library version number */
+ if (ret_float)
+ flt_cvt((float *)ret_float, EX_API_VERS);
+
+ if (ret_int)
+ *ret_int = EX_API_VERS_NODOT;
+ break;
+
+ case EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH:
+ /* Return the MAX_NAME_LENGTH size for this database
+ 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(exoid, DIM_STR_NAME, &dimid)) != NC_NOERR) {
+ /* If not found, then an older database */
+ *ret_int = 32;
+ }
+ else {
+ /* Get the name string length */
+ size_t name_length = 0;
+ if ((status = nc_inq_dimlen(exoid,dimid,&name_length)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get name string length in file id %d", exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ else {
+ *ret_int = name_length-1;
+ }
+ }
+ break;
+
+ case EX_INQ_DB_MAX_USED_NAME_LENGTH:
+ /* Return the value of the ATT_MAX_NAME_LENGTH attribute (if it
+ exists) which is the maximum length of any entity, variable,
+ attribute, property name written to this database. If the
+ attribute does not exist, then '32' is returned. The length
+ does not include the trailing null.
+ */
+ {
+ nc_type att_type = NC_NAT;
+ size_t att_len = 0;
+
+ *ret_int = 32; /* Default size consistent with older databases */
+
+ status = nc_inq_att(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, &att_type, &att_len);
+ if (status == NC_NOERR && att_type == NC_INT) {
+ /* The attribute exists, return it... */
+ status = nc_get_att_int(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, ret_int);
+ }
+ }
+ break;
+
+ case EX_INQ_MAX_READ_NAME_LENGTH:
+ /* Returns the user-specified maximum size of names that will be
+ * returned to the user by any of the ex_get_ routines. If the
+ * name is longer than this value, it will be truncated. The
+ * default if not set by the client is 32 characters. The value
+ * does not include the trailing null.
+ */
+ *ret_int = ex_max_name_length;
+ break;
+
+ case EX_INQ_TITLE:
+ /* returns the title of the database */
+ if ((status = nc_get_att_text (exoid, NC_GLOBAL, ATT_TITLE, tmp_title)) != NC_NOERR) {
+ *ret_char = '\0';
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get database title for file id %d", exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ } else {
+ strncpy(ret_char, tmp_title, MAX_LINE_LENGTH+1);
+ ret_char[MAX_LINE_LENGTH] = '\0';
+ }
+ break;
+
+ 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, "ex_inquire") != NC_NOERR)
+ return EX_FATAL;
+ *ret_int = ldum;
+ break;
+
+ case EX_INQ_NODES:
+ /* returns the number of nodes */
+ if (ex_get_dimension(exoid, DIM_NUM_NODES, "nodes", &ldum, &dimid, NULL) != NC_NOERR)
+ *ret_int = 0;
+ else
+ *ret_int = ldum;
+ break;
+
+ case EX_INQ_ELEM:
+ /* returns the number of elements */
+ if (ex_get_dimension(exoid, DIM_NUM_ELEM, "elements", &ldum, &dimid, NULL) != NC_NOERR)
+ *ret_int = 0;
+ else
+ *ret_int = ldum;
+ break;
+
+ 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) != NC_NOERR)
+ *ret_int = 0;
+ else
+ *ret_int = ldum;
+ break;
+
+ 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)
+ *ret_int = 0;
+ else
+ *ret_int = ldum;
+ break;
+
+ case EX_INQ_NS_NODE_LEN:
+ /* returns the length of the concatenated node sets node list */
+ ex_get_concat_set_len(exoid, ret_int,"node",EX_NODE_SET,DIM_NUM_NS,VAR_NS_STAT,"num_nod_ns",0);
+ break;
+
+ case EX_INQ_NS_DF_LEN:
+ /* returns the length of the concatenated node sets dist factor list */
+
+ /*
+ Determine the concatenated node sets distribution factor length:
+
+ 1. Get the node set ids list.
+ 2. Check see if the dist factor variable for a node set id exists.
+ 3. If it exists, goto step 4, else the length is zero.
+ 4. Get the dimension of the number of nodes in the node set -0
+ use this value as the length as by definition they are the same.
+ 5. Sum the individual lengths for the total list length.
+ */
+
+ *ret_int = 0; /* default value if no node sets defined */
+
+ if (nc_inq_dimid (exoid, DIM_NUM_NS, &dimid) == NC_NOERR) {
+ if ((status = nc_inq_dimlen(exoid, dimid, &num_sets)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of node sets in file id %d",
+ exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+
+ if (!(ids = malloc(num_sets*sizeof(int))))
+ {
+ exerrval = EX_MEMFAIL;
+ sprintf(errmsg,
+ "Error: failed to allocate memory for node set ids for file id %d",
+ exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ex_get_node_set_ids (exoid, ids) == EX_FATAL)
+ {
+ sprintf(errmsg,
+ "Error: failed to get node sets in file id %d",
+ exoid);
+ /* pass back error code from ex_get_node_set_ids (in exerrval) */
+ ex_err("ex_inquire",errmsg,exerrval);
+ free (ids);
+ return (EX_FATAL);
+ }
+
+ for (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 */
+ } else {
+ *ret_int = 0;
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of dist fact for node set %d in file id %d",
+ ids[i], exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free (ids);
+ return (EX_FATAL);
+ }
+ } else {
+ if ((status = nc_inq_dimid (exoid, DIM_NUM_NOD_NS(i+1), &dimid)) != NC_NOERR) {
+ *ret_int = 0;
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of nodes in node set %d in file id %d",
+ ids[i], exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free (ids);
+ return (EX_FATAL);
+ }
+ if ((status = nc_inq_dimlen (exoid, dimid, &idum)) != NC_NOERR) {
+ *ret_int = 0;
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of nodes in node set %d in file id %d",
+ ids[i],exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free(ids);
+ return (EX_FATAL);
+ }
+ }
+ *ret_int += idum;
+ }
+ free(ids);
+ }
+
+ break;
+
+ 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)
+ *ret_int = 0;
+ else
+ *ret_int = ldum;
+ break;
+
+ case EX_INQ_SS_NODE_LEN:
+
+ /* returns the length of the concatenated side sets node list */
+
+ *ret_int = 0; /* default return value */
+
+ if (nc_inq_dimid (exoid, DIM_NUM_SS, &dimid) == NC_NOERR) {
+ if ((status = nc_inq_dimlen(exoid, dimid, &num_sets)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of side sets in file id %d",
+ exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+
+ if (!(ids = malloc(num_sets*sizeof(int)))) {
+ exerrval = EX_MEMFAIL;
+ sprintf(errmsg,
+ "Error: failed to allocate memory for side set ids for file id %d",
+ exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ex_get_side_set_ids (exoid, ids) == EX_FATAL) {
+ sprintf(errmsg,
+ "Error: failed to get side set ids in file id %d",
+ exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free(ids);
+ return (EX_FATAL);
+ }
+
+ /* allocate space for stat array */
+ if (!(stat_vals = malloc((int)num_sets*sizeof(int)))) {
+ exerrval = EX_MEMFAIL;
+ free (ids);
+ sprintf(errmsg,
+ "Error: failed to allocate memory for side set status array for file id %d",
+ exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ /* get variable id of status array */
+ if ((status = nc_inq_varid (exoid, VAR_SS_STAT, &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) {
+ exerrval = status;
+ free (ids);
+ free(stat_vals);
+ sprintf(errmsg,
+ "Error: failed to get element block status array from file id %d",
+ exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+ else /* default: status is true */
+ for(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++) {
+ if (stat_vals[i] == 0) /* is this object null? */
+ continue;
+
+ if ((status = ex_get_side_set_node_list_len(exoid, ids[i], &tmp_num)) != NC_NOERR) {
+ *ret_int = 0;
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to side set %d node length in file id %d",
+ ids[i],exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free(stat_vals);
+ free(ids);
+ return (EX_FATAL);
+ }
+ *ret_int += tmp_num;
+ }
+
+ free(stat_vals);
+ free (ids);
+ }
+
+ break;
+
+ case EX_INQ_SS_ELEM_LEN:
+ /* returns the length of the concatenated side sets element list */
+ ex_get_concat_set_len(exoid, ret_int,"side",EX_SIDE_SET,DIM_NUM_SS,VAR_SS_STAT,"num_side_ss",0);
+ break;
+
+ case EX_INQ_SS_DF_LEN:
+
+ /* returns the length of the concatenated side sets dist factor list */
+
+ /*
+ Determine the concatenated side sets distribution factor length:
+
+ 1. Get the side set ids list.
+ 2. Check see if the dist factor dimension for a side set id exists.
+ 3. If it exists, goto step 4, else set the individual length to zero.
+ 4. Sum the dimension value into the running total length.
+ */
+
+ *ret_int = 0;
+
+ /* first check see if any side sets exist */
+
+ if (nc_inq_dimid (exoid, DIM_NUM_SS, &dimid) == NC_NOERR) {
+ if ((status = nc_inq_dimlen (exoid, dimid, &num_sets)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of side sets in file id %d",
+ exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+
+ if (!(ids = malloc(num_sets*sizeof(int)))) {
+ exerrval = EX_MEMFAIL;
+ sprintf(errmsg,
+ "Error: failed to allocate memory for side set ids for file id %d",
+ exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ex_get_side_set_ids (exoid, ids) == EX_FATAL) {
+ sprintf(errmsg,
+ "Error: failed to get side sets in file id %d",
+ exoid);
+ /* pass back error code from ex_get_side_set_ids (in exerrval) */
+ ex_err("ex_inquire",errmsg,exerrval);
+ free (ids);
+ return (EX_FATAL);
+ }
+
+ for (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 */
+ } else {
+ *ret_int = 0;
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of dist fact for side set %d in file id %d",
+ ids[i], exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free (ids);
+ return (EX_FATAL);
+ }
+ } else {
+ if ((status = nc_inq_dimlen (exoid, dimid, &ldum)) != NC_NOERR) {
+ *ret_int = 0;
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of dist factors in side set %d in file id %d",
+ ids[i], exoid);
+ ex_err("ex_inquire",errmsg,exerrval);
+ free (ids);
+ return (EX_FATAL);
+ }
+ }
+ *ret_int += ldum;
+ }
+ free (ids);
+ }
+
+ break;
+
+ case EX_INQ_QA:
+ /* returns the number of QA records */
+ if (ex_get_dimension(exoid, DIM_NUM_QA, "QA records", &ldum, &dimid, NULL) != NC_NOERR)
+ *ret_int = 0;
+ else
+ *ret_int = ldum;
+ break;
+
+ case EX_INQ_INFO:
+ /* returns the number of information records */
+ if (ex_get_dimension(exoid, DIM_NUM_INFO, "info records", &ldum, &dimid, NULL) != NC_NOERR)
+ *ret_int = 0;
+ else
+ *ret_int = ldum;
+ break;
+
+ 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, "ex_inquire") != NC_NOERR)
+ return EX_FATAL;
+ *ret_int = ldum;
+ break;
+
+ case EX_INQ_EB_PROP:
+ /* returns the number of element block properties */
+ *ret_int = ex_get_num_props (exoid, EX_ELEM_BLOCK);
+ break;
+
+ case EX_INQ_NS_PROP:
+ /* returns the number of node set properties */
+ *ret_int = ex_get_num_props (exoid, EX_NODE_SET);
+ break;
+
+ case EX_INQ_SS_PROP:
+ /* returns the number of side set properties */
+ *ret_int = ex_get_num_props (exoid, EX_SIDE_SET);
+ break;
+
+ 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)
+ *ret_int = 0;
+ else
+ *ret_int = ldum;
+ break;
+
+ case EX_INQ_EM_PROP:
+ /* returns the number of element map properties */
+ *ret_int = ex_get_num_props (exoid, EX_ELEM_MAP);
+ break;
+
+ 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)
+ *ret_int = 0;
+ else
+ *ret_int = ldum;
+ break;
+
+ case EX_INQ_NM_PROP:
+ /* returns the number of node map properties */
+ *ret_int = ex_get_num_props (exoid, EX_NODE_MAP);
+ break;
+
+ 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;
+ 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;
+ 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;
+ break;
+
+ case EX_INQ_ES_LEN:
+ /* returns the length of the concatenated edge set edge list. */
+ ex_get_concat_set_len(exoid, ret_int,"edge",EX_EDGE_SET,DIM_NUM_ES,VAR_ES_STAT,"num_edge_es",0);
+ break;
+
+ case EX_INQ_ES_DF_LEN:
+ /* returns the length of the concatenated edge set distribution factor list. */
+ ex_get_concat_set_len(exoid, ret_int,"edge",EX_EDGE_SET,DIM_NUM_ES,VAR_ES_STAT,"num_df_es",1);
+ break;
+
+ case EX_INQ_EDGE_PROP:
+ /* returns the number of integer properties stored for each edge block. This includes the "ID" property. */
+ *ret_int = ex_get_num_props( exoid, EX_EDGE_BLOCK );
+ break;
+
+ case EX_INQ_ES_PROP:
+ /* returns the number of integer properties stored for each edge set.. This includes the "ID" property */
+ *ret_int = ex_get_num_props( exoid, EX_EDGE_SET );
+ break;
+
+ 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;
+ 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;
+ 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;
+ break;
+
+ case EX_INQ_FS_LEN:
+ /* returns the length of the concatenated edge set edge list. */
+ ex_get_concat_set_len(exoid, ret_int,"face",EX_FACE_SET,DIM_NUM_FS,VAR_FS_STAT,"num_face_fs",0);
+ break;
+
+ case EX_INQ_FS_DF_LEN:
+ /* returns the length of the concatenated edge set distribution factor list. */
+ ex_get_concat_set_len(exoid, ret_int,"face",EX_FACE_SET,DIM_NUM_FS,VAR_FS_STAT,"num_df_fs",1);
+ break;
+
+ case EX_INQ_FACE_PROP:
+ /* returns the number of integer properties stored for each edge block. This includes the "ID" property. */
+ *ret_int = ex_get_num_props( exoid, EX_FACE_BLOCK );
+ break;
+
+ case EX_INQ_FS_PROP:
+ /* returns the number of integer properties stored for each edge set.. This includes the "ID" property */
+ *ret_int = ex_get_num_props( exoid, EX_FACE_SET );
+ break;
+
+ 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;
+ break;
+
+ case EX_INQ_ELS_LEN:
+ /* returns the length of the concatenated element set element list. */
+ ex_get_concat_set_len(exoid, ret_int,"element",EX_ELEM_SET,DIM_NUM_ELS,VAR_ELS_STAT,"num_ele_els",0);
+ break;
+
+ case EX_INQ_ELS_DF_LEN:
+ /* returns the length of the concatenated element set distribution factor list. */
+ ex_get_concat_set_len(exoid, ret_int,"element",EX_ELEM_SET,DIM_NUM_ELS,VAR_ELS_STAT,"num_df_els",1);
+ break;
+
+ case EX_INQ_ELS_PROP:
+ /* returns the number of integer properties stored for each element set. */
+ *ret_int = ex_get_num_props( exoid, EX_ELEM_SET );
+ break;
+
+ 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;
+ 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;
+ 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;
+ break;
+
+ default:
+ *ret_int = 0;
+ exerrval = EX_FATAL;
+ sprintf(errmsg, "Error: invalid inquiry %d", req_info);
+ ex_err("ex_inquire",errmsg,exerrval);
+ return(EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/cbind/src/exopen.c b/exodus/cbind/src/exopen.c
similarity index 55%
rename from cbind/src/exopen.c
rename to exodus/cbind/src/exopen.c
index 69f0f46..4ac3124 100644
--- a/cbind/src/exopen.c
+++ b/exodus/cbind/src/exopen.c
@@ -56,17 +56,62 @@
#include "exodusII.h"
#include "exodusII_int.h"
-/*!
- * opens an existing EXODUS II file (or EXODUS II history file) and returns
- * an id that can subsequently be used to refer to the file. Multiple files
- * may be open simultaneously.
- * \param path exodus filename path
- * \param mode access mode w/r
- * \param[out] comp_ws computer word size
- * \param[out] io_ws storage word size
- * \param[out] version EXODUSII interface version number
- * \param run_version EXODUSII version number of linked library
- * \return exoid exodus file id
+/*!
+
+The function ex_open() opens an existing exodus file and returns
+an ID that can subsequently be used to refer to the file, the word
+size of the floating point values stored in the file, and the version
+of the exodus database (returned as a ``float'', regardless of the
+compute or I/O word size). Multiple files may be ``open'' simultaneously.
+
+\return In case of an error, ex_open() returns a negative
+number. Possible causes of errors include:
+ - The specified file does not exist.
+ - The mode specified is something other than the predefined constant \fparam{EX_READ} or \fparam{EX_WRITE}.
+ - Database version is earlier than 2.0.
+
+\param path The file name of the exodus file. This can be given as either an
+ absolute path name (from the root of the file system) or a relative
+ path name (from the current directory).
+
+\param mode Access mode. Use one of the following predefined constants:
+ - \fparam{EX_READ} To open the file just for reading.
+ - \fparam{EX_WRITE} To open the file for writing and reading.
+
+\param[in,out] comp_ws The word size in bytes (0, 4 or 8) of the floating point variables
+ used in the application program. If 0 (zero) is passed, the default
+ size of floating point values for the machine will be used and
+ returned in this variable. WARNING: all exodus functions requiring
+ reals must be passed reals declared with this passed in or returned
+ compute word size (4 or 8).
+
+
+\param[in,out] io_ws The word size in bytes (0, 4 or 8) of the floating
+ point data as they are stored in the exodus file. If the word
+ size does not match the word size of data stored in the file,
+ a fatal error is returned. If this argument is 0, the word size
+ of the floating point data already stored in the file is returned.
+
+\param[out] version Returned exodus database version number.
+
+The following opens an exodus file named \file{test.exo} for read
+only, using default settings for compute and I/O word sizes:
+
+\code
+#include "exodusII.h"
+int CPU_word_size,IO_word_size, exoid;
+float version;
+
+CPU_word_size = sizeof(float); \co{float or double}
+IO_word_size = 0; \co{use what is stored in file}
+
+\comment{open exodus files}
+exoid = ex_open ("test.exo", \co{filename path}
+ EX_READ, \co{access mode = READ}
+ &CPU_word_size, \co{CPU word size}
+ &IO_word_size, \co{IO word size}
+ &version); \co{ExodusII library version}
+\endcode
*/
int ex_open_int (const char *path,
@@ -77,9 +122,12 @@ int ex_open_int (const char *path,
int run_version)
{
int exoid;
- int status;
+ int status, stat_att, stat_dim;
+ nc_type att_type = NC_NAT;
+ size_t att_len = 0;
int old_fill;
int file_wordsize;
+ int dim_str_name;
char errmsg[MAX_ERR_LENGTH];
exerrval = 0; /* clear error code */
@@ -92,7 +140,7 @@ int ex_open_int (const char *path,
int run_version_minor = run_version % 100;
int lib_version_major = EX_API_VERS_NODOT / 100;
int lib_version_minor = EX_API_VERS_NODOT % 100;
- fprintf(stderr, "EXODUSII: Warning: This code was compiled with exodusII version %d.%02d,\n but was linked with exodusII library version %d.%02d\n This is probably an error in the build process of this code.\n",
+ fprintf(stderr, "EXODUS: Warning: This code was compiled with exodus version %d.%02d,\n but was linked with exodus library version %d.%02d\n This is probably an error in the build process of this code.\n",
run_version_major, run_version_minor, lib_version_major, lib_version_minor);
}
@@ -104,10 +152,40 @@ int ex_open_int (const char *path,
#endif
{
/* NOTE: netCDF returns an id of -1 on an error - but no error code! */
- if (status == 0)
+ if (status == 0) {
exerrval = EX_FATAL;
- else
- exerrval = status;
+ }
+ else {
+ /* 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
+ compile-time define since we could be using a shareable
+ netcdf library, so the netcdf4 capabilities aren't known
+ until runtime...
+
+ Netcdf-4.X does not (yet?) have a function that can be
+ queried to determine whether the library being used was
+ compiled with --enable-netcdf4, so that isn't very
+ helpful..
+
+ At this time, query the beginning of the file and see if it
+ is an HDF-5 file and if it is assume that the open failure
+ is due to the netcdf library not enabling netcdf4 features...
+ */
+ int type = 0;
+ ex_check_file_type(path, &type);
+
+ if (type == 5) {
+ /* This is an hdf5 (netcdf4) file. Since the nc_open failed,
+ the assumption is that the netcdf doesn't have netcdf4
+ capabilities enabled. Tell the user...
+ */
+ fprintf(stderr,
+ "EXODUS: Error: Attempting to open the netcdf-4 file: '%s'\n\twith a netcdf library that does not support netcdf-4\n",
+ path);
+ }
+ exerrval = status;
+ }
sprintf(errmsg,"Error: failed to open %s read only",path);
ex_err("ex_open",errmsg,exerrval);
return(EX_FATAL);
@@ -133,9 +211,7 @@ int ex_open_int (const char *path,
}
/* turn off automatic filling of netCDF variables */
-
- if ((status = nc_set_fill (exoid, NC_NOFILL, &old_fill)) != NC_NOERR)
- {
+ if ((status = nc_set_fill (exoid, NC_NOFILL, &old_fill)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to set nofill mode in file id %d",
@@ -143,6 +219,24 @@ int ex_open_int (const char *path,
ex_err("ex_open", errmsg, exerrval);
return (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);
+ if(stat_att != NC_NOERR || stat_dim != NC_NOERR) {
+ nc_redef(exoid);
+ if (stat_att != NC_NOERR) {
+ int max_so_far = 32;
+ status=nc_put_att_int(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, NC_INT, 1, &max_so_far);
+ }
+
+ /* If the DIM_STR_NAME variable does not exist on the database, we need to add it now. */
+ if(stat_dim != NC_NOERR) {
+ /* Not found; set to default value of 32+1. */
+ int max_name = ex_max_name_length < 32 ? 32 : ex_max_name_length;
+ status = nc_def_dim(exoid, DIM_STR_NAME, max_name+1, &dim_str_name);
+ }
+ nc_enddef (exoid);
+ }
}
else
{
@@ -165,8 +259,7 @@ int ex_open_int (const char *path,
}
/* check ExodusII file version - old version 1.x files are not supported */
- if (*version < 2.0)
- {
+ if (*version < 2.0) {
exerrval = EX_FATAL;
sprintf(errmsg,"Error: Unsupported file version %.2f in file id: %d",
*version, exoid);
diff --git a/cbind/src/exopts.c b/exodus/cbind/src/exopts.c
similarity index 65%
rename from cbind/src/exopts.c
rename to exodus/cbind/src/exopts.c
index 3d1fe2d..594526d 100644
--- a/cbind/src/exopts.c
+++ b/exodus/cbind/src/exopts.c
@@ -32,26 +32,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exopts - ex_opts
-*
-* entry conditions -
-* input parameters:
-* int options error reporting options mask
-*
-* exit conditions -
-* The internal error reporting options mask, exoptval, is set to the passed
-* value - no error checking is done.
-*
-* revision history -
-*
-*
-*****************************************************************************/
+
#include "exodusII.h"
#include "exodusII_int.h"
-/* init exoptval */
+/*! \cond INTERNAL */
+int ex_max_name_length = 32; /* For default compatibility with older clients */
+
#if defined(VERBOSE)
int exoptval = EX_VERBOSE; /* loud mode: set EX_VERBOSE */
#else
@@ -61,11 +48,37 @@ int exoptval = EX_VERBOSE | EX_DEBUG;/* debug mode: set EX_VERBOSE & EX_DEBUG */
int exoptval = EX_DEFAULT; /* set default global options value to NOT print error msgs*/
#endif
#endif
+/*! \endcond */
/*!
- * error reporting options mask
- * \param options error reporting options mask \sa ex_options
- */
+The function ex_opts() is used to set message reporting options.
+
+\return In case of an error, ex_opts() returns a negative number; a warning
+ will return a positive number.
+
+\param[in] options Integer option value. Current options are shown in the table below.
+
+<table>
+<tr><td> \c EX_ABORT </td><td> Causes fatal errors to force program
+ exit. (Default is false.) </td></tr>
+<tr><td> \c EX_DEBUG </td><td> Causes certain messages to print
+ for debug use. (Default is false.)</td></tr>
+<tr><td> \c EX_VERBOSE</td><td> Causes all error messages to print when true,
+ otherwise no error messages will print. (Default is false.)</td></tr>
+</table>
+
+\note Values may be OR'ed together to provide any combination
+ of these capabilities.
+
+For example, the following will cause all messages to print
+and will cause the program to exit upon receipt of fatal error:
+
+\code
+#include "exodusII.h"
+ex_opts(EX_ABORT|EX_VERBOSE);
+\endcode
+
+*/
void ex_opts (int options)
{
exerrval = 0; /* clear error code */
diff --git a/cbind/src/expatn.c b/exodus/cbind/src/expatn.c
similarity index 92%
rename from cbind/src/expatn.c
rename to exodus/cbind/src/expatn.c
index 4af82be..031f845 100644
--- a/cbind/src/expatn.c
+++ b/exodus/cbind/src/expatn.c
@@ -67,11 +67,11 @@ int ex_put_attr_names(int exoid,
int blk_id,
char* names[])
{
- int status;
int varid, numattrdim, blk_id_ndx;
- size_t num_attr, start[2], count[2];
+ size_t num_attr;
+
+ int status;
char errmsg[MAX_ERR_LENGTH];
- size_t i;
exerrval = 0; /* clear error code */
@@ -197,21 +197,8 @@ int ex_put_attr_names(int exoid,
}
/* write out the attributes */
- for (i = 0; i < num_attr; i++) {
- start[0] = i;
- start[1] = 0;
+ status = ex_put_names_internal(exoid, varid, num_attr, names, blk_type,
+ "attribute", "ex_put_attr_names");
- count[0] = 1;
- count[1] = strlen(names[i])+1;
-
- if ((status = nc_put_vara_text(exoid, varid, start, count, (void*) names[i])) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to put attribute namess for %s %d in file id %d",
- ex_name_of_object(blk_type),blk_id,exoid);
- ex_err("ex_put_attr_names",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
- return(EX_NOERR);
+ return(status);
}
diff --git a/cbind/src/expatt.c b/exodus/cbind/src/expatt.c
similarity index 100%
rename from cbind/src/expatt.c
rename to exodus/cbind/src/expatt.c
diff --git a/cbind/src/expattp.c b/exodus/cbind/src/expattp.c
similarity index 99%
rename from cbind/src/expattp.c
rename to exodus/cbind/src/expattp.c
index 3093742..76b50b6 100644
--- a/cbind/src/expattp.c
+++ b/exodus/cbind/src/expattp.c
@@ -204,7 +204,7 @@ int ex_put_attr_param (int exoid,
}
/* inquire previously defined dimensions */
- if ((status = nc_inq_dimid(exoid, DIM_STR, &strdim)) != NC_NOERR) {
+ if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &strdim)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to get string length in file id %d",exoid);
diff --git a/cbind/src/expblk.c b/exodus/cbind/src/expblk.c
similarity index 96%
rename from cbind/src/expblk.c
rename to exodus/cbind/src/expblk.c
index 316f16c..5de0cb7 100644
--- a/cbind/src/expblk.c
+++ b/exodus/cbind/src/expblk.c
@@ -82,7 +82,7 @@ int ex_put_block( int exoid,
{
int status;
int arbitrary_polyhedra = 0; /* 1 if block is arbitrary 2d polyhedra type; 2 if 3d polyhedra */
- int varid, dimid, dims[2], blk_id_ndx, blk_stat, strdim;
+ int att_name_varid, varid, dimid, dims[2], blk_id_ndx, blk_stat, strdim;
size_t start[2];
int num_blk;
size_t temp;
@@ -361,7 +361,7 @@ int ex_put_block( int exoid,
}
/* inquire previously defined dimensions */
- if ((status = nc_inq_dimid(exoid, DIM_STR, &strdim)) != NC_NOERR) {
+ if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &strdim)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to get string length in file id %d",exoid);
@@ -373,7 +373,7 @@ int ex_put_block( int exoid,
dims[0] = numattrdim;
dims[1] = strdim;
- if ((status = nc_def_var(exoid, vattnam, NC_CHAR, 2, dims, &varid)) != NC_NOERR) {
+ if ((status = nc_def_var(exoid, vattnam, NC_CHAR, 2, dims, &att_name_varid)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to define %s attribute name array in file id %d",
@@ -528,6 +528,24 @@ int ex_put_block( int exoid,
return (EX_FATAL);
}
+ /* Output a dummy empty attribute name in case client code doesn't
+ write anything; avoids corruption in some cases.
+ */
+ if (num_attr_per_entry > 0) {
+ size_t count[2];
+ char *text = "";
+ size_t i;
+
+ count[0] = 1;
+ start[1] = 0;
+ count[1] = strlen(text)+1;
+
+ for (i = 0; i < num_attr_per_entry; i++) {
+ start[0] = i;
+ nc_put_vara_text(exoid, att_name_varid, start, count, text);
+ }
+ }
+
return (EX_NOERR);
/* Fatal error: exit definition mode and return */
diff --git a/cbind/src/expcab.c b/exodus/cbind/src/expcab.c
similarity index 99%
rename from cbind/src/expcab.c
rename to exodus/cbind/src/expcab.c
index 129d29f..dc5a363 100644
--- a/cbind/src/expcab.c
+++ b/exodus/cbind/src/expcab.c
@@ -95,7 +95,7 @@ int ex_put_concat_all_blocks (int exoid,
exerrval = 0; /* clear error code */
/* inquire previously defined dimensions */
- if ((status = nc_inq_dimid(exoid, DIM_STR, &strdim)) != NC_NOERR) {
+ if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &strdim)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to get string length in file id %d",exoid);
diff --git a/cbind/src/expclb.c b/exodus/cbind/src/expclb.c
similarity index 99%
rename from cbind/src/expclb.c
rename to exodus/cbind/src/expclb.c
index 5e1ca5d..4275981 100644
--- a/cbind/src/expclb.c
+++ b/exodus/cbind/src/expclb.c
@@ -161,7 +161,7 @@ int ex_put_concat_elem_block (int exoid,
}
/* inquire previously defined dimensions */
- if ((status = nc_inq_dimid(exoid, DIM_STR, &strdim)) != NC_NOERR) {
+ if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &strdim)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to get string length in file id %d",exoid);
diff --git a/exodus/cbind/src/expcns.c b/exodus/cbind/src/expcns.c
new file mode 100644
index 0000000..9faa138
--- /dev/null
+++ b/exodus/cbind/src/expcns.c
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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_put_concat_sets()(exoid, EX_NODE_SET, &set_specs)
+
+The function ex_put_concat_node_sets() writes the node set ID's, node
+sets node count array, node sets distribution factor count array, node
+sets node list pointers array, node sets distribution factor pointer,
+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. Writing concatenated node sets is more
+efficient than writing individual node sets. See #Efficiency for a
+discussion of efficiency issues.
+
+Because the distribution factors are floating point values, the
+application code must declare the array passed to be the appropriate
+type (\c float or \c double) to match the compute word size passed in
+ex_create() or ex_open().
+
+\return In case of an error, ex_put_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()
+ - data file opened for read only.
+ - data file not initialized properly with call to ex_put_init().
+ - the number of node sets specified in a call to ex_put_init() was zero or has been exceeded.
+ - a node set with the same ID has already been stored.
+ - the number of distribution factors specified for one of the
+ node sets is not zero and is not equal to the number of nodes in the
+ same node set.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create()
+ or ex_open().
+
+\param[in] node_set_ids Array containing the node set ID for each set.
+
+\param[in] num_nodes_per_set Array containing the number of nodes for each set.
+
+\param[in] num_dist_per_set Array containing the number of distribution factors for each set.
+
+\param[in] node_sets_node_index Array containing the indices into the \c node_set_node_list which
+ are the locations of the first node for each set. These indices are
+ 0-based. Pass \c NULL for remaining parameters to just set the
+ nodeset parameters and not output nodeset data.
+
+\param[in] node_sets_df_index Array containing the indices into the \c node_set_dist_list which
+ are the locations of the first distribution factor for each set. These
+ indices are 0-based.
+
+\param[in] node_sets_node_list Array containing the nodes for all sets. Internal node IDs are used in
+ this list (See Section LocalNodeIds).
+\param[in] node_sets_dist_fact Array containing the distribution factors for all sets.
+
+
+For example, the following code will write out two node sets
+in a concatenated format:
+
+\code
+int ids[2], num_nodes_per_set[2], node_ind[2], node_list[8],
+ num_df_per_set[2], df_ind[2], error, exoid;
+
+float dist_fact[8];
+
+ids[0] = 20; ids[1] = 21;
+num_nodes_per_set[0] = 5; num_nodes_per_set[1] = 3;
+
+node_ind[0] = 0; node_ind[1] = 5;
+
+node_list[0] = 100; node_list[1] = 101; node_list[2] = 102;
+node_list[3] = 103; node_list[4] = 104;
+node_list[5] = 200; node_list[6] = 201; node_list[7] = 202;
+
+num_df_per_set[0] = 5; num_df_per_set[1] = 3;
+
+df_ind[0] = 0; df_ind[1] = 5;
+
+dist_fact[0] = 1.0; dist_fact[1] = 2.0; dist_fact[2] = 3.0;
+dist_fact[3] = 4.0; dist_fact[4] = 5.0;
+dist_fact[5] = 1.1; dist_fact[6] = 2.1;
+dist_fact[7] = 3.1;
+
+error = ex_put_concat_node_sets (exoid, ids, num_nodes_per_set,
+ num_df_per_set, node_ind, df_ind,
+ node_list, dist_fact);
+\endcode
+
+ */
+
+int ex_put_concat_node_sets (int exoid,
+ int *node_set_ids,
+ int *num_nodes_per_set,
+ int *num_dist_per_set,
+ int *node_sets_node_index,
+ int *node_sets_df_index,
+ 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_dist_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_put_concat_sets(exoid, EX_NODE_SET, &set_specs);
+}
diff --git a/cbind/src/expcon.c b/exodus/cbind/src/expcon.c
similarity index 70%
rename from cbind/src/expcon.c
rename to exodus/cbind/src/expcon.c
index 4b5be25..22645fa 100644
--- a/cbind/src/expcon.c
+++ b/exodus/cbind/src/expcon.c
@@ -32,43 +32,55 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expcon - ex_put_coord_names
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* char* coord_names ptr array of coordinate names
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
#include <string.h>
+
/*!
- * writes the names of the coordinate arrays to the database
- * \param exoid exodus file id
- * \param coord_names ptr array of coordinate names
+
+The function ex_put_coord_names() writes the names (\p
+MAX_STR_LENGTH-characters in length) of the coordinate arrays to the
+database. Memory must be allocated for the character strings before
+this function is invoked.
+
+In case of an error, ex_put_coord_names() 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().
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] coord_names Array containing \c num_dim names of length \p MAX_STR_LENGTH
+ of the nodal coordinate arrays.
+
+The following coding will write the coordinate names to an
+open exodus file :
+
+\code
+int error, exoid;
+
+char *coord_names[3];
+coord_names[0] = "xcoor";
+coord_names[1] = "ycoor";
+coord_names[2] = "zcoor";
+
+error = ex_put_coord_names (exoid, coord_names);
+\endcode
+
*/
int ex_put_coord_names (int exoid,
char *coord_names[])
{
int status;
- size_t i;
int ndimdim, varid;
- size_t num_dim, start[2], count[2];
+ size_t num_dim;
char errmsg[MAX_ERR_LENGTH];
exerrval = 0; /* clear error code */
- /* inquire previously defined dimensions */
if ((status = nc_inq_dimid(exoid, DIM_NUM_DIM, &ndimdim)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
@@ -96,24 +108,9 @@ int ex_put_coord_names (int exoid,
return (EX_FATAL);
}
-
/* write out coordinate names */
+ status = ex_put_names_internal(exoid, varid, num_dim, coord_names, EX_COORDINATE,
+ "", "ex_put_coord_names");
- for (i=0; i<num_dim; i++) {
- start[0] = i;
- start[1] = 0;
-
- count[0] = 1;
- count[1] = strlen(coord_names[i]) + 1;
-
- if ((status = nc_put_vara_text(exoid, varid, start, count, coord_names[i])) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to store coordinate name %d in file id %d",
- (int)i,exoid);
- ex_err("ex_put_coord_names",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
- return (EX_NOERR);
+ return (status);
}
diff --git a/cbind/src/expconn.c b/exodus/cbind/src/expconn.c
similarity index 100%
rename from cbind/src/expconn.c
rename to exodus/cbind/src/expconn.c
diff --git a/cbind/src/expcor.c b/exodus/cbind/src/expcor.c
similarity index 76%
rename from cbind/src/expcor.c
rename to exodus/cbind/src/expcor.c
index 3006066..5c6ad9a 100644
--- a/cbind/src/expcor.c
+++ b/exodus/cbind/src/expcor.c
@@ -53,13 +53,60 @@
#include "exodusII.h"
#include "exodusII_int.h"
-/*!
- * writes the coordinates of all the nodes in the model
- * Only writes the 'non-null' arrays.
- * \param exoid exodus file id
- * \param x_coor X coord array
- * \param y_coor y coord array
- * \param z_coor z coord array
+/*!
+The function ex_put_coord() writes the nodal coordinates of the nodes
+in the model. The function ex_put_init() must be invoked before this
+call is made.
+
+Because the coordinates are floating point values, the application
+code must declare the arrays passed to be the appropriate type
+(\e float or \e double) to match the compute word size passed in
+ex_create() or ex_open().
+
+\return In case of an error, ex_put_coord() 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().
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] x_coor The X-coordinates of the nodes. If this is \c NULL, the
+ X-coordinates will not be written.
+\param[in] y_coor The Y-coordinates of the nodes. These are stored only if \c num_dim
+ > 1; otherwise, pass in \c NULL. If this is \c NULL, the
+ Y-coordinates will not be written.
+\param[in] z_coor The Z-coordinates of the nodes. These are stored only if \c num_dim
+ > 2; otherwise, pass in \c NULL. If this is \c NULL, the
+ Z-coordinates will not be written.
+
+The following will write the nodal coordinates to an open
+exodus file :
+
+\code
+int error, exoid;
+
+// \comment{if file opened with compute word size of sizeof(float)}
+float x[8], y[8], z[8];
+
+// \comment{write nodal coordinates values to database}
+x[0] = 0.0; y[0] = 0.0; z[0] = 0.0;
+x[1] = 0.0; y[1] = 0.0; z[1] = 1.0;
+x[2] = 1.0; y[2] = 0.0; z[2] = 1.0;
+x[3] = 1.0; y[3] = 0.0; z[3] = 0.0;
+x[4] = 0.0; y[4] = 1.0; z[4] = 0.0;
+x[5] = 0.0; y[5] = 1.0; z[5] = 1.0;
+x[6] = 1.0; y[6] = 1.0; z[6] = 1.0;
+x[7] = 1.0; y[7] = 1.0; z[7] = 0.0;
+
+error = ex_put_coord(exoid, x, y, z);
+
+// \comment{Do the same as the previous call in three separate calls}
+error = ex_put_coord(exoid, x, NULL, NULL);
+error = ex_put_coord(exoid, NULL, y, NULL);
+error = ex_put_coord(exoid, NULL, NULL, z);
+\endcode
+
*/
int ex_put_coord (int exoid,
diff --git a/cbind/src/expcset.c b/exodus/cbind/src/expcset.c
similarity index 100%
rename from cbind/src/expcset.c
rename to exodus/cbind/src/expcset.c
diff --git a/cbind/src/expcss.c b/exodus/cbind/src/expcss.c
similarity index 100%
rename from cbind/src/expcss.c
rename to exodus/cbind/src/expcss.c
diff --git a/cbind/src/expean.c b/exodus/cbind/src/expean.c
similarity index 100%
rename from cbind/src/expean.c
rename to exodus/cbind/src/expean.c
diff --git a/cbind/src/expeat.c b/exodus/cbind/src/expeat.c
similarity index 56%
rename from cbind/src/expeat.c
rename to exodus/cbind/src/expeat.c
index 00f12ac..19b8c0b 100644
--- a/cbind/src/expeat.c
+++ b/exodus/cbind/src/expeat.c
@@ -32,33 +32,42 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expeat - ex_put_elem_attr
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int elem_blk_id element block id
-* float* attrib array of attributes
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * writes the attributes for an element block
- * \param exoid exodus file id
- * \param elem_blk_id element block id
- * \param attrib array of attributes
- * \deprecated Use ex_put_attr()(exoid, EX_ELEM_BLOCK, elem_blk_id, attrib)
- */
+\deprecated Use ex_put_attr()(exoid, EX_ELEM_BLOCK, elem_blk_id, attrib)
+
+The function ex_put_elem_attr() writes the attributes for an element
+block. Each element in the element block must have the same number of
+attributes, so there are(\c num_attr x \c num_elem_this_blk)
+attributes for each element block. The function ex_put_elem_block()
+must be invoked before this call is made.
+
+Because the attributes are floating point values, the application code
+must declare the array passed to be the appropriate type (\c float or
+\c double) to match the compute word size passed in ex_create() or
+ex_open().
+
+\return In case of an error, ex_put_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()
+ - data file opened for read only.
+ - data file not initialized properly with call to ex_put_init().
+ - ex_put_elem_block() was not called previously for specified element block ID.
+ - ex_put_elem_block() was called with 0 attributes specified.
+
+\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[in] attrib Size [num_elem_this_blk*num_attr]
+ The list of attributes for the element block. The \c num_attr
+ index cycles faster.
+
+Refer to the code example in ex_put_elem_block() for an example of
+writing the attributes array for an element block.
+
+*/
int ex_put_elem_attr (int exoid,
int elem_blk_id,
diff --git a/cbind/src/expecpp.c b/exodus/cbind/src/expecpp.c
similarity index 100%
rename from cbind/src/expecpp.c
rename to exodus/cbind/src/expecpp.c
diff --git a/cbind/src/expelb.c b/exodus/cbind/src/expelb.c
similarity index 50%
rename from cbind/src/expelb.c
rename to exodus/cbind/src/expelb.c
index 676fbb2..ad82e56 100644
--- a/cbind/src/expelb.c
+++ b/exodus/cbind/src/expelb.c
@@ -51,18 +51,77 @@
*****************************************************************************/
#include "exodusII.h"
-#include "exodusII_int.h"
-#include <string.h>
/*!
- * writes the parameters used to describe an element block
- * \param exoid exodus file id
- * \param elem_blk_id block identifier
- * \param elem_type element type string
- * \param num_elem_this_blk number of elements in the element blk
- * \param num_nodes_per_elem number of nodes per element block
- * \param num_attr_per_elem number of attributes per element
- * \deprecated Use ex_put_block()(exoid, EX_ELEM_BLOCK, elem_blk_id, elem_type, num_elem_this_blk, num_nodes_per_elem, 0, 0, num_attr_per_elem)
+\deprecated Use ex_put_block()(exoid, EX_ELEM_BLOCK, elem_blk_id, elem_type, num_elem_this_blk, num_nodes_per_elem, 0, 0, num_attr_per_elem)
+
+The function ex_put_elem_block() writes the parameters used to
+describe an element block.
+
+\return In case of an error, ex_put_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()
+ - data file opened for read only.
+ - data file not initialized properly with call to ex_put_init().
+ - an element block with the same ID has already been specified.
+ - the number of element blocks specified in the call to ex_put_init() has been exceeded.
+
+\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[in] elem_type The type of elements in the element block. The maximum length of this
+ string is \p MAX_STR_LENGTH .
+\param[in] num_elem_this_blk The number of elements in the element block.
+\param[in] num_nodes_per_elem The number of nodes per element in the element block.
+\param[in] num_attr_per_elem The number of attributes per element in the element block.
+
+For example, the following code segment will initialize an element
+block with an ID of 10, write out the connectivity array, and write
+out the element attributes array:
+
+\code
+int id, error, exoid, num_elem_in_blk, num_nodes_per_elem, *connect, num_attr;
+float *attrib;
+
+\comment{write element block parameters}
+id = 10;
+num_elem_in_blk = 2;
+num_nodes_per_elem = 4; \comment{elements are 4-node shells}
+num_attr = 1; \comment{one attribute per element}
+
+error = ex_put_elem_block(exoid, id, "SHELL", num_elem_in_blk,
+ num_nodes_per_elem, num_attr);
+
+\comment{write element connectivity}
+connect = (int *)calloc(num_elem_in_blk*num_nodes_per_elem, sizeof(int));
+
+\comment{fill connect with node numbers; nodes for first elemen}
+connect[0] = 1; connect[1] = 2; connect[2] = 3; connect[3] = 4;
+
+\comment{nodes for second element}
+connect[4] = 5; connect[5] = 6; connect[6] = 7; connect[7] = 8;
+
+error = ex_put_elem_conn (exoid, id, connect);
+
+\comment{write element block attributes}
+attrib = (float *) calloc (num_attr*num_elem_in_blk, sizeof(float));
+
+for (i=0, cnt=0; i < num_elem_in_blk; i++) {
+ for (j=0; j < num_attr; j++, cnt++) {
+ attrib[cnt] = 1.0;
+ }
+}
+
+error = ex_put_elem_attr (exoid, id, attrib);
+
+\comment{Same result using non-deprecated code}
+error = ex_put_block(exoid, EX_ELEM_BLOCK, id, "SHELL", num_elem_in_blk,
+ num_nodes_per_elem, 0, 0, num_attr);
+error = ex_put_conn (exoid, EX_ELEM_BLOCK, id, connect);
+error = ex_put_attr (exoid, EX_ELEM_BLOCK, id, attrib);
+
+\endcode
+
*/
int ex_put_elem_block (int exoid,
diff --git a/cbind/src/expelc.c b/exodus/cbind/src/expelc.c
similarity index 63%
rename from cbind/src/expelc.c
rename to exodus/cbind/src/expelc.c
index 0e07b41..5aa336c 100644
--- a/cbind/src/expelc.c
+++ b/exodus/cbind/src/expelc.c
@@ -34,16 +34,33 @@
*/
#include "exodusII.h"
-#include "exodusII_int.h"
-#include <stdlib.h> /* for free() */
/*!
- * writes the connectivity array for an element block
- * \param exoid exodus file id
- * \param elem_blk_id element block id
- * \param *connect connectivity array
- * \deprecated Use ex_put_conn()(exoid, EX_ELEM_BLOCK, elem_blk_id, connect, 0, 0)
- */
+\deprecated Use ex_put_conn()(exoid, EX_ELEM_BLOCK, elem_blk_id, connect, 0, 0)
+
+The function ex_put_elem_conn() writes the connectivity array for an
+element block. The function ex_put_elem_block() must be invoked before
+this call is made.
+
+\return In case of an error, ex_put_elem_conn() returns a negative
+number; a warning will return a positive number. Possible causes of
+errors include:
+ - data file opened for read only.
+ - data file not initialized properly with call to ex_put_init().
+ - ex_put_elem_block() was not called previously.
+
+
+\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[in] connect Size [num_elem_this_blk,num_nodes_per_elem],
+ The connectivity array; a list of nodes (internal node IDs;
+ See Section LocalNodeIds) that define each element in the element
+ block. The node index cycles faster than the element index.
+
+Refer to the code example in ex_put_elem_block() for an example of
+writing the connectivity array for an element block.
+
+*/
int ex_put_elem_conn (int exoid,
int elem_blk_id,
diff --git a/cbind/src/expem.c b/exodus/cbind/src/expem.c
similarity index 100%
rename from cbind/src/expem.c
rename to exodus/cbind/src/expem.c
diff --git a/cbind/src/expenm.c b/exodus/cbind/src/expenm.c
similarity index 58%
rename from cbind/src/expenm.c
rename to exodus/cbind/src/expenm.c
index 6787adc..a12bc1e 100644
--- a/cbind/src/expenm.c
+++ b/exodus/cbind/src/expenm.c
@@ -32,32 +32,46 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expenm - ex_put_elem_num_map
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int* elem_map element numbering map array
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
-#include "exodusII_int.h"
-#include <stdlib.h> /* for free() */
/*!
- * writes out the element numbering map to the database; this allows
- * element numbers to be non-contiguous
- * \param exoid exodus file id
- * \param elem_map element numbering map array
- * \deprecated Use ex_put_id_map()(exoid, EX_ELEM_MAP, elem_map)
+\deprecated Use ex_put_id_map()(exoid, EX_ELEM_MAP, elem_map)
+
+The function ex_put_elem_num_map() writes out the optional element
+number map to the database. See Section LocalElementIds for a description
+of the element number map. The function ex_put_init() must be invoked
+before this call is made.
+
+\return In case of an error, ex_put_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()
+ - data file opened for read only.
+ - data file not initialized properly with call to ex_put_init().
+ - an element number map already exists in the file.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] elem_map The element number map.
+
+The following code generates a default element number map and outputs
+it to an open exodus file. This is a trivial case and included just
+for illustration. Since this map is optional, it should be written out
+only if it contains something other than the default map.
+
+\code
+int error, exoid;
+int *elem_map = (int *)calloc(num_elem, sizeof(int));
+
+for (i=1; i <= num_elem; i++)
+ elem_map[i-1] = i;
+
+error = ex_put_elem_num_map(exoid, elem_map);
+
+\comment{Equivalent using non-deprecated function}
+error = ex_put_id_map(exoid, EX_ELEM_MAP, elem_map);
+\endcode
+
*/
int ex_put_elem_num_map (int exoid,
diff --git a/exodus/cbind/src/expev.c b/exodus/cbind/src/expev.c
new file mode 100644
index 0000000..60aae32
--- /dev/null
+++ b/exodus/cbind/src/expev.c
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************
+*
+* expev - ex_put_elem_var
+*
+* entry conditions -
+* input parameters:
+* int exoid exodus file id
+* int time_step time step number
+* int elem_var_index element variable index
+* int elem_blk_id element block id
+* int num_elem_this_blk number of elements in this block
+*
+* exit conditions -
+*
+*
+* exit conditions -
+*
+* revision history -
+*
+*
+*****************************************************************************/
+
+#include <stdlib.h>
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+/*!
+\deprecated Use ex_put_var()(exoid, time_step, EX_ELEM_BLOCK, elem_var_index, elem_blk_id, num_elem_this_blk, elem_var_vals)
+
+The function ex_put_elem_var() writes the values of a single element
+variable for one element block at one time step. It is recommended,
+but not required, to write the element variable truth table (with
+ex_put_elem_var_tab() before this function is invoked for better
+efficiency. See #Efficiency for a discussion of
+efficiency issues.
+
+Because element variables are floating point values, the application
+code must declare the array passed to be the appropriate type (\c
+float or \c double) to match the compute word size passed in
+ex_create() or ex_open().
+
+\return In case of an error, ex_put_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()
+ - data file opened for read only.
+ - data file not initialized properly with call to ex_put_init().
+ - invalid element block ID.
+ - ex_put_elem_block() not called previously to specify parameters for this element block.
+ - ex_put_variable_param() not called previously specifying the number of element variables.
+ - an element variable truth table was stored in the file but
+ contains a zero (indicating no valid element variable) for the
+ specified element block and element variable.
+
+\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().
+ This is essentially a counter that is incremented only when results
+ variables are output. The first time step is 1.
+\param[in] elem_var_index The index of the element variable. The first variable has
+ an index of 1.
+\param[in] elem_blk_id The element block ID.
+\param[in] num_elem_this_blk The number of elements in the given element block.
+\param[in] elem_var_vals Array of \c num_elem_this_blk values of the \c elem_var_index-th
+ element variable for the element block with ID of \c elem_blk_id
+ at the \c time_step-th time step.
+
+The following coding will write out all of the element variables for a
+single time step \c n to an open exodus file :
+
+\code
+int num_ele_vars, num_elem_blk, *num_elem_in_block,error,
+ exoid, n, *ebids;
+
+float *elem_var_vals;
+
+\comment{write element variables}
+for (k=1; k <= num_ele_vars; k++) {
+ for (j=0; j < num_elem_blk; j++) {
+ elem_var_vals = (float *)
+ calloc(num_elem_in_block[j], sizeof(float));
+
+ for (m=0; m < num_elem_in_block[j]; m++) {
+ \comment{simulation code fills this in}
+ elem_var_vals[m] = 10.0;
+ }
+
+ error = ex_put_elem_var (exoid, n, k, ebids[j],
+ num_elem_in_block[j], elem_var_vals);
+
+\comment {Using non-deprecated function:}
+ error = ex_put_var (exoid, n, EX_ELEM_BLOCK, k, ebids[j],
+ num_elem_in_block[j], elem_var_vals);
+
+ free (elem_var_vals);
+ }
+}
+\endcode
+
+ */
+
+int ex_put_elem_var (int exoid,
+ int time_step,
+ int elem_var_index,
+ int elem_blk_id,
+ int num_elem_this_blk,
+ const void *elem_var_vals)
+{
+ return ex_put_var(exoid, time_step, EX_ELEM_BLOCK, elem_var_index,
+ elem_blk_id, num_elem_this_blk, elem_var_vals);
+}
diff --git a/cbind/src/expfrm.c b/exodus/cbind/src/expfrm.c
similarity index 100%
rename from cbind/src/expfrm.c
rename to exodus/cbind/src/expfrm.c
diff --git a/cbind/src/expgv.c b/exodus/cbind/src/expgv.c
similarity index 56%
rename from cbind/src/expgv.c
rename to exodus/cbind/src/expgv.c
index c6bda24..c18a22c 100644
--- a/cbind/src/expgv.c
+++ b/exodus/cbind/src/expgv.c
@@ -54,14 +54,56 @@
#include "exodusII_int.h"
/*!
- * writes the values of all the global variables for a single time step to
- * the database; time step numbers are assumed to start at 1
- * \param exoid exodus file id
- * \param time_step time step number
- * \param num_glob_vars number of global vars in file
- * \param glob_var_vals array of global variable values
- * \deprecated Use ex_put_var()(exoid, time_step, EX_GLOBAL, 1, 0, num_glob_vars, glob_var_vals)
- */
+\deprecated Use ex_put_var()(exoid, time_step, EX_GLOBAL, 1, 0, num_glob_vars, glob_var_vals)
+
+The function ex_put_glob_vars() writes the values of all the global
+variables for a single time step. The function ex_put_variable_param()
+must be invoked before this call is made.
+
+Because global variables are floating point values, the application
+code must declare the array passed to be the appropriate type (\c
+float or \c double) to match the compute word size passed in
+ex_create() or ex_open().
+
+\return In case of an error, ex_put_glob_vars() 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.
+ - ex_put_variable_param() not called previously specifying
+ the number of global variables.
+
+
+\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().
+ This is essentially a counter that is incremented when results
+ variables are output. The first time step is 1.
+\param[in] num_glob_vars The number of global variables to be written to the database.
+\param[in] glob_var_vals Array of \c num_glob_vars global variable values for
+ the \c time_step-th time step.
+
+
+As an example, the following coding will write the values of all the
+global variables at one time step to an open exodus II file:
+
+\code
+int num_glo_vars, error, exoid, time_step;
+
+float *glob_var_vals
+
+\comment{write global variables}
+for (j=0; j < num_glo_vars; j++) {
+ \comment{application code fills this array}
+ glob_var_vals[j] = 10.0;
+}
+error = ex_put_glob_vars (exoid, time_step, num_glo_vars, glob_var_vals);
+
+\comment{Using non-deprecated functions:}
+error = ex_put_var (exoid, time_step, EX_GLOBAL, 1, 0, num_glo_vars, glob_var_vals);
+
+\endcode
+
+*/
int ex_put_glob_vars (int exoid,
int time_step,
diff --git a/cbind/src/expidm.c b/exodus/cbind/src/expidm.c
similarity index 100%
copy from cbind/src/expidm.c
copy to exodus/cbind/src/expidm.c
diff --git a/cbind/src/expinf.c b/exodus/cbind/src/expinf.c
similarity index 82%
rename from cbind/src/expinf.c
rename to exodus/cbind/src/expinf.c
index 585e272..e0bfcc7 100644
--- a/cbind/src/expinf.c
+++ b/exodus/cbind/src/expinf.c
@@ -32,31 +32,44 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expinf - ex_put_info
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* char* info[] ptr array of info records
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
#include <string.h>
/*!
- * writes information records to the database
- * \param exoid exodus file id
- * \param num_info count of info records to be written.
- * \param info[] ptr array of info records
+The function ex_put_info() writes information records to the
+database. The records are \c MAX_LINE_LENGTH-character strings.
+
+In case of an error, ex_put_info() 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.
+ - information records already exist in file.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] num_info The number of information records.
+\param[in] info Array containing the information records.
+
+The following code will write out three information records
+to an open exodus file -
+
+\code
+#include "exodusII.h"
+int error, exoid, num_info;
+char *info[3];
+
+\comment{write information records}
+num_info = 3;
+
+info[0] = "This is the first information record.";
+info[1] = "This is the second information record.";
+info[2] = "This is the third information record.";
+
+error = ex_put_info(exoid, num_info, info);
+\endcode
+
*/
int ex_put_info (int exoid,
diff --git a/cbind/src/expini.c b/exodus/cbind/src/expini.c
similarity index 65%
rename from cbind/src/expini.c
rename to exodus/cbind/src/expini.c
index eec715d..240abae 100644
--- a/cbind/src/expini.c
+++ b/exodus/cbind/src/expini.c
@@ -32,41 +32,48 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expini - ex_put_init
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* char* title title of file
-* int num_dim number of dimensions (per node)
-* int num_nodes number of nodes
-* int num_elem number of elements
-* int num_elem_blk number of element blocks
-* int num_node_sets number of node sets
-* int num_side_sets number of side sets
-*
-* exit conditions -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
#include <string.h>
/*!
- * writes the initialization parameters to the EXODUS II file
- * \param exoid exodus file id
- * \param title title of file
- * \param num_dim number of dimensions (per node)
- * \param num_nodes number of nodes
- * \param num_elem number of elements
- * \param num_elem_blk number of element blocks
- * \param num_node_sets number of node sets
- * \param num_side_sets number of side sets
- */
+
+The function ex_put_init() writes the initialization parameters to the
+exodus file. This function must be called once (and only once) before
+writing any data to the file.
+
+\return In case of an error, ex_put_init() 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.
+ - this routine has been called previously.
+
+\param exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param title Database title. Maximum length is \c MAX_LINE_LENGTH.
+\param num_dim The dimensionality of the database. This is the number of coordinates per node.
+\param num_nodes The number of nodal points.
+\param num_elem The number of elements.
+\param num_elem_blk The number of element blocks.
+\param num_node_sets The number of node sets.
+\param num_side_sets The number of side sets.
+
+The following code segment will initialize an open exodus file with
+the specified parameters:
+
+\code
+int num_dim, num_nods, num_el, num_el_blk, num_ns, num_ss, error, exoid;
+
+\comment{initialize file with parameters}
+num_dim = 3; num_nods = 46; num_el = 5; num_el_blk = 5;
+num_ns = 2; num_ss = 5;
+
+error = ex_put_init (exoid, "This is the title", num_dim,
+ num_nods, num_el,num_el_blk, num_ns, num_ss);
+\endcode
+
+*/
int ex_put_init (int exoid,
const char *title,
diff --git a/cbind/src/expinix.c b/exodus/cbind/src/expinix.c
similarity index 51%
rename from cbind/src/expinix.c
rename to exodus/cbind/src/expinix.c
index 944ad68..a6b0fbb 100644
--- a/cbind/src/expinix.c
+++ b/exodus/cbind/src/expinix.c
@@ -55,7 +55,7 @@
#include <string.h>
#include <assert.h>
-void write_dummy_names(int exoid, ex_entity_type obj_type)
+static void write_dummy_names(int exoid, ex_entity_type obj_type)
{
const char *routine = "write_dummy_names";
size_t start[2], count[2];
@@ -64,131 +64,168 @@ void write_dummy_names(int exoid, ex_entity_type obj_type)
size_t num_entity;
size_t i;
- ex_get_dimension(exoid, ex_dim_num_objects(obj_type), ex_name_of_object(obj_type),
+ ex_get_dimension(exoid, ex_dim_num_objects(obj_type),
+ ex_name_of_object(obj_type),
&num_entity, &varid, routine);
-
- count[0] = 1;
- start[1] = 0;
- count[1] = strlen(text)+1;
for (i = 0; i < num_entity; i++) {
start[0] = i;
+ count[0] = 1;
+
+ start[1] = 0;
+ count[1] = strlen(text)+1;
+
nc_put_vara_text(exoid, varid, start, count, text);
}
}
-#define EX_WRITE_OBJECT_PARAMS(TNAME,DNAME,SNAME,INAME,NUM_BLK,DIMVAR) \
- /* Can have nonzero model->num_elem_blk even if model->num_elem == 0 */ \
- if ((NUM_BLK) > 0) { \
- if ((status = nc_def_dim(exoid, DNAME, (size_t)(NUM_BLK), &DIMVAR)) != NC_NOERR) { \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to define number of " TNAME "s in file id %d", \
- exoid); \
- ex_err("ex_put_init_ext",errmsg,exerrval); \
- goto error_ret; /* exit define mode and return */ \
- } \
- /* ...and some variables */ \
- /* element block id status array */ \
- dim[0] = DIMVAR; \
- if ((status = nc_def_var (exoid, SNAME, NC_INT, 1, dim, &varid)) != NC_NOERR) { \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to define " TNAME " status array in file id %d",exoid); \
- ex_err("ex_put_init_ext",errmsg,exerrval); \
- goto error_ret; /* exit define mode and return */ \
- } \
- \
- /* TNAME id array */ \
- if ((status = nc_def_var (exoid, INAME, NC_INT, 1, dim, &varid)) != NC_NOERR) { \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to define " TNAME " id array in file id %d",exoid); \
- ex_err("ex_put_init_ext",errmsg,exerrval); \
- goto error_ret; /* 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) { \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to store " TNAME " property name %s in file id %d", \
- "ID",exoid); \
- ex_err("ex_put_init_ext",errmsg,exerrval); \
- return (EX_FATAL); \
- } \
+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 (count > 0) {
+ dim[0] = dimension_var;
+ dim[1] = string_dimension;
+
+ if ((status = nc_def_var (exoid, dimension_name, NC_CHAR, 2, dim, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define %s name array in file id %d",type,exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ return status; /* exit define mode and return */
+ }
}
+ return NC_NOERR;
+}
-#define EX_WRITE_MAP_PARAMS(TNAME,DNUMMAP,VMAPIDS,NUMMAPS,MAPDIM) \
- /* Can have nonzero model->num_XXXX_map even if model->num_XXXX == 0 */ \
- if ((NUMMAPS) > 0) { \
- if ((status = nc_def_dim(exoid, DNUMMAP, (size_t)(NUMMAPS), &MAPDIM)) != NC_NOERR) { \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to define number of " TNAME "s in file id %d", \
- exoid); \
- ex_err("ex_put_init_ext",errmsg,exerrval); \
- goto error_ret; /* exit define mode and return */ \
- } \
- \
- dim[0] = MAPDIM; \
- \
- /* TNAME id array */ \
- if ((status = nc_def_var(exoid, VMAPIDS, NC_INT, 1, dim, &varid)) != NC_NOERR) { \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to define " TNAME " id array in file id %d",exoid); \
- ex_err("ex_put_init_ext",errmsg,exerrval); \
- goto error_ret; /* 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) { \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to store " TNAME " property name %s in file id %d", \
- "ID",exoid); \
- ex_err("ex_put_init_ext",errmsg,exerrval); \
- return (EX_FATAL); \
- } \
+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,
+ int count, int *dimension)
+{
+ int dim[2];
+ int varid;
+ int status;
+ char errmsg[MAX_ERR_LENGTH];
+
+ /* Can have nonzero model->num_elem_blk even if model->num_elem == 0 */
+ if (count > 0) {
+ if ((status = nc_def_dim(exoid, dimension_name, (size_t)count, dimension)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define number of %ss in file id %d",
+ type, exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ return status; /* exit define mode and return */
+ }
+ /* ...and some variables */
+ /* element block id status array */
+ dim[0] = *dimension;
+ if ((status = nc_def_var (exoid, status_dim_name, NC_INT, 1, dim, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define %s status array in file id %d", type, exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ return status; /* exit define mode and return */
+ }
+
+ /* type id array */
+ if ((status = nc_def_var (exoid, id_array_dim_name, NC_INT, 1, dim, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define %s id array in file id %d", type, exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ 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) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store %s property name %s in file id %d",
+ type, "ID", exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ return status;
+ }
}
+ return NC_NOERR;
+}
+
+static int ex_write_map_params(int exoid, const char *map_name, const char *map_dim_name,
+ const char *map_id_name, int map_count, int *map_dimension)
+{
+ int dim[2];
+ int varid;
+ int status;
+ char errmsg[MAX_ERR_LENGTH];
+
+ /* Can have nonzero model->num_XXXX_map even if model->num_XXXX == 0 */
+ if ((map_count) > 0) {
+ if ((status = nc_def_dim(exoid, map_dim_name, (size_t)(map_count), map_dimension)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define number of %ss in file id %d",
+ map_name, exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ return status; /* exit define mode and return */
+ }
+
+ dim[0] = *map_dimension;
+
+ /* map_name id array */
+ if ((status = nc_def_var(exoid, map_id_name, NC_INT, 1, dim, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define %s id array in file id %d", map_name, exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ return status; /* exit define mode and return */
+ }
-#define EX_WRITE_OBJECT_NAMES(TNAME,DNAME,DIMVAR,DIMVAL) \
- /* Element block names... */ \
- if ((DIMVAL) > 0) { \
- dim[0] = (DIMVAR); \
- dim[1] = strdim; \
- \
- if ((status = nc_def_var (exoid, DNAME, NC_CHAR, 2, dim, &varid)) != NC_NOERR) { \
- exerrval = status; \
- sprintf(errmsg, \
- "Error: failed to define %s name array in file id %d",TNAME,exoid); \
- ex_err("ex_put_init_ext",errmsg,exerrval); \
- goto error_ret; /* 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) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store %s property name %s in file id %d",
+ map_name, "ID",exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ return (EX_FATAL);
+ }
}
+ return NC_NOERR;
+}
-static void zero_id_status(int exoid, const char *var_stat, const char *var_id,
- int count, int *ids)
+static void invalidate_id_status(int exoid, const char *var_stat,
+ const char *var_id, int count, int *ids)
{
int status;
int i;
int id_var, stat_var;
if (count > 0) {
- for (i=0; i < count; i++) {
- ids[i] = 0;
+ if (var_id != 0) {
+ for (i=0; i < count; i++) {
+ ids[i] = EX_INVALID_ID;
+ }
+
+ status = nc_inq_varid(exoid, var_id, &id_var);
+ assert(status == NC_NOERR);
+ status = nc_put_var_int(exoid, id_var, ids);
+ assert(status == NC_NOERR);
}
- status = nc_inq_varid(exoid, var_id, &id_var);
- assert(status == NC_NOERR);
- status = nc_inq_varid(exoid, var_stat, &stat_var);
- assert(status == NC_NOERR);
+ if (var_stat != 0) {
+ for (i=0; i < count; i++) {
+ ids[i] = 0;
+ }
- status = nc_put_var_int(exoid, id_var, ids);
- assert(status == NC_NOERR);
- status = nc_put_var_int(exoid, stat_var, ids);
- assert(status == NC_NOERR);
+ status = nc_inq_varid(exoid, var_stat, &stat_var);
+ assert(status == NC_NOERR);
+ status = nc_put_var_int(exoid, stat_var, ids);
+ assert(status == NC_NOERR);
+ }
}
}
@@ -201,7 +238,8 @@ static void zero_id_status(int exoid, const char *var_stat, const char *var_id,
int ex_put_init_ext (int exoid,
const ex_init_params *model)
{
- int numdimdim, numnoddim, elblkdim, edblkdim, fablkdim, esetdim, fsetdim, elsetdim, nsetdim, ssetdim, strdim, dim[2], varid, temp;
+ int numdimdim, numnoddim, elblkdim, edblkdim, fablkdim, esetdim,
+ fsetdim, elsetdim, nsetdim, ssetdim, dim_str_name, dim[2], temp;
int status;
int nmapdim,edmapdim,famapdim,emapdim;
int title_len;
@@ -249,6 +287,29 @@ int ex_put_init_ext (int exoid,
/* ...and some dimensions... */
+ /* create name string length dimension */
+ {
+ int max_name = ex_max_name_length < 32 ? 32 : ex_max_name_length;
+ if ((status=nc_def_dim (exoid, DIM_STR_NAME, max_name+1, &dim_str_name)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define name string length in file id %d",exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ goto error_ret;
+ }
+ }
+
+ {
+ int max_so_far = 32;
+ if ((status=nc_put_att_int(exoid, NC_GLOBAL, ATT_MAX_NAME_LENGTH, NC_INT, 1, &max_so_far)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add maximum_name_length attribute in file id %d",exoid);
+ ex_err("ex_put_init_ext",errmsg,exerrval);
+ goto error_ret;
+ }
+ }
+
if ((status = nc_def_dim(exoid, DIM_NUM_DIM, model->num_dim, &numdimdim)) != NC_NOERR)
{
exerrval = status;
@@ -334,20 +395,20 @@ int ex_put_init_ext (int exoid,
}
}
- EX_WRITE_OBJECT_PARAMS("element block", DIM_NUM_EL_BLK, VAR_STAT_EL_BLK, VAR_ID_EL_BLK, model->num_elem_blk, elblkdim);
- EX_WRITE_OBJECT_PARAMS("edge block", DIM_NUM_ED_BLK, VAR_STAT_ED_BLK, VAR_ID_ED_BLK, model->num_edge_blk, edblkdim);
- EX_WRITE_OBJECT_PARAMS("face block", DIM_NUM_FA_BLK, VAR_STAT_FA_BLK, VAR_ID_FA_BLK, model->num_face_blk, fablkdim);
-
- EX_WRITE_OBJECT_PARAMS("node set", DIM_NUM_NS, VAR_NS_STAT, VAR_NS_IDS, model->num_node_sets, nsetdim);
- EX_WRITE_OBJECT_PARAMS("edge set", DIM_NUM_ES, VAR_ES_STAT, VAR_ES_IDS, model->num_edge_sets, esetdim);
- EX_WRITE_OBJECT_PARAMS("face set", DIM_NUM_FS, VAR_FS_STAT, VAR_FS_IDS, model->num_face_sets, fsetdim);
- EX_WRITE_OBJECT_PARAMS("side set", DIM_NUM_SS, VAR_SS_STAT, VAR_SS_IDS, model->num_side_sets, ssetdim);
- EX_WRITE_OBJECT_PARAMS("elem set", DIM_NUM_ELS, VAR_ELS_STAT, VAR_ELS_IDS, model->num_elem_sets, elsetdim);
+ if (ex_write_object_params(exoid, "element block", DIM_NUM_EL_BLK, VAR_STAT_EL_BLK, VAR_ID_EL_BLK, model->num_elem_blk, &elblkdim)) goto error_ret;
+ if (ex_write_object_params(exoid, "edge block", DIM_NUM_ED_BLK, VAR_STAT_ED_BLK, VAR_ID_ED_BLK, model->num_edge_blk, &edblkdim)) goto error_ret;
+ if (ex_write_object_params(exoid, "face block", DIM_NUM_FA_BLK, VAR_STAT_FA_BLK, VAR_ID_FA_BLK, model->num_face_blk, &fablkdim)) goto error_ret;
+
+ if (ex_write_object_params(exoid, "node set", DIM_NUM_NS, VAR_NS_STAT, VAR_NS_IDS, model->num_node_sets, &nsetdim)) goto error_ret;
+ if (ex_write_object_params(exoid, "edge set", DIM_NUM_ES, VAR_ES_STAT, VAR_ES_IDS, model->num_edge_sets, &esetdim)) goto error_ret;
+ if (ex_write_object_params(exoid, "face set", DIM_NUM_FS, VAR_FS_STAT, VAR_FS_IDS, model->num_face_sets, &fsetdim)) goto error_ret;
+ if (ex_write_object_params(exoid, "side set", DIM_NUM_SS, VAR_SS_STAT, VAR_SS_IDS, model->num_side_sets, &ssetdim)) goto error_ret;
+ if (ex_write_object_params(exoid, "elem set", DIM_NUM_ELS, VAR_ELS_STAT, VAR_ELS_IDS, model->num_elem_sets, &elsetdim)) goto error_ret;
- EX_WRITE_MAP_PARAMS( "node map", DIM_NUM_NM, VAR_NM_PROP(1), model->num_node_maps, nmapdim);
- EX_WRITE_MAP_PARAMS( "edge map", DIM_NUM_EDM, VAR_EDM_PROP(1), model->num_edge_maps, edmapdim);
- EX_WRITE_MAP_PARAMS( "face map", DIM_NUM_FAM, VAR_FAM_PROP(1), model->num_face_maps, famapdim);
- EX_WRITE_MAP_PARAMS("element map", DIM_NUM_EM, VAR_EM_PROP(1), model->num_elem_maps, emapdim);
+ if (ex_write_map_params(exoid, "node map", DIM_NUM_NM, VAR_NM_PROP(1), model->num_node_maps, &nmapdim) != NC_NOERR) goto error_ret;
+ if (ex_write_map_params(exoid, "edge map", DIM_NUM_EDM, VAR_EDM_PROP(1), model->num_edge_maps, &edmapdim) != NC_NOERR) goto error_ret;
+ if (ex_write_map_params(exoid, "face map", DIM_NUM_FAM, VAR_FAM_PROP(1), model->num_face_maps, &famapdim) != NC_NOERR) goto error_ret;
+ if (ex_write_map_params(exoid, "element map", DIM_NUM_EM, VAR_EM_PROP(1), model->num_elem_maps, &emapdim) != NC_NOERR) goto error_ret;
/*
* To reduce the maximum dataset sizes, the storage of the nodal
@@ -417,29 +478,19 @@ int ex_put_init_ext (int exoid,
}
}
- /* inquire previously defined dimensions */
- if ((status = nc_inq_dimid (exoid, DIM_STR, &strdim)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get string length in file id %d",exoid);
- ex_err("ex_put_init_ext",errmsg,exerrval);
- goto error_ret; /* exit define mode and return */
- }
-
-
- EX_WRITE_OBJECT_NAMES("element block",VAR_NAME_EL_BLK,elblkdim,model->num_elem_blk);
- EX_WRITE_OBJECT_NAMES("edge block", VAR_NAME_ED_BLK,edblkdim,model->num_edge_blk);
- EX_WRITE_OBJECT_NAMES("face block", VAR_NAME_FA_BLK,fablkdim,model->num_face_blk);
- EX_WRITE_OBJECT_NAMES("node set", VAR_NAME_NS, nsetdim, model->num_node_sets);
- EX_WRITE_OBJECT_NAMES("edge set", VAR_NAME_ES, esetdim, model->num_edge_sets);
- EX_WRITE_OBJECT_NAMES("face set", VAR_NAME_FS, fsetdim, model->num_face_sets);
- EX_WRITE_OBJECT_NAMES("side set", VAR_NAME_SS, ssetdim, model->num_side_sets);
- EX_WRITE_OBJECT_NAMES("element set", VAR_NAME_ELS, elsetdim,model->num_elem_sets);
- EX_WRITE_OBJECT_NAMES("node map", VAR_NAME_NM, nmapdim, model->num_node_maps);
- EX_WRITE_OBJECT_NAMES("edge map", VAR_NAME_EDM, edmapdim,model->num_edge_maps);
- EX_WRITE_OBJECT_NAMES("face map", VAR_NAME_FAM, famapdim,model->num_face_maps);
- EX_WRITE_OBJECT_NAMES("element map", VAR_NAME_EM, emapdim, model->num_elem_maps);
- EX_WRITE_OBJECT_NAMES("coordinate", VAR_NAME_COOR, numdimdim,model->num_dim);
+ if (ex_write_object_names(exoid, "element block",VAR_NAME_EL_BLK,elblkdim, dim_str_name, model->num_elem_blk) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "edge block", VAR_NAME_ED_BLK,edblkdim, dim_str_name, model->num_edge_blk) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "face block", VAR_NAME_FA_BLK,fablkdim, dim_str_name, model->num_face_blk) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "node set", VAR_NAME_NS, nsetdim, dim_str_name, model->num_node_sets) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "edge set", VAR_NAME_ES, esetdim, dim_str_name, model->num_edge_sets) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "face set", VAR_NAME_FS, fsetdim, dim_str_name, model->num_face_sets) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "side set", VAR_NAME_SS, ssetdim, dim_str_name, model->num_side_sets) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "element set", VAR_NAME_ELS, elsetdim, dim_str_name, model->num_elem_sets) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "node map", VAR_NAME_NM, nmapdim, dim_str_name, model->num_node_maps) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "edge map", VAR_NAME_EDM, edmapdim, dim_str_name, model->num_edge_maps) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "face map", VAR_NAME_FAM, famapdim, dim_str_name, model->num_face_maps) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "element map", VAR_NAME_EM, emapdim, dim_str_name, model->num_elem_maps) != NC_NOERR) goto error_ret;
+ if (ex_write_object_names(exoid, "coordinate", VAR_NAME_COOR, numdimdim,dim_str_name, model->num_dim) != NC_NOERR) goto error_ret;
/* leave define mode */
if ((status = nc_enddef (exoid)) != NC_NOERR) {
@@ -450,9 +501,9 @@ int ex_put_init_ext (int exoid,
return (EX_FATAL);
}
- /* Fill the id and status arrays with zeros */
+ /* Fill the id and status arrays with EX_INVALID_ID */
{
- int *zeros = NULL;
+ int *invalid_ids = NULL;
int maxset = model->num_elem_blk;
if (maxset < model->num_edge_blk) maxset = model->num_edge_blk;
if (maxset < model->num_face_blk) maxset = model->num_face_blk;
@@ -461,45 +512,62 @@ int ex_put_init_ext (int exoid,
if (maxset < model->num_face_sets) maxset = model->num_face_sets;
if (maxset < model->num_side_sets) maxset = model->num_side_sets;
if (maxset < model->num_elem_sets) maxset = model->num_elem_sets;
+ if (maxset < model->num_node_maps) maxset = model->num_node_maps;
+ if (maxset < model->num_edge_maps) maxset = model->num_edge_maps;
+ if (maxset < model->num_face_maps) maxset = model->num_face_maps;
+ if (maxset < model->num_elem_maps) maxset = model->num_elem_maps;
/* allocate space for id/status array */
- if (!(zeros = malloc(maxset*sizeof(int)))) {
+ if (!(invalid_ids = malloc(maxset*sizeof(int)))) {
exerrval = EX_MEMFAIL;
sprintf(errmsg,
- "Error: failed to allocate memory for id/status array for file id %d", exoid);
+ "Error: failed to allocate memory for id/status array for file id %d", exoid);
ex_err("ex_put_init_ext",errmsg,exerrval);
return (EX_FATAL);
}
- zero_id_status(exoid, VAR_STAT_EL_BLK, VAR_ID_EL_BLK, model->num_elem_blk, zeros);
- zero_id_status(exoid, VAR_STAT_ED_BLK, VAR_ID_ED_BLK, model->num_edge_blk, zeros);
- zero_id_status(exoid, VAR_STAT_FA_BLK, VAR_ID_FA_BLK, model->num_face_blk, zeros);
-
- zero_id_status(exoid, VAR_NS_STAT, VAR_NS_IDS, model->num_node_sets, zeros);
- zero_id_status(exoid, VAR_ES_STAT, VAR_ES_IDS, model->num_edge_sets, zeros);
- zero_id_status(exoid, VAR_FS_STAT, VAR_FS_IDS, model->num_face_sets, zeros);
- zero_id_status(exoid, VAR_SS_STAT, VAR_SS_IDS, model->num_side_sets, zeros);
- zero_id_status(exoid, VAR_ELS_STAT, VAR_ELS_IDS, model->num_elem_sets, zeros);
- if (zeros != NULL) {
- free(zeros);
- zeros = NULL;
+ invalidate_id_status(exoid, VAR_STAT_EL_BLK, VAR_ID_EL_BLK,
+ model->num_elem_blk, invalid_ids);
+ invalidate_id_status(exoid, VAR_STAT_ED_BLK, VAR_ID_ED_BLK,
+ model->num_edge_blk, invalid_ids);
+ invalidate_id_status(exoid, VAR_STAT_FA_BLK, VAR_ID_FA_BLK,
+ model->num_face_blk, invalid_ids);
+ invalidate_id_status(exoid, VAR_NS_STAT, VAR_NS_IDS,
+ model->num_node_sets, invalid_ids);
+ invalidate_id_status(exoid, VAR_ES_STAT, VAR_ES_IDS,
+ model->num_edge_sets, invalid_ids);
+ invalidate_id_status(exoid, VAR_FS_STAT, VAR_FS_IDS,
+ model->num_face_sets, invalid_ids);
+ invalidate_id_status(exoid, VAR_SS_STAT, VAR_SS_IDS,
+ model->num_side_sets, invalid_ids);
+ invalidate_id_status(exoid, VAR_ELS_STAT, VAR_ELS_IDS,
+ model->num_elem_sets, invalid_ids);
+
+ invalidate_id_status(exoid, 0, VAR_NM_PROP(1), model->num_node_maps, invalid_ids);
+ invalidate_id_status(exoid, 0, VAR_EDM_PROP(1), model->num_edge_maps, invalid_ids);
+ invalidate_id_status(exoid, 0, VAR_FAM_PROP(1), model->num_face_maps, invalid_ids);
+ invalidate_id_status(exoid, 0, VAR_EM_PROP(1), model->num_elem_maps, invalid_ids);
+
+ if (invalid_ids != NULL) {
+ free(invalid_ids);
+ invalid_ids = NULL;
}
}
- {
- /* Write dummy values to the names arrays to avoid corruption issues on some platforms */
- if (model->num_elem_blk > 0) write_dummy_names(exoid, EX_ELEM_BLOCK);
- if (model->num_edge_blk > 0) write_dummy_names(exoid, EX_EDGE_BLOCK);
- if (model->num_face_blk > 0) write_dummy_names(exoid, EX_FACE_BLOCK);
- if (model->num_node_sets> 0) write_dummy_names(exoid, EX_NODE_SET);
- if (model->num_edge_sets> 0) write_dummy_names(exoid, EX_EDGE_SET);
- if (model->num_face_sets> 0) write_dummy_names(exoid, EX_FACE_SET);
- if (model->num_side_sets> 0) write_dummy_names(exoid, EX_SIDE_SET);
- if (model->num_elem_sets> 0) write_dummy_names(exoid, EX_ELEM_SET);
- if (model->num_node_maps> 0) write_dummy_names(exoid, EX_NODE_MAP);
- if (model->num_edge_maps> 0) write_dummy_names(exoid, EX_EDGE_MAP);
- if (model->num_face_maps> 0) write_dummy_names(exoid, EX_FACE_MAP);
- if (model->num_elem_maps> 0) write_dummy_names(exoid, EX_ELEM_MAP);
- }
+
+ /* Write dummy values to the names arrays to avoid corruption issues on some platforms */
+ if (model->num_elem_blk > 0) write_dummy_names(exoid, EX_ELEM_BLOCK);
+ if (model->num_edge_blk > 0) write_dummy_names(exoid, EX_EDGE_BLOCK);
+ if (model->num_face_blk > 0) write_dummy_names(exoid, EX_FACE_BLOCK);
+ if (model->num_node_sets> 0) write_dummy_names(exoid, EX_NODE_SET);
+ if (model->num_edge_sets> 0) write_dummy_names(exoid, EX_EDGE_SET);
+ if (model->num_face_sets> 0) write_dummy_names(exoid, EX_FACE_SET);
+ if (model->num_side_sets> 0) write_dummy_names(exoid, EX_SIDE_SET);
+ if (model->num_elem_sets> 0) write_dummy_names(exoid, EX_ELEM_SET);
+ if (model->num_node_maps> 0) write_dummy_names(exoid, EX_NODE_MAP);
+ if (model->num_edge_maps> 0) write_dummy_names(exoid, EX_EDGE_MAP);
+ if (model->num_face_maps> 0) write_dummy_names(exoid, EX_FACE_MAP);
+ if (model->num_elem_maps> 0) write_dummy_names(exoid, EX_ELEM_MAP);
+
return (EX_NOERR);
/* Fatal error: exit definition mode and return */
diff --git a/cbind/src/expmap.c b/exodus/cbind/src/expmap.c
similarity index 78%
rename from cbind/src/expmap.c
rename to exodus/cbind/src/expmap.c
index 98f62cd..90292a4 100644
--- a/cbind/src/expmap.c
+++ b/exodus/cbind/src/expmap.c
@@ -53,10 +53,37 @@
#include <stdlib.h> /* for free() */
/*!
- * writes out the element order map to the database.
- * \param exoid exodus file id
- * \param elem_map element order map array
- * \deprecated Use ex_put_num_map() instead.
+\deprecated Use ex_put_num_map() instead.
+
+The function ex_put_map() writes out the optional element order map to
+the database. See #ElementOrderMap for a description of the element
+order map. The function ex_put_init() must be invoked before this call
+is made.
+
+In case of an error, ex_put_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()
+ - data file opened for read only.
+ - data file not initialized properly with call to ex_put_init().
+ - an element map already exists in the file.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] elem_map The element order map.
+
+The following code generates a default element order map and outputs
+it to an open exodus file. This is a trivial case and included just
+for illustration. Since this map is optional, it should be written out
+only if it contains something other than the default map.
+
+\code
+int error, exoid;
+int *elem_map = (int *)calloc(num_elem, sizeof(int));
+for (i=0; i < num_elem; i++) {
+ elem_map[i] = i+1;
+}
+error = ex_put_map(exoid, elem_map);
+\endcode
+
*/
int ex_put_map (int exoid,
diff --git a/cbind/src/expmp.c b/exodus/cbind/src/expmp.c
similarity index 85%
rename from cbind/src/expmp.c
rename to exodus/cbind/src/expmp.c
index 8b7cab2..7c6d51b 100644
--- a/cbind/src/expmp.c
+++ b/exodus/cbind/src/expmp.c
@@ -49,6 +49,8 @@
#include "exodusII.h"
#include "exodusII_int.h"
+#include <assert.h>
+#include <stdlib.h>
/*!
* defines the number of node and element maps. It is more efficient
@@ -66,6 +68,7 @@ int ex_put_map_param (int exoid,
int num_elem_maps)
{
int dim[2], dimid, strdim, varid, status;
+ int var_nm_id, var_em_id;
int i;
char errmsg[MAX_ERR_LENGTH];
@@ -85,24 +88,22 @@ int ex_put_map_param (int exoid,
if ( (num_node_maps > 0) || (num_elem_maps > 0) ) {
/* inquire previously defined dimensions */
- if ((status = nc_inq_dimid (exoid, DIM_STR, &strdim)) != NC_NOERR)
- {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get string length in file id %d",exoid);
- ex_err("ex_put_map_param",errmsg,exerrval);
- return (EX_FATAL);
- }
+ if ((status = nc_inq_dimid (exoid, DIM_STR_NAME, &strdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get string length in file id %d",exoid);
+ ex_err("ex_put_map_param",errmsg,exerrval);
+ return (EX_FATAL);
+ }
/* put file into define mode */
- if ((status = nc_redef (exoid)) != NC_NOERR)
- {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to put file id %d into define mode", exoid);
- ex_err("ex_put_map_param",errmsg,exerrval);
- return (EX_FATAL);
- }
+ if ((status = nc_redef (exoid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file id %d into define mode", exoid);
+ ex_err("ex_put_map_param",errmsg,exerrval);
+ return (EX_FATAL);
+ }
/* node maps: */
@@ -119,7 +120,7 @@ int ex_put_map_param (int exoid,
/* node maps id array: */
dim[0] = dimid;
- if ((status = nc_def_var(exoid, VAR_NM_PROP(1), NC_INT, 1, dim, &varid)) != NC_NOERR)
+ if ((status = nc_def_var(exoid, VAR_NM_PROP(1), NC_INT, 1, dim, &var_nm_id)) != NC_NOERR)
{
exerrval = status;
sprintf(errmsg,
@@ -130,7 +131,7 @@ int ex_put_map_param (int exoid,
}
/* store property name as attribute of property array variable */
- if ((status=nc_put_att_text(exoid, varid, ATT_PROP_NAME, 3, "ID")) != NC_NOERR)
+ if ((status=nc_put_att_text(exoid, var_nm_id, ATT_PROP_NAME, 3, "ID")) != NC_NOERR)
{
exerrval = status;
sprintf(errmsg,
@@ -199,7 +200,7 @@ int ex_put_map_param (int exoid,
/* element maps id array: */
dim[0] = dimid;
- if ((status = nc_def_var(exoid, VAR_EM_PROP(1), NC_INT, 1, dim, &varid)) != NC_NOERR)
+ if ((status = nc_def_var(exoid, VAR_EM_PROP(1), NC_INT, 1, dim, &var_em_id)) != NC_NOERR)
{
exerrval = status;
sprintf(errmsg,
@@ -210,7 +211,7 @@ int ex_put_map_param (int exoid,
}
/* store property name as attribute of property array variable */
- if ((status=nc_put_att_text(exoid, varid, ATT_PROP_NAME, 3, "ID")) != NC_NOERR)
+ if ((status=nc_put_att_text(exoid, var_em_id, ATT_PROP_NAME, 3, "ID")) != NC_NOERR)
{
exerrval = status;
sprintf(errmsg,
@@ -270,15 +271,31 @@ int ex_put_map_param (int exoid,
}
/* leave define mode */
- if ((status = nc_enddef (exoid)) != NC_NOERR)
- {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to complete variable definitions in file id %d",exoid);
- ex_err("ex_put_map_param",errmsg,exerrval);
- return (EX_FATAL);
- }
+ if ((status = nc_enddef (exoid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to complete variable definitions in file id %d",exoid);
+ ex_err("ex_put_map_param",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ /* Fill the id arrays with EX_INVALID_ID */
+ {
+ int maxset = num_node_maps > num_elem_maps ? num_node_maps : num_elem_maps;
+ int *invalid_ids = malloc(maxset*sizeof(int));
+ for (i=0; i < maxset; i++) {
+ invalid_ids[i] = EX_INVALID_ID;
+ }
+ if (num_node_maps > 0) {
+ status = nc_put_var_int(exoid, var_nm_id, invalid_ids);
+ assert(status == NC_NOERR);
+ }
+ if (num_elem_maps > 0) {
+ status = nc_put_var_int(exoid, var_em_id, invalid_ids);
+ assert(status == NC_NOERR);
+ }
+ free(invalid_ids);
+ }
}
return (EX_NOERR);
diff --git a/cbind/src/expnam.c b/exodus/cbind/src/expnam.c
similarity index 90%
rename from cbind/src/expnam.c
rename to exodus/cbind/src/expnam.c
index aaf6c92..741ae48 100644
--- a/cbind/src/expnam.c
+++ b/exodus/cbind/src/expnam.c
@@ -71,7 +71,6 @@ int ex_put_name (int exoid,
{
int status;
int varid, ent_ndx;
- size_t start[2], count[2];
char errmsg[MAX_ERR_LENGTH];
const char *routine = "ex_put_name";
const char *vobj;
@@ -140,19 +139,7 @@ int ex_put_name (int exoid,
if (ent_ndx < 0) ent_ndx = -ent_ndx;
/* write EXODUS entityname */
- start[0] = ent_ndx-1;
- start[1] = 0;
-
- count[0] = 1;
- count[1] = strlen(name) + 1;
-
- if ((status = nc_put_vara_text(exoid, varid, start, count, name)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to store %s name for id %d in file id %d",
- ex_name_of_object(obj_type), entity_id, exoid);
- ex_err(routine,errmsg,exerrval);
- return (EX_FATAL);
- }
- return(EX_NOERR);
+ status = ex_put_name_internal(exoid, varid, ent_ndx-1, name, obj_type, "", routine);
+
+ return(status);
}
diff --git a/cbind/src/expnams.c b/exodus/cbind/src/expnams.c
similarity index 87%
rename from cbind/src/expnams.c
rename to exodus/cbind/src/expnams.c
index 38d3bfa..cf63384 100644
--- a/cbind/src/expnams.c
+++ b/exodus/cbind/src/expnams.c
@@ -56,7 +56,7 @@
#include <string.h>
/*!
- * writes the names of the results variables to the database
+ * writes the entity names to the database
* \param exoid exodus file id
* \param obj_type object type
* \param names ptr array of entity names
@@ -68,9 +68,9 @@ int ex_put_names (int exoid,
{
int status;
int varid;
- size_t num_entity, i;
- size_t start[2], count[2];
+ size_t num_entity;
char errmsg[MAX_ERR_LENGTH];
+
const char *vname = NULL;
const char *routine = "ex_put_names";
@@ -142,23 +142,7 @@ int ex_put_names (int exoid,
}
/* write EXODUS entitynames */
- for (i=0; i<num_entity; i++) {
- if (names[i] != '\0') {
- start[0] = i;
- start[1] = 0;
-
- count[0] = 1;
- count[1] = strlen(names[i]) + 1;
-
- if ((status = nc_put_vara_text(exoid, varid, start, count, names[i])) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to store %s names in file id %d",
- ex_name_of_object(obj_type), exoid);
- ex_err(routine,errmsg,exerrval);
- return (EX_FATAL);
- }
- }
- }
- return(EX_NOERR);
+ status = ex_put_names_internal(exoid, varid, num_entity, names, obj_type, "", routine);
+
+ return(status);
}
diff --git a/cbind/src/expncor.c b/exodus/cbind/src/expncor.c
similarity index 100%
rename from cbind/src/expncor.c
rename to exodus/cbind/src/expncor.c
diff --git a/cbind/src/expnm.c b/exodus/cbind/src/expnm.c
similarity index 100%
rename from cbind/src/expnm.c
rename to exodus/cbind/src/expnm.c
diff --git a/cbind/src/expnmap.c b/exodus/cbind/src/expnmap.c
similarity index 100%
rename from cbind/src/expnmap.c
rename to exodus/cbind/src/expnmap.c
diff --git a/cbind/src/expnnm.c b/exodus/cbind/src/expnnm.c
similarity index 58%
rename from cbind/src/expnnm.c
rename to exodus/cbind/src/expnnm.c
index 794b897..4a5b76b 100644
--- a/cbind/src/expnnm.c
+++ b/exodus/cbind/src/expnnm.c
@@ -32,32 +32,45 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expnnm - ex_put_node_num_map
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int* node_map node numbering map
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-
#include "exodusII.h"
-#include "exodusII_int.h"
-#include <stdlib.h> /* for free() */
/*!
- * writes out the node numbering map to the database; allows node numbers
- * to be non-contiguous
- * \param exoid exodus file id
- * \param node_map node numbering map
- * \deprecated Use ex_put_id_map()(exoid, EX_NODE_MAP, node_map)
+
+\deprecated Use ex_put_id_map()(exoid, EX_NODE_MAP, node_map)
+
+The function ex_put_node_num_map() writes out the optional node number
+map to the database. See Section LocalNodeIds for a description of the
+node number map. The function ex_put_init() must be invoked before
+this call is made.
+
+\return In case of an error, ex_put_node_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()
+ - data file opened for read only.
+ - data file not initialized properly with call to ex_put_init().
+ - a node number map already exists in the file.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] node_map The node number map.
+
+The following code generates a default node number map and outputs it
+to an open exodus file. This is a trivial case and included just for
+illustration. Since this map is optional, it should be written out
+only if it contains something other than the default map.
+
+\code
+int error, exoid;
+int *node_map = (int *)calloc(num_nodes, sizeof(int));
+
+for (i=1; i <= num_nodes; i++)
+ node_map[i-1] = i;
+
+error = ex_put_node_num_map(exoid, node_map);
+
+\comment{Equivalent using non-deprecated function}
+error = ex_put_id_map(exoid, EX_NODE_MAP, node_map);
+\endcode
*/
int ex_put_node_num_map (int exoid,
diff --git a/cbind/src/expnnv.c b/exodus/cbind/src/expnnv.c
similarity index 100%
rename from cbind/src/expnnv.c
rename to exodus/cbind/src/expnnv.c
diff --git a/cbind/src/expnoatt.c b/exodus/cbind/src/expnoatt.c
similarity index 100%
rename from cbind/src/expnoatt.c
rename to exodus/cbind/src/expnoatt.c
diff --git a/exodus/cbind/src/expnp.c b/exodus/cbind/src/expnp.c
new file mode 100644
index 0000000..b6173bf
--- /dev/null
+++ b/exodus/cbind/src/expnp.c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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_put_set_param()(exoid, EX_NODE_SET, node_set_id, num_nodes_in_set, num_dist_in_set)
+
+The function ex_put_node_set_param() writes the node set ID, the
+number of nodes which describe a single node set, and the number of
+node set distribution factors for the node set.
+
+\return In case of an error, ex_put_node_set_param() 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().
+ - the number of node sets specified in the call to ex_put_init() was zero or has been exceeded.
+ - a node set with the same ID has already been stored.
+ - the specified number of distribution factors is not zero and is not equal to the number of nodes.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] node_set_id The node set ID.
+\param[in] num_nodes_in_set The number of nodes in the node set.
+\param[in] num_dist_in_set The number of distribution factors in the node set. This should be
+ either 0 (zero) for no factors, or should equal \c num_nodes_in_set.
+
+
+The following code segment will write out a node set to an open exodus
+file :
+
+\code
+int id, num_nodes_in_set, num_dist_in_set, error, exoid, *node_list;
+float *dist_fact;
+
+\comment{write node set parameters}
+id = 20; num_nodes_in_set = 5; num_dist_in_set = 5;
+error = ex_put_node_set_param(exoid, id, num_nodes_in_set,
+ num_dist_in_set);
+
+\comment{write node set node list}
+node_list = (int *) calloc (num_nodes_in_set, sizeof(int));
+node_list[0] = 100; node_list[1] = 101; node_list[2] = 102;
+node_list[3] = 103; node_list[4] = 104;
+
+error = ex_put_node_set(exoid, id, node_list);
+
+\comment{write node set distribution factors}
+dist_fact = (float *) calloc (num_dist_in_set, sizeof(float));
+dist_fact[0] = 1.0; dist_fact[1] = 2.0; dist_fact[2] = 3.0;
+dist_fact[3] = 4.0; dist_fact[4] = 5.0;
+
+error = ex_put_node_set_dist_fact(exoid, id, dist_fact);
+
+\comment{Same result using non-deprecated functions}
+error = ex_put_set_param(exoid, EX_NODE_SET, id, num_nodes_in_set, num_dist_in_set);
+error = ex_put_set(exoid, EX_NODE_SET, id, node_list);
+error = ex_put_set_dist_fact(exoid, EX_NODE_SET, id, dist_fact);
+\endcode
+ */
+
+int ex_put_node_set_param (int exoid,
+ int node_set_id,
+ int num_nodes_in_set,
+ int num_dist_in_set)
+{
+ return ex_put_set_param(exoid, EX_NODE_SET, node_set_id, num_nodes_in_set, num_dist_in_set);
+}
diff --git a/cbind/src/expns.c b/exodus/cbind/src/expns.c
similarity index 65%
rename from cbind/src/expns.c
rename to exodus/cbind/src/expns.c
index af0b97d..93832b4 100644
--- a/cbind/src/expns.c
+++ b/exodus/cbind/src/expns.c
@@ -32,33 +32,32 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expns - ex_put_node_set
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int node_set_id node set id
-* int* node_set_node_list node list array for the node set
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * writes the node list for a single node set
- * \param exoid exodus file id
- * \param node_set_id node set id
- * \param node_set_node_list node list array for the node set
- * \deprecated Use ex_put_set()(exoid, EX_NODE_SET, node_set_id, node_set_node_list, NULL)
- */
+\deprecated Use ex_put_set()(exoid, EX_NODE_SET, node_set_id, node_set_node_list, NULL)
+
+The function ex_put_node_set() writes the node list for a single node
+set. The function ex_put_node_set_param() must be called before this
+routine is invoked.
+
+\return In case of an error, ex_put_node_set() 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_node_set_param() not called previously.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] node_set_id The node set ID.
+\param[in] node_set_node_list Array containing the node list for the node set. Internal node IDs are
+ used in this list (See Section LocalNodeIds).
+
+Refer to the description of ex_put_node_set_param() for a sample code
+segment to write out a node set.
+*/
int ex_put_node_set (int exoid,
int node_set_id,
diff --git a/cbind/src/expnsd.c b/exodus/cbind/src/expnsd.c
similarity index 60%
rename from cbind/src/expnsd.c
rename to exodus/cbind/src/expnsd.c
index d63766c..e27c622 100644
--- a/cbind/src/expnsd.c
+++ b/exodus/cbind/src/expnsd.c
@@ -32,33 +32,37 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expnsd - ex_put_node_set_dist_fact
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int node_set_id node set id
-* void* node_set _dist_fact node distribution factors for node set
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
-#include "exodusII_int.h"
/*!
- * writes the node set distribution factors for a single node set
- * \param exoid exodus file id
- * \param node_set_id node set id
- * \param node_set_dist_fact node distribution factors for node set
- * \deprecated Use ex_put_set_dist_fact()(exoid, EX_NODE_SET, node_set_id, node_set_dist_fact)
- */
+\deprecated Use ex_put_set_dist_fact()(exoid, EX_NODE_SET, node_set_id, node_set_dist_fact)
+
+The function ex_put_node_set_dist_fact() writes node set distribution
+factors for a single node set. The function ex_put_node_set_param()
+must be called before this routine is invoked.
+
+Because the distribution factors are floating point values, the
+application code must declare the array passed to be the appropriate
+type (\c float or \c double) to match the compute word size passed in
+ex_create() or ex_open().
+
+\return In case of an error, ex_put_node_set_dist_fact() 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_node_set_param() not called previously.
+ - a call to ex_put_node_set_param() specified zero distribution factors.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] node_set_id The node set ID.
+\param[in] node_set_dist_fact Array containing the distribution factors in the node set.
+
+Refer to the description of ex_put_node_set_param() for a sample code
+segment to write out the distribution factors for a node set.
+*/
int ex_put_node_set_dist_fact (int exoid,
int node_set_id,
diff --git a/cbind/src/expnstt.c b/exodus/cbind/src/expnstt.c
similarity index 100%
rename from cbind/src/expnstt.c
rename to exodus/cbind/src/expnstt.c
diff --git a/cbind/src/expnsv.c b/exodus/cbind/src/expnsv.c
similarity index 100%
rename from cbind/src/expnsv.c
rename to exodus/cbind/src/expnsv.c
diff --git a/cbind/src/expnv.c b/exodus/cbind/src/expnv.c
similarity index 63%
copy from cbind/src/expnv.c
copy to exodus/cbind/src/expnv.c
index f9d405a..28dbe20 100644
--- a/cbind/src/expnv.c
+++ b/exodus/cbind/src/expnv.c
@@ -32,38 +32,64 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expnv - ex_put_nodal_var
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int time_step whole time step number
-* int nodeal_var_index index of desired nodal variable
-* int num_nodes number of nodal points
-* float* nodal_var_vals array of nodal variable values
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
/*!
- * writes the values of a single nodal variable for a single time step to
- * the database; assume the first time step and nodal variable index
- * is 1
- * \param exoid exodus file id
- * \param time_step whole time step number
- * \param nodal_var_index index of desired nodal variable
- * \param num_nodes number of nodal points
- * \param nodal_var_vals array 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()
+must be invoked before this call is made.
+
+Because nodal variables are floating point values, the application
+code must declare the array passed to be the appropriate type (\c
+float or \c 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
+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 nodal variables.
+
+
+\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(). 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] nodal_var_vals Array of \c num_nodes values of the \c nodal_var_index-th nodal
+ variable for the \c time_step-th time step.
+
+
+As an example, the following code segment writes all the nodal
+variables for a single time step:
+
+\code
+int num_nod_vars, num_nodes, error, exoid, time_step;
+float *nodal_var_vals;
+
+\comment{write nodal variables}
+nodal_var_vals = (float *) calloc(num_nodes, sizeof(float));
+for (k=1; k <= num_nod_vars; k++) {
+ for (j=0; j < num_nodes; j++) {
+ \comment{application code fills in this array}
+ nodal_var_vals[j] = 10.0;
+ }
+ error = ex_put_nodal_var(exoid, time_step, k, num_nodes,
+ nodal_var_vals);
+}
+\endcode
+
+*/
int ex_put_nodal_var (int exoid,
int time_step,
diff --git a/cbind/src/expnvar.c b/exodus/cbind/src/expnvar.c
similarity index 100%
rename from cbind/src/expnvar.c
rename to exodus/cbind/src/expnvar.c
diff --git a/cbind/src/expnvv.c b/exodus/cbind/src/expnvv.c
similarity index 100%
rename from cbind/src/expnvv.c
rename to exodus/cbind/src/expnvv.c
diff --git a/cbind/src/expoatt.c b/exodus/cbind/src/expoatt.c
similarity index 100%
rename from cbind/src/expoatt.c
rename to exodus/cbind/src/expoatt.c
diff --git a/cbind/src/expoea.c b/exodus/cbind/src/expoea.c
similarity index 100%
rename from cbind/src/expoea.c
rename to exodus/cbind/src/expoea.c
diff --git a/cbind/src/expp.c b/exodus/cbind/src/expp.c
similarity index 72%
rename from cbind/src/expp.c
rename to exodus/cbind/src/expp.c
index c8f9ee1..9ea0a4e 100644
--- a/cbind/src/expp.c
+++ b/exodus/cbind/src/expp.c
@@ -32,40 +32,73 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expp - ex_put_prop: write object property
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int obj_type type of object (element block, node
-* set or side set)
-* int obj_id id of object to which property will
-* be assigned
-* char* prop_name name of the property for which the
-* value will be stored
-* int value value of the property
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
#include <string.h>
/*!
- * writes an object property
- * \param exoid exodus file id
- * \param obj_type type of object
- * \param obj_id id of object to which property will be assigned
- * \param prop_name name of the property for which the value will be stored
- * \param value value of the property
- */
+
+The function ex_put_prop() stores an integer object property value to
+a single element block, node set, or side set. Although it is not
+necessary to invoke ex_put_prop_names(), since ex_put_prop() will
+allocate space within the data file if it hasn't been previously
+allocated, it is more efficient to use ex_put_prop_names() if there is
+more than one property to store. \see Efficiency for a discussion of
+efficiency issues.
+
+It should be noted that the interpretation of the values of the
+integers stored as properties is left to the application code. In
+general, a zero (0) means the object does not have the specified
+property (or is not in the specified group); a nonzero value means the
+object does have the specified property. When space is allocated for
+the properties using ex_put_prop_names() or ex_put_prop(), the
+properties are initialized to zero (0).
+
+Because the ID of an element block, node set, or side set is just
+another property (named \b ID), this routine can be used to change
+the value of an ID. This feature must be used with caution, though,
+because changing the ID of an object to the ID of another object of
+the same type (element block, node set, or side set) would cause two
+objects to have the same ID, and thus only the first would be
+accessible. Therefore, ex_put_prop() issues a warning if a user
+attempts to give two objects the same ID.
+
+\return In case of an error, ex_put_prop() 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().
+ - invalid object type specified.
+ - a warning is issued if a user attempts to change the ID of an
+ object to the ID of an existing object of the same type.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] obj_type Type of object; use one of the options in the table below.
+\param[in] obj_id The element block, node set, or side set ID.
+\param[in] prop_name The name of the property for which the value will be stored.
+ Maximum length of this string is \p MAX_STR_LENGTH .
+\param[in] value The value of the property.
+
+<table>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+<tr><td> \c EX_ELEM_MAP </td><td> Element Map entity type </td></tr>
+<tr><td> \c EX_NODE_MAP </td><td> Node Map entity type </td></tr>
+<tr><td> \c EX_EDGE_MAP </td><td> Edge Map entity type </td></tr>
+<tr><td> \c EX_FACE_MAP </td><td> Face Map entity type </td></tr>
+</table>
+
+For an example of code to write out an object property, refer to the
+description for ex_put_prop_names().
+*/
int ex_put_prop (int exoid,
ex_entity_type obj_type,
@@ -78,6 +111,7 @@ int ex_put_prop (int exoid,
int found = FALSE;
int num_props, i, dimid, propid, dims[1];
size_t start[1];
+ size_t prop_name_len, name_length;
int ldum;
char name[MAX_VAR_NAME_LENGTH+1];
char tmpstr[MAX_STR_LENGTH+1];
@@ -168,8 +202,10 @@ int ex_put_prop (int exoid,
/* if property array has not been created, create it */
if (!found) {
- /* put netcdf file into define mode */
+ 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) {
exerrval = status;
sprintf(errmsg,"Error: failed to place file id %d into define mode",exoid);
@@ -270,9 +306,18 @@ int ex_put_prop (int exoid,
goto error_ret; /* Exit define mode and return */
}
+ /* Check that the property name length is less than MAX_NAME_LENGTH */
+ prop_name_len = strlen(prop_name)+1;
+ if (prop_name_len > name_length) {
+ fprintf(stderr,
+ "Warning: The property name '%s' is too long.\n\tIt will be truncated from %d to %d characters\n",
+ prop_name, (int)prop_name_len-1, (int)name_length-1);
+ prop_name_len = name_length;
+ }
+
/* store property name as attribute of property array variable */
if ((status = nc_put_att_text(exoid, propid, ATT_PROP_NAME,
- strlen(prop_name)+1, (void*)prop_name)) != NC_NOERR) {
+ prop_name_len, (void*)prop_name)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to store property name %s in file id %d",
@@ -281,6 +326,8 @@ int ex_put_prop (int exoid,
goto error_ret; /* Exit define mode and return */
}
+ ex_update_max_name_length(exoid, prop_name_len-1);
+
/* leave define mode */
if ((status = nc_enddef (exoid)) != NC_NOERR) {
exerrval = status;
diff --git a/cbind/src/exppa.c b/exodus/cbind/src/exppa.c
similarity index 73%
rename from cbind/src/exppa.c
rename to exodus/cbind/src/exppa.c
index cef3b92..77a6fac 100644
--- a/cbind/src/exppa.c
+++ b/exodus/cbind/src/exppa.c
@@ -32,25 +32,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exppa - ex_put_prop_array: write object property array
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int obj_type type of object (element block, node
-* set or side set)
-* char* prop_name name of the property for which the
-* values will be stored
-* int* values array of property values
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
@@ -58,11 +39,60 @@
#include <stdlib.h> /* for free() */
/*!
- * writes an array of object properties
- * \param exoid exodus file id
- * \param obj_type type of object (element block, node set or side set)
- * \param prop_name name of the property for which the values will be stored
- * \param values array of property values
+
+The function ex_put_prop_array() stores an array of ({num_elem_blk},
+\c num_node_sets, or \c num_side_sets) integer property values for all
+element blocks, node sets, or side sets. The order of the values in
+the array must correspond to the order in which the element blocks,
+node sets, or side sets were introduced into the file. For instance,
+if the parameters for element block with ID 20 were written to a file
+(via ex_put_elem_block()), and then parameters for element block with
+ID 10, followed by the parameters for element block with ID 30, the
+first, second, and third elements in the property array would
+correspond to element block 20, element block 10, and element block
+30, respectively.
+
+One should note that this same functionality (writing properties to
+multiple objects) can be accomplished with multiple calls to
+ex_put_prop().
+
+Although it is not necessary to invoke ex_put_prop_names(), since
+ex_put_prop_array() will allocate space within the data file if it
+hasn't been previously allocated, it is more efficient to use
+ex_put_prop_names() if there is more than one property to store. \see
+See Efficiency for a discussion of efficiency issues.
+
+\return In case of an error, ex_put_prop_array() 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().
+ - invalid object type specified.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] obj_type Type of object; use one of the options in the table below.
+\param[in] prop_name The name of the property for which the values will be stored. Maximum
+ length of this string is \p MAX_STR_LENGTH .
+\param[in] values An array of property values.
+
+<table>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+<tr><td> \c EX_ELEM_MAP </td><td> Element Map entity type </td></tr>
+<tr><td> \c EX_NODE_MAP </td><td> Node Map entity type </td></tr>
+<tr><td> \c EX_EDGE_MAP </td><td> Edge Map entity type </td></tr>
+<tr><td> \c EX_FACE_MAP </td><td> Face Map entity type </td></tr>
+</table>
+
+For an example of code to write an array of object properties, refer
+to the description for ex_put_prop_names().
*/
int ex_put_prop_array (int exoid,
diff --git a/cbind/src/exppem.c b/exodus/cbind/src/exppem.c
similarity index 100%
rename from cbind/src/exppem.c
rename to exodus/cbind/src/exppem.c
diff --git a/cbind/src/expidm.c b/exodus/cbind/src/exppidm.c
similarity index 89%
rename from cbind/src/expidm.c
rename to exodus/cbind/src/exppidm.c
index 74c5112..da04ce9 100644
--- a/cbind/src/expidm.c
+++ b/exodus/cbind/src/exppidm.c
@@ -51,22 +51,27 @@
#include "exodusII.h"
#include "exodusII_int.h"
-#include <stdlib.h> /* for free() */
+#include <stdlib.h>
/*!
- * writes out the entity numbering map to the database; this allows
- * the entity numbers to be non-contiguous. This map is used for
- * mapping between local and global entity ids.
+ * writes out a portion of the entity numbering map to the database;
+ * this allows the entity numbers to be non-contiguous. This map is
+ * used for mapping between local and global entity ids.
* \param exoid exodus file id
* \param map_type
+ * \param start_entity_num
+ * \param num_entities
* \param map element numbering map array
*/
-int ex_put_id_map (int exoid,
- ex_entity_type map_type,
- const int *map)
+int ex_put_partial_id_map (int exoid,
+ ex_entity_type map_type,
+ int start_entity_num,
+ int num_entities,
+ const int *map)
{
int dimid, mapid, status, dims[1];
+ size_t start[1], count[1];
char errmsg[MAX_ERR_LENGTH];
const char* tname;
const char* dnumentries;
@@ -109,7 +114,7 @@ int ex_put_id_map (int exoid,
return (EX_NOERR);
}
- /* put netcdf file into define mode */
+ /* 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) {
exerrval = status;
@@ -120,7 +125,6 @@ int ex_put_id_map (int exoid,
return (EX_FATAL);
}
-
/* create a variable array in which to store the id map */
dims[0] = dimid;
@@ -154,7 +158,10 @@ int ex_put_id_map (int exoid,
}
/* write out the entity numbering map */
- status = nc_put_var_int(exoid, mapid, map);
+ start[0] = start_entity_num-1;
+ count[0] = num_entities;
+
+ status = nc_put_vara_int(exoid, mapid, start, count, map);
if (status!= NC_NOERR) {
exerrval = status;
diff --git a/cbind/src/exppn.c b/exodus/cbind/src/exppn.c
similarity index 58%
rename from cbind/src/exppn.c
rename to exodus/cbind/src/exppn.c
index b8a86f4..4a2ca97 100644
--- a/cbind/src/exppn.c
+++ b/exodus/cbind/src/exppn.c
@@ -32,36 +32,93 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exppn - ex_put_prop_names: write property arrays names
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int obj_type type of object (element block, node
-* set or side set)
-* int num_props number of properties to be assigned
-* char** prop_names array of num_props names
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
#include <string.h>
/*!
- * writes the parameters to set up property name arrays
- * \param exoid exodus file id
- * \param obj_type type of object
- * \param num_props number of properties to be assigned
- * \param **prop_names array of num_props names
- */
+
+The function ex_put_prop_names() writes object property names and
+allocates space for object property arrays used to assign integer
+properties to element blocks, node sets, or side sets. The property
+arrays are initialized to zero (0). Although this function is
+optional, since ex_put_prop() will allocate space within the data file
+if it hasn't been previously allocated, it is more efficient to use
+ex_put_prop_names() if there is more than one property to store. \see
+Efficiency for a discussion of efficiency issues.
+
+\return In case of an error, ex_put_prop_names() 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().
+ - invalid object type specified.
+ - no object of the specified type is stored in the file.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] obj_type Type of object; use one of the options in the table below.
+\param[in] num_props The number of integer properties to be assigned to all of the objects
+ of the type specified (element blocks, node sets, or side sets).
+\param[in] prop_names Array containing \c num_props names (of maximum length
+ of \p MAX_STR_LENGTH ) of properties to be stored.
+
+<table>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+<tr><td> \c EX_ELEM_MAP </td><td> Element Map entity type </td></tr>
+<tr><td> \c EX_NODE_MAP </td><td> Node Map entity type </td></tr>
+<tr><td> \c EX_EDGE_MAP </td><td> Edge Map entity type </td></tr>
+<tr><td> \c EX_FACE_MAP </td><td> Face Map entity type </td></tr>
+</table>
+
+For instance, suppose a user wanted to assign the 1st, 3rd, and 5th
+element blocks (those element blocks stored 1st, 3rd, and 5th,
+regardless of their ID) to a group (property) called \b TOP, and the
+2nd, 3rd, and 4th element blocks to a group called \b LSIDE. This
+could be accomplished with the following code:
+
+\code
+#include "exodusII.h";
+
+char* prop_names[2];
+int top_part[] = {1,0,1,0,1};
+int lside_part[] = {0,1,1,1,0};
+
+int id[] = {10, 20, 30, 40, 50};
+
+prop_names[0] = "TOP";
+prop_names[1] = "LSIDE";
+
+\comment{This call to ex_put_prop_names is optional, but more efficient}
+ex_put_prop_names (exoid, EX_ELEM_BLOCK, 2, prop_names);
+
+\comment{The property values can be output individually thus}
+for (i=0; i < 5; i++) {
+ ex_put_prop (exoid, EX_ELEM_BLOCK, id[i], prop_names[0],
+ top_part[i]);
+
+ ex_put_prop (exoid, EX_ELEM_BLOCK, id[i], prop_names[1],
+ lside_part[i]);
+}
+
+\comment{Alternatively, the values can be output as an array}
+ex_put_prop_array (exoid, EX_ELEM_BLOCK, prop_names[0],
+ top_part);
+
+ex_put_prop_array (exoid, EX_ELEM_BLOCK, prop_names[1],
+ lside_part);
+
+\endcode
+
+*/
int ex_put_prop_names (int exoid,
ex_entity_type obj_type,
@@ -71,13 +128,18 @@ int ex_put_prop_names (int exoid,
int status;
int oldfill, temp;
int i, propid, dimid, dims[1];
+ size_t name_length, prop_name_len;
char name[MAX_VAR_NAME_LENGTH+1];
int vals[1];
+ int max_name_len = 0;
char errmsg[MAX_ERR_LENGTH];
exerrval = 0; /* clear error code */
+ /* Get the name string length */
+ 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) {
exerrval = status;
@@ -169,9 +231,21 @@ int ex_put_prop_names (int exoid,
goto error_ret; /* Exit define mode and return */
}
+ /* Check that the property name length is less than MAX_NAME_LENGTH */
+ prop_name_len = strlen(prop_names[i])+1;
+ if (prop_name_len > name_length) {
+ fprintf(stderr,
+ "Warning: The property name '%s' is too long.\n\tIt will be truncated from %d to %d characters\n",
+ prop_names[i], (int)prop_name_len-1, (int)name_length-1);
+ prop_name_len = name_length;
+ }
+
+ if (prop_name_len > max_name_len)
+ max_name_len = prop_name_len;
+
/* store property name as attribute of property array variable */
if ((status = nc_put_att_text(exoid, propid, ATT_PROP_NAME,
- strlen(prop_names[i])+1, prop_names[i])) != NC_NOERR) {
+ prop_name_len, prop_names[i])) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to store property name %s in file id %d",
@@ -191,6 +265,9 @@ int ex_put_prop_names (int exoid,
return (EX_FATAL);
}
+ /* Update the maximum_name_length attribute on the file. */
+ ex_update_max_name_length(exoid, max_name_len-1);
+
nc_set_fill(exoid, oldfill, &temp); /* default: turn off fill */
return (EX_NOERR);
diff --git a/cbind/src/exppsetd.c b/exodus/cbind/src/exppsetd.c
similarity index 100%
rename from cbind/src/exppsetd.c
rename to exodus/cbind/src/exppsetd.c
diff --git a/cbind/src/expqa.c b/exodus/cbind/src/expqa.c
similarity index 79%
rename from cbind/src/expqa.c
rename to exodus/cbind/src/expqa.c
index d9347ca..acdce83 100644
--- a/cbind/src/expqa.c
+++ b/exodus/cbind/src/expqa.c
@@ -32,32 +32,56 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expqa = ex_put_qa
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int num_qa_records number of qa records to be written
-* char* qa_record[][4]) qa record array
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
#include <string.h>
/*!
- * writes the QA records to the database
- * \param exoid exodus file id
- * \param num_qa_records number of qa records to be written
- * \param *qa_record qa record array
+
+The function ex_put_qa() writes the QA records to the database. Each
+QA record contains four \c MAX_STR_LENGTH-byte character
+strings. The character strings are:
+
+ - the analysis code name
+ - the analysis code QA descriptor
+ - the analysis date
+ - the analysis time
+
+\return In case of an error, ex_put_qa() 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.
+ - QA records already exist in file.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+
+\param[in] num_qa_records The number of QA records.
+\param[in] qa_record Array containing the QA records.
+
+The following code segment will write out two QA records:
+
+\code
+#include "exodusII.h"
+int num_qa_rec, error, exoid;
+char *qa_record[2][4];
+
+\comment{write QA records}
+num_qa_rec = 2;
+
+qa_record[0][0] = "TESTWT1";
+qa_record[0][1] = "testwt1";
+qa_record[0][2] = "07/07/93";
+qa_record[0][3] = "15:41:33";
+qa_record[1][0] = "FASTQ";
+qa_record[1][1] = "fastq";
+qa_record[1][2] = "07/07/93";
+qa_record[1][3] = "16:41:33";
+
+error = ex_put_qa (exoid, num_qa_rec, qa_record);
+\endcode
+
*/
int ex_put_qa (int exoid,
diff --git a/cbind/src/expset.c b/exodus/cbind/src/expset.c
similarity index 89%
rename from cbind/src/expset.c
rename to exodus/cbind/src/expset.c
index 0ec5e02..1c5ae80 100644
--- a/cbind/src/expset.c
+++ b/exodus/cbind/src/expset.c
@@ -60,8 +60,8 @@
* \param exoid exodus file id
* \param set_type set type
* \param set_id set id
- * \param *set_entry_list array of entries in set
- * \param *set_extra_list array of extras in set
+ * \param *set_entry_list array of entries in set. Set to NULL to not write.
+ * \param *set_extra_list array of extras in set. Set to NULL to not write.
*/
int ex_put_set (int exoid,
@@ -123,7 +123,7 @@ int ex_put_set (int exoid,
entryptr = VAR_ELEM_SS(set_id_ndx);
extraptr = VAR_SIDE_SS(set_id_ndx);
}
- if (set_type == EX_ELEM_SET) {
+ else if (set_type == EX_ELEM_SET) {
entryptr = VAR_ELEM_ELS(set_id_ndx);
extraptr = NULL;
}
@@ -151,30 +151,26 @@ int ex_put_set (int exoid,
}
/* write out the entry list and extra list arrays */
+ if (set_entry_list != NULL) {
- status = nc_put_var_int(exoid, entry_list_id, set_entry_list);
-
- if (status != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to store entry list for %s %d in file id %d",
- ex_name_of_object(set_type), set_id,exoid);
- ex_err("ex_put_set",errmsg,exerrval);
- return (EX_FATAL);
+ status = nc_put_var_int(exoid, entry_list_id, set_entry_list);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store entry list for %s %d in file id %d",
+ ex_name_of_object(set_type), set_id,exoid);
+ ex_err("ex_put_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
}
/* only do for edge, face and side sets */
- if (extraptr) {
- if ( set_extra_list == NULL ) {
- sprintf(errmsg, "Error: extra list NULL for %s %d in file id %d",
- ex_name_of_object(set_type), set_id, exoid );
- ex_err("ex_put_set",errmsg,EX_BADPARAM);
- return (EX_FATAL);
- }
-
+ if (extraptr && set_extra_list != NULL ) {
+
status = nc_put_var_int(exoid, extra_list_id, set_extra_list);
-
+
if (status != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
diff --git a/cbind/src/expsetd.c b/exodus/cbind/src/expsetd.c
similarity index 100%
rename from cbind/src/expsetd.c
rename to exodus/cbind/src/expsetd.c
diff --git a/cbind/src/expsetp.c b/exodus/cbind/src/expsetp.c
similarity index 100%
rename from cbind/src/expsetp.c
rename to exodus/cbind/src/expsetp.c
diff --git a/cbind/src/expsp.c b/exodus/cbind/src/expsp.c
similarity index 100%
rename from cbind/src/expsp.c
rename to exodus/cbind/src/expsp.c
diff --git a/cbind/src/expss.c b/exodus/cbind/src/expss.c
similarity index 100%
rename from cbind/src/expss.c
rename to exodus/cbind/src/expss.c
diff --git a/cbind/src/expssd.c b/exodus/cbind/src/expssd.c
similarity index 100%
rename from cbind/src/expssd.c
rename to exodus/cbind/src/expssd.c
diff --git a/cbind/src/expsstt.c b/exodus/cbind/src/expsstt.c
similarity index 100%
rename from cbind/src/expsstt.c
rename to exodus/cbind/src/expsstt.c
diff --git a/cbind/src/expssv.c b/exodus/cbind/src/expssv.c
similarity index 100%
rename from cbind/src/expssv.c
rename to exodus/cbind/src/expssv.c
diff --git a/cbind/src/exptim.c b/exodus/cbind/src/exptim.c
similarity index 70%
rename from cbind/src/exptim.c
rename to exodus/cbind/src/exptim.c
index 606a95c..3a0b5c5 100644
--- a/cbind/src/exptim.c
+++ b/exodus/cbind/src/exptim.c
@@ -32,34 +32,45 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* exptim - ex_put_time
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int time_step time step number
-* float time_value simulation time at specified step
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include <string.h>
#include "exodusII.h"
#include "exodusII_int.h"
/*!
- * writes the time value for a whole time step;
- * assume the first time step is 1
- * \param exoid exodus file id
- * \param time_step time step number (1...)
- * \param time_value simulation time at specified step
- */
+
+The function ex_put_time() writes the time value for a specified time
+step.
+
+Because time values are floating point values, the application code
+must declare the array passed to be the appropriate type (\c float or
+\c double) to match the compute word size passed in ex_create() or
+ex_open().
+
+\return In case of an error, ex_put_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()
+ - data file opened for read only.
+
+\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. This is essentially a counter that is
+ incremented only when results variables are output to the data
+ file. The first time step is 1.
+\param[in] time_value The time at the specified time step.
+
+The following code segment will write out the simulation time value at
+simulation time step n:
+
+\code
+int error, exoid, n;
+float time_value;
+
+\comment{write time value}
+error = ex_put_time (exoid, n, &time_value);
+\endcode
+
+*/
int ex_put_time (int exoid,
int time_step,
diff --git a/cbind/src/exptt.c b/exodus/cbind/src/exptt.c
similarity index 100%
rename from cbind/src/exptt.c
rename to exodus/cbind/src/exptt.c
diff --git a/cbind/src/expvan.c b/exodus/cbind/src/expvan.c
similarity index 100%
rename from cbind/src/expvan.c
rename to exodus/cbind/src/expvan.c
diff --git a/cbind/src/expvar.c b/exodus/cbind/src/expvar.c
similarity index 100%
rename from cbind/src/expvar.c
rename to exodus/cbind/src/expvar.c
diff --git a/cbind/src/expvarnam.c b/exodus/cbind/src/expvarnam.c
similarity index 83%
rename from cbind/src/expvarnam.c
rename to exodus/cbind/src/expvarnam.c
index 6bbf5e1..4637197 100644
--- a/cbind/src/expvarnam.c
+++ b/exodus/cbind/src/expvarnam.c
@@ -69,23 +69,13 @@ int ex_put_variable_name (int exoid,
const char *var_name)
{
int status;
- int varid, dimid;
- size_t start[2], count[2];
+ int varid;
char errmsg[MAX_ERR_LENGTH];
const char* vname;
exerrval = 0; /* clear error code */
- /* inquire previously defined dimensions */
- if ((status = nc_inq_dimid(exoid, DIM_STR, &dimid)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get string length in file id %d",exoid);
- ex_err("ex_put_var_name",errmsg,exerrval);
- return (EX_FATAL);
- }
-
- /* inquire previously defined variables */
+ /* inquire previously defined variables */
switch (obj_type) {
case EX_GLOBAL:
vname = VAR_NAME_GLO_VAR;
@@ -134,20 +124,8 @@ int ex_put_variable_name (int exoid,
}
/* write EXODUS variable name */
- start[0] = var_num-1;
- start[1] = 0;
-
- count[0] = 1;
- count[1] = strlen(var_name) + 1;
-
- if ((status = nc_put_vara_text(exoid, varid, start, count, var_name)) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to store %s variable name %d in file id %d",
- ex_name_of_object(obj_type), var_num, exoid);
- ex_err("ex_put_variable_name",errmsg,exerrval);
- return (EX_FATAL);
- }
+ status = ex_put_name_internal(exoid, varid, var_num-1, var_name, obj_type,
+ "variable", "ex_put_variable_name");
- return(EX_NOERR);
+ return(status);
}
diff --git a/cbind/src/expvarnams.c b/exodus/cbind/src/expvarnams.c
similarity index 66%
rename from cbind/src/expvarnams.c
rename to exodus/cbind/src/expvarnams.c
index 3415dad..f0f5317 100644
--- a/cbind/src/expvarnams.c
+++ b/exodus/cbind/src/expvarnams.c
@@ -90,20 +90,67 @@
}
/*!
- * writes the names of the results variables to the database
- * \param exoid exodus file id
- * \param obj_type variable type
- * \param num_vars # of variables to read
- * \param *var_names ptr array of variable names
- */
+
+The function ex_put_variable_names() writes the names of the results
+variables to the database. The names are \p MAX_STR_LENGTH -characters
+in length. The function ex_put_variable_param() must be called before
+this function is invoked.
+
+\return In case of an error, ex_put_variable_names() 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 not initialized properly with call to ex_put_init().
+ - invalid variable type specified.
+ - ex_put_variable_param() was not called previously or was
+ called with zero variables of the specified type.
+ - ex_put_variable_names() has been called previously for the
+ specified variable type.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] obj_type Variable indicating the type of variable which is described.
+ Use one of the options in the table below.
+\param[in] num_vars The number of \c var_type variables that will be written
+ to the database.
+\param[in] var_names Array of pointers to \c num_vars variable names.
+
+<table>
+<tr><td> \c EX_GLOBAL} </td><td> Global entity type </td></tr>
+<tr><td> \c EX_NODAL} </td><td> Nodal entity type </td></tr>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+</table>
+
+The following coding will write out the names associated with the
+nodal variables:
+\code
+int num_nod_vars, error, exoid;
+char *var_names[2];
+
+\comment{write results variables parameters and names}
+num_nod_vars = 2;
+
+var_names[0] = "disx";
+var_names[1] = "disy";
+
+error = ex_put_variable_param (exoid, EX_NODAL, num_nod_vars);
+error = ex_put_variable_names (exoid, EX_NODAL, num_nod_vars, var_names);
+\endcode
+
+*/
int ex_put_variable_names (int exoid,
ex_entity_type obj_type,
int num_vars,
char* var_names[])
{
- int i, varid, dimid, status;
- size_t start[2], count[2];
+ int varid, dimid, status;
char errmsg[MAX_ERR_LENGTH];
exerrval = 0; /* clear error code */
@@ -149,21 +196,8 @@ int ex_put_variable_names (int exoid,
}
/* write EXODUS variable names */
- for (i=0; i<num_vars; i++) {
- start[0] = i;
- start[1] = 0;
-
- count[0] = 1;
- count[1] = strlen(var_names[i]) + 1;
-
- if ((status = nc_put_vara_text(exoid, varid, start, count, var_names[i])) != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to store variable names in file id %d",
- exoid);
- ex_err("ex_put_var_names",errmsg,exerrval);
- return (EX_FATAL);
- }
- }
- return(EX_NOERR);
+ status = ex_put_names_internal(exoid, varid, num_vars, var_names, obj_type,
+ "variable", "ex_put_var_names");
+
+ return(status);
}
diff --git a/cbind/src/expvarparam.c b/exodus/cbind/src/expvarparam.c
similarity index 81%
rename from cbind/src/expvarparam.c
rename to exodus/cbind/src/expvarparam.c
index 58f8c83..e1878cf 100644
--- a/cbind/src/expvarparam.c
+++ b/exodus/cbind/src/expvarparam.c
@@ -32,28 +32,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expvp - ex_put_var_param
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int obj_type
-* int* num_vars number of variables in database
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
#include "exodusII.h"
#include "exodusII_int.h"
#include <ctype.h>
+/*! \cond INTERNAL */
#define EX_PREPARE_RESULT_VAR(TNAME,DIMNAME,VARNAMEVAR) \
if ((status = nc_def_dim(exoid, DIMNAME, num_vars, &dimid)) != NC_NOERR) { \
if (status == NC_ENAMEINUSE) { \
@@ -73,7 +58,7 @@
} \
/* Now define TNAME variable name variable */ \
dims[0] = dimid; \
- dims[1] = strdim; \
+ dims[1] = dim_str_name; \
if ((status = nc_def_var (exoid, VARNAMEVAR, NC_CHAR, 2, dims, &varid)) != NC_NOERR) { \
if (status == NC_ENAMEINUSE) { \
exerrval = status; \
@@ -90,20 +75,64 @@
} \
goto error_ret; /* exit define mode and return */ \
}
+/*! \endcond */
/*!
- * writes the number and names of global, nodal, or element variables
- * that will be written to the database
- * \param exoid exodus file id
- * \param obj_type object type
- * \param *num_vars number of variables in database
+
+The function ex_put_variable_param() writes the number of global,
+nodal, nodeset, sideset, edge, face, or element variables that will be
+written to the database.
+
+\return In case of an error, ex_put_variable_param() 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.
+ - invalid variable type specified.
+ - data file not initialized properly with call to ex_put_init().
+ - this routine has already been called with the same variable
+ type; redefining the number of variables is not allowed.
+ - a warning value is returned if the number of variables
+ is specified as zero.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] obj_type Variable indicating the type of variable which is described. Use one
+ of the #ex_entity_type types specified in the table below.
+\param[in] num_vars The number of \c var_type variables that will be written to the
+ database.
+
+<table>
+<tr><td> \c EX_GLOBAL </td><td> Global entity type </td></tr>
+<tr><td> \c EX_NODAL </td><td> Nodal entity type </td></tr>
+<tr><td> \c EX_NODE_SET </td><td> Node Set entity type </td></tr>
+<tr><td> \c EX_EDGE_BLOCK </td><td> Edge Block entity type </td></tr>
+<tr><td> \c EX_EDGE_SET </td><td> Edge Set entity type </td></tr>
+<tr><td> \c EX_FACE_BLOCK </td><td> Face Block entity type </td></tr>
+<tr><td> \c EX_FACE_SET </td><td> Face Set entity type </td></tr>
+<tr><td> \c EX_ELEM_BLOCK </td><td> Element Block entity type</td></tr>
+<tr><td> \c EX_ELEM_SET </td><td> Element Set entity type </td></tr>
+<tr><td> \c EX_SIDE_SET </td><td> Side Set entity type </td></tr>
+</table>
+
+For example, the following code segment initializes the data file to
+store global variables:
+
+\code
+int num_glo_vars, error, exoid;
+
+\comment{write results variables parameters}
+num_glo_vars = 3;
+
+error = ex_put_variable_param (exoid, EX_GLOBAL, num_glo_vars);
+\endcode
+
*/
int ex_put_variable_param (int exoid,
ex_entity_type obj_type,
int num_vars)
{
- int time_dim, num_nod_dim, dimid, strdim, varid;
+ int time_dim, num_nod_dim, dimid, dim_str_name, varid;
int dims[3];
char errmsg[MAX_ERR_LENGTH];
int status;
@@ -158,10 +187,10 @@ int ex_put_variable_param (int exoid,
}
}
- if ((status = nc_inq_dimid (exoid, DIM_STR, &strdim)) < 0) {
+ if ((status = nc_inq_dimid (exoid, DIM_STR_NAME, &dim_str_name)) < 0) {
exerrval = status;
sprintf(errmsg,
- "Error: failed to get string length in file id %d",exoid);
+ "Error: failed to get name string length in file id %d",exoid);
ex_err("ex_put_variable_param",errmsg,exerrval);
return (EX_FATAL);
}
@@ -257,7 +286,7 @@ int ex_put_variable_param (int exoid,
/* Now define nodal variable name variable */
dims[0] = dimid;
- dims[1] = strdim;
+ dims[1] = dim_str_name;
if ((status = nc_def_var(exoid, VAR_NAME_NOD_VAR, NC_CHAR, 2, dims, &varid)) != NC_NOERR) {
if (status == NC_ENAMEINUSE) {
exerrval = status;
diff --git a/cbind/src/expvartab.c b/exodus/cbind/src/expvartab.c
similarity index 100%
rename from cbind/src/expvartab.c
rename to exodus/cbind/src/expvartab.c
diff --git a/cbind/src/expvnm.c b/exodus/cbind/src/expvnm.c
similarity index 100%
rename from cbind/src/expvnm.c
rename to exodus/cbind/src/expvnm.c
diff --git a/cbind/src/expvp.c b/exodus/cbind/src/expvp.c
similarity index 100%
rename from cbind/src/expvp.c
rename to exodus/cbind/src/expvp.c
diff --git a/cbind/src/expvpa.c b/exodus/cbind/src/expvpa.c
similarity index 100%
rename from cbind/src/expvpa.c
rename to exodus/cbind/src/expvpa.c
diff --git a/cbind/src/expvpax.c b/exodus/cbind/src/expvpax.c
similarity index 99%
rename from cbind/src/expvpax.c
rename to exodus/cbind/src/expvpax.c
index 04bd7e3..2b827f2 100644
--- a/cbind/src/expvpax.c
+++ b/exodus/cbind/src/expvpax.c
@@ -154,7 +154,7 @@ int ex_put_all_var_param_ext ( int exoid,
}
/* Check this now so we can use it later without checking for errors */
- if ((status = nc_inq_dimid(exoid, DIM_STR, &temp)) != NC_NOERR) {
+ if ((status = nc_inq_dimid(exoid, DIM_STR_NAME, &temp)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to get string length in file id %d",exoid);
@@ -411,7 +411,7 @@ int define_variable_name_variable(int exoid, const char *VARIABLE, int dimension
int status;
dims[0] = dimension;
- nc_inq_dimid(exoid, DIM_STR, &dims[1]); /* Checked earlier, so known to exist */
+ nc_inq_dimid(exoid, DIM_STR_NAME, &dims[1]); /* Checked earlier, so known to exist */
if ((status=nc_def_var(exoid, VARIABLE, NC_CHAR, 2, dims, &variable)) != NC_NOERR) {
if (status == NC_ENAMEINUSE) {
diff --git a/cbind/src/expvpc.c b/exodus/cbind/src/expvpc.c
similarity index 100%
rename from cbind/src/expvpc.c
rename to exodus/cbind/src/expvpc.c
diff --git a/exodus/cbind/src/expvtt.c b/exodus/cbind/src/expvtt.c
new file mode 100644
index 0000000..9498b02
--- /dev/null
+++ b/exodus/cbind/src/expvtt.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************
+*
+* expvtt - ex_put_elem_var_tab
+*
+* environment - UNIX
+*
+* entry conditions -
+* input parameters:
+* int exoid exodus file id
+* int num_elem_blk number of element blocks
+* int num_elem_var number of element variables
+* int* elem_var_tab element variable truth table array
+*
+* exit conditions -
+*
+* revision history -
+*
+*
+*****************************************************************************/
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+/*!
+\deprecated Use ex_put_truth_table()(exoid, EX_ELEM_BLOCK, num_elem_blk, num_elem_var, elem_var_tab)
+
+The function ex_put_elem_var_tab() writes the exodus element variable
+truth table to the database. The element variable truth table
+indicates whether a particular element result is written for the
+elements in a particular element block. A 0 (zero) entry indicates
+that no results will be output for that element variable for that
+element block. A non-zero entry indicates that the appropriate results
+will be output.
+
+Although writing the element variable truth table is optional, it is
+encouraged because it creates at one time all the necessary
+\code{NetCDF} variables in which to hold the exodus element variable
+values. This results in significant time savings. See
+Section #Efficiency for a discussion of efficiency issues.
+
+The function ex_put_variable_param() must be called before this
+routine in order to define the number of element variables.
+
+\return In case of an error, ex_put_elem_var_tab() 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().
+ - the specified number of element blocks is different than the
+ number specified in a call to ex_put_init().
+ - ex_put_elem_block() not called previously to specify
+ element block parameters.
+ - ex_put_variable_param() not called previously to specify
+ the number of element variables or was called but with a different
+ number of element variables.
+ - ex_put_elem_var() previously called.
+
+\param[in] exoid exodus file ID returned from a previous call to ex_create() or ex_open().
+\param[in] num_elem_blk The number of element blocks.
+\param[in] num_elem_var The number of element variables.
+\param[in] elem_var_tab Size [num_elem_blk,num_elem_var]. A 2-dimensional array
+ (with the \c num_elem_var index cycling faster)
+ containing the element variable truth table.
+
+The following coding will create, populate, and write an element
+variable truth table to an opened exodus file (NOTE: all element
+variables are valid for all element blocks in this example.):
+
+\code
+int *truth_tab, num_elem_blk, num_ele_vars, error, exoid;
+
+\comment{write element variable truth table}
+truth_tab = (int *)calloc((num_elem_blk*num_ele_vars), sizeof(int));
+
+for (i=0, k=0; i < num_elem_blk; i++) {
+ for (j=0; j < num_ele_vars; j++) {
+ truth_tab[k++] = 1;
+ }
+}
+error = ex_put_elem_var_tab(exoid, num_elem_blk, num_ele_vars,
+ truth_tab);
+\endcode
+
+*/
+
+int ex_put_elem_var_tab (int exoid,
+ int num_elem_blk,
+ int num_elem_var,
+ int *elem_var_tab)
+{
+ return ex_put_truth_table(exoid, EX_ELEM_BLOCK, num_elem_blk, num_elem_var, elem_var_tab);
+}
diff --git a/cbind/src/expvv.c b/exodus/cbind/src/expvv.c
similarity index 100%
rename from cbind/src/expvv.c
rename to exodus/cbind/src/expvv.c
diff --git a/cbind/src/exupda.c b/exodus/cbind/src/exupda.c
similarity index 100%
rename from cbind/src/exupda.c
rename to exodus/cbind/src/exupda.c
diff --git a/cbind/test/CMakeLists.txt b/exodus/cbind/test/CMakeLists.txt
similarity index 97%
rename from cbind/test/CMakeLists.txt
rename to exodus/cbind/test/CMakeLists.txt
index 36813a4..88ce577 100644
--- a/cbind/test/CMakeLists.txt
+++ b/exodus/cbind/test/CMakeLists.txt
@@ -63,7 +63,8 @@ SET( cbind_OLDTESTS
testwt-nfaced
create_mesh
rd_wt_mesh
-)
+ testwt-long-name
+ testrd-long-name)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/testall.in
diff --git a/cbind/test/CreateEdgeFace.c b/exodus/cbind/test/CreateEdgeFace.c
similarity index 97%
rename from cbind/test/CreateEdgeFace.c
rename to exodus/cbind/test/CreateEdgeFace.c
index f80be73..3930008 100644
--- a/cbind/test/CreateEdgeFace.c
+++ b/exodus/cbind/test/CreateEdgeFace.c
@@ -103,20 +103,20 @@ int emap1[] = {
};
const char* eblk_names[] = {
- "Eli WALLACH",
- "Angelo NOVI"
+ "Eli_WALLACH",
+ "Angelo_NOVI"
};
-const char* edblk_names[] = { "Aldo GIUFFRE" };
+const char* edblk_names[] = { "Aldo_GIUFFRE" };
const char* fablk_names[] = {
- "Livio LORENZON",
- "Claudio SCARCHILLI",
- "John BARTHA"
+ "Livio_LORENZON",
+ "Claudio_SCARCHILLI",
+ "John_BARTHA"
};
-const char* nmap_names[] = { "Luigi PISTILLI" };
-const char* edmap_names[] = { "Antonio CASALE" };
-const char* famap_names[] = { "Sandro SCARCHILLI" };
-const char* emap_names[] = { "Benito STEFANELLI" };
+const char* nmap_names[] = { "Luigi_PISTILLI" };
+const char* edmap_names[] = { "Antonio_CASALE" };
+const char* famap_names[] = { "Sandro_SCARCHILLI" };
+const char* emap_names[] = { "Benito_STEFANELLI" };
/* ======== Sets ========= */
int nset_nodes[] = {
@@ -157,17 +157,17 @@ int elset_elems[] = {
};
const char* elset_names[] = {
- "Clint EASTWOOD",
- "Lee VAN CLEEF"
+ "Clint_EASTWOOD",
+ "Lee_VAN_CLEEF"
};
-const char* nset_names[] = { "Ennio MORRICONE" };
-const char* eset_names[] = { "Rada RASSIMOV" };
-const char* fset_names[] = { "Enzo PETITO" };
-const char* sset_names[] = { "Luciano VINCENZONI" };
+const char* nset_names[] = { "Ennio_MORRICONE" };
+const char* eset_names[] = { "Rada_RASSIMOV" };
+const char* fset_names[] = { "Enzo_PETITO" };
+const char* sset_names[] = { "Luciano_VINCENZONI" };
/* ======== Attributes ========= */
-const char* edge_attr_names1[] = {"Sergio LEONE"};
+const char* edge_attr_names1[] = {"Sergio_LEONE"};
const char* face_attr_names1[] = {"GOOD"};
const char* face_attr_names2[] = {"BAD"};
@@ -278,7 +278,7 @@ int cCreateEdgeFace( int argc, char* argv[] )
1, /* num_edge_blk */
11, /* num_face */
3, /* num_face_blk */
- 2, /* num_elem */
+ 3, /* num_elem */
2, /* num_elem_blk */
1, /* num_node_sets */
1, /* num_edge_sets */
@@ -352,7 +352,7 @@ int cCreateEdgeFace( int argc, char* argv[] )
blockParams.define_maps = 0;
- strcpy(blockParams.edge_type[0], "STRAIGHT2");
+ strcpy(blockParams.edge_type[0], "EDGE2");
strcpy(blockParams.face_type[0], "QUAD4");
strcpy(blockParams.face_type[1], "QUAD4");
diff --git a/cbind/test/Imakefile b/exodus/cbind/test/Imakefile
similarity index 93%
rename from cbind/test/Imakefile
rename to exodus/cbind/test/Imakefile
index 12a6391..95f0895 100644
--- a/cbind/test/Imakefile
+++ b/exodus/cbind/test/Imakefile
@@ -35,16 +35,16 @@
INCLUDES = -I../include
-EXOIITEST = -L../.. -lexodus
-LOCALEXO = ../../libexodus.a
-LIBS = $(EXOIITEST) -L$(USRLIBDIR) $(NETCDF) $(EXTRANETCDFLIB)
+EXOIITEST = -Wl,-R../src -L../src -lexodus
+LOCALEXO = ../src/libexodus.a
+LIBS = $(LOCALEXO) -L$(USRLIBDIR) $(NETCDF) $(EXTRANETCDFLIB)
PROGS = testwt testwtd testrd testrd1 testrdd testwt1 testwt2 testwtm \
testwt_ss testwt_nossnsdf testrd_ss testrdwt testcp testcpd testcp_nl \
testcp_ln testwt_clb testwt_nc testrd_nc testwt-zeroe testwt-zeron \
testrdv testwt-one-attrib create_mesh rd_wt_mesh \
testrd-partial testwt-partial testwt-nsided testrd-nsided testwt-nfaced \
- testrd-nfaced
+ testrd-nfaced testwt-long-name testrd-long-name
#if 0
CreateEdgeFace ReadEdgeFace
@@ -74,6 +74,8 @@ NormalProgramTarget(testcp_ln ,testcp_ln.o, $(LOCALEXO), /**/, $(LIBS))
NormalProgramTarget(testwt_nc, testwt_nc.o, $(LOCALEXO), /**/, $(LIBS))
NormalProgramTarget(testrd_nc, testrd_nc.o, $(LOCALEXO), /**/, $(LIBS))
+NormalProgramTarget(testwt-long-name,testwt-long-name.o,$(LOCALEXO), /**/, $(LIBS))
+NormalProgramTarget(testrd-long-name,testrd-long-name.o,$(LOCALEXO), /**/, $(LIBS))
NormalProgramTarget(testwt-zeroe, testwt-zeroe.o, $(LOCALEXO), /**/, $(LIBS))
NormalProgramTarget(testwt-zeron, testwt-zeron.o, $(LOCALEXO), /**/, $(LIBS))
NormalProgramTarget(testwt-one-attrib, testwt-one-attrib.o, $(LOCALEXO), /**/, $(LIBS))
diff --git a/cbind/test/Makefile.standalone b/exodus/cbind/test/Makefile.standalone
similarity index 84%
rename from cbind/test/Makefile.standalone
rename to exodus/cbind/test/Makefile.standalone
index 00064ba..27e80e2 100644
--- a/cbind/test/Makefile.standalone
+++ b/exodus/cbind/test/Makefile.standalone
@@ -36,10 +36,11 @@ LOCALEXO = ../../libexodus.a
LIBS = $(EXOIITEST) $(NETCDF_LIB) -lm
PROGS = testwt testwtd testrd testrd1 testrdd testwt1 testwt2 testwtm \
- testwt_ss testwt_nossnsdf testrd_ss testrdwt testcp testcpd \
- testwt_clb testwt_nc testrd_nc testwt-zeroe testwt-zeron \
- testrdv testwt-one-attrib create_mesh rd_wt_mesh testcef \
- testref testwt-nsided testrd-nsided testwt-nfaced testrd-nfaced
+ testwt_ss testwt_nossnsdf testrd_ss testrdwt testcp testcpd testcp_nl \
+ testcp_ln testwt_clb testwt_nc testrd_nc testwt-zeroe testwt-zeron \
+ testrdv testwt-one-attrib create_mesh rd_wt_mesh \
+ testrd-partial testwt-partial testwt-nsided testrd-nsided testwt-nfaced \
+ testrd-nfaced testwt-long-name testrd-long-name
all:: check
@@ -88,6 +89,12 @@ testrdwt: testrdwt.o $(LOCALEXO)
testcp: testcp.o $(LOCALEXO)
$(CC) $(CFLAGS) -o $@ testcp.o $(LDFLAGS) $(LIBS)
+testcp_nl: testcp_nl.o $(LOCALEXO)
+ $(CC) $(CFLAGS) -o $@ testcp_nl.o $(LDFLAGS) $(LIBS)
+
+testcp_ln: testcp_ln.o $(LOCALEXO)
+ $(CC) $(CFLAGS) -o $@ testcp_ln.o $(LDFLAGS) $(LIBS)
+
testcpd: testcpd.o $(LOCALEXO)
$(CC) $(CFLAGS) -o $@ testcpd.o $(LDFLAGS) $(LIBS)
@@ -130,6 +137,19 @@ testcef: CreateEdgeFace.c $(LOCALEXO)
testref: ReadEdgeFace.c $(LOCALEXO)
$(CC) $(CFLAGS) -DReadEdgeFace=main -o $@ ReadEdgeFace.c $(LDFLAGS) $(LIBS)
+testwt-long-name: testwt-long-name.o $(LOCALEXO)
+ $(CC) $(CFLAGS) -o $@ testwt-long-name.o $(LDFLAGS) $(LIBS)
+
+testrd-long-name: testrd-long-name.o $(LOCALEXO)
+ $(CC) $(CFLAGS) -o $@ testrd-long-name.o $(LDFLAGS) $(LIBS)
+
+testrd-partial: testrd-partial.o $(LOCALEXO)
+ $(CC) $(CFLAGS) -o $@ testrd-partial.o $(LDFLAGS) $(LIBS)
+
+testwt-partial: testwt-partial.o $(LOCALEXO)
+ $(CC) $(CFLAGS) -o $@ testwt-partial.o $(LDFLAGS) $(LIBS)
+
+
test: check
check: $(PROGS)
csh ./testall
diff --git a/cbind/test/ReadEdgeFace.c b/exodus/cbind/test/ReadEdgeFace.c
similarity index 99%
rename from cbind/test/ReadEdgeFace.c
rename to exodus/cbind/test/ReadEdgeFace.c
index 75924f6..44d9c2f 100644
--- a/cbind/test/ReadEdgeFace.c
+++ b/exodus/cbind/test/ReadEdgeFace.c
@@ -20,7 +20,7 @@
fprintf( stdout, sucmsg, ival ); \
}
-int obj_types[] = {
+ex_entity_type obj_types[] = {
EX_EDGE_BLOCK,
EX_FACE_BLOCK,
EX_ELEM_BLOCK,
@@ -35,7 +35,7 @@ int obj_types[] = {
EX_ELEM_MAP
};
-int obj_sizes[] = {
+ex_inquiry obj_sizes[] = {
EX_INQ_EDGE_BLK,
EX_INQ_FACE_BLK,
EX_INQ_ELEM_BLK,
@@ -358,6 +358,8 @@ int cReadEdgeFace( int argc, char* argv[] )
case EX_ELEM_MAP:
num_entries = modelParams.num_elem;
break;
+ default:
+ num_entries = 0;
}
if ( num_entries ) {
fprintf( stdout, "Entries: %3d\n :", num_entries );
diff --git a/cbind/test/create_mesh.c b/exodus/cbind/test/create_mesh.c
similarity index 99%
rename from cbind/test/create_mesh.c
rename to exodus/cbind/test/create_mesh.c
index 26c46f1..44f9544 100644
--- a/cbind/test/create_mesh.c
+++ b/exodus/cbind/test/create_mesh.c
@@ -455,7 +455,7 @@ void write_exo_mesh(
int IO_word_size=sizeof(realtyp);
int exoid, err, num_dim, num_elem_blk, num_node_sets, num_side_sets;
int i, j, t, index, loc_num_elements, loc_num_nodes, len_connect;
- int *elem_map, *node_map, *domain_connect, *loc_connect;
+ int *elem_map = NULL, *node_map = NULL, *domain_connect = NULL, *loc_connect = NULL;
int *elem_var_tab;
int accum_num_elements = 0;
int loc_node_size = -1;
@@ -476,7 +476,7 @@ void write_exo_mesh(
exoid = ex_create (temporary_name, EX_CLOBBER, &CPU_word_size, &IO_word_size);
if (exoid < 0) {
- fprintf(stderr, "after ex_create, error = %d\n", err);
+ fprintf(stderr, "after ex_create, error = %d\n", exoid);
exit(-1);
}
diff --git a/exodus/cbind/test/exodus_unit_tests.gold b/exodus/cbind/test/exodus_unit_tests.gold
new file mode 100644
index 0000000..c5168ac
--- /dev/null
+++ b/exodus/cbind/test/exodus_unit_tests.gold
@@ -0,0 +1,41 @@
+************************************************************************
+************************************************************************
+testwt - single precision write test...
+testrd - single precision read test...
+testrdv - single precision read test with varid...
+testcp_ss - single-to-single precision copy test...
+testcp_sd - single-to-double precision copy test...
+testcp_ln - large model to normal model single precision copy test...
+testcp_nl - normal_model to large_model single precision copy test...
+testwt_clb - single precision write test using concatenated puts...
+testwtd - double precision write test...
+testrdd - double precision read test...
+testcp_dd - double-to-double precision copy test...
+testcp_ds - double-to-single precision copy test...
+testwt1 - single precision write files with several side sets...
+testwt1 ... [Expect WEDGE6 warning from this test]
+testrd1 - single precision read test of a file with several side sets...
+testrd1 ... [Expect file create failure error, NOCLOBBER]
+testrd1 ... [Expect failure locating elem var 1 for elem block 12]
+testwt_ss - write files to test side sets...
+testwt_ss ... [Expect WEDGE6 warning from this test]
+testrd_ss - read test of a file with several side sets...
+testrd_ss ... [Expect warning for NULL sidesets 30 and 31]
+testwt2 - single precision write 2 files (simultaneously open) test...
+testrdwt - read from one and write to another (simutaneously open) file...
+testwt_nc - write x y z components of coordinates separately...
+testrd_nc - read x y z components of coordinates separately...
+testwt-zeron - write file with zero nodes and elements...
+testrd - read test of file with zero nodes and elements...
+testwt-zeroe - write file with zero elements...
+testrd - read test of file with zero elements...
+testwt-one-attrib - read/write test of element attributes - read one at a time...
+testwt-nsided - write file with nsided elements...
+testrd-nsided - read file with nsided elements...
+testwt-nfaced - write file with nfaced elements...
+testrd-nfaced - read file with nfaced elements...
+testwt-long-name - write file with long (64-character) names...
+testrd - read long name file truncating to 32 characters on read...
+testrd-long-name - read long name file...
+************************************************************************
+************************************************************************
diff --git a/cbind/test/makedmp b/exodus/cbind/test/makedmp
similarity index 100%
rename from cbind/test/makedmp
rename to exodus/cbind/test/makedmp
diff --git a/cbind/test/rd_wt_mesh.c b/exodus/cbind/test/rd_wt_mesh.c
similarity index 99%
rename from cbind/test/rd_wt_mesh.c
rename to exodus/cbind/test/rd_wt_mesh.c
index cecf2e5..007106b 100644
--- a/cbind/test/rd_wt_mesh.c
+++ b/exodus/cbind/test/rd_wt_mesh.c
@@ -138,12 +138,12 @@ int main( int argc, char **argv )
int rank, num_domains;
int quit=FALSE;
int loc_num_nodes, loc_num_elems;
- int *loc_connect;
+ int *loc_connect = NULL;
#ifdef HAVE_PARALLEL
MPI_Info mpi_info_object = MPI_INFO_NULL; /* Copy of MPI Info object. */
#endif
- int *elem_map;
+ int *elem_map = NULL;
int exodus = TRUE; /* TRUE, perform EXODUS benchmark; FALSE don't */
int close_files = FALSE;
char file_name[MAX_STRING_LEN] = DEFAULT_FILE_NAME; /* Input file name. */
@@ -177,9 +177,9 @@ int main( int argc, char **argv )
char value[MAX_STRING_LEN]; /* Value of a key/value pair in a MPI Info */
#endif
/* object. */
- realtyp *x_coords;
- realtyp *y_coords;
- realtyp *z_coords;
+ realtyp *x_coords = NULL;
+ realtyp *y_coords = NULL;
+ realtyp *z_coords = NULL;
int ndim;
#ifdef HAVE_PARALLEL
MPI_Info new_mpi_info_object;
@@ -297,7 +297,7 @@ int main( int argc, char **argv )
}
if ( exodus ) {
- int *node_map;
+ int *node_map = NULL;
if (0 == read_exo_mesh(file_name, rank, &ndim, num_domains,
&num_nodal_fields, &num_global_fields, &num_element_fields,
&num_timesteps, sleep_time, num_iterations,
@@ -442,7 +442,7 @@ int read_exo_mesh (char *file_name, int rank, int *num_dim, int num_domains,
struct stat file_status;
size_t glob_file_size;
size_t glob_raw_data_vol;
- size_t raw_data_vol;
+ size_t raw_data_vol = 0;
float version;
realtyp *globals = NULL;
@@ -763,13 +763,13 @@ int write_exo_mesh (char *file_name, int rank, int num_dim, int num_domains, int
int IO_word_size = sizeof(realtyp);
int j, t, npd, err, num_elem_blk, num_node_sets, num_side_sets;
int iter;
- int *elem_var_tab;
+ int *elem_var_tab = NULL;
size_t file_size;
struct stat file_status;
size_t glob_file_size;
size_t glob_raw_data_vol;
- size_t raw_data_vol;
+ size_t raw_data_vol = 0;
realtyp *globals = NULL;
@@ -787,9 +787,9 @@ int write_exo_mesh (char *file_name, int rank, int num_dim, int num_domains, int
char tmp_name[MAX_STRING_LEN];
char base_name[MAX_STRING_LEN];
- char **gvar_name;
- char **nvar_name;
- char **evar_name;
+ char **gvar_name = NULL;
+ char **nvar_name = NULL;
+ char **evar_name = NULL;
int *exoid = NULL;
exoid = malloc(files_per_domain * sizeof(int));
diff --git a/cbind/test/test.dmp b/exodus/cbind/test/test.dmp
similarity index 96%
copy from cbind/test/test.dmp
copy to exodus/cbind/test/test.dmp
index 2853709..18c3d0e 100644
--- a/cbind/test/test.dmp
+++ b/exodus/cbind/test/test.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 7 ;
@@ -63,39 +64,39 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
float nattrb(num_nodes, num_att_in_nblk) ;
- char nattrib_name(num_att_in_nblk, len_string) ;
+ char nattrib_name(num_att_in_nblk, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
float attrib6(num_el_in_blk6, num_att_in_blk6) ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "tetra" ;
float attrib7(num_el_in_blk7, num_att_in_blk7) ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "tri" ;
int eb_prop2(num_el_blk) ;
@@ -114,7 +115,7 @@ variables:
int ns_prop3(num_node_sets) ;
ns_prop3:name = "VELOCITY" ;
float nsattrb1(num_nod_ns1, num_att_in_ns1) ;
- char nsattrib_name1(num_att_in_ns1, len_string) ;
+ char nsattrib_name1(num_att_in_ns1, len_name) ;
int elem_ss1(num_side_ss1) ;
int side_ss1(num_side_ss1) ;
float dist_fact_ss1(num_df_ss1) ;
@@ -132,14 +133,14 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
- char name_nset_var(num_nset_var, len_string) ;
- char name_sset_var(num_sset_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
+ char name_nset_var(num_nset_var, len_name) ;
+ char name_sset_var(num_sset_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var2eb1(time_step, num_el_in_blk1) ;
float vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -188,6 +189,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
@@ -493,9 +495,9 @@ data:
"nod_var1" ;
name_elem_var =
- "ele_var0",
- "ele_var1",
- "ele_var2" ;
+ "this_variable_name_is_short",
+ "this_variable_name_is_just_right",
+ "this_variable_name_is_tooooo_lon" ;
name_nset_var =
"ns_var0",
diff --git a/cbind/test/test.exo_c b/exodus/cbind/test/test.exo_c
similarity index 100%
rename from cbind/test/test.exo_c
rename to exodus/cbind/test/test.exo_c
diff --git a/cbind/test/test1.dmp b/exodus/cbind/test/test1.dmp
similarity index 94%
rename from cbind/test/test1.dmp
rename to exodus/cbind/test/test1.dmp
index 5e8fe7b..83d02d4 100644
--- a/cbind/test/test1.dmp
+++ b/exodus/cbind/test/test1.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 28 ;
num_elem = 8 ;
@@ -61,17 +62,17 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int nm_prop1(num_node_maps) ;
nm_prop1:name = "ID" ;
- char nmap_names(num_node_maps, len_string) ;
+ char nmap_names(num_node_maps, len_name) ;
int node_map1(num_nodes) ;
int em_prop1(num_elem_maps) ;
em_prop1:name = "ID" ;
- char emap_names(num_elem_maps, len_string) ;
+ char emap_names(num_elem_maps, len_name) ;
int elem_map1(num_elem) ;
int elem_map2(num_elem) ;
int em_prop2(num_elem_maps) ;
@@ -84,31 +85,31 @@ variables:
nm_prop2:_FillValue = 0 ;
nm_prop2:name = "NUMBER" ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "circle" ;
float attrib6(num_el_in_blk6, num_att_in_blk6) ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "sphere" ;
float attrib7(num_el_in_blk7, num_att_in_blk7) ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -143,12 +144,12 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var1eb2(time_step, num_el_in_blk2) ;
float vals_elem_var1eb4(time_step, num_el_in_blk4) ;
@@ -174,6 +175,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is testwt1" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/cbind/test/test2-1.dmp b/exodus/cbind/test/test2-1.dmp
similarity index 95%
rename from cbind/test/test2-1.dmp
rename to exodus/cbind/test/test2-1.dmp
index fa8a74e..d4e1d39 100644
--- a/cbind/test/test2-1.dmp
+++ b/exodus/cbind/test/test2-1.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -53,29 +54,29 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -110,12 +111,12 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var2eb1(time_step, num_el_in_blk1) ;
float vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -137,6 +138,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/cbind/test/test2-2.dmp b/exodus/cbind/test/test2-2.dmp
similarity index 94%
rename from cbind/test/test2-2.dmp
rename to exodus/cbind/test/test2-2.dmp
index 498f075..5e60a2d 100644
--- a/cbind/test/test2-2.dmp
+++ b/exodus/cbind/test/test2-2.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -53,29 +54,29 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -110,12 +111,12 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var2eb1(time_step, num_el_in_blk1) ;
float vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -137,6 +138,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is test 2" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/cbind/test/test2.dmp b/exodus/cbind/test/test2.dmp
similarity index 91%
rename from cbind/test/test2.dmp
rename to exodus/cbind/test/test2.dmp
index 0f35951..8a41281 100644
--- a/cbind/test/test2.dmp
+++ b/exodus/cbind/test/test2.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -50,29 +51,29 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -119,6 +120,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1 ;
diff --git a/cbind/test/test_clb.dmp b/exodus/cbind/test/test_clb.dmp
similarity index 96%
rename from cbind/test/test_clb.dmp
rename to exodus/cbind/test/test_clb.dmp
index 7aa0536..99024ac 100644
--- a/cbind/test/test_clb.dmp
+++ b/exodus/cbind/test/test_clb.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 7 ;
@@ -61,38 +62,38 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "tetra" ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
float attrib6(num_el_in_blk6, num_att_in_blk6) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "tri" ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
float attrib7(num_el_in_blk7, num_att_in_blk7) ;
int eb_prop2(num_el_blk) ;
eb_prop2:_FillValue = 0 ;
@@ -127,11 +128,11 @@ variables:
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
float vals_glo_var(time_step, num_glo_var) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var2eb1(time_step, num_el_in_blk1) ;
float vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -154,13 +155,13 @@ variables:
float vals_elem_var2eb7(time_step, num_el_in_blk7) ;
float vals_elem_var3eb7(time_step, num_el_in_blk7) ;
int elem_var_tab(num_el_blk, num_elem_var) ;
- char name_nset_var(num_nset_var, len_string) ;
+ char name_nset_var(num_nset_var, len_name) ;
float vals_nset_var1ns1(time_step, num_nod_ns1) ;
float vals_nset_var3ns1(time_step, num_nod_ns1) ;
float vals_nset_var1ns2(time_step, num_nod_ns2) ;
float vals_nset_var3ns2(time_step, num_nod_ns2) ;
int nset_var_tab(num_node_sets, num_nset_var) ;
- char name_sset_var(num_sset_var, len_string) ;
+ char name_sset_var(num_sset_var, len_name) ;
float vals_sset_var2ss1(time_step, num_side_ss1) ;
float vals_sset_var4ss1(time_step, num_side_ss1) ;
float vals_sset_var6ss1(time_step, num_side_ss1) ;
@@ -184,6 +185,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/cbind/test/testall.in b/exodus/cbind/test/testall
similarity index 72%
copy from cbind/test/testall.in
copy to exodus/cbind/test/testall
index c0a234a..17099e3 100755
--- a/cbind/test/testall.in
+++ b/exodus/cbind/test/testall
@@ -38,85 +38,86 @@
#set PREFIX = "valgrind --tool=memcheck"
set PREFIX = ""
-set BINDIR = @CMAKE_CURRENT_BINARY_DIR@
-set SRCDIR = @CMAKE_CURRENT_SOURCE_DIR@
-set NCDUMP = @Netcdf_LIBRARY_DIRS@/../bin/ncdump
+set SUFFIX = ""
+set BINDIR = /Users/gdsjaar/src/exodusii-sf/exodus/cbind/test
+set SRCDIR = /Users/gdsjaar/src/exodusii-sf/exodus/cbind/test
+set NCDUMP = /Users/gdsjaar/src/SEACAS.git/bin/ncdump
echo "************************************************************************"
echo "************************************************************************"
rm -f test.output
echo "testwt - single precision write test..."
echo "begin testwt" > test.output
-${PREFIX} ${BINDIR}/testwt >> test.output
+${PREFIX} ${BINDIR}/testwt${SUFFIX} >> test.output
echo "end testwt" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test.dmp | tee testwt.res
echo "testrd - single precision read test..."
echo "begin testrd" >> test.output
-${PREFIX} ${BINDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd.dmp | tee testrd.res
+${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd.dmp | tee testrd.res
echo "end testrd" >> test.output
echo "testrdv - single precision read test with varid..."
echo "begin testrdv" >> test.output
-${PREFIX} ${BINDIR}/testrdv | grep -v version | diff - ${SRCDIR}/testrdv.dmp | tee testrdv.res
+${PREFIX} ${BINDIR}/testrdv${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrdv.dmp | tee testrdv.res
echo "end testrdv" >> test.output
echo "testcp_ss - single-to-single precision copy test..."
echo "begin testcp_ss" >> test.output
-${PREFIX} ${BINDIR}/testcp >> test.output
+${PREFIX} ${BINDIR}/testcp${SUFFIX} >> test.output
echo "end testcp_ss" >> test.output
${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ss.dmp | tee testcp_ss.res
echo "testcp_sd - single-to-double precision copy test..."
echo "begin testcp_sd" >> test.output
-${PREFIX} ${BINDIR}/testcpd >> test.output
+${PREFIX} ${BINDIR}/testcpd${SUFFIX} >> test.output
echo "end testcp_sd" >> test.output
${NCDUMP} -d5,5 testcpd.exo | grep -v version | diff - ${SRCDIR}/testcp_sd.dmp | tee testcp_sd.res
echo "testcp_ln - large model to normal model single precision copy test..."
echo "begin testcp_ln" >> test.output
-${PREFIX} ${BINDIR}/testcp_ln >> test.output
+${PREFIX} ${BINDIR}/testcp_ln${SUFFIX} >> test.output
echo "end testcp_ln" >> test.output
${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ln.dmp | tee testcp_ln.res
echo "testcp_nl - normal_model to large_model single precision copy test..."
echo "begin testcp_nl" >> test.output
-${PREFIX} ${BINDIR}/testcp_nl >> test.output
+${PREFIX} ${BINDIR}/testcp_nl${SUFFIX} >> test.output
echo "end testcp_nl" >> test.output
${NCDUMP} -d5,5 testcp_nl.exo | grep -v version | diff - ${SRCDIR}/testcp_nl.dmp | tee testcp_nl.res
echo "testwt_clb - single precision write test using concatenated puts..."
echo "begin testwt_clb" >> test.output
-${PREFIX} ${BINDIR}/testwt_clb >> test.output
+${PREFIX} ${BINDIR}/testwt_clb${SUFFIX} >> test.output
echo "end testwt_clb" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test_clb.dmp | tee testwt_clb.res
echo "testwtd - double precision write test..."
echo "begin testwtd" >> test.output
-${PREFIX} ${BINDIR}/testwtd >> test.output
+${PREFIX} ${BINDIR}/testwtd${SUFFIX} >> test.output
echo "end testwtd" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testd.dmp | tee testwtd.res
echo "testrdd - double precision read test..."
echo "begin testrdd" >> test.output
-${PREFIX} ${BINDIR}/testrdd | grep -v version | diff - ${SRCDIR}/testrdd.dmp | tee testrdd.res
+${PREFIX} ${BINDIR}/testrdd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrdd.dmp | tee testrdd.res
echo "end testrdd" >> test.output
echo "testcp_dd - double-to-double precision copy test..."
echo "begin testcp_dd" >> test.output
-${PREFIX} ${BINDIR}/testcpd >> test.output
+${PREFIX} ${BINDIR}/testcpd${SUFFIX} >> test.output
echo "end testcp_dd" >> test.output
${NCDUMP} -d5,5 testcpd.exo | grep -v version | diff - ${SRCDIR}/testcp_dd.dmp | tee testcp_dd.res
echo "testcp_ds - double-to-single precision copy test..."
echo "begin testcp_ds" >> test.output
-${PREFIX} ${BINDIR}/testcp >> test.output
+${PREFIX} ${BINDIR}/testcp${SUFFIX} >> test.output
echo "end testcp_ds" >> test.output
${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ds.dmp | tee testcp_ds.res
echo "testwt1 - single precision write files with several side sets..."
echo "testwt1 ... [Expect WEDGE6 warning from this test]"
echo "begin testwt1" >> test.output
-${PREFIX} ${BINDIR}/testwt1 >> test.output
+${PREFIX} ${BINDIR}/testwt1${SUFFIX} >> test.output
echo "end testwt1" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test1.dmp | tee testwt1.res
@@ -124,94 +125,110 @@ echo "testrd1 - single precision read test of a file with several side sets..."
echo "testrd1 ... [Expect file create failure error, NOCLOBBER]"
echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]"
echo "begin testrd1" >> test.output
-${PREFIX} ${BINDIR}/testrd1 | grep -v version | diff - ${SRCDIR}/testrd1.dmp | tee testrd1.res
+${PREFIX} ${BINDIR}/testrd1${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd1.dmp | tee testrd1.res
echo "end testrd1" >> test.output
echo "testwt_ss - write files to test side sets..."
echo "testwt_ss ... [Expect WEDGE6 warning from this test]"
echo "begin testwt_ss" >> test.output
-${PREFIX} ${BINDIR}/testwt_ss >> test.output
+${PREFIX} ${BINDIR}/testwt_ss${SUFFIX} >> test.output
echo "end testwt_ss" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt_ss.dmp | tee testwt_ss.res
echo "testrd_ss - read test of a file with several side sets..."
echo "testrd_ss ... [Expect warning for NULL sidesets 30 and 31]"
echo "begin testrd_ss" >> test.output
-${PREFIX} ${BINDIR}/testrd_ss | grep -v version | diff - ${SRCDIR}/testrd_ss.dmp | tee testrd_ss.res
+${PREFIX} ${BINDIR}/testrd_ss${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_ss.dmp | tee testrd_ss.res
echo "end testrd_ss" >> test.output
echo "testwt2 - single precision write 2 files (simultaneously open) test..."
echo "begin testwt2" >> test.output
-${PREFIX} ${BINDIR}/testwt2 >> test.output
+${PREFIX} ${BINDIR}/testwt2${SUFFIX} >> test.output
echo "end testwt2" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test2-1.dmp | tee testwt2-1.res
${NCDUMP} -d5,5 test2.exo | grep -v version | diff - ${SRCDIR}/test2-2.dmp | tee testwt2-2.res
echo "testrdwt - read from one and write to another (simutaneously open) file..."
echo "begin testrdwt" >> test.output
-${PREFIX} ${BINDIR}/testrdwt >> test.output
+${PREFIX} ${BINDIR}/testrdwt${SUFFIX} >> test.output
echo "end testrdwt" >> test.output
${NCDUMP} -d5,5 test2.exo | grep -v version | diff - ${SRCDIR}/test2.dmp | tee testrdwt.res
echo "testwt_nc - write x y z components of coordinates separately..."
echo "begin testwt_nc" >> test.output
-${PREFIX} ${BINDIR}/testwt_nc >> test.output
+${PREFIX} ${BINDIR}/testwt_nc${SUFFIX} >> test.output
echo "end testwt_nc" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test.dmp | tee testwt_nc.res
echo "testrd_nc - read x y z components of coordinates separately..."
echo "begin testrd_nc" >> test.output
-${PREFIX} ${BINDIR}/testrd_nc | grep -v version | diff - ${SRCDIR}/testrd_nc.dmp | tee testrd_nc.res
+${PREFIX} ${BINDIR}/testrd_nc${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_nc.dmp | tee testrd_nc.res
echo "end testrd" >> test.output
echo "testwt-zeron - write file with zero nodes and elements..."
echo "begin testwt-zeron" >> test.output
-${PREFIX} ${BINDIR}/testwt-zeron >> test.output
+${PREFIX} ${BINDIR}/testwt-zeron${SUFFIX} >> test.output
echo "end testwt-zeron" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt-zeron.dmp | tee testwt-zeron.res
echo "testrd - read test of file with zero nodes and elements..."
echo "begin testrd zero nodes" >> test.output
-${PREFIX} ${BINDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd_zeron.dmp | tee testrd_zeron.res
+${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_zeron.dmp | tee testrd_zeron.res
echo "end testrd zero nodes" >> test.output
echo "testwt-zeroe - write file with zero elements..."
echo "begin testwt-zeroe" >> test.output
-${PREFIX} ${BINDIR}/testwt-zeroe >> test.output
+${PREFIX} ${BINDIR}/testwt-zeroe${SUFFIX} >> test.output
echo "end testwt-zeroe" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt-zeroe.dmp | tee testwt-zeroe.res
echo "testrd - read test of file with zero elements..."
echo "begin testrd zero elements" >> test.output
-${PREFIX} ${BINDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd_zeroe.dmp | tee testrd_zeroe.res
+${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_zeroe.dmp | tee testrd_zeroe.res
echo "end testrd zero elements" >> test.output
echo "testwt-one-attrib - read/write test of element attributes - read one at a time..."
echo "begin testwt-one-attrib - read attributes one at a time" >> test.output
-${PREFIX} ${BINDIR}/testwt-one-attrib | tee testrd_zeroe.res
+${PREFIX} ${BINDIR}/testwt-one-attrib${SUFFIX} | tee testrd_zeroe.res
echo "end testwt-one-attrib - read attributes one at a time" >> test.output
echo "testwt-nsided - write file with nsided elements..."
echo "begin testwt-nsided" >> test.output
-${PREFIX} ${BINDIR}/testwt-nsided >> test.output
+${PREFIX} ${BINDIR}/testwt-nsided${SUFFIX} >> test.output
echo "end testwt-nsided" >> test.output
${NCDUMP} -d5,5 test-nsided.exo | grep -v version | diff - ${SRCDIR}/testwt-nsided.dmp | tee testwt-nsided.res
echo "testrd-nsided - read file with nsided elements..."
echo "begin testrd-nsided" >> test.output
-${PREFIX} ${BINDIR}/testrd-nsided | grep -v version | diff - ${SRCDIR}/testrd-nsided.dmp | tee testrd-nsided.res
+${PREFIX} ${BINDIR}/testrd-nsided${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd-nsided.dmp | tee testrd-nsided.res
echo "end testrd-nsided" >> test.output
echo "testwt-nfaced - write file with nfaced elements..."
echo "begin testwt-nfaced" >> test.output
-${PREFIX} ${BINDIR}/testwt-nfaced >> test.output
+${PREFIX} ${BINDIR}/testwt-nfaced${SUFFIX} >> test.output
echo "end testwt-nfaced" >> test.output
${NCDUMP} -d5,5 test-nfaced.exo | grep -v version | diff - ${SRCDIR}/testwt-nfaced.dmp | tee testwt-nfaced.res
echo "testrd-nfaced - read file with nfaced elements..."
echo "begin testrd-nfaced" >> test.output
-${PREFIX} ${BINDIR}/testrd-nfaced | grep -v version | diff - ${SRCDIR}/testrd-nfaced.dmp | tee testrd-nfaced.res
+${PREFIX} ${BINDIR}/testrd-nfaced${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd-nfaced.dmp | tee testrd-nfaced.res
echo "end testrd-nfaced" >> test.output
+echo "testwt-long-name - write file with long (64-character) names..."
+echo "begin testwt-long-name" >> test.output
+${PREFIX} ${BINDIR}/testwt-long-name${SUFFIX} >> test.output
+echo "end testwt-long-name" >> test.output
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt-long-name.dmp | tee testwt-long-name.res
+
+echo "testrd - read long name file truncating to 32 characters on read..."
+echo "begin testrd (truncate)" >> test.output
+${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd-nm32.dmp | tee testrd-nm32.res
+echo "end testrd (truncate)" >> test.output
+
+echo "testrd-long-name - read long name file..."
+echo "begin testrd-long-name" >> test.output
+${PREFIX} ${BINDIR}/testrd-long-name${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd-long-name.dmp | tee testrd-long-name.res
+echo "end testrd-long-name" >> test.output
+
echo "************************************************************************"
echo "************************************************************************"
diff --git a/cbind/test/testall b/exodus/cbind/test/testall.in
old mode 100644
new mode 100755
similarity index 69%
rename from cbind/test/testall
rename to exodus/cbind/test/testall.in
index beea756..6101582
--- a/cbind/test/testall
+++ b/exodus/cbind/test/testall.in
@@ -38,85 +38,86 @@
#set PREFIX = "valgrind --tool=memcheck"
set PREFIX = ""
-set BINDIR = /home/gdsjaar/src/exodusII-sf/exodusii/cbind/test
-set SRCDIR = /home/gdsjaar/src/exodusII-sf/exodusii/cbind/test
-set NCDUMP = /home/gdsjaar/src/SEACAS.git/bin/ncdump
+set SUFFIX = ""
+set BINDIR = @CMAKE_CURRENT_BINARY_DIR@
+set SRCDIR = @CMAKE_CURRENT_SOURCE_DIR@
+set NCDUMP = @NETCDF_NCDUMP@
echo "************************************************************************"
echo "************************************************************************"
rm -f test.output
echo "testwt - single precision write test..."
echo "begin testwt" > test.output
-${PREFIX} ${BINDIR}/testwt >> test.output
+${PREFIX} ${BINDIR}/testwt${SUFFIX} >> test.output
echo "end testwt" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test.dmp | tee testwt.res
echo "testrd - single precision read test..."
echo "begin testrd" >> test.output
-${PREFIX} ${BINDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd.dmp | tee testrd.res
+${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd.dmp | tee testrd.res
echo "end testrd" >> test.output
echo "testrdv - single precision read test with varid..."
echo "begin testrdv" >> test.output
-${PREFIX} ${BINDIR}/testrdv | grep -v version | diff - ${SRCDIR}/testrdv.dmp | tee testrdv.res
+${PREFIX} ${BINDIR}/testrdv${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrdv.dmp | tee testrdv.res
echo "end testrdv" >> test.output
echo "testcp_ss - single-to-single precision copy test..."
echo "begin testcp_ss" >> test.output
-${PREFIX} ${BINDIR}/testcp >> test.output
+${PREFIX} ${BINDIR}/testcp${SUFFIX} >> test.output
echo "end testcp_ss" >> test.output
${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ss.dmp | tee testcp_ss.res
echo "testcp_sd - single-to-double precision copy test..."
echo "begin testcp_sd" >> test.output
-${PREFIX} ${BINDIR}/testcpd >> test.output
+${PREFIX} ${BINDIR}/testcpd${SUFFIX} >> test.output
echo "end testcp_sd" >> test.output
${NCDUMP} -d5,5 testcpd.exo | grep -v version | diff - ${SRCDIR}/testcp_sd.dmp | tee testcp_sd.res
echo "testcp_ln - large model to normal model single precision copy test..."
echo "begin testcp_ln" >> test.output
-${PREFIX} ${BINDIR}/testcp_ln >> test.output
+${PREFIX} ${BINDIR}/testcp_ln${SUFFIX} >> test.output
echo "end testcp_ln" >> test.output
${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ln.dmp | tee testcp_ln.res
echo "testcp_nl - normal_model to large_model single precision copy test..."
echo "begin testcp_nl" >> test.output
-${PREFIX} ${BINDIR}/testcp_nl >> test.output
+${PREFIX} ${BINDIR}/testcp_nl${SUFFIX} >> test.output
echo "end testcp_nl" >> test.output
${NCDUMP} -d5,5 testcp_nl.exo | grep -v version | diff - ${SRCDIR}/testcp_nl.dmp | tee testcp_nl.res
echo "testwt_clb - single precision write test using concatenated puts..."
echo "begin testwt_clb" >> test.output
-${PREFIX} ${BINDIR}/testwt_clb >> test.output
+${PREFIX} ${BINDIR}/testwt_clb${SUFFIX} >> test.output
echo "end testwt_clb" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test_clb.dmp | tee testwt_clb.res
echo "testwtd - double precision write test..."
echo "begin testwtd" >> test.output
-${PREFIX} ${BINDIR}/testwtd >> test.output
+${PREFIX} ${BINDIR}/testwtd${SUFFIX} >> test.output
echo "end testwtd" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testd.dmp | tee testwtd.res
echo "testrdd - double precision read test..."
echo "begin testrdd" >> test.output
-${PREFIX} ${BINDIR}/testrdd | grep -v version | diff - ${SRCDIR}/testrdd.dmp | tee testrdd.res
+${PREFIX} ${BINDIR}/testrdd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrdd.dmp | tee testrdd.res
echo "end testrdd" >> test.output
echo "testcp_dd - double-to-double precision copy test..."
echo "begin testcp_dd" >> test.output
-${PREFIX} ${BINDIR}/testcpd >> test.output
+${PREFIX} ${BINDIR}/testcpd${SUFFIX} >> test.output
echo "end testcp_dd" >> test.output
${NCDUMP} -d5,5 testcpd.exo | grep -v version | diff - ${SRCDIR}/testcp_dd.dmp | tee testcp_dd.res
echo "testcp_ds - double-to-single precision copy test..."
echo "begin testcp_ds" >> test.output
-${PREFIX} ${BINDIR}/testcp >> test.output
+${PREFIX} ${BINDIR}/testcp${SUFFIX} >> test.output
echo "end testcp_ds" >> test.output
${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ds.dmp | tee testcp_ds.res
echo "testwt1 - single precision write files with several side sets..."
echo "testwt1 ... [Expect WEDGE6 warning from this test]"
echo "begin testwt1" >> test.output
-${PREFIX} ${BINDIR}/testwt1 >> test.output
+${PREFIX} ${BINDIR}/testwt1${SUFFIX} >> test.output
echo "end testwt1" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test1.dmp | tee testwt1.res
@@ -124,83 +125,110 @@ echo "testrd1 - single precision read test of a file with several side sets..."
echo "testrd1 ... [Expect file create failure error, NOCLOBBER]"
echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]"
echo "begin testrd1" >> test.output
-${PREFIX} ${BINDIR}/testrd1 | grep -v version | diff - ${SRCDIR}/testrd1.dmp | tee testrd1.res
+${PREFIX} ${BINDIR}/testrd1${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd1.dmp | tee testrd1.res
echo "end testrd1" >> test.output
echo "testwt_ss - write files to test side sets..."
echo "testwt_ss ... [Expect WEDGE6 warning from this test]"
echo "begin testwt_ss" >> test.output
-${PREFIX} ${BINDIR}/testwt_ss >> test.output
+${PREFIX} ${BINDIR}/testwt_ss${SUFFIX} >> test.output
echo "end testwt_ss" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt_ss.dmp | tee testwt_ss.res
echo "testrd_ss - read test of a file with several side sets..."
echo "testrd_ss ... [Expect warning for NULL sidesets 30 and 31]"
echo "begin testrd_ss" >> test.output
-${PREFIX} ${BINDIR}/testrd_ss | grep -v version | diff - ${SRCDIR}/testrd_ss.dmp | tee testrd_ss.res
+${PREFIX} ${BINDIR}/testrd_ss${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_ss.dmp | tee testrd_ss.res
echo "end testrd_ss" >> test.output
echo "testwt2 - single precision write 2 files (simultaneously open) test..."
echo "begin testwt2" >> test.output
-${PREFIX} ${BINDIR}/testwt2 >> test.output
+${PREFIX} ${BINDIR}/testwt2${SUFFIX} >> test.output
echo "end testwt2" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test2-1.dmp | tee testwt2-1.res
${NCDUMP} -d5,5 test2.exo | grep -v version | diff - ${SRCDIR}/test2-2.dmp | tee testwt2-2.res
echo "testrdwt - read from one and write to another (simutaneously open) file..."
echo "begin testrdwt" >> test.output
-${PREFIX} ${BINDIR}/testrdwt >> test.output
+${PREFIX} ${BINDIR}/testrdwt${SUFFIX} >> test.output
echo "end testrdwt" >> test.output
${NCDUMP} -d5,5 test2.exo | grep -v version | diff - ${SRCDIR}/test2.dmp | tee testrdwt.res
echo "testwt_nc - write x y z components of coordinates separately..."
echo "begin testwt_nc" >> test.output
-${PREFIX} ${BINDIR}/testwt_nc >> test.output
+${PREFIX} ${BINDIR}/testwt_nc${SUFFIX} >> test.output
echo "end testwt_nc" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test.dmp | tee testwt_nc.res
echo "testrd_nc - read x y z components of coordinates separately..."
echo "begin testrd_nc" >> test.output
-${PREFIX} ${BINDIR}/testrd_nc | grep -v version | diff - ${SRCDIR}/testrd_nc.dmp | tee testrd_nc.res
+${PREFIX} ${BINDIR}/testrd_nc${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_nc.dmp | tee testrd_nc.res
echo "end testrd" >> test.output
echo "testwt-zeron - write file with zero nodes and elements..."
echo "begin testwt-zeron" >> test.output
-${PREFIX} ${BINDIR}/testwt-zeron >> test.output
+${PREFIX} ${BINDIR}/testwt-zeron${SUFFIX} >> test.output
echo "end testwt-zeron" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt-zeron.dmp | tee testwt-zeron.res
echo "testrd - read test of file with zero nodes and elements..."
echo "begin testrd zero nodes" >> test.output
-${PREFIX} ${BINDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd_zeron.dmp | tee testrd_zeron.res
+${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_zeron.dmp | tee testrd_zeron.res
echo "end testrd zero nodes" >> test.output
echo "testwt-zeroe - write file with zero elements..."
echo "begin testwt-zeroe" >> test.output
-${PREFIX} ${BINDIR}/testwt-zeroe >> test.output
+${PREFIX} ${BINDIR}/testwt-zeroe${SUFFIX} >> test.output
echo "end testwt-zeroe" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt-zeroe.dmp | tee testwt-zeroe.res
echo "testrd - read test of file with zero elements..."
echo "begin testrd zero elements" >> test.output
-${PREFIX} ${BINDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd_zeroe.dmp | tee testrd_zeroe.res
+${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_zeroe.dmp | tee testrd_zeroe.res
echo "end testrd zero elements" >> test.output
echo "testwt-one-attrib - read/write test of element attributes - read one at a time..."
echo "begin testwt-one-attrib - read attributes one at a time" >> test.output
-${PREFIX} ${BINDIR}/testwt-one-attrib | tee testrd_zeroe.res
+${PREFIX} ${BINDIR}/testwt-one-attrib${SUFFIX} | tee testrd_zeroe.res
echo "end testwt-one-attrib - read attributes one at a time" >> test.output
echo "testwt-nsided - write file with nsided elements..."
echo "begin testwt-nsided" >> test.output
-${PREFIX} ${BINDIR}/testwt-nsided >> test.output
+${PREFIX} ${BINDIR}/testwt-nsided${SUFFIX} >> test.output
echo "end testwt-nsided" >> test.output
${NCDUMP} -d5,5 test-nsided.exo | grep -v version | diff - ${SRCDIR}/testwt-nsided.dmp | tee testwt-nsided.res
echo "testrd-nsided - read file with nsided elements..."
echo "begin testrd-nsided" >> test.output
-${PREFIX} ${BINDIR}/testrd-nsided | grep -v version | diff - ${SRCDIR}/testrd-nsided.dmp | tee testrd-nsided.res
+${PREFIX} ${BINDIR}/testrd-nsided${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd-nsided.dmp | tee testrd-nsided.res
echo "end testrd-nsided" >> test.output
+echo "testwt-nfaced - write file with nfaced elements..."
+echo "begin testwt-nfaced" >> test.output
+${PREFIX} ${BINDIR}/testwt-nfaced${SUFFIX} >> test.output
+echo "end testwt-nfaced" >> test.output
+${NCDUMP} -d5,5 test-nfaced.exo | grep -v version | diff - ${SRCDIR}/testwt-nfaced.dmp | tee testwt-nfaced.res
+
+echo "testrd-nfaced - read file with nfaced elements..."
+echo "begin testrd-nfaced" >> test.output
+${PREFIX} ${BINDIR}/testrd-nfaced${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd-nfaced.dmp | tee testrd-nfaced.res
+echo "end testrd-nfaced" >> test.output
+
+echo "testwt-long-name - write file with long (64-character) names..."
+echo "begin testwt-long-name" >> test.output
+${PREFIX} ${BINDIR}/testwt-long-name${SUFFIX} >> test.output
+echo "end testwt-long-name" >> test.output
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt-long-name.dmp | tee testwt-long-name.res
+
+echo "testrd - read long name file truncating to 32 characters on read..."
+echo "begin testrd (truncate)" >> test.output
+${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd-nm32.dmp | tee testrd-nm32.res
+echo "end testrd (truncate)" >> test.output
+
+echo "testrd-long-name - read long name file..."
+echo "begin testrd-long-name" >> test.output
+${PREFIX} ${BINDIR}/testrd-long-name${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd-long-name.dmp | tee testrd-long-name.res
+echo "end testrd-long-name" >> test.output
+
echo "************************************************************************"
echo "************************************************************************"
diff --git a/cbind/test/testall.in b/exodus/cbind/test/testall.in1
old mode 100755
new mode 100644
similarity index 78%
rename from cbind/test/testall.in
rename to exodus/cbind/test/testall.in1
index c0a234a..7a65d4d
--- a/cbind/test/testall.in
+++ b/exodus/cbind/test/testall.in1
@@ -38,85 +38,84 @@
#set PREFIX = "valgrind --tool=memcheck"
set PREFIX = ""
-set BINDIR = @CMAKE_CURRENT_BINARY_DIR@
-set SRCDIR = @CMAKE_CURRENT_SOURCE_DIR@
-set NCDUMP = @Netcdf_LIBRARY_DIRS@/../bin/ncdump
+set SRCDIR = .
+set NCDUMP = @<BINDIR>@/ncdump
echo "************************************************************************"
echo "************************************************************************"
rm -f test.output
echo "testwt - single precision write test..."
echo "begin testwt" > test.output
-${PREFIX} ${BINDIR}/testwt >> test.output
+${PREFIX} ${SRCDIR}/testwt >> test.output
echo "end testwt" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test.dmp | tee testwt.res
echo "testrd - single precision read test..."
echo "begin testrd" >> test.output
-${PREFIX} ${BINDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd.dmp | tee testrd.res
+${PREFIX} ${SRCDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd.dmp | tee testrd.res
echo "end testrd" >> test.output
echo "testrdv - single precision read test with varid..."
echo "begin testrdv" >> test.output
-${PREFIX} ${BINDIR}/testrdv | grep -v version | diff - ${SRCDIR}/testrdv.dmp | tee testrdv.res
+${PREFIX} ${SRCDIR}/testrdv | grep -v version | diff - ${SRCDIR}/testrdv.dmp | tee testrdv.res
echo "end testrdv" >> test.output
echo "testcp_ss - single-to-single precision copy test..."
echo "begin testcp_ss" >> test.output
-${PREFIX} ${BINDIR}/testcp >> test.output
+${PREFIX} ${SRCDIR}/testcp >> test.output
echo "end testcp_ss" >> test.output
${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ss.dmp | tee testcp_ss.res
echo "testcp_sd - single-to-double precision copy test..."
echo "begin testcp_sd" >> test.output
-${PREFIX} ${BINDIR}/testcpd >> test.output
+${PREFIX} ${SRCDIR}/testcpd >> test.output
echo "end testcp_sd" >> test.output
${NCDUMP} -d5,5 testcpd.exo | grep -v version | diff - ${SRCDIR}/testcp_sd.dmp | tee testcp_sd.res
echo "testcp_ln - large model to normal model single precision copy test..."
echo "begin testcp_ln" >> test.output
-${PREFIX} ${BINDIR}/testcp_ln >> test.output
+${PREFIX} ${SRCDIR}/testcp_ln >> test.output
echo "end testcp_ln" >> test.output
${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ln.dmp | tee testcp_ln.res
echo "testcp_nl - normal_model to large_model single precision copy test..."
echo "begin testcp_nl" >> test.output
-${PREFIX} ${BINDIR}/testcp_nl >> test.output
+${PREFIX} ${SRCDIR}/testcp_nl >> test.output
echo "end testcp_nl" >> test.output
${NCDUMP} -d5,5 testcp_nl.exo | grep -v version | diff - ${SRCDIR}/testcp_nl.dmp | tee testcp_nl.res
echo "testwt_clb - single precision write test using concatenated puts..."
echo "begin testwt_clb" >> test.output
-${PREFIX} ${BINDIR}/testwt_clb >> test.output
+${PREFIX} ${SRCDIR}/testwt_clb >> test.output
echo "end testwt_clb" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test_clb.dmp | tee testwt_clb.res
echo "testwtd - double precision write test..."
echo "begin testwtd" >> test.output
-${PREFIX} ${BINDIR}/testwtd >> test.output
+${PREFIX} ${SRCDIR}/testwtd >> test.output
echo "end testwtd" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testd.dmp | tee testwtd.res
echo "testrdd - double precision read test..."
echo "begin testrdd" >> test.output
-${PREFIX} ${BINDIR}/testrdd | grep -v version | diff - ${SRCDIR}/testrdd.dmp | tee testrdd.res
+${PREFIX} ${SRCDIR}/testrdd | grep -v version | diff - ${SRCDIR}/testrdd.dmp | tee testrdd.res
echo "end testrdd" >> test.output
echo "testcp_dd - double-to-double precision copy test..."
echo "begin testcp_dd" >> test.output
-${PREFIX} ${BINDIR}/testcpd >> test.output
+${PREFIX} ${SRCDIR}/testcpd >> test.output
echo "end testcp_dd" >> test.output
${NCDUMP} -d5,5 testcpd.exo | grep -v version | diff - ${SRCDIR}/testcp_dd.dmp | tee testcp_dd.res
echo "testcp_ds - double-to-single precision copy test..."
echo "begin testcp_ds" >> test.output
-${PREFIX} ${BINDIR}/testcp >> test.output
+${PREFIX} ${SRCDIR}/testcp >> test.output
echo "end testcp_ds" >> test.output
${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ds.dmp | tee testcp_ds.res
echo "testwt1 - single precision write files with several side sets..."
echo "testwt1 ... [Expect WEDGE6 warning from this test]"
echo "begin testwt1" >> test.output
-${PREFIX} ${BINDIR}/testwt1 >> test.output
+${PREFIX} ${SRCDIR}/testwt1 >> test.output
echo "end testwt1" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test1.dmp | tee testwt1.res
@@ -124,94 +123,110 @@ echo "testrd1 - single precision read test of a file with several side sets..."
echo "testrd1 ... [Expect file create failure error, NOCLOBBER]"
echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]"
echo "begin testrd1" >> test.output
-${PREFIX} ${BINDIR}/testrd1 | grep -v version | diff - ${SRCDIR}/testrd1.dmp | tee testrd1.res
+${PREFIX} ${SRCDIR}/testrd1 | grep -v version | diff - ${SRCDIR}/testrd1.dmp | tee testrd1.res
echo "end testrd1" >> test.output
echo "testwt_ss - write files to test side sets..."
echo "testwt_ss ... [Expect WEDGE6 warning from this test]"
echo "begin testwt_ss" >> test.output
-${PREFIX} ${BINDIR}/testwt_ss >> test.output
+${PREFIX} ${SRCDIR}/testwt_ss >> test.output
echo "end testwt_ss" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt_ss.dmp | tee testwt_ss.res
echo "testrd_ss - read test of a file with several side sets..."
echo "testrd_ss ... [Expect warning for NULL sidesets 30 and 31]"
echo "begin testrd_ss" >> test.output
-${PREFIX} ${BINDIR}/testrd_ss | grep -v version | diff - ${SRCDIR}/testrd_ss.dmp | tee testrd_ss.res
+${PREFIX} ${SRCDIR}/testrd_ss | grep -v version | diff - ${SRCDIR}/testrd_ss.dmp | tee testrd_ss.res
echo "end testrd_ss" >> test.output
echo "testwt2 - single precision write 2 files (simultaneously open) test..."
echo "begin testwt2" >> test.output
-${PREFIX} ${BINDIR}/testwt2 >> test.output
+${PREFIX} ${SRCDIR}/testwt2 >> test.output
echo "end testwt2" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test2-1.dmp | tee testwt2-1.res
${NCDUMP} -d5,5 test2.exo | grep -v version | diff - ${SRCDIR}/test2-2.dmp | tee testwt2-2.res
echo "testrdwt - read from one and write to another (simutaneously open) file..."
echo "begin testrdwt" >> test.output
-${PREFIX} ${BINDIR}/testrdwt >> test.output
+${PREFIX} ${SRCDIR}/testrdwt >> test.output
echo "end testrdwt" >> test.output
${NCDUMP} -d5,5 test2.exo | grep -v version | diff - ${SRCDIR}/test2.dmp | tee testrdwt.res
echo "testwt_nc - write x y z components of coordinates separately..."
echo "begin testwt_nc" >> test.output
-${PREFIX} ${BINDIR}/testwt_nc >> test.output
+${PREFIX} ${SRCDIR}/testwt_nc >> test.output
echo "end testwt_nc" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test.dmp | tee testwt_nc.res
echo "testrd_nc - read x y z components of coordinates separately..."
echo "begin testrd_nc" >> test.output
-${PREFIX} ${BINDIR}/testrd_nc | grep -v version | diff - ${SRCDIR}/testrd_nc.dmp | tee testrd_nc.res
+${PREFIX} ${SRCDIR}/testrd_nc | grep -v version | diff - ${SRCDIR}/testrd_nc.dmp | tee testrd_nc.res
echo "end testrd" >> test.output
echo "testwt-zeron - write file with zero nodes and elements..."
echo "begin testwt-zeron" >> test.output
-${PREFIX} ${BINDIR}/testwt-zeron >> test.output
+${PREFIX} ${SRCDIR}/testwt-zeron >> test.output
echo "end testwt-zeron" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt-zeron.dmp | tee testwt-zeron.res
echo "testrd - read test of file with zero nodes and elements..."
echo "begin testrd zero nodes" >> test.output
-${PREFIX} ${BINDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd_zeron.dmp | tee testrd_zeron.res
+${PREFIX} ${SRCDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd_zeron.dmp | tee testrd_zeron.res
echo "end testrd zero nodes" >> test.output
echo "testwt-zeroe - write file with zero elements..."
echo "begin testwt-zeroe" >> test.output
-${PREFIX} ${BINDIR}/testwt-zeroe >> test.output
+${PREFIX} ${SRCDIR}/testwt-zeroe >> test.output
echo "end testwt-zeroe" >> test.output
${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt-zeroe.dmp | tee testwt-zeroe.res
echo "testrd - read test of file with zero elements..."
echo "begin testrd zero elements" >> test.output
-${PREFIX} ${BINDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd_zeroe.dmp | tee testrd_zeroe.res
+${PREFIX} ${SRCDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd_zeroe.dmp | tee testrd_zeroe.res
echo "end testrd zero elements" >> test.output
echo "testwt-one-attrib - read/write test of element attributes - read one at a time..."
echo "begin testwt-one-attrib - read attributes one at a time" >> test.output
-${PREFIX} ${BINDIR}/testwt-one-attrib | tee testrd_zeroe.res
+${PREFIX} ${SRCDIR}/testwt-one-attrib | tee testrd_zeroe.res
echo "end testwt-one-attrib - read attributes one at a time" >> test.output
echo "testwt-nsided - write file with nsided elements..."
echo "begin testwt-nsided" >> test.output
-${PREFIX} ${BINDIR}/testwt-nsided >> test.output
+${PREFIX} ${SRCDIR}/testwt-nsided >> test.output
echo "end testwt-nsided" >> test.output
${NCDUMP} -d5,5 test-nsided.exo | grep -v version | diff - ${SRCDIR}/testwt-nsided.dmp | tee testwt-nsided.res
echo "testrd-nsided - read file with nsided elements..."
echo "begin testrd-nsided" >> test.output
-${PREFIX} ${BINDIR}/testrd-nsided | grep -v version | diff - ${SRCDIR}/testrd-nsided.dmp | tee testrd-nsided.res
+${PREFIX} ${SRCDIR}/testrd-nsided | grep -v version | diff - ${SRCDIR}/testrd-nsided.dmp | tee testrd-nsided.res
echo "end testrd-nsided" >> test.output
echo "testwt-nfaced - write file with nfaced elements..."
echo "begin testwt-nfaced" >> test.output
-${PREFIX} ${BINDIR}/testwt-nfaced >> test.output
+${PREFIX} ${SRCDIR}/testwt-nfaced >> test.output
echo "end testwt-nfaced" >> test.output
${NCDUMP} -d5,5 test-nfaced.exo | grep -v version | diff - ${SRCDIR}/testwt-nfaced.dmp | tee testwt-nfaced.res
echo "testrd-nfaced - read file with nfaced elements..."
echo "begin testrd-nfaced" >> test.output
-${PREFIX} ${BINDIR}/testrd-nfaced | grep -v version | diff - ${SRCDIR}/testrd-nfaced.dmp | tee testrd-nfaced.res
+${PREFIX} ${SRCDIR}/testrd-nfaced | grep -v version | diff - ${SRCDIR}/testrd-nfaced.dmp | tee testrd-nfaced.res
echo "end testrd-nfaced" >> test.output
+echo "testwt-long-name - write file with long (64-character) names..."
+echo "begin testwt-long-name" >> test.output
+${PREFIX} ${SRCDIR}/testwt-long-name >> test.output
+echo "end testwt-long-name" >> test.output
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testwt-long-name.dmp | tee testwt-long-name.res
+
+echo "testrd - read long name file truncating to 32 characters on read..."
+echo "begin testrd (truncate)" >> test.output
+${PREFIX} ${SRCDIR}/testrd | grep -v version | diff - ${SRCDIR}/testrd-nm32.dmp | tee testrd-nm32.res
+echo "end testrd (truncate)" >> test.output
+
+echo "testrd-long-name - read long name file..."
+echo "begin testrd-long-name" >> test.output
+${PREFIX} ${SRCDIR}/testrd-long-name | grep -v version | diff - ${SRCDIR}/testrd-long-name.dmp | tee testrd-long-name.res
+echo "end testrd-long-name" >> test.output
+
echo "************************************************************************"
echo "************************************************************************"
diff --git a/cbind/test/testcp.c b/exodus/cbind/test/testcp.c
similarity index 100%
rename from cbind/test/testcp.c
rename to exodus/cbind/test/testcp.c
diff --git a/cbind/test/testcp_dd.dmp b/exodus/cbind/test/testcp_dd.dmp
similarity index 91%
rename from cbind/test/testcp_dd.dmp
rename to exodus/cbind/test/testcp_dd.dmp
index e439388..6131dc2 100644
--- a/cbind/test/testcp_dd.dmp
+++ b/exodus/cbind/test/testcp_dd.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -48,29 +49,29 @@ variables:
double coordx(num_nodes) ;
double coordy(num_nodes) ;
double coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
double attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
double attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
double attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
double attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
double attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -108,6 +109,7 @@ variables:
:floating_point_word_size = 8 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1 ;
diff --git a/cbind/test/testcp_ds.dmp b/exodus/cbind/test/testcp_ds.dmp
similarity index 90%
rename from cbind/test/testcp_ds.dmp
rename to exodus/cbind/test/testcp_ds.dmp
index 194f66e..057c952 100644
--- a/cbind/test/testcp_ds.dmp
+++ b/exodus/cbind/test/testcp_ds.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -48,29 +49,29 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -108,6 +109,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1 ;
diff --git a/cbind/test/testcp_ln.c b/exodus/cbind/test/testcp_ln.c
similarity index 100%
rename from cbind/test/testcp_ln.c
rename to exodus/cbind/test/testcp_ln.c
diff --git a/cbind/test/testcp_ln.dmp b/exodus/cbind/test/testcp_ln.dmp
similarity index 90%
rename from cbind/test/testcp_ln.dmp
rename to exodus/cbind/test/testcp_ln.dmp
index 4cddab0..460f12f 100644
--- a/cbind/test/testcp_ln.dmp
+++ b/exodus/cbind/test/testcp_ln.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 7 ;
@@ -54,39 +55,39 @@ variables:
int ss_prop1(num_side_sets) ;
ss_prop1:name = "ID" ;
float coord(num_dim, num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
float nattrb(num_nodes, num_att_in_nblk) ;
- char nattrib_name(num_att_in_nblk, len_string) ;
+ char nattrib_name(num_att_in_nblk, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
float attrib6(num_el_in_blk6, num_att_in_blk6) ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "tetra" ;
float attrib7(num_el_in_blk7, num_att_in_blk7) ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "tri" ;
int eb_prop2(num_el_blk) ;
@@ -105,7 +106,7 @@ variables:
int ns_prop3(num_node_sets) ;
ns_prop3:name = "VELOCITY" ;
float nsattrb1(num_nod_ns1, num_att_in_ns1) ;
- char nsattrib_name1(num_att_in_ns1, len_string) ;
+ char nsattrib_name1(num_att_in_ns1, len_name) ;
int elem_ss1(num_side_ss1) ;
int side_ss1(num_side_ss1) ;
float dist_fact_ss1(num_df_ss1) ;
@@ -126,6 +127,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 0 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1, 1, 1 ;
diff --git a/cbind/test/testcp_nl.c b/exodus/cbind/test/testcp_nl.c
similarity index 100%
rename from cbind/test/testcp_nl.c
rename to exodus/cbind/test/testcp_nl.c
diff --git a/cbind/test/testcp_nl.dmp b/exodus/cbind/test/testcp_nl.dmp
similarity index 90%
rename from cbind/test/testcp_nl.dmp
rename to exodus/cbind/test/testcp_nl.dmp
index 63ce157..52698ff 100644
--- a/cbind/test/testcp_nl.dmp
+++ b/exodus/cbind/test/testcp_nl.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 7 ;
@@ -56,39 +57,39 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
float nattrb(num_nodes, num_att_in_nblk) ;
- char nattrib_name(num_att_in_nblk, len_string) ;
+ char nattrib_name(num_att_in_nblk, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
float attrib6(num_el_in_blk6, num_att_in_blk6) ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "tetra" ;
float attrib7(num_el_in_blk7, num_att_in_blk7) ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "tri" ;
int eb_prop2(num_el_blk) ;
@@ -107,7 +108,7 @@ variables:
int ns_prop3(num_node_sets) ;
ns_prop3:name = "VELOCITY" ;
float nsattrb1(num_nod_ns1, num_att_in_ns1) ;
- char nsattrib_name1(num_att_in_ns1, len_string) ;
+ char nsattrib_name1(num_att_in_ns1, len_name) ;
int elem_ss1(num_side_ss1) ;
int side_ss1(num_side_ss1) ;
float dist_fact_ss1(num_df_ss1) ;
@@ -128,6 +129,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1, 1, 1 ;
diff --git a/cbind/test/testcp_sd.dmp b/exodus/cbind/test/testcp_sd.dmp
similarity index 90%
rename from cbind/test/testcp_sd.dmp
rename to exodus/cbind/test/testcp_sd.dmp
index bb2771d..b771a6e 100644
--- a/cbind/test/testcp_sd.dmp
+++ b/exodus/cbind/test/testcp_sd.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 7 ;
@@ -56,39 +57,39 @@ variables:
double coordx(num_nodes) ;
double coordy(num_nodes) ;
double coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
double nattrb(num_nodes, num_att_in_nblk) ;
- char nattrib_name(num_att_in_nblk, len_string) ;
+ char nattrib_name(num_att_in_nblk, len_name) ;
int elem_map(num_elem) ;
double attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
double attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
double attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
double attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
double attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
double attrib6(num_el_in_blk6, num_att_in_blk6) ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "tetra" ;
double attrib7(num_el_in_blk7, num_att_in_blk7) ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "tri" ;
int eb_prop2(num_el_blk) ;
@@ -107,7 +108,7 @@ variables:
int ns_prop3(num_node_sets) ;
ns_prop3:name = "VELOCITY" ;
double nsattrb1(num_nod_ns1, num_att_in_ns1) ;
- char nsattrib_name1(num_att_in_ns1, len_string) ;
+ char nsattrib_name1(num_att_in_ns1, len_name) ;
int elem_ss1(num_side_ss1) ;
int side_ss1(num_side_ss1) ;
double dist_fact_ss1(num_df_ss1) ;
@@ -128,6 +129,7 @@ variables:
:floating_point_word_size = 8 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1, 1, 1 ;
diff --git a/cbind/test/testcp_ss.dmp b/exodus/cbind/test/testcp_ss.dmp
similarity index 90%
rename from cbind/test/testcp_ss.dmp
rename to exodus/cbind/test/testcp_ss.dmp
index 86d1604..096ecd3 100644
--- a/cbind/test/testcp_ss.dmp
+++ b/exodus/cbind/test/testcp_ss.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 7 ;
@@ -56,39 +57,39 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
float nattrb(num_nodes, num_att_in_nblk) ;
- char nattrib_name(num_att_in_nblk, len_string) ;
+ char nattrib_name(num_att_in_nblk, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
float attrib6(num_el_in_blk6, num_att_in_blk6) ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "tetra" ;
float attrib7(num_el_in_blk7, num_att_in_blk7) ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "tri" ;
int eb_prop2(num_el_blk) ;
@@ -107,7 +108,7 @@ variables:
int ns_prop3(num_node_sets) ;
ns_prop3:name = "VELOCITY" ;
float nsattrb1(num_nod_ns1, num_att_in_ns1) ;
- char nsattrib_name1(num_att_in_ns1, len_string) ;
+ char nsattrib_name1(num_att_in_ns1, len_name) ;
int elem_ss1(num_side_ss1) ;
int side_ss1(num_side_ss1) ;
float dist_fact_ss1(num_df_ss1) ;
@@ -128,6 +129,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1, 1, 1 ;
diff --git a/cbind/test/testcpd.c b/exodus/cbind/test/testcpd.c
similarity index 100%
rename from cbind/test/testcpd.c
rename to exodus/cbind/test/testcpd.c
diff --git a/cbind/test/testd.dmp b/exodus/cbind/test/testd.dmp
similarity index 95%
rename from cbind/test/testd.dmp
rename to exodus/cbind/test/testd.dmp
index 06a015b..669e945 100644
--- a/cbind/test/testd.dmp
+++ b/exodus/cbind/test/testd.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -53,29 +54,29 @@ variables:
double coordx(num_nodes) ;
double coordy(num_nodes) ;
double coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
double attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
double attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
double attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
double attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
double attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -110,12 +111,12 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
double vals_glo_var(time_step, num_glo_var) ;
double vals_nod_var1(time_step, num_nodes) ;
double vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
double vals_elem_var1eb1(time_step, num_el_in_blk1) ;
double vals_elem_var2eb1(time_step, num_el_in_blk1) ;
double vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -137,6 +138,7 @@ variables:
:floating_point_word_size = 8 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/cbind/test/testrd.c b/exodus/cbind/test/testrd-long-name.c
similarity index 94%
copy from cbind/test/testrd.c
copy to exodus/cbind/test/testrd-long-name.c
index 04f1667..7867d4a 100644
--- a/cbind/test/testrd.c
+++ b/exodus/cbind/test/testrd-long-name.c
@@ -68,14 +68,20 @@ int main (int argc, char **argv)
int i, j, k, node_ctr;
int *elem_map, *connect, *node_list, *node_ctr_list, *elem_list, *side_list;
int *ids;
- int *num_nodes_per_set, *num_elem_per_set;
- int *num_df_per_set;
- int *node_ind, *elem_ind, *df_ind, num_qa_rec, num_info;
+ int *num_nodes_per_set = NULL;
+ int *num_elem_per_set = NULL;
+ int *num_df_per_set = NULL;
+ int *node_ind = NULL;
+ int *elem_ind = NULL;
+ int *df_ind = NULL;
+ int num_qa_rec, num_info;
int num_glo_vars, num_nod_vars, num_ele_vars;
int num_nset_vars, num_sset_vars;
int *truth_tab;
int num_time_steps;
- int *num_elem_in_block, *num_nodes_per_elem, *num_attr;
+ int *num_elem_in_block = NULL;
+ int *num_nodes_per_elem = NULL;
+ int *num_attr = NULL;
int num_nodes_in_set, num_elem_in_set;
int num_sides_in_set, num_df_in_set;
int list_len, elem_list_len, node_list_len, df_list_len;
@@ -83,7 +89,8 @@ int main (int argc, char **argv)
int CPU_word_size,IO_word_size;
int num_props, prop_value, *prop_values;
int idum;
-
+ int max_name_length;
+
float time_value, *time_values, *var_values;
float *x, *y, *z;
float *attrib, *dist_fact;
@@ -94,6 +101,7 @@ int main (int argc, char **argv)
char *attrib_names[10];
char name[MAX_STR_LENGTH+1];
char title[MAX_LINE_LENGTH+1], elem_type[MAX_STR_LENGTH+1];
+ char title_chk[MAX_LINE_LENGTH+1];
char *cdum = 0;
char *prop_names[3];
@@ -112,6 +120,8 @@ int main (int argc, char **argv)
printf ("\nafter ex_open\n");
if (exoid < 0) exit(1);
+
+
printf ("test.exo is an EXODUSII file; version %4.2f\n",
version);
/* printf (" CPU word size %1d\n",CPU_word_size); */
@@ -122,10 +132,18 @@ int main (int argc, char **argv)
ex_inquire(exoid,EX_INQ_LIB_VERS, &idum, &version, cdum);
printf ("EXODUSII Library API; version %4.2f (%d)\n", version, idum);
- /* ncopts = NC_VERBOSE; */
+ /* Query size of names used in this file */
+ {
+ int max_all_name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH);
+ int max_use_name_length = ex_inquire_int(exoid, EX_INQ_DB_MAX_USED_NAME_LENGTH);
+ printf ("This file can use at most %d-character names\n", max_all_name_length);
+ printf ("This maximum name length used is %d-character names\n", max_use_name_length);
+ max_name_length = max_use_name_length;
+ ex_set_max_name_length(exoid, max_name_length);
+ }
+
/* read database parameters */
-
error = ex_get_init (exoid, title, &num_dim, &num_nodes, &num_elem,
&num_elem_blk, &num_node_sets, &num_side_sets);
@@ -140,6 +158,12 @@ int main (int argc, char **argv)
printf ("num_node_sets = %3d\n",num_node_sets);
printf ("num_side_sets = %3d\n",num_side_sets);
+ /* Check that ex_inquire gives same title */
+ error = ex_inquire (exoid, EX_INQ_TITLE, &idum, &fdum, title_chk);
+ if (strcmp(title, title_chk) != 0) {
+ printf ("error in ex_inquire for EX_INQ_TITLE\n");
+ }
+
/* read nodal coordinates values and names from database */
x = (float *) calloc(num_nodes, sizeof(float));
@@ -191,14 +215,15 @@ int main (int argc, char **argv)
for (i=0; i<num_dim; i++)
{
- coord_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ coord_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_coord_names (exoid, coord_names);
printf ("\nafter ex_get_coord_names, error = %3d\n", error);
-
printf ("x coord name = '%s'\n", coord_names[0]);
printf ("y coord name = '%s'\n", coord_names[1]);
+ if (num_dim >2)
+ printf ("z coord name = '%s'\n", coord_names[2]);
for (i=0; i<num_dim; i++)
free(coord_names[i]);
@@ -209,7 +234,7 @@ int main (int argc, char **argv)
printf ("num nodal attributes = %d\n", num_attrs);
if (num_attrs > 0) {
for (j=0; j<num_attrs; j++) {
- attrib_names[j] = (char *)calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ attrib_names[j] = (char *)calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_attr_names (exoid, EX_NODAL, 0, attrib_names);
printf (" after ex_get_attr_names, error = %d\n", error);
@@ -255,7 +280,7 @@ int main (int argc, char **argv)
printf ("\nafter ex_get_elem_blk_ids, error = %3d\n", error);
for (i=0; i<num_elem_blk; i++) {
- block_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ block_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_names(exoid, EX_ELEM_BLOCK, block_names);
@@ -288,7 +313,7 @@ int main (int argc, char **argv)
for (i=0; i<num_props; i++)
{
- prop_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ prop_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_prop_names(exoid,EX_ELEM_BLOCK,prop_names);
@@ -351,7 +376,7 @@ int main (int argc, char **argv)
{
if (num_elem_in_block[i] > 0) {
for (j=0; j<num_attr[i]; j++)
- attrib_names[j] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ attrib_names[j] = (char *) calloc ((max_name_length+1), sizeof(char));
attrib = (float *) calloc(num_attr[i]*num_elem_in_block[i],sizeof(float));
error = ex_get_elem_attr (exoid, ids[i], attrib);
@@ -385,7 +410,7 @@ int main (int argc, char **argv)
printf ("\nafter ex_get_node_set_ids, error = %3d\n", error);
for (i=0; i<num_node_sets; i++) {
- nset_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ nset_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_names(exoid, EX_NODE_SET, nset_names);
@@ -446,7 +471,7 @@ int main (int argc, char **argv)
printf ("num nodeset attributes for nodeset %d = %d\n", ids[i], num_attrs);
if (num_attrs > 0) {
for (j=0; j<num_attrs; j++) {
- attrib_names[j] = (char *)calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ attrib_names[j] = (char *)calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_attr_names (exoid, EX_NODE_SET, ids[i], attrib_names);
printf (" after ex_get_attr_names, error = %d\n", error);
@@ -475,7 +500,7 @@ int main (int argc, char **argv)
for (i=0; i<num_props; i++)
{
- prop_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ prop_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
prop_values = (int *) calloc (num_node_sets, sizeof(int));
@@ -559,7 +584,7 @@ int main (int argc, char **argv)
printf ("\nafter ex_get_side_set_ids, error = %3d\n", error);
for (i=0; i<num_side_sets; i++) {
- sset_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ sset_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_names(exoid, EX_SIDE_SET, sset_names);
@@ -654,7 +679,7 @@ int main (int argc, char **argv)
for (i=0; i<num_props; i++)
{
- prop_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ prop_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_prop_names(exoid,EX_SIDE_SET,prop_names);
@@ -763,7 +788,7 @@ int main (int argc, char **argv)
{
for (j=0; j<4; j++)
{
- qa_record[i][j] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ qa_record[i][j] = (char *) calloc ((max_name_length+1), sizeof(char));
}
}
@@ -807,7 +832,7 @@ int main (int argc, char **argv)
for (i=0; i<num_glo_vars; i++)
{
- var_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ var_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_var_names (exoid, "g", num_glo_vars, var_names);
@@ -829,7 +854,7 @@ int main (int argc, char **argv)
for (i=0; i<num_nod_vars; i++)
{
- var_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ var_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_var_names (exoid, "n", num_nod_vars, var_names);
@@ -852,7 +877,7 @@ int main (int argc, char **argv)
for (i=0; i<num_ele_vars; i++)
{
- var_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ var_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_var_names (exoid, "e", num_ele_vars, var_names);
@@ -895,7 +920,7 @@ int main (int argc, char **argv)
if (num_nset_vars > 0) {
for (i=0; i<num_nset_vars; i++)
{
- var_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ var_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_var_names (exoid, "m", num_nset_vars, var_names);
@@ -939,7 +964,7 @@ int main (int argc, char **argv)
if (num_sset_vars > 0) {
for (i=0; i<num_sset_vars; i++)
{
- var_names[i] = (char *) calloc ((MAX_STR_LENGTH+1), sizeof(char));
+ var_names[i] = (char *) calloc ((max_name_length+1), sizeof(char));
}
error = ex_get_var_names (exoid, "s", num_sset_vars, var_names);
diff --git a/cbind/test/testrd.dmp b/exodus/cbind/test/testrd-long-name.dmp
similarity index 89%
copy from cbind/test/testrd.dmp
copy to exodus/cbind/test/testrd-long-name.dmp
index d5ebca6..38b0b40 100644
--- a/cbind/test/testrd.dmp
+++ b/exodus/cbind/test/testrd-long-name.dmp
@@ -1,6 +1,8 @@
after ex_open
I/O word size 4
+This file can use at most 127-character names
+This maximum name length used is 64-character names
after ex_get_init, error = 0
database parameters:
title = 'This is a test'
@@ -116,8 +118,9 @@ z coords =
10.0
after ex_get_coord_names, error = 0
-x coord name = 'xcoor'
-y coord name = 'ycoor'
+x coord name = 'X coordinate name that is padded to be longer than 32 characters'
+y coord name = 'Y coordinate name that is padded to be longer than 32 characters'
+z coord name = 'Z coordinate name that is padded to be longer than 32 characters'
num nodal attributes = 2
after ex_get_attr_names, error = 0
nodal attribute 0 = 'Node_attr_1'
@@ -208,7 +211,7 @@ element type = 'quad'
num_elem_in_block = 1
num_nodes_per_elem = 4
num_attr = 1
-name = 'block_1'
+name = 'Very long name for block_1 that exceeds 32 characters'
after ex_get_elem_block, error = 0
element block id = 11
@@ -216,7 +219,7 @@ element type = 'quad'
num_elem_in_block = 1
num_nodes_per_elem = 4
num_attr = 1
-name = 'block_2'
+name = 'Very long name for block_2 that exceeds 32 characters'
after ex_get_elem_block, error = 0
element block id = 12
@@ -224,7 +227,7 @@ element type = 'hex'
num_elem_in_block = 1
num_nodes_per_elem = 8
num_attr = 1
-name = 'block_3'
+name = 'Very long name for block_3 that exceeds 32 characters'
after ex_get_elem_block, error = 0
element block id = 13
@@ -232,7 +235,7 @@ element type = 'tetra'
num_elem_in_block = 1
num_nodes_per_elem = 4
num_attr = 1
-name = 'block_4'
+name = 'Very long name for block_4 that exceeds 32 characters'
after ex_get_elem_block, error = 0
element block id = 14
@@ -240,7 +243,7 @@ element type = 'wedge'
num_elem_in_block = 1
num_nodes_per_elem = 6
num_attr = 1
-name = 'block_5'
+name = 'Very long name for block_5 that exceeds 32 characters'
after ex_get_elem_block, error = 0
element block id = 15
@@ -248,7 +251,7 @@ element type = 'tetra'
num_elem_in_block = 1
num_nodes_per_elem = 8
num_attr = 1
-name = 'block_6'
+name = 'Very long name for block_6 that exceeds 32 characters'
after ex_get_elem_block, error = 0
element block id = 16
@@ -256,7 +259,7 @@ element type = 'tri'
num_elem_in_block = 1
num_nodes_per_elem = 3
num_attr = 1
-name = 'block_7'
+name = 'Very long name for block_7 that exceeds 32 characters'
after ex_inquire, error = 0
@@ -337,31 +340,31 @@ connect array for elem block 16
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 10 attribute 'THICKNESS' = 3.1416
+element block 10 attribute 'The name for the attribute representing the shell thickness' = 3.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 11 attribute 'THICKNESS' = 6.1416
+element block 11 attribute 'The name for the attribute representing the shell thickness' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 12 attribute 'THICKNESS' = 6.1416
+element block 12 attribute 'The name for the attribute representing the shell thickness' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 13 attribute 'THICKNESS' = 6.1416
+element block 13 attribute 'The name for the attribute representing the shell thickness' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 14 attribute 'THICKNESS' = 6.1416
+element block 14 attribute 'The name for the attribute representing the shell thickness' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 15 attribute 'THICKNESS' = 6.1416
+element block 15 attribute 'The name for the attribute representing the shell thickness' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 16 attribute 'THICKNESS' = 6.1416
+element block 16 attribute 'The name for the attribute representing the shell thickness' = 6.1416
after ex_get_node_set_ids, error = 0
@@ -858,14 +861,14 @@ after ex_get_var_param, error = 0
after ex_get_var_names, error = 0
There are 2 nodal variables; their names are :
- 'node_variable_a_very_long_name_0'
- 'nod_var1'
+ 'node_variable_a_somewhat_long_name_0'
+ 'node_variable_a_much_longer_name_that_is_not_too_long_name'
after ex_get_var_param, error = 0
after ex_get_var_names, error = 0
There are 3 element variables; their names are :
- 'ele_var0'
+ 'the_stress_on_the_elements_in_this_block_that_are_active_now'
'ele_var1'
'ele_var2'
diff --git a/cbind/test/testrd-nfaced.c b/exodus/cbind/test/testrd-nfaced.c
similarity index 100%
rename from cbind/test/testrd-nfaced.c
rename to exodus/cbind/test/testrd-nfaced.c
diff --git a/cbind/test/testrd-nfaced.dmp b/exodus/cbind/test/testrd-nfaced.dmp
similarity index 100%
rename from cbind/test/testrd-nfaced.dmp
rename to exodus/cbind/test/testrd-nfaced.dmp
diff --git a/cbind/test/testrd.dmp b/exodus/cbind/test/testrd-nm32.dmp
similarity index 93%
copy from cbind/test/testrd.dmp
copy to exodus/cbind/test/testrd-nm32.dmp
index d5ebca6..5fd70ce 100644
--- a/cbind/test/testrd.dmp
+++ b/exodus/cbind/test/testrd-nm32.dmp
@@ -116,8 +116,9 @@ z coords =
10.0
after ex_get_coord_names, error = 0
-x coord name = 'xcoor'
-y coord name = 'ycoor'
+x coord name = 'X coordinate name that is padded'
+y coord name = 'Y coordinate name that is padded'
+z coord name = 'Z coordinate name that is padded'
num nodal attributes = 2
after ex_get_attr_names, error = 0
nodal attribute 0 = 'Node_attr_1'
@@ -208,7 +209,7 @@ element type = 'quad'
num_elem_in_block = 1
num_nodes_per_elem = 4
num_attr = 1
-name = 'block_1'
+name = 'Very long name for block_1 that'
after ex_get_elem_block, error = 0
element block id = 11
@@ -216,7 +217,7 @@ element type = 'quad'
num_elem_in_block = 1
num_nodes_per_elem = 4
num_attr = 1
-name = 'block_2'
+name = 'Very long name for block_2 that'
after ex_get_elem_block, error = 0
element block id = 12
@@ -224,7 +225,7 @@ element type = 'hex'
num_elem_in_block = 1
num_nodes_per_elem = 8
num_attr = 1
-name = 'block_3'
+name = 'Very long name for block_3 that'
after ex_get_elem_block, error = 0
element block id = 13
@@ -232,7 +233,7 @@ element type = 'tetra'
num_elem_in_block = 1
num_nodes_per_elem = 4
num_attr = 1
-name = 'block_4'
+name = 'Very long name for block_4 that'
after ex_get_elem_block, error = 0
element block id = 14
@@ -240,7 +241,7 @@ element type = 'wedge'
num_elem_in_block = 1
num_nodes_per_elem = 6
num_attr = 1
-name = 'block_5'
+name = 'Very long name for block_5 that'
after ex_get_elem_block, error = 0
element block id = 15
@@ -248,7 +249,7 @@ element type = 'tetra'
num_elem_in_block = 1
num_nodes_per_elem = 8
num_attr = 1
-name = 'block_6'
+name = 'Very long name for block_6 that'
after ex_get_elem_block, error = 0
element block id = 16
@@ -256,7 +257,7 @@ element type = 'tri'
num_elem_in_block = 1
num_nodes_per_elem = 3
num_attr = 1
-name = 'block_7'
+name = 'Very long name for block_7 that'
after ex_inquire, error = 0
@@ -337,31 +338,31 @@ connect array for elem block 16
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 10 attribute 'THICKNESS' = 3.1416
+element block 10 attribute 'The name for the attribute repre' = 3.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 11 attribute 'THICKNESS' = 6.1416
+element block 11 attribute 'The name for the attribute repre' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 12 attribute 'THICKNESS' = 6.1416
+element block 12 attribute 'The name for the attribute repre' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 13 attribute 'THICKNESS' = 6.1416
+element block 13 attribute 'The name for the attribute repre' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 14 attribute 'THICKNESS' = 6.1416
+element block 14 attribute 'The name for the attribute repre' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 15 attribute 'THICKNESS' = 6.1416
+element block 15 attribute 'The name for the attribute repre' = 6.1416
after ex_get_elem_attr, error = 0
after ex_get_elem_attr_names, error = 0
-element block 16 attribute 'THICKNESS' = 6.1416
+element block 16 attribute 'The name for the attribute repre' = 6.1416
after ex_get_node_set_ids, error = 0
@@ -858,14 +859,14 @@ after ex_get_var_param, error = 0
after ex_get_var_names, error = 0
There are 2 nodal variables; their names are :
- 'node_variable_a_very_long_name_0'
- 'nod_var1'
+ 'node_variable_a_somewhat_long_na'
+ 'node_variable_a_much_longer_name'
after ex_get_var_param, error = 0
after ex_get_var_names, error = 0
There are 3 element variables; their names are :
- 'ele_var0'
+ 'the_stress_on_the_elements_in_th'
'ele_var1'
'ele_var2'
diff --git a/cbind/test/testrd-nsided.c b/exodus/cbind/test/testrd-nsided.c
similarity index 98%
rename from cbind/test/testrd-nsided.c
rename to exodus/cbind/test/testrd-nsided.c
index 6302510..47f05fc 100644
--- a/cbind/test/testrd-nsided.c
+++ b/exodus/cbind/test/testrd-nsided.c
@@ -50,16 +50,28 @@ int main (int argc, char **argv)
int exoid, num_dim, num_nodes, num_elem, num_elem_blk, num_node_sets;
int num_side_sets, error, nnodes;
int i, j, k;
- int *elem_map, *connect, *node_list, *node_ctr_list, *elem_list, *side_list;
- int *ids, *nnpe;
- int *num_nodes_per_set, *num_elem_per_set;
- int *num_df_per_set;
- int *node_ind, *elem_ind, *df_ind, num_qa_rec, num_info;
+ int *elem_map = NULL;
+ int *connect = NULL;
+ int *node_list = NULL;
+ int *node_ctr_list = NULL;
+ int *elem_list = NULL;
+ int *side_list = NULL;
+ int *ids = NULL;
+ int *nnpe = NULL;
+ int *num_nodes_per_set = NULL;
+ int *num_elem_per_set = NULL;
+ int *num_df_per_set = NULL;
+ int *node_ind = NULL;
+ int *elem_ind = NULL;
+ int *df_ind = NULL;
+ int num_qa_rec, num_info;
int num_glo_vars, num_nod_vars, num_ele_vars;
int num_nset_vars, num_sset_vars;
- int *truth_tab;
+ int *truth_tab = NULL;
int num_time_steps;
- int *num_elem_in_block, *num_nodes_per_elem, *num_attr;
+ int *num_elem_in_block = NULL;
+ int *num_nodes_per_elem = NULL;
+ int *num_attr = NULL;
int num_nodes_in_set, num_elem_in_set;
int num_sides_in_set, num_df_in_set;
int list_len, elem_list_len, df_list_len;
diff --git a/cbind/test/testrd-nsided.dmp b/exodus/cbind/test/testrd-nsided.dmp
similarity index 100%
rename from cbind/test/testrd-nsided.dmp
rename to exodus/cbind/test/testrd-nsided.dmp
diff --git a/cbind/test/testrd-partial.c b/exodus/cbind/test/testrd-partial.c
similarity index 99%
rename from cbind/test/testrd-partial.c
rename to exodus/cbind/test/testrd-partial.c
index 04f1667..7d4693c 100644
--- a/cbind/test/testrd-partial.c
+++ b/exodus/cbind/test/testrd-partial.c
@@ -68,14 +68,17 @@ int main (int argc, char **argv)
int i, j, k, node_ctr;
int *elem_map, *connect, *node_list, *node_ctr_list, *elem_list, *side_list;
int *ids;
- int *num_nodes_per_set, *num_elem_per_set;
+ int *num_nodes_per_set = NULL;
+ int *num_elem_per_set = NULL;
int *num_df_per_set;
int *node_ind, *elem_ind, *df_ind, num_qa_rec, num_info;
int num_glo_vars, num_nod_vars, num_ele_vars;
int num_nset_vars, num_sset_vars;
int *truth_tab;
int num_time_steps;
- int *num_elem_in_block, *num_nodes_per_elem, *num_attr;
+ int *num_elem_in_block = NULL;
+ int *num_nodes_per_elem = NULL;
+ int *num_attr = NULL;
int num_nodes_in_set, num_elem_in_set;
int num_sides_in_set, num_df_in_set;
int list_len, elem_list_len, node_list_len, df_list_len;
diff --git a/cbind/test/testrd.c b/exodus/cbind/test/testrd.c
similarity index 98%
rename from cbind/test/testrd.c
rename to exodus/cbind/test/testrd.c
index 04f1667..eb74e87 100644
--- a/cbind/test/testrd.c
+++ b/exodus/cbind/test/testrd.c
@@ -68,14 +68,20 @@ int main (int argc, char **argv)
int i, j, k, node_ctr;
int *elem_map, *connect, *node_list, *node_ctr_list, *elem_list, *side_list;
int *ids;
- int *num_nodes_per_set, *num_elem_per_set;
- int *num_df_per_set;
- int *node_ind, *elem_ind, *df_ind, num_qa_rec, num_info;
+ int *num_nodes_per_set = NULL;
+ int *num_elem_per_set = NULL;
+ int *num_df_per_set = NULL;
+ int *node_ind = NULL;
+ int *elem_ind = NULL;
+ int *df_ind = NULL;
+ int num_qa_rec, num_info;
int num_glo_vars, num_nod_vars, num_ele_vars;
int num_nset_vars, num_sset_vars;
int *truth_tab;
int num_time_steps;
- int *num_elem_in_block, *num_nodes_per_elem, *num_attr;
+ int *num_elem_in_block = NULL;
+ int *num_nodes_per_elem = NULL;
+ int *num_attr = NULL;
int num_nodes_in_set, num_elem_in_set;
int num_sides_in_set, num_df_in_set;
int list_len, elem_list_len, node_list_len, df_list_len;
@@ -94,6 +100,7 @@ int main (int argc, char **argv)
char *attrib_names[10];
char name[MAX_STR_LENGTH+1];
char title[MAX_LINE_LENGTH+1], elem_type[MAX_STR_LENGTH+1];
+ char title_chk[MAX_LINE_LENGTH+1];
char *cdum = 0;
char *prop_names[3];
@@ -140,6 +147,12 @@ int main (int argc, char **argv)
printf ("num_node_sets = %3d\n",num_node_sets);
printf ("num_side_sets = %3d\n",num_side_sets);
+ /* Check that ex_inquire gives same title */
+ error = ex_inquire (exoid, EX_INQ_TITLE, &idum, &fdum, title_chk);
+ if (strcmp(title, title_chk) != 0) {
+ printf ("error in ex_inquire for EX_INQ_TITLE\n");
+ }
+
/* read nodal coordinates values and names from database */
x = (float *) calloc(num_nodes, sizeof(float));
@@ -196,9 +209,10 @@ int main (int argc, char **argv)
error = ex_get_coord_names (exoid, coord_names);
printf ("\nafter ex_get_coord_names, error = %3d\n", error);
-
printf ("x coord name = '%s'\n", coord_names[0]);
printf ("y coord name = '%s'\n", coord_names[1]);
+ if (num_dim >2)
+ printf ("z coord name = '%s'\n", coord_names[2]);
for (i=0; i<num_dim; i++)
free(coord_names[i]);
diff --git a/cbind/test/testrd.dmp b/exodus/cbind/test/testrd.dmp
similarity index 99%
rename from cbind/test/testrd.dmp
rename to exodus/cbind/test/testrd.dmp
index d5ebca6..04c0d17 100644
--- a/cbind/test/testrd.dmp
+++ b/exodus/cbind/test/testrd.dmp
@@ -118,6 +118,7 @@ z coords =
after ex_get_coord_names, error = 0
x coord name = 'xcoor'
y coord name = 'ycoor'
+z coord name = 'zcoor'
num nodal attributes = 2
after ex_get_attr_names, error = 0
nodal attribute 0 = 'Node_attr_1'
@@ -865,9 +866,9 @@ after ex_get_var_param, error = 0
after ex_get_var_names, error = 0
There are 3 element variables; their names are :
- 'ele_var0'
- 'ele_var1'
- 'ele_var2'
+ 'this_variable_name_is_short'
+ 'this_variable_name_is_just_right'
+ 'this_variable_name_is_tooooo_lon'
after ex_get_elem_var_tab, error = 0
This is the element variable truth table:
diff --git a/cbind/test/testrd1.c b/exodus/cbind/test/testrd1.c
similarity index 100%
rename from cbind/test/testrd1.c
rename to exodus/cbind/test/testrd1.c
diff --git a/cbind/test/testrd1.dmp b/exodus/cbind/test/testrd1.dmp
similarity index 100%
rename from cbind/test/testrd1.dmp
rename to exodus/cbind/test/testrd1.dmp
diff --git a/cbind/test/testrd_nc.c b/exodus/cbind/test/testrd_nc.c
similarity index 100%
rename from cbind/test/testrd_nc.c
rename to exodus/cbind/test/testrd_nc.c
diff --git a/cbind/test/testrd_nc.dmp b/exodus/cbind/test/testrd_nc.dmp
similarity index 99%
rename from cbind/test/testrd_nc.dmp
rename to exodus/cbind/test/testrd_nc.dmp
index f497853..71d8257 100644
--- a/cbind/test/testrd_nc.dmp
+++ b/exodus/cbind/test/testrd_nc.dmp
@@ -766,9 +766,9 @@ after ex_get_var_param, error = 0
after ex_get_var_names, error = 0
There are 3 element variables; their names are :
- 'ele_var0'
- 'ele_var1'
- 'ele_var2'
+ 'this_variable_name_is_short'
+ 'this_variable_name_is_just_right'
+ 'this_variable_name_is_tooooo_lon'
after ex_get_elem_var_tab, error = 0
This is the element variable truth table:
diff --git a/cbind/test/testrd_ss.c b/exodus/cbind/test/testrd_ss.c
similarity index 100%
rename from cbind/test/testrd_ss.c
rename to exodus/cbind/test/testrd_ss.c
diff --git a/cbind/test/testrd_ss.dmp b/exodus/cbind/test/testrd_ss.dmp
similarity index 100%
rename from cbind/test/testrd_ss.dmp
rename to exodus/cbind/test/testrd_ss.dmp
diff --git a/cbind/test/testrd_zeroe.dmp b/exodus/cbind/test/testrd_zeroe.dmp
similarity index 99%
rename from cbind/test/testrd_zeroe.dmp
rename to exodus/cbind/test/testrd_zeroe.dmp
index 88f4686..4121df3 100644
--- a/cbind/test/testrd_zeroe.dmp
+++ b/exodus/cbind/test/testrd_zeroe.dmp
@@ -118,6 +118,7 @@ z coords =
after ex_get_coord_names, error = 0
x coord name = 'xcoor'
y coord name = 'ycoor'
+z coord name = 'zcoor'
num nodal attributes = 0
after ex_get_map, error = 0
diff --git a/cbind/test/testrd_zeron.dmp b/exodus/cbind/test/testrd_zeron.dmp
similarity index 99%
rename from cbind/test/testrd_zeron.dmp
rename to exodus/cbind/test/testrd_zeron.dmp
index 4f5a3e3..ab3d197 100644
--- a/cbind/test/testrd_zeron.dmp
+++ b/exodus/cbind/test/testrd_zeron.dmp
@@ -19,6 +19,7 @@ z coords =
after ex_get_coord_names, error = 0
x coord name = 'xcoor'
y coord name = 'ycoor'
+z coord name = 'zcoor'
num nodal attributes = 0
after ex_get_map, error = 0
diff --git a/cbind/test/testrdd.c b/exodus/cbind/test/testrdd.c
similarity index 100%
rename from cbind/test/testrdd.c
rename to exodus/cbind/test/testrdd.c
diff --git a/cbind/test/testrdd.dmp b/exodus/cbind/test/testrdd.dmp
similarity index 100%
rename from cbind/test/testrdd.dmp
rename to exodus/cbind/test/testrdd.dmp
diff --git a/cbind/test/testrdv.c b/exodus/cbind/test/testrdv.c
similarity index 99%
rename from cbind/test/testrdv.c
rename to exodus/cbind/test/testrdv.c
index c4c5ddb..d16b962 100644
--- a/cbind/test/testrdv.c
+++ b/exodus/cbind/test/testrdv.c
@@ -73,10 +73,13 @@ int main (int argc, char **argv)
int *node_ind, *elem_ind, *df_ind, num_qa_rec, num_info;
int num_glo_vars, num_nod_vars, num_ele_vars;
int *truth_tab;
- int *node_varid, *elem_varid;
+ int *node_varid = NULL;
+ int *elem_varid = NULL;
int num_time_steps;
- int *num_elem_in_block, *num_nodes_per_elem, *num_attr;
+ int *num_elem_in_block = NULL;
+ int *num_nodes_per_elem = NULL;
+ int *num_attr = NULL;
int num_nodes_in_set, num_elem_in_set;
int num_sides_in_set, num_df_in_set;
int list_len, elem_list_len, node_list_len, df_list_len;
diff --git a/cbind/test/testrdv.dmp b/exodus/cbind/test/testrdv.dmp
similarity index 99%
rename from cbind/test/testrdv.dmp
rename to exodus/cbind/test/testrdv.dmp
index 5af654e..80e9b57 100644
--- a/cbind/test/testrdv.dmp
+++ b/exodus/cbind/test/testrdv.dmp
@@ -768,9 +768,9 @@ after ex_get_var_param, error = 0
after ex_get_var_names, error = 0
There are 3 element variables; their names are :
- 'ele_var0'
- 'ele_var1'
- 'ele_var2'
+ 'this_variable_name_is_short'
+ 'this_variable_name_is_just_right'
+ 'this_variable_name_is_tooooo_lon'
after ex_get_elem_var_tab, error = 0
This is the element variable truth table:
diff --git a/cbind/test/testrdwt.c b/exodus/cbind/test/testrdwt.c
similarity index 100%
rename from cbind/test/testrdwt.c
rename to exodus/cbind/test/testrdwt.c
diff --git a/cbind/test/testwt.c b/exodus/cbind/test/testwt-long-name.c
similarity index 87%
copy from cbind/test/testwt.c
copy to exodus/cbind/test/testwt-long-name.c
index 1eb0a0d..dba8a54 100644
--- a/cbind/test/testwt.c
+++ b/exodus/cbind/test/testwt-long-name.c
@@ -32,30 +32,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* testwt - test write an ExodusII database file
-*
-* author - Sandia National Laboratories
-* Larry A. Schoof - Original
-* Vic Yarberry - Added headers and error logging
-* 7/7/93 Modified for use with Exodus 2.00
-*
-*
-* environment - UNIX
-*
-* entry conditions -
-*
-* exit conditions -
-*
-* revision history -
-*
-* This is a test program for the C binding of the EXODUS II
-* database write routines.
-*
-*
-*****************************************************************************/
-
#include <stdlib.h>
#include <stdio.h>
@@ -83,7 +59,7 @@ int main (int argc, char **argv)
float time_value;
float x[100], y[100], z[100];
float attrib[1], dist_fact[100];
- char *coord_names[3], *qa_record[2][4], *info[3], *var_names[3];
+ char *coord_names[3], *qa_record[2][4], *info[3], *variable_names[3];
char *block_names[10], *nset_names[10], *sset_names[10];
char *prop_names[2], *attrib_names[2];
char *title = "This is a test";
@@ -96,6 +72,7 @@ int main (int argc, char **argv)
/* create EXODUS II file */
+
exoid = ex_create ("test.exo", /* filename path */
EX_CLOBBER, /* create mode */
&CPU_word_size, /* CPU float word size in bytes */
@@ -103,9 +80,9 @@ int main (int argc, char **argv)
printf ("after ex_create for test.exo, exoid = %d\n", exoid);
printf (" cpu word size: %d io word size: %d\n",CPU_word_size,IO_word_size);
- /* ncopts = NC_VERBOSE; */
+ ex_set_max_name_length(exoid, 127); /* Using long names */
-/* initialize file with parameters */
+ /* initialize file with parameters */
num_dim = 3;
num_nodes = 33;
@@ -181,10 +158,11 @@ int main (int argc, char **argv)
ex_close (exoid);
exit(-1);
}
-
- coord_names[0] = "xcoor";
- coord_names[1] = "ycoor";
- coord_names[2] = "zcoor";
+ /* 0 1 2 3 4 5 6 */
+ /* 1234567890123456789012345678901234567890123456789012345678901234 */
+ coord_names[0] = "X coordinate name that is padded to be longer than 32 characters";
+ coord_names[1] = "Y coordinate name that is padded to be longer than 32 characters";
+ coord_names[2] = "Z coordinate name that is padded to be longer than 32 characters";
error = ex_put_coord_names (exoid, coord_names);
printf ("after ex_put_coord_names, error = %d\n", error);
@@ -247,14 +225,15 @@ int main (int argc, char **argv)
/* write element block parameters */
- block_names[0] = "block_1";
- block_names[1] = "block_2";
- block_names[2] = "block_3";
- block_names[3] = "block_4";
- block_names[4] = "block_5";
- block_names[5] = "block_6";
- block_names[6] = "block_7";
-
+ /* 0 1 2 3 4 5 6 */
+ /* 1234567890123456789012345678901234567890123456789012345678901234 */
+ block_names[0] = "Very long name for block_1 that exceeds 32 characters";
+ block_names[1] = "Very long name for block_2 that exceeds 32 characters";
+ block_names[2] = "Very long name for block_3 that exceeds 32 characters";
+ block_names[3] = "Very long name for block_4 that exceeds 32 characters";
+ block_names[4] = "Very long name for block_5 that exceeds 32 characters";
+ block_names[5] = "Very long name for block_6 that exceeds 32 characters";
+ block_names[6] = "Very long name for block_7 that exceeds 32 characters";
num_elem_in_block[0] = 1;
num_elem_in_block[1] = 1;
num_elem_in_block[2] = 1;
@@ -353,7 +332,8 @@ int main (int argc, char **argv)
/* write element block properties */
- /* 12345678901234567890123456789012 */
+ /* 0 1 2 3 4 5 6 */
+ /* 1234567890123456789012345678901234567890123456789012345678901234 */
prop_names[0] = "MATERIAL_PROPERTY_LONG_NAME_32CH";
prop_names[1] = "DENSITY";
error = ex_put_prop_names(exoid,EX_ELEM_BLOCK,2,prop_names);
@@ -559,7 +539,9 @@ int main (int argc, char **argv)
exit(-1);
}
- attrib_names[0] = "THICKNESS";
+ /* 0 1 2 3 4 5 6 */
+ /* 1234567890123456789012345678901234567890123456789012345678901234 */
+ attrib_names[0] = "The name for the attribute representing the shell thickness";
for (i=0; i < 7; i++) {
error = ex_put_elem_attr_names (exoid, ebids[i], attrib_names);
printf ("after ex_put_elem_attr_names, error = %d\n", error);
@@ -942,17 +924,17 @@ int main (int argc, char **argv)
num_glo_vars = 1;
- var_names[0] = "glo_vars";
+ variable_names[0] = "glo_vars";
- error = ex_put_var_param (exoid, "g", num_glo_vars);
- printf ("after ex_put_var_param, error = %d\n", error);
+ error = ex_put_variable_param (exoid, EX_GLOBAL, num_glo_vars);
+ printf ("after ex_put_variable_param, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
}
- error = ex_put_var_names (exoid, "g", num_glo_vars, var_names);
- printf ("after ex_put_var_names, error = %d\n", error);
+ error = ex_put_variable_names (exoid, EX_GLOBAL, num_glo_vars, variable_names);
+ printf ("after ex_put_variable_names, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
@@ -961,19 +943,20 @@ int main (int argc, char **argv)
num_nod_vars = 2;
- /* 12345678901234567890123456789012 */
- var_names[0] = "node_variable_a_very_long_name_0";
- var_names[1] = "nod_var1";
+ /* 0 1 2 3 4 5 6 */
+ /* 1234567890123456789012345678901234567890123456789012345678901234 */
+ variable_names[0] = "node_variable_a_somewhat_long_name_0";
+ variable_names[1] = "node_variable_a_much_longer_name_that_is_not_too_long_name";
- error = ex_put_var_param (exoid, "n", num_nod_vars);
- printf ("after ex_put_var_param, error = %d\n", error);
+ error = ex_put_variable_param (exoid, EX_NODAL, num_nod_vars);
+ printf ("after ex_put_variable_param, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
}
- error = ex_put_var_names (exoid, "n", num_nod_vars, var_names);
- printf ("after ex_put_var_names, error = %d\n", error);
+ error = ex_put_variable_names (exoid, EX_NODAL, num_nod_vars, variable_names);
+ printf ("after ex_put_variable_names, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
@@ -982,19 +965,21 @@ int main (int argc, char **argv)
num_ele_vars = 3;
- var_names[0] = "ele_var0";
- var_names[1] = "ele_var1";
- var_names[2] = "ele_var2";
+ /* 0 1 2 3 4 5 6 */
+ /* 1234567890123456789012345678901234567890123456789012345678901234 */
+ variable_names[0] = "the_stress_on_the_elements_in_this_block_that_are_active_now";
+ variable_names[1] = "ele_var1";
+ variable_names[2] = "ele_var2";
- error = ex_put_var_param (exoid, "e", num_ele_vars);
- printf ("after ex_put_var_param, error = %d\n", error);
+ error = ex_put_variable_param (exoid, EX_ELEM_BLOCK, num_ele_vars);
+ printf ("after ex_put_variable_param, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
}
- error = ex_put_var_names (exoid, "e", num_ele_vars, var_names);
- printf ("after ex_put_var_names, error = %d\n", error);
+ error = ex_put_variable_names (exoid, EX_ELEM_BLOCK, num_ele_vars, variable_names);
+ printf ("after ex_put_variable_names, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
@@ -1003,19 +988,19 @@ int main (int argc, char **argv)
{
num_nset_vars = 3;
- var_names[0] = "ns_var0";
- var_names[1] = "ns_var1";
- var_names[2] = "ns_var2";
+ variable_names[0] = "ns_var0";
+ variable_names[1] = "ns_var1";
+ variable_names[2] = "ns_var2";
- error = ex_put_var_param (exoid, "m", num_nset_vars);
- printf ("after ex_put_var_param, error = %d\n", error);
+ error = ex_put_variable_param (exoid, EX_NODE_SET, num_nset_vars);
+ printf ("after ex_put_variable_param, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
}
- error = ex_put_var_names (exoid, "m", num_nset_vars, var_names);
- printf ("after ex_put_var_names, error = %d\n", error);
+ error = ex_put_variable_names (exoid, EX_NODE_SET, num_nset_vars, variable_names);
+ printf ("after ex_put_variable_names, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
@@ -1025,19 +1010,19 @@ int main (int argc, char **argv)
{
num_sset_vars = 3;
- var_names[0] = "ss_var0";
- var_names[1] = "ss_var1";
- var_names[2] = "ss_var2";
+ variable_names[0] = "ss_var0";
+ variable_names[1] = "ss_var1";
+ variable_names[2] = "ss_var2";
- error = ex_put_var_param (exoid, "s", num_sset_vars);
- printf ("after ex_put_var_param, error = %d\n", error);
+ error = ex_put_variable_param (exoid, EX_SIDE_SET, num_sset_vars);
+ printf ("after ex_put_variable_param, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
}
- error = ex_put_var_names (exoid, "s", num_sset_vars, var_names);
- printf ("after ex_put_var_names, error = %d\n", error);
+ error = ex_put_variable_names (exoid, EX_SIDE_SET, num_sset_vars, variable_names);
+ printf ("after ex_put_variable_names, error = %d\n", error);
if (error) {
ex_close (exoid);
exit(-1);
diff --git a/cbind/test/test.dmp b/exodus/cbind/test/testwt-long-name.dmp
similarity index 91%
rename from cbind/test/test.dmp
rename to exodus/cbind/test/testwt-long-name.dmp
index 2853709..b4bd6fe 100644
--- a/cbind/test/test.dmp
+++ b/exodus/cbind/test/testwt-long-name.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 128 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 7 ;
@@ -63,39 +64,39 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
float nattrb(num_nodes, num_att_in_nblk) ;
- char nattrib_name(num_att_in_nblk, len_string) ;
+ char nattrib_name(num_att_in_nblk, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
float attrib6(num_el_in_blk6, num_att_in_blk6) ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "tetra" ;
float attrib7(num_el_in_blk7, num_att_in_blk7) ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "tri" ;
int eb_prop2(num_el_blk) ;
@@ -114,7 +115,7 @@ variables:
int ns_prop3(num_node_sets) ;
ns_prop3:name = "VELOCITY" ;
float nsattrb1(num_nod_ns1, num_att_in_ns1) ;
- char nsattrib_name1(num_att_in_ns1, len_string) ;
+ char nsattrib_name1(num_att_in_ns1, len_name) ;
int elem_ss1(num_side_ss1) ;
int side_ss1(num_side_ss1) ;
float dist_fact_ss1(num_df_ss1) ;
@@ -132,14 +133,14 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
- char name_nset_var(num_nset_var, len_string) ;
- char name_sset_var(num_sset_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
+ char name_nset_var(num_nset_var, len_name) ;
+ char name_sset_var(num_sset_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var2eb1(time_step, num_el_in_blk1) ;
float vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -188,6 +189,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 64 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
@@ -214,13 +216,13 @@ data:
6, 0, 0, 6, 2, 0, 2.7, 3.3, 1.7, 2.3, 0, 0, 10 ;
eb_names =
- "block_1",
- "block_2",
- "block_3",
- "block_4",
- "block_5",
- "block_6",
- "block_7" ;
+ "Very long name for block_1 that exceeds 32 characters",
+ "Very long name for block_2 that exceeds 32 characters",
+ "Very long name for block_3 that exceeds 32 characters",
+ "Very long name for block_4 that exceeds 32 characters",
+ "Very long name for block_5 that exceeds 32 characters",
+ "Very long name for block_6 that exceeds 32 characters",
+ "Very long name for block_7 that exceeds 32 characters" ;
ns_names =
"nset_1",
@@ -234,9 +236,9 @@ data:
"sset_5" ;
coor_names =
- "xcoor",
- "ycoor",
- "zcoor" ;
+ "X coordinate name that is padded to be longer than 32 characters",
+ "Y coordinate name that is padded to be longer than 32 characters",
+ "Z coordinate name that is padded to be longer than 32 characters" ;
nattrb =
0, 0,
@@ -283,7 +285,7 @@ data:
3.1416 ;
attrib_name1 =
- "THICKNESS" ;
+ "The name for the attribute representing the shell thickness" ;
connect1 =
1, 2, 3, 4 ;
@@ -292,7 +294,7 @@ data:
6.1416 ;
attrib_name2 =
- "THICKNESS" ;
+ "The name for the attribute representing the shell thickness" ;
connect2 =
5, 6, 7, 8 ;
@@ -301,7 +303,7 @@ data:
6.1416 ;
attrib_name3 =
- "THICKNESS" ;
+ "The name for the attribute representing the shell thickness" ;
connect3 =
9, 10, 11, 12, 13, 14, 15, 16 ;
@@ -310,7 +312,7 @@ data:
6.1416 ;
attrib_name4 =
- "THICKNESS" ;
+ "The name for the attribute representing the shell thickness" ;
connect4 =
17, 18, 19, 20 ;
@@ -319,7 +321,7 @@ data:
6.1416 ;
attrib_name5 =
- "THICKNESS" ;
+ "The name for the attribute representing the shell thickness" ;
connect5 =
21, 22, 23, 24, 25, 26 ;
@@ -328,7 +330,7 @@ data:
6.1416 ;
attrib_name6 =
- "THICKNESS" ;
+ "The name for the attribute representing the shell thickness" ;
connect6 =
17, 18, 19, 20, 27, 28, 30, 29 ;
@@ -337,7 +339,7 @@ data:
6.1416 ;
attrib_name7 =
- "THICKNESS" ;
+ "The name for the attribute representing the shell thickness" ;
connect7 =
31, 32, 33 ;
@@ -489,11 +491,11 @@ data:
5.1, 5.2, 5.3 ;
name_nod_var =
- "node_variable_a_very_long_name_0",
- "nod_var1" ;
+ "node_variable_a_somewhat_long_name_0",
+ "node_variable_a_much_longer_name_that_is_not_too_long_name" ;
name_elem_var =
- "ele_var0",
+ "the_stress_on_the_elements_in_this_block_that_are_active_now",
"ele_var1",
"ele_var2" ;
diff --git a/cbind/test/testwt-nfaced.c b/exodus/cbind/test/testwt-nface-nside.c
similarity index 58%
copy from cbind/test/testwt-nfaced.c
copy to exodus/cbind/test/testwt-nface-nside.c
index c46e6f2..a70e861 100644
--- a/cbind/test/testwt-nfaced.c
+++ b/exodus/cbind/test/testwt-nface-nside.c
@@ -50,15 +50,26 @@ int main (int argc, char **argv)
int exoid, num_dim, num_nodes, num_elem, num_elem_blk;
int num_elem_in_block[10], num_total_nodes_per_blk[10];
int num_face_in_block[10], num_total_faces_per_blk[10];
- int num_node_sets, error;
- int i, j, *connect;
- int bids, nnpe[10];
+ int num_face_in_sset[10], num_nodes_in_nset[10];
+ int num_node_sets, num_side_sets, error;
+ int i, j, k, m, *elem_map, *connect;
+ int node_list[100],elem_list[100],side_list[100];
+ int bids[10], ssids[10], nsids[10], nnpe[10];
int num_qa_rec, num_info;
+ int num_glo_vars, num_nod_vars, num_ele_vars, num_sset_vars, num_nset_vars;
+ int *truth_tab;
+ int whole_time_step, num_time_steps;
int CPU_word_size,IO_word_size;
+ int prop_array[2];
+ float *glob_var_vals, *nodal_var_vals, *elem_var_vals;
+ float *sset_var_vals, *nset_var_vals;
+ float time_value;
float x[100], y[100], z[100];
- char *coord_names[3], *qa_record[2][4], *info[3];
- char *block_names[10];
+ float dist_fact[100];
+ char *coord_names[3], *qa_record[2][4], *info[3], *var_names[3];
+ char *block_names[10], *nset_names[10], *sset_names[10];
+ char *prop_names[2], *attrib_names[2];
char *title = "This is a test";
ex_opts (EX_VERBOSE | EX_ABORT );
@@ -84,7 +95,7 @@ int main (int argc, char **argv)
num_dim = 3;
num_nodes = 14;
- num_elem = 3;
+ num_elem = 1;
num_elem_blk = 1;
num_node_sets = 0;
@@ -93,7 +104,7 @@ int main (int argc, char **argv)
par.num_nodes = num_nodes;
par.num_edge = 0;
par.num_edge_blk = 0;
- par.num_face = 15;
+ par.num_face = 5;
par.num_face_blk = 1;
par.num_elem = num_elem;
par.num_elem_blk = num_elem_blk;
@@ -157,10 +168,10 @@ int main (int argc, char **argv)
/* Write the face block parameters */
block_names[0] = "face_block_1";
num_face_in_block[0] = 15;
- num_total_nodes_per_blk[0] = 58;
- bids = 10;
+ num_total_nodes_per_blk[0] = 54;
+ bids[0] = 10;
- error = ex_put_block (exoid, EX_FACE_BLOCK, bids, "nsided",
+ error = ex_put_block (exoid, EX_FACE_BLOCK, bids[0], "nsided",
num_face_in_block[0],
num_total_nodes_per_blk[0],
0, 0, 0);
@@ -171,15 +182,6 @@ int main (int argc, char **argv)
exit(-1);
}
- /* Write face block names */
- error = ex_put_names(exoid, EX_FACE_BLOCK, block_names);
- printf ("after ex_put_names, error = %d\n", error);
-
- if (error) {
- ex_close (exoid);
- exit(-1);
- }
-
/* write face connectivity */
@@ -192,95 +194,79 @@ int main (int argc, char **argv)
connect[i++] = 5;
connect[i++] = 6;
connect[i++] = 8; /* connectivity of face 1 of element 1 */
- nnpe[j++] = 3;
+
connect[i++] = 2;
connect[i++] = 1;
connect[i++] = 4; /* face 2 of element 1 */
- nnpe[j++] = 3;
+
connect[i++] = 6;
connect[i++] = 2;
connect[i++] = 4;
connect[i++] = 8; /* face 3 of element 1 */
- nnpe[j++] = 4;
+
connect[i++] = 8;
connect[i++] = 4;
connect[i++] = 1;
connect[i++] = 5; /* face 4 of element 1 */
- nnpe[j++] = 4;
connect[i++] = 1;
connect[i++] = 2;
connect[i++] = 6;
connect[i++] = 5; /* face 5 of element 1 */
- nnpe[j++] = 4;
connect[i++] = 5;
connect[i++] = 8;
connect[i++] = 7; /* connectivity of face 1 of element 2 */
- nnpe[j++] = 3;
+ 1 3 4 # face 2 of element 2
+7 8 4 3 # face 3 of element 2
+7 3 1 5 # face 4 of element 2
+5 1 4 8 # face 5 of element 2 -- dup
+
+8 4 14 10 12 # connectivity of face 1 of element 3
+7 11 9 13 3 # face 2 of element 3
+7 8 12 11 # face 3 of element 3
+11 12 10 9 # face 4 of element 3
+9 10 14 13 # face 5 of element 3
+13 14 4 3 # face 6 of element 3
+7 3 4 8 # face 7 of element 3 -- dup
+
+
+
+
+
+
+
+
- connect[i++] = 1;
- connect[i++] = 3;
- connect[i++] = 4; /* face 2 of element 2 */
- nnpe[j++] = 3;
- connect[i++] = 7;
- connect[i++] = 8;
- connect[i++] = 4;
- connect[i++] = 3; /* face 3 of element 2 */
- nnpe[j++] = 4;
- connect[i++] = 7;
- connect[i++] = 3;
- connect[i++] = 1;
- connect[i++] = 5; /* face 4 of element 2 */
- nnpe[j++] = 4;
- connect[i++] = 8;
- connect[i++] = 4;
- connect[i++] = 14;
- connect[i++] = 10;
- connect[i++] = 12; /* connectivity of face 1 of element 3 */
- nnpe[j++] = 5;
-
- connect[i++] = 7;
- connect[i++] = 11;
- connect[i++] = 9;
- connect[i++] = 13;
- connect[i++] = 3; /* face 2 of element 3 */
- nnpe[j++] = 5;
-
- connect[i++] = 7;
- connect[i++] = 8;
- connect[i++] = 12;
- connect[i++] = 11; /* face 3 of element 3 */
- nnpe[j++] = 4;
- connect[i++] = 11;
- connect[i++] = 12;
- connect[i++] = 10;
- connect[i++] = 9; /* face 4 of element 3 */
+
+
+
+ connect[i++] = 1; connect[i++] = 2; connect[i++] = 3; connect[i++] = 4;
nnpe[j++] = 4;
- connect[i++] = 9;
- connect[i++] = 10;
- connect[i++] = 14;
- connect[i++] = 13; /* face 5 of element 3 */
+ connect[i++] = 5; connect[i++] = 3; connect[i++] = 4; connect[i++] = 6;
nnpe[j++] = 4;
- connect[i++] = 13;
- connect[i++] = 14;
- connect[i++] = 4;
- connect[i++] = 3; /* face 6 of element 3 */
+ connect[i++] = 5; connect[i++] = 1; connect[i++] = 2; connect[i++] = 6;
nnpe[j++] = 4;
-
+
+ connect[i++] = 6; connect[i++] = 2; connect[i++] = 4;
+ nnpe[j++] = 3;
+
+ connect[i++] = 5; connect[i++] = 3; connect[i++] = 1;
+ nnpe[j++] = 3;
+
assert(i == num_total_nodes_per_blk[0]);
assert(j == num_face_in_block[0]);
- error = ex_put_conn (exoid, EX_FACE_BLOCK, bids, connect, NULL, NULL);
+ error = ex_put_conn (exoid, EX_FACE_BLOCK, bids[0], connect, NULL, NULL);
printf ("after ex_put_conn, error = %d\n", error);
if (error) {
@@ -291,7 +277,7 @@ int main (int argc, char **argv)
free (connect);
connect = NULL;
- error = ex_put_entity_count_per_polyhedra(exoid, EX_FACE_BLOCK, bids, nnpe);
+ error = ex_put_entity_count_per_polyhedra(exoid, EX_FACE_BLOCK, bids[0], nnpe);
printf ("after ex_put_entity_count_per_polyhedra, error = %d\n", error);
if (error) {
@@ -302,12 +288,13 @@ int main (int argc, char **argv)
/* write element block parameters */
block_names[0] = "nfaced_1";
- num_elem_in_block[0] = 3;
- num_total_faces_per_blk[0] = 5 + 5 + 7;
+ num_elem_in_block[0] = 1;
+ num_total_nodes_per_blk[0] = 6; /* Do we need this; does it make sense... */
+ num_total_faces_per_blk[0] = 5;
- bids = 10;
+ bids[0] = 10;
- error = ex_put_block (exoid, EX_ELEM_BLOCK, bids, "nfaced",
+ error = ex_put_block (exoid, EX_ELEM_BLOCK, bids[0], "nfaced",
num_elem_in_block[0],
0,
0,
@@ -320,6 +307,15 @@ int main (int argc, char **argv)
exit(-1);
}
+ /* Write face block names */
+ error = ex_put_names(exoid, EX_FACE_BLOCK, block_names);
+ printf ("after ex_put_names, error = %d\n", error);
+
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
/* Write element block names */
error = ex_put_names(exoid, EX_ELEM_BLOCK, block_names);
printf ("after ex_put_names, error = %d\n", error);
@@ -334,34 +330,14 @@ int main (int argc, char **argv)
i = 0;
j = 0;
- connect[i++] = 1;
- connect[i++] = 2;
- connect[i++] = 3;
- connect[i++] = 4;
+ connect[i++] = 1; connect[i++] = 2; connect[i++] = 3; connect[i++] = 4;
connect[i++] = 5;
- nnpe[j++] = 5; /* Number of faces per element 1 */
-
- connect[i++] = 4;
- connect[i++] = 6;
- connect[i++] = 7;
- connect[i++] = 8;
- connect[i++] = 9;
- nnpe[j++] = 5; /* Number of faces per element 2 */
+ nnpe[j++] = 5; /* Number of faces per element */
-
- connect[i++] = 8;
- connect[i++] = 10;
- connect[i++] = 11;
- connect[i++] = 12;
- connect[i++] = 13;
- connect[i++] = 14;
- connect[i++] = 15;
- nnpe[j++] = 7; /* Number of faces per element 3 */
-
assert(i == num_total_faces_per_blk[0]);
assert(j == num_elem_in_block[0]);
- error = ex_put_conn (exoid, EX_ELEM_BLOCK, bids, NULL, NULL, connect);
+ error = ex_put_conn (exoid, EX_ELEM_BLOCK, bids[0], NULL, NULL, connect);
printf ("after ex_put_conn, error = %d\n", error);
if (error) {
@@ -371,7 +347,7 @@ int main (int argc, char **argv)
free (connect);
- error = ex_put_entity_count_per_polyhedra(exoid, EX_ELEM_BLOCK, bids, nnpe);
+ error = ex_put_entity_count_per_polyhedra(exoid, EX_ELEM_BLOCK, bids[0], nnpe);
printf ("after ex_put_entity_count_per_polyhedra, error = %d\n", error);
if (error) {
@@ -417,6 +393,188 @@ int main (int argc, char **argv)
exit(-1);
}
+
+
+ /* write results variables parameters and names */
+ num_glo_vars = 1;
+
+ var_names[0] = "glo_vars";
+
+ error = ex_put_var_param (exoid, "g", num_glo_vars);
+ printf ("after ex_put_var_param, error = %d\n", error);
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+ error = ex_put_var_names (exoid, "g", num_glo_vars, var_names);
+ printf ("after ex_put_var_names, error = %d\n", error);
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+
+
+ num_nod_vars = 2;
+ /* 12345678901234567890123456789012 */
+ var_names[0] = "node_variable_a_very_long_name_0";
+ var_names[1] = "n";
+
+ error = ex_put_var_param (exoid, "n", num_nod_vars);
+ printf ("after ex_put_var_param, error = %d\n", error);
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+ error = ex_put_var_names (exoid, "n", num_nod_vars, var_names);
+ printf ("after ex_put_var_names, error = %d\n", error);
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+
+ num_ele_vars = 3;
+
+ var_names[0] = "ele_var0";
+ var_names[1] = "ele_var1";
+ var_names[2] = "ele_var2";
+
+ error = ex_put_var_param (exoid, "e", num_ele_vars);
+ printf ("after ex_put_var_param, error = %d\n", error);
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+ error = ex_put_var_names (exoid, "e", num_ele_vars, var_names);
+ printf ("after ex_put_var_names, error = %d\n", error);
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+ /* write element variable truth table */
+ truth_tab = (int *) calloc ((num_elem_blk*num_ele_vars), sizeof(int));
+
+ k = 0;
+ for (i=0; i<num_elem_blk; i++)
+ {
+ for (j=0; j<num_ele_vars; j++)
+ {
+ truth_tab[k++] = 1;
+ }
+ }
+
+ error = ex_put_elem_var_tab (exoid, num_elem_blk, num_ele_vars, truth_tab);
+ printf ("after ex_put_elem_var_tab, error = %d\n", error);
+
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+ free (truth_tab);
+
+
+/* for each time step, write the analysis results;
+ * the code below fills the arrays glob_var_vals,
+ * nodal_var_vals, and elem_var_vals with values for debugging purposes;
+ * obviously the analysis code will populate these arrays
+ */
+
+ whole_time_step = 1;
+ num_time_steps = 10;
+
+ glob_var_vals = (float *) calloc (num_glo_vars, CPU_word_size);
+ nodal_var_vals = (float *) calloc (num_nodes, CPU_word_size);
+ elem_var_vals = (float *) calloc (8, CPU_word_size);
+
+ for (i=0; i<num_time_steps; i++)
+ {
+ time_value = (float)(i+1)/100.;
+
+ /* write time value */
+ error = ex_put_time (exoid, whole_time_step, &time_value);
+ printf ("after ex_put_time, error = %d\n", error);
+
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+ /* write global variables */
+ for (j=0; j<num_glo_vars; j++)
+ {
+ glob_var_vals[j] = (float)(j+2) * time_value;
+ }
+
+ error = ex_put_glob_vars (exoid, whole_time_step, num_glo_vars,
+ glob_var_vals);
+ printf ("after ex_put_glob_vars, error = %d\n", error);
+
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+ /* write nodal variables */
+ for (k=1; k<=num_nod_vars; k++)
+ {
+ for (j=0; j<num_nodes; j++)
+ {
+ nodal_var_vals[j] = (float)k + ((float)(j+1) * time_value);
+ }
+
+ error = ex_put_nodal_var (exoid, whole_time_step, k, num_nodes,
+ nodal_var_vals);
+ printf ("after ex_put_nodal_var, error = %d\n", error);
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+
+ }
+
+ /* write element variables */
+ for (k=1; k<=num_ele_vars; k++)
+ {
+ for (j=0; j<num_elem_blk; j++)
+ {
+ for (m=0; m<num_elem_in_block[j]; m++)
+ {
+ elem_var_vals[m] = (float)(k+1) + (float)(j+2) +
+ ((float)(m+1)*time_value);
+ /* printf("elem_var_vals[%d]: %f\n",m,elem_var_vals[m]); */
+ }
+ error = ex_put_elem_var (exoid, whole_time_step, k, bids[j],
+ num_elem_in_block[j], elem_var_vals);
+ printf ("after ex_put_elem_var, error = %d\n", error);
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+ }
+ }
+
+ whole_time_step++;
+
+ /* update the data file; this should be done at the end of every time step
+ * to ensure that no data is lost if the analysis dies
+ */
+ error = ex_update (exoid);
+ printf ("after ex_update, error = %d\n", error);
+ if (error) {
+ ex_close (exoid);
+ exit(-1);
+ }
+ }
+ free(glob_var_vals);
+ free(nodal_var_vals);
+ free(elem_var_vals);
+
/* close the EXODUS files
*/
error = ex_close (exoid);
diff --git a/cbind/test/testwt-nfaced.c b/exodus/cbind/test/testwt-nfaced.c
similarity index 99%
rename from cbind/test/testwt-nfaced.c
rename to exodus/cbind/test/testwt-nfaced.c
index c46e6f2..f6c15eb 100644
--- a/cbind/test/testwt-nfaced.c
+++ b/exodus/cbind/test/testwt-nfaced.c
@@ -52,7 +52,7 @@ int main (int argc, char **argv)
int num_face_in_block[10], num_total_faces_per_blk[10];
int num_node_sets, error;
int i, j, *connect;
- int bids, nnpe[10];
+ int bids, nnpe[20];
int num_qa_rec, num_info;
int CPU_word_size,IO_word_size;
diff --git a/cbind/test/testwt-nfaced.dmp b/exodus/cbind/test/testwt-nfaced.dmp
similarity index 92%
rename from cbind/test/testwt-nfaced.dmp
rename to exodus/cbind/test/testwt-nfaced.dmp
index 5422b8d..fce2533 100644
--- a/cbind/test/testwt-nfaced.dmp
+++ b/exodus/cbind/test/testwt-nfaced.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 14 ;
num_elem = 3 ;
@@ -27,9 +28,9 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char fa_names(num_fa_blk, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char fa_names(num_fa_blk, len_name) ;
+ char coor_names(num_dim, len_name) ;
int fbconn1(num_nod_per_fa1) ;
fbconn1:elem_type = "nsided" ;
int fbepecnt1(num_fa_in_blk1) ;
@@ -47,6 +48,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1 ;
diff --git a/cbind/test/testwt-nsided.c b/exodus/cbind/test/testwt-nsided.c
similarity index 100%
rename from cbind/test/testwt-nsided.c
rename to exodus/cbind/test/testwt-nsided.c
diff --git a/cbind/test/testwt-nsided.dmp b/exodus/cbind/test/testwt-nsided.dmp
similarity index 97%
rename from cbind/test/testwt-nsided.dmp
rename to exodus/cbind/test/testwt-nsided.dmp
index b7f43a5..fe2bcb7 100644
--- a/cbind/test/testwt-nsided.dmp
+++ b/exodus/cbind/test/testwt-nsided.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 7 ;
@@ -44,12 +45,12 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
float nattrb(num_nodes, num_att_in_nblk) ;
- char nattrib_name(num_att_in_nblk, len_string) ;
+ char nattrib_name(num_att_in_nblk, len_name) ;
int elem_map(num_elem) ;
int connect1(num_nod_per_el1) ;
connect1:elem_type = "nsided" ;
@@ -66,7 +67,7 @@ variables:
int ns_prop3(num_node_sets) ;
ns_prop3:name = "VELOCITY" ;
float nsattrb1(num_nod_ns1, num_att_in_ns1) ;
- char nsattrib_name1(num_att_in_ns1, len_string) ;
+ char nsattrib_name1(num_att_in_ns1, len_name) ;
int elem_ss1(num_side_ss1) ;
int side_ss1(num_side_ss1) ;
float dist_fact_ss1(num_df_ss1) ;
@@ -84,14 +85,14 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
- char name_nset_var(num_nset_var, len_string) ;
- char name_sset_var(num_sset_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
+ char name_nset_var(num_nset_var, len_name) ;
+ char name_sset_var(num_sset_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var2eb1(time_step, num_el_in_blk1) ;
float vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -122,6 +123,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/cbind/test/testwt-one-attrib.c b/exodus/cbind/test/testwt-one-attrib.c
similarity index 100%
rename from cbind/test/testwt-one-attrib.c
rename to exodus/cbind/test/testwt-one-attrib.c
diff --git a/cbind/test/testwt-partial.c b/exodus/cbind/test/testwt-partial.c
similarity index 100%
rename from cbind/test/testwt-partial.c
rename to exodus/cbind/test/testwt-partial.c
diff --git a/cbind/test/testwt-zeroe.c b/exodus/cbind/test/testwt-zeroe.c
similarity index 100%
rename from cbind/test/testwt-zeroe.c
rename to exodus/cbind/test/testwt-zeroe.c
diff --git a/cbind/test/testwt-zeroe.dmp b/exodus/cbind/test/testwt-zeroe.dmp
similarity index 96%
rename from cbind/test/testwt-zeroe.dmp
rename to exodus/cbind/test/testwt-zeroe.dmp
index ea4deca..b856f2e 100644
--- a/cbind/test/testwt-zeroe.dmp
+++ b/exodus/cbind/test/testwt-zeroe.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_node_sets = 2 ;
@@ -21,8 +22,8 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char ns_names(num_node_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char ns_names(num_node_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int node_ns1(num_nod_ns1) ;
float dist_fact_ns1(num_nod_ns1) ;
int node_ns2(num_nod_ns2) ;
@@ -34,16 +35,17 @@ variables:
ns_prop3:name = "VELOCITY" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
// global attributes:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/cbind/test/testwt-zeron.c b/exodus/cbind/test/testwt-zeron.c
similarity index 100%
rename from cbind/test/testwt-zeron.c
rename to exodus/cbind/test/testwt-zeron.c
diff --git a/cbind/test/testwt-zeron.dmp b/exodus/cbind/test/testwt-zeron.dmp
similarity index 87%
rename from cbind/test/testwt-zeron.dmp
rename to exodus/cbind/test/testwt-zeron.dmp
index c453fa9..339348c 100644
--- a/cbind/test/testwt-zeron.dmp
+++ b/exodus/cbind/test/testwt-zeron.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_el_blk = 7 ;
num_qa_rec = 2 ;
@@ -14,17 +15,18 @@ variables:
int eb_status(num_el_blk) ;
int eb_prop1(num_el_blk) ;
eb_prop1:name = "ID" ;
- char eb_names(num_el_blk, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char coor_names(num_dim, len_name) ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
// global attributes:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/cbind/test/testwt.c b/exodus/cbind/test/testwt.c
similarity index 99%
rename from cbind/test/testwt.c
rename to exodus/cbind/test/testwt.c
index 1eb0a0d..fa7ef55 100644
--- a/cbind/test/testwt.c
+++ b/exodus/cbind/test/testwt.c
@@ -981,10 +981,11 @@ int main (int argc, char **argv)
num_ele_vars = 3;
-
- var_names[0] = "ele_var0";
- var_names[1] = "ele_var1";
- var_names[2] = "ele_var2";
+ /* 0 1 2 3 */
+ /* 12345678901234567890123456789012 */
+ var_names[0] = "this_variable_name_is_short";
+ var_names[1] = "this_variable_name_is_just_right";
+ var_names[2] = "this_variable_name_is_tooooo_long";
error = ex_put_var_param (exoid, "e", num_ele_vars);
printf ("after ex_put_var_param, error = %d\n", error);
diff --git a/cbind/test/testwt1.c b/exodus/cbind/test/testwt1.c
similarity index 100%
rename from cbind/test/testwt1.c
rename to exodus/cbind/test/testwt1.c
diff --git a/cbind/test/testwt2.c b/exodus/cbind/test/testwt2.c
similarity index 100%
rename from cbind/test/testwt2.c
rename to exodus/cbind/test/testwt2.c
diff --git a/cbind/test/testwt_clb.c b/exodus/cbind/test/testwt_clb.c
similarity index 100%
rename from cbind/test/testwt_clb.c
rename to exodus/cbind/test/testwt_clb.c
diff --git a/cbind/test/testwt_nc.c b/exodus/cbind/test/testwt_nc.c
similarity index 99%
rename from cbind/test/testwt_nc.c
rename to exodus/cbind/test/testwt_nc.c
index b597245..22a4bbe 100644
--- a/cbind/test/testwt_nc.c
+++ b/exodus/cbind/test/testwt_nc.c
@@ -985,9 +985,11 @@ int main (int argc, char **argv)
num_ele_vars = 3;
- var_names[0] = "ele_var0";
- var_names[1] = "ele_var1";
- var_names[2] = "ele_var2";
+ /* 0 1 2 3 */
+ /* 12345678901234567890123456789012 */
+ var_names[0] = "this_variable_name_is_short";
+ var_names[1] = "this_variable_name_is_just_right";
+ var_names[2] = "this_variable_name_is_tooooo_long";
error = ex_put_var_param (exoid, "e", num_ele_vars);
printf ("after ex_put_var_param, error = %d\n", error);
diff --git a/cbind/test/testwt_nossnsdf.c b/exodus/cbind/test/testwt_nossnsdf.c
similarity index 100%
rename from cbind/test/testwt_nossnsdf.c
rename to exodus/cbind/test/testwt_nossnsdf.c
diff --git a/cbind/test/testwt_ss.c b/exodus/cbind/test/testwt_ss.c
similarity index 100%
rename from cbind/test/testwt_ss.c
rename to exodus/cbind/test/testwt_ss.c
diff --git a/cbind/test/testwt_ss.dmp b/exodus/cbind/test/testwt_ss.dmp
similarity index 89%
rename from cbind/test/testwt_ss.dmp
rename to exodus/cbind/test/testwt_ss.dmp
index 790627c..4a8879d 100644
--- a/cbind/test/testwt_ss.dmp
+++ b/exodus/cbind/test/testwt_ss.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 8 ;
@@ -59,40 +60,40 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
float attrib6(num_el_in_blk6, num_att_in_blk6) ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "tetra" ;
float attrib7(num_el_in_blk7, num_att_in_blk7) ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "shell" ;
float attrib8(num_el_in_blk8, num_att_in_blk8) ;
- char attrib_name8(num_att_in_blk8, len_string) ;
+ char attrib_name8(num_att_in_blk8, len_name) ;
int connect8(num_el_in_blk8, num_nod_per_el8) ;
connect8:elem_type = "triangle" ;
int elem_ss3(num_side_ss3) ;
@@ -118,6 +119,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1, 1, 1, 1 ;
@@ -126,7 +128,7 @@ data:
ns_status = 0, 0 ;
- ns_prop1 = 0, 0 ;
+ ns_prop1 = -1, -1 ;
ss_status = 0, 0, 1, 1, 1, 1, 1, 1, 1 ;
diff --git a/cbind/test/testwtbig.c b/exodus/cbind/test/testwtbig.c
similarity index 100%
rename from cbind/test/testwtbig.c
rename to exodus/cbind/test/testwtbig.c
diff --git a/cbind/test/testwtd.c b/exodus/cbind/test/testwtd.c
similarity index 100%
rename from cbind/test/testwtd.c
rename to exodus/cbind/test/testwtd.c
diff --git a/cbind/test/testwtm.c b/exodus/cbind/test/testwtm.c
similarity index 100%
rename from cbind/test/testwtm.c
rename to exodus/cbind/test/testwtm.c
diff --git a/exodus/customdoxygen.css b/exodus/customdoxygen.css
new file mode 100644
index 0000000..27dfe7f
--- /dev/null
+++ b/exodus/customdoxygen.css
@@ -0,0 +1,686 @@
+/* The standard CSS for doxygen */
+
+body, table, div, p, dl {
+ font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+ font-size: 12px;
+}
+
+/* @group Heading Levels */
+
+h1 {
+ font-size: 150%;
+}
+
+h2 {
+ font-size: 120%;
+}
+
+h3 {
+ font-size: 100%;
+}
+
+dt {
+ font-weight: bold;
+}
+
+div.multicol {
+ -moz-column-gap: 1em;
+ -webkit-column-gap: 1em;
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+}
+
+p.startli, p.startdd, p.starttd {
+ margin-top: 2px;
+}
+
+p.endli {
+ margin-bottom: 0px;
+}
+
+p.enddd {
+ margin-bottom: 4px;
+}
+
+p.endtd {
+ margin-bottom: 2px;
+}
+
+/* @end */
+
+caption {
+ font-weight: bold;
+}
+
+span.legend {
+ font-size: 70%;
+ text-align: center;
+}
+
+h3.version {
+ font-size: 90%;
+ text-align: center;
+}
+
+div.qindex, div.navtab{
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+}
+
+div.qindex, div.navpath {
+ width: 100%;
+ line-height: 140%;
+}
+
+div.navtab {
+ margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+ color: #3D578C;
+ font-weight: normal;
+ text-decoration: none;
+}
+
+.contents a:visited {
+ color: #4665A2;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a.qindex {
+ font-weight: bold;
+}
+
+a.qindexHL {
+ font-weight: bold;
+ background-color: #9CAFD4;
+ color: #ffffff;
+ border: 1px double #869DCA;
+}
+
+.contents a.qindexHL:visited {
+ color: #ffffff;
+}
+
+a.el {
+ font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code {
+ color: #4665A2;
+}
+
+a.codeRef {
+ color: #4665A2;
+}
+
+/* @end */
+
+dl.el {
+ margin-left: -1cm;
+}
+
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 105%;
+}
+
+pre.fragment {
+ border: 1px solid #C4CFE5;
+ background-color: #EEEEFF;
+ padding: 4px 6px;
+ margin: 4px 8px 4px 8px;
+ overflow: auto;
+ word-wrap: break-word;
+ font-size: 9pt;
+ line-height: 125%;
+}
+
+div.ah {
+ background-color: black;
+ font-weight: bold;
+ color: #ffffff;
+ margin-bottom: 3px;
+ margin-top: 3px;
+ padding: 0.2em;
+ border: solid thin #333;
+ border-radius: 0.5em;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ box-shadow: 2px 2px 3px #999;
+ -webkit-box-shadow: 2px 2px 3px #999;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+ background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
+}
+
+div.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ font-weight: bold;
+}
+
+div.groupText {
+ margin-left: 16px;
+ font-style: italic;
+}
+
+body {
+ background: white;
+ color: black;
+ margin: 0;
+}
+
+div.contents {
+ margin-top: 10px;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+td.indexkey {
+ background-color: #EBEFF6;
+ font-weight: bold;
+ border: 1px solid #C4CFE5;
+ margin: 2px 0px 2px 0;
+ padding: 2px 10px;
+}
+
+td.indexvalue {
+ background-color: #EBEFF6;
+ border: 1px solid #C4CFE5;
+ padding: 2px 10px;
+ margin: 2px 0px;
+}
+
+tr.memlist {
+ background-color: #EEF1F7;
+}
+
+p.formulaDsp {
+ text-align: center;
+}
+
+img.formulaDsp {
+
+}
+
+img.formulaInl {
+ vertical-align: middle;
+}
+
+div.center {
+ text-align: center;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+}
+
+div.center img {
+ border: 0px;
+}
+
+address.footer {
+ text-align: right;
+ padding-right: 12px;
+}
+
+img.footer {
+ border: 0px;
+ vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+ color: #008000
+}
+
+span.keywordtype {
+ color: #604020
+}
+
+span.keywordflow {
+ color: #e08000
+}
+
+span.comment {
+ color: #800000
+}
+
+span.preprocessor {
+ color: #806020
+}
+
+span.stringliteral {
+ color: #002080
+}
+
+span.charliteral {
+ color: #008080
+}
+
+span.vhdldigit {
+ color: #ff00ff
+}
+
+span.vhdlchar {
+ color: #000000
+}
+
+span.vhdlkeyword {
+ color: #700070
+}
+
+span.vhdllogic {
+ color: #ff0000
+}
+
+/* @end */
+
+/*
+.search {
+ color: #003399;
+ font-weight: bold;
+}
+
+form.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+
+input.search {
+ font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+*/
+
+td.tiny {
+ font-size: 75%;
+}
+
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #A3B4D7;
+}
+
+th.dirtab {
+ background: #EBEFF6;
+ font-weight: bold;
+}
+
+hr {
+ height: 0px;
+ border: none;
+ border-top: 1px solid #4A6AAA;
+}
+
+hr.footer {
+ height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+ border-spacing: 0px;
+ padding: 0px;
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #F9FAFC;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+ border-top: 1px solid #C4CFE5;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memTemplParams {
+ color: #4665A2;
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+ font-size: 80%;
+ color: #4665A2;
+ font-weight: normal;
+ margin-left: 9px;
+}
+
+.memnav {
+ background-color: #EBEFF6;
+ border: 1px solid #A3B4D7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+}
+
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+ margin-left: 6px;
+}
+
+.memproto {
+ border-top: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 6px 0px 6px 0px;
+ color: #253555;
+ font-weight: bold;
+ text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+ /* opera specific markup */
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ border-top-right-radius: 8px;
+ border-top-left-radius: 8px;
+ /* firefox specific markup */
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ -moz-border-radius-topright: 8px;
+ -moz-border-radius-topleft: 8px;
+ /* webkit specific markup */
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -webkit-border-top-right-radius: 8px;
+ -webkit-border-top-left-radius: 8px;
+ background-image:url('nav_f.png');
+ background-repeat:repeat-x;
+ background-color: #E2E8F2;
+
+}
+
+.memdoc {
+ border-bottom: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ padding: 2px 5px;
+ background-color: #FBFCFD;
+ border-top-width: 0;
+ /* opera specific markup */
+ border-bottom-left-radius: 8px;
+ border-bottom-right-radius: 8px;
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ /* firefox specific markup */
+ -moz-border-radius-bottomleft: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
+ /* webkit specific markup */
+ -webkit-border-bottom-left-radius: 8px;
+ -webkit-border-bottom-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+
+.params, .retval, .exception, .tparams {
+ border-spacing: 6px 2px;
+}
+
+.params .paramname, .retval .paramname {
+ font-weight: bold;
+ vertical-align: top;
+}
+
+.params .paramtype {
+ font-style: italic;
+ vertical-align: top;
+}
+
+.params .paramdir {
+ font-family: "courier new",courier,monospace;
+ vertical-align: top;
+}
+
+
+
+
+/* @end */
+
+/* @group Directory (tree) */
+
+/* for the tree view */
+
+.ftvtree {
+ font-family: sans-serif;
+ margin: 0px;
+}
+
+/* these are for tree view when used as main index */
+
+.directory {
+ font-size: 9pt;
+ font-weight: bold;
+ margin: 5px;
+}
+
+.directory h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+
+/*
+The following two styles can be used to replace the root node title
+with an image of your choice. Simply uncomment the next two styles,
+specify the name of your image and be sure to set 'height' to the
+proper pixel height of your image.
+*/
+
+/*
+.directory h3.swap {
+ height: 61px;
+ background-repeat: no-repeat;
+ background-image: url("yourimage.gif");
+}
+.directory h3.swap span {
+ display: none;
+}
+*/
+
+.directory > h3 {
+ margin-top: 0;
+}
+
+.directory p {
+ margin: 0px;
+ white-space: nowrap;
+}
+
+.directory div {
+ display: none;
+ margin: 0px;
+}
+
+.directory img {
+ vertical-align: -30%;
+}
+
+/* these are for tree view when not used as main index */
+
+.directory-alt {
+ font-size: 100%;
+ font-weight: bold;
+}
+
+.directory-alt h3 {
+ margin: 0px;
+ margin-top: 1em;
+ font-size: 11pt;
+}
+
+.directory-alt > h3 {
+ margin-top: 0;
+}
+
+.directory-alt p {
+ margin: 0px;
+ white-space: nowrap;
+}
+
+.directory-alt div {
+ display: none;
+ margin: 0px;
+}
+
+.directory-alt img {
+ vertical-align: -30%;
+}
+
+/* @end */
+
+div.dynheader {
+ margin-top: 8px;
+}
+
+address {
+ font-style: normal;
+ color: #2A3D61;
+}
+
+table.doxtable {
+ border-collapse:collapse;
+}
+
+table.doxtable td, table.doxtable th {
+ border: 1px solid #2D4068;
+ padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+ background-color: #374F7F;
+ color: #FFFFFF;
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+ text-align:left;
+}
+
+.tabsearch {
+ top: 0px;
+ left: 10px;
+ height: 36px;
+ background-image: url('tab_b.png');
+ z-index: 101;
+ overflow: hidden;
+ font-size: 13px;
+}
+
+.navpath ul
+{
+ font-size: 11px;
+ background-image:url('tab_b.png');
+ background-repeat:repeat-x;
+ height:30px;
+ line-height:30px;
+ color:#8AA0CC;
+ border:solid 1px #C2CDE4;
+ overflow:hidden;
+ margin:0px;
+ padding:0px;
+}
+
+.navpath li
+{
+ list-style-type:none;
+ float:left;
+ padding-left:10px;
+ padding-right: 15px;
+ background-image:url('bc_s.png');
+ background-repeat:no-repeat;
+ background-position:right;
+ color:#364D7C;
+}
+
+.navpath a
+{
+ height:32px;
+ display:block;
+ text-decoration: none;
+ outline: none;
+}
+
+.navpath a:hover
+{
+ color:#6884BD;
+}
+
+div.summary
+{
+ float: right;
+ font-size: 8pt;
+ padding-right: 5px;
+ width: 50%;
+ text-align: right;
+}
+
+div.summary a
+{
+ white-space: nowrap;
+}
+
+div.header
+{
+ background-image:url('nav_h.png');
+ background-repeat:repeat-x;
+ background-color: #F9FAFC;
+ margin: 0px;
+ border-bottom: 1px solid #C4CFE5;
+}
+
+div.headertitle
+{
+ padding: 5px 5px 5px 10px;
+}
+
diff --git a/doc/doc.poly.txt b/exodus/doc/doc.poly.txt
similarity index 100%
rename from doc/doc.poly.txt
rename to exodus/doc/doc.poly.txt
diff --git a/exodus/doc/exodus-face-edge.pdf b/exodus/doc/exodus-face-edge.pdf
new file mode 100644
index 0000000..b3d13bf
Binary files /dev/null and b/exodus/doc/exodus-face-edge.pdf differ
diff --git a/exodus/doc/exodus.pdf b/exodus/doc/exodus.pdf
new file mode 100644
index 0000000..a0a6aa5
Binary files /dev/null and b/exodus/doc/exodus.pdf differ
diff --git a/exodusii.dsp b/exodus/exodusii.dsp
similarity index 100%
rename from exodusii.dsp
rename to exodus/exodusii.dsp
diff --git a/exodus/forbind/CMakeLists.txt b/exodus/forbind/CMakeLists.txt
new file mode 100644
index 0000000..2d116ba
--- /dev/null
+++ b/exodus/forbind/CMakeLists.txt
@@ -0,0 +1,27 @@
+INCLUDE(PackageLibraryMacros)
+INCLUDE(FortranSettings)
+
+INCLUDE_DIRECTORIES(
+ "${CMAKE_CURRENT_SOURCE_DIR}/include"
+ "${CMAKE_CURRENT_BINARY_DIR}/include"
+)
+
+SET(SOURCES "")
+SET_AND_INC_DIRS(DIR ${CMAKE_CURRENT_SOURCE_DIR})
+
+APPEND_GLOB(SOURCES ${DIR}/src/*.c ${DIR}/src/*.F)
+
+SET(HEADERS
+ include/exodusII.inc
+ include/exodusII_int.inc
+)
+
+PACKAGE_ADD_LIBRARY(
+ exodus_for
+ HEADERS ${HEADERS}
+ SOURCES ${SOURCES}
+ DEPLIBS exodus
+)
+
+PACKAGE_ADD_TEST_DIRECTORIES(test)
+
diff --git a/forbind/include/Imakefile b/exodus/forbind/include/Imakefile
similarity index 59%
rename from forbind/include/Imakefile
rename to exodus/forbind/include/Imakefile
index b67da7b..8044031 100644
--- a/forbind/include/Imakefile
+++ b/exodus/forbind/include/Imakefile
@@ -1,3 +1,4 @@
+XCOMM $Id: Imakefile,v 1.5 2008/07/24 21:40:41 gdsjaar Exp $
INCLIST=exodusII.inc exodusII_int.inc
diff --git a/exodus/forbind/include/exodusII.inc b/exodus/forbind/include/exodusII.inc
new file mode 100644
index 0000000..d5ff8cf
--- /dev/null
+++ b/exodus/forbind/include/exodusII.inc
@@ -0,0 +1,157 @@
+! -*- mode: fortran -*-
+!
+! Copyright 1994 Sandia Corporation. Under the terms of Contract
+! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+! retains certain rights in this software.
+!
+! See the COPYRIGHT file for copying and redistribution conditions.
+!
+!***************************************************************
+!
+! Name: exodusII.inc - Exodus II Application include file
+!
+! Use this include file to define general Exodus II parameters
+!
+!*****************************************************************************
+!
+! Define Exodus functions that return values
+!
+ integer excre,exopen,exlgmd
+ external excre, exopen, exlgmd
+!
+! Define access modes
+!
+ integer EXNOCL,EXCLOB,EXREAD,EXWRIT,EXWRT,EXNORM,EXLARG
+ integer EXNET4, EXNOSH, EXSHAR
+
+ parameter (EXNOCL = 0) ! EXNOCL - File create with no overwrite (no clobber), default
+ parameter (EXCLOB = 1) ! EXCLOB - File create with overwrite (clobber)
+ parameter (EXNORM = 2) ! EXNORM - Disable large model modifications
+ parameter (EXLARG = 4) ! EXLARG - Large model modifications
+ parameter (EXNET4 = 8) ! EXNET4 - use the hdf5-based netcdf4 output
+ parameter (EXNOSH = 16) ! EXNOSH - Do not open netcdf file in "share" mode
+ parameter (EXSHAR = 32) ! EXSHAR - Do open netcdf file in "share" mode
+
+ parameter (EXREAD = 0) ! EXREAD - File open for read
+ parameter (EXWRIT = 1) ! EXWRIT - File open for write
+ parameter (EXWRT = 1) ! EXWRT - File open for write (alternate to EXWRIT)
+!
+! --INQUIRE FLAGS
+ integer EXTYPE, EXVERS, EXDBVR, EXTITL, EXDIM, EXNODE, &
+ & EXELEM, EXELBL, EXNODS, EXSIDS, EXQA, EXINFO, &
+ & EXTIMS, EXSSNL, EXSSEL, EXNSNL, EXNEBP, EXNNSP, &
+ & EXNSSP, EXNSDF, EXSSDF, EXLBVR, EXNEMP, EXNNMP, &
+ & EXNEM, EXNNM, EXNEDG, EXNEDB, EXNEDS, EXESL , &
+ & EXESDL, EXEDBP, EXEDSP, EXNFAC, EXNFB , EXNFS , &
+ & EXFSL , EXFSDL, EXFABP, EXFASP, EXNELS, EXELSL, &
+ & EXELSD, EXELSP, EXNEDM, EXNFAM, EXNCF, EXDBMXALNM, &
+ & EXDBMXUSNM, EXMXRDNM
+
+!
+ parameter (EXTYPE = 1) ! -- inquire EXODUS II file type
+ parameter (EXVERS = 2) ! -- inquire API version number
+ parameter (EXDBVR = 3) ! -- inquire database version number
+ parameter (EXTITL = 4) ! -- inquire database title
+ parameter (EXDIM = 5) ! -- inquire number of dimensions
+ parameter (EXNODE = 6) ! -- inquire number of nodes
+ parameter (EXELEM = 7) ! -- inquire number of elements
+ parameter (EXELBL = 8) ! -- inquire number of element blocks
+ parameter (EXNODS = 9) ! -- inquire number of node sets
+ parameter (EXNSNL = 10) ! -- inquire length of node set node list
+ parameter (EXSIDS = 11) ! -- inquire number of side sets
+ parameter (EXSSNL = 12) ! -- inquire length of side set node list
+ parameter (EXSSEL = 13) ! -- inquire length of side set element list
+ parameter (EXQA = 14) ! -- inquire number of QA records
+ parameter (EXINFO = 15) ! -- inquire number of info records
+ parameter (EXTIMS = 16) ! -- inquire number of time steps in the database
+ parameter (EXNEBP = 17) ! -- inquire number of element block properties
+ parameter (EXNNSP = 18) ! -- inquire number of node set properties
+ parameter (EXNSSP = 19) ! -- inquire number of side set properties
+ parameter (EXNSDF = 20) ! -- inquire length of node set distribution factor list
+ parameter (EXSSDF = 21) ! -- inquire length of side set distribution factor list
+ parameter (EXLBVR = 22) ! -- inquire API Lib vers number
+ parameter (EXNEMP = 23) ! -- inquire number of element map properties
+ parameter (EXNNMP = 24) ! -- inquire number of node map properties
+ parameter (EXNEM = 25) ! -- inquire number of element maps
+ parameter (EXNNM = 26) ! -- inquire number of node maps
+ parameter (EXNEDG = 27) ! -- inquire number of edges
+ parameter (EXNEDB = 28) ! -- inquire number of edge blocks
+ parameter (EXNEDS = 29) ! -- inquire number of edge sets
+ parameter (EXESL = 30) ! -- inquire length of concat edge set edge list
+ parameter (EXESDL = 31) ! -- inquire length of concat edge set dist factor list
+ parameter (EXEDBP = 32) ! -- inquire number of properties stored per edge block
+ parameter (EXEDSP = 33) ! -- inquire number of properties stored per edge set
+ Parameter (EXNFAC = 34) ! -- inquire number of faces
+ parameter (EXNFB = 35) ! -- inquire number of face blocks
+ parameter (EXNFS = 36) ! -- inquire number of face sets
+ parameter (EXFSL = 37) ! -- inquire length of concat face set face list
+ parameter (EXFSDL = 38) ! -- inquire length of concat face set dist factor list
+ parameter (EXFABP = 39) ! -- inquire number of properties stored per face block
+ parameter (EXFASP = 40) ! -- inquire number of properties stored per face set
+ parameter (EXNELS = 41) ! -- inquire number of element sets
+ parameter (EXELSL = 42) ! -- inquire length of concat element set element list
+ parameter (EXELSD = 43) ! -- inquire length of concat element set dist factor list
+ parameter (EXELSP = 44) ! -- inquire number of properties stored per elem set
+ parameter (EXNEDM = 45) ! -- inquire number of edge maps
+ parameter (EXNFAM = 46) ! -- inquire number of face maps
+ parameter (EXNCF = 47) ! -- inquire number of coordinate frames
+ parameter (EXDBMXALNM = 48)! -- inquire size of MAX_NAME_LENGTH dimension on database
+ parameter (EXDBMXUSNM = 49)! -- inquire max size of any name existing on database
+ parameter (EXMXRDNM = 50) ! -- inquire user-specified max size of names returned; truncated if longer
+!
+! Define limits
+!
+ integer MXSTLN, MXLNLN
+! MXSTLN - Maximum string length: used for store strings
+ parameter (MXSTLN = 32)
+! MXLNLN - Maximum line string length
+ parameter (MXLNLN = 80)
+!
+! properties
+!
+ integer EXEBLK, EXNSET, EXSSET, EXEMAP, EXNMAP
+
+ parameter (EXEBLK = 1) ! EXEBLK - element block property code
+ parameter (EXNSET = 2) ! EXNSPR - node set property code
+ parameter (EXSSET = 3) ! EXSSPR - side set property code
+ parameter (EXEMAP = 4) ! EXEMAP - element map property code
+ parameter (EXNMAP = 5) ! EXNMAP - node map property code
+!
+! Define options codes
+!
+ integer EXVRBS, EXDEBG, EXABRT
+
+ parameter (EXVRBS = 1) ! EXVRBS - verbose mode message flag
+ parameter (EXDEBG = 2) ! EXDEBG - debug mode message flag
+ parameter (EXABRT = 4) ! EXABRT - abort mode flag
+!
+! Define coordinate frames
+!
+ integer EXCFREC, EXCFCYL, EXCFSPH
+
+ parameter (EXCFREC = 1) ! Rectangular
+ parameter (EXCFCYL = 2) ! Cylindrical
+ parameter (EXCFSPH = 3) ! Spherical
+
+!
+! Define error return codes
+!
+ integer EXFATL, EXOK, EXWARN
+
+ parameter (EXFATL = -1) ! EXFATL - fatal error flag def
+ parameter (EXOK = 0) ! EXOK - no err (success) flag def
+ parameter (EXWARN = 1) ! EXWARN - warning flag def
+!
+! Define error return codes and flags
+!
+ integer EXMEMF, EXBFMD, EXBFID, EXBTID, EXBPRM, EXNULL, &
+ & EXPMSG, EXLMSG
+
+ parameter (EXMEMF = 1000) ! EXMEMF - memory allocation failure flag def
+ parameter (EXBFMD = 1001) ! EXBFMD - wrong file mode
+ parameter (EXBFID = 1002) ! EXBFID - bad file id def
+ parameter (EXBTID = 1004) ! EXBTID - id table lookup failed
+ parameter (EXBPRM = 1005) ! EXBPRM - bad parameter passed
+ parameter (EXNULL = -1006) ! EXNULL - null entity found
+ parameter (EXPMSG = -1000) ! EXPMSG - message print code - no error implied
+ parameter (EXLMSG = -1001) ! EXLMSG - print last error message msg code
diff --git a/forbind/include/exodusII_int.inc b/exodus/forbind/include/exodusII_int.inc
similarity index 96%
rename from forbind/include/exodusII_int.inc
rename to exodus/forbind/include/exodusII_int.inc
index d4b189f..f117ec3 100644
--- a/forbind/include/exodusII_int.inc
+++ b/exodus/forbind/include/exodusII_int.inc
@@ -9,6 +9,16 @@ C*****************************************************************************
C
C EXODUSII_INT - exodus II internals include file
C
+C author - Victor R. Yarberry, Sandia National Laboratories
+C
+C environment - UNIX F77
+C
+C revision history -
+C
+C Based on original written by Lynn Clements (RE/SPEC)
+C
+C $Id: exodusII_int.inc,v 1.8 2008/07/24 21:40:41 gdsjaar Exp $
+C
C*****************************************************************************
C --
C -- This file contains define constants that are used to refer to
diff --git a/forbind/src/aix.m4 b/exodus/forbind/src/Imakefile
similarity index 61%
rename from forbind/src/aix.m4
rename to exodus/forbind/src/Imakefile
index d689026..fea7803 100644
--- a/forbind/src/aix.m4
+++ b/exodus/forbind/src/Imakefile
@@ -1,4 +1,3 @@
-divert(-1)
# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
# retains certain rights in this software.
@@ -33,36 +32,45 @@ divert(-1)
#
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', AIX)
+/* Use *.h files in ../../cbind/include/ instead of installed *.h files */
+INCLUDES = IncRef-I../../cbind/include
+F77EXTRAOPTIONS = IncRef-I../include
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1') # for AIX, use same name
+F77CPPFLAGS = F77CppFlags
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
+SRCS = exo_jack.c
+SRCSF = addrwrap.F
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
+OBJS = ${SRCS:.c=.o} ${SRCSF:.F=.o}
+LibraryTargetSubdirsCopy(libexoIIv2for.a,$(OBJS),../../)
+CleanupCapF(addrwrap.f)
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
+#if Build64BitAccess == YES
+/* Need to compile exo_jack.c without the -DBuild64 option
+ * real* -> float* (actually void* since it handles both float* and double*)
+ */
+exo_jack32.o: exo_jack.c
+ $(CC) -o exo_jack32.o -c $(CFLAGS) -DDEFAULT_REAL_INT exo_jack.c
+
+all:: libexoIIv2for32.a
+libexoIIv2for32.a: exo_jack32.o
+ $(AR) $@ $?
+ $(_NULLCMD_)
+ $(_NULLCMD_)
+ $(CP) $@ ../../
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
+#endif
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
+/*
+ * 32-bit build:
+ * Compile exo_jack.c and put in libexoIIv2for.a archive.
+ *
+ * 64-bit build: (using 8-byte integer/real)
+ * Compile addrwrap.F (contains main api name 'func'; calls 'func4' name)
+ * Compile exo_jack.c with -DBuild64 (adds 4_ to function names)
+ * -- put above two object files into libexoIIv2for.a
+ *
+ */
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
+DependTarget()
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer*1')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/hp.m4 b/exodus/forbind/src/Makefile.standalone
similarity index 62%
rename from forbind/src/hp.m4
rename to exodus/forbind/src/Makefile.standalone
index 3fb5382..e635ea1 100644
--- a/forbind/src/hp.m4
+++ b/exodus/forbind/src/Makefile.standalone
@@ -1,4 +1,3 @@
-divert(-1)
# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
# retains certain rights in this software.
@@ -32,37 +31,50 @@ divert(-1)
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+INCLUDES = -I../../cbind/include
+F77EXTRAOPTIONS = -I../include
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', HP-UX)
+SRCS = exo_jack.c
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1') # for HP-UX, use same name
+SRCSF = addrwrap.F
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
+OBJS = ${SRCS:.c=.o} ${SRCSF:.F=.o}
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
+ifeq ($(BITS),64)
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
+LOCALFLAGS=-DBuild64
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
+# Need to compile exo_jack.c without the -DBuild64 option
+# real* -> float* (actually void* since it handles both float* and double*)
+exo_jack32.o: exo_jack.c
+ $(CC) -o exo_jack32.o -c $(CFLAGS) -DDEFAULT_REAL_INT exo_jack.c
+
+all:: libexoIIv2for32.a
+libexoIIv2for32.a: exo_jack32.o
+ $(AR) $@ $?
+ $(_NULLCMD_)
+ $(_NULLCMD_)
+ $(CP) $@ ../../
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
+endif
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
+all:: libexoIIv2for.a
+libexoIIv2for.a: $(OBJS)
+ $(AR) $@ $?
+ $(RANLIB) $@
+ cp libexoIIv2for.a ../../
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`byte')
+clean::
+ rm -f *.CKP *.ln *.BAK *.bak *.o *.M *.mod core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"*
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
+.SUFFIXES: .c .F .f
+.c.o:
+ $(CC) -c $(LOCALFLAGS) $(CFLAGS) -DADDC_ $*.c
+.f.o:
+ $(FC) -c $(FFLAGS) $*.f
+.F.o:
+ $(FC) -c $(LOCALFLAGS) $(DEFINES) $(FFLAGS) $*.F
+
+# ----------------------------------------------------------------------
+# dependencies generated by makedepend or sfmakedepend
-divert(0)dnl
diff --git a/exodus/forbind/src/addrwrap.F b/exodus/forbind/src/addrwrap.F
new file mode 100644
index 0000000..3b83937
--- /dev/null
+++ b/exodus/forbind/src/addrwrap.F
@@ -0,0 +1,3431 @@
+C Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+C DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+C retains certain rights in this software.
+C
+C Redistribution and use in source and binary forms, with or without
+C modification, are permitted provided that the following conditions are
+C met:
+C
+C * Redistributions of source code must retain the above copyright
+C notice, this list of conditions and the following disclaimer.
+C
+C * Redistributions in binary form must reproduce the above
+C copyright notice, this list of conditions and the following
+C disclaimer in the documentation and/or other materials provided
+C with the distribution.
+C
+C * Neither the name of Sandia Corporation nor the names of its
+C contributors may be used to endorse or promote products derived
+C from this software without specific prior written permission.
+C
+C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+C "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+C LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+C A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+C OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+C SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+C LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+C THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+C (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+C OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+C
+
+ SUBROUTINE ADRDUM
+ END
+
+#ifdef Build64
+ SUBROUTINE EXCLOS (IDEXO, IERR)
+C
+C CLOSE EXODUS II FILE
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXCLOS4 (IDEXO4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXCN2S (IDEXO, NSESS, NDESS, IXEESS, IXNESS,
+ & LTEESS, LTNESS, LTSESS, IERR)
+C
+C CONVERT SIDE SET NODES TO SIDES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NSESS (*) ! (R)
+ INTEGER NDESS (*) ! (R)
+ INTEGER IXEESS (*) ! (R)
+ INTEGER IXNESS (*) ! (R)
+ INTEGER LTEESS (*) ! (R)
+ INTEGER LTNESS (*) ! (R)
+ INTEGER LTSESS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NSESS4 (1) ! (R)
+ INTEGER*4 NDESS4 (1) ! (R)
+ INTEGER*4 IXEESS4 (1) ! (R)
+ INTEGER*4 IXNESS4 (1) ! (R)
+ INTEGER*4 LTEESS4 (1) ! (R)
+ INTEGER*4 LTNESS4 (1) ! (R)
+ INTEGER*4 LTSESS4 (1) ! (W)
+ POINTER (PNSESS4, NSESS4)
+ POINTER (PNDESS4, NDESS4)
+ POINTER (PIXEESS4, IXEESS4)
+ POINTER (PIXNESS4, IXNESS4)
+ POINTER (PLTEESS4, LTEESS4)
+ POINTER (PLTNESS4, LTNESS4)
+ POINTER (PLTSESS4, LTSESS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXSIDS
+ INTEGER NEXELEM
+ INTEGER NEXNODE
+ INTEGER NEXNSNL
+ INTEGER NEXSSEL
+ INTEGER I
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXSIDS
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXSIDS = INTRET4
+ INFREQ4 = EXELEM
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXELEM = INTRET4
+ INFREQ4 = EXNODE
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXNODE = INTRET4
+ NEXNSNL = 0
+ NEXSSEL = 0
+ DO I = 1, NEXSIDS
+ NEXNSNL = NEXNSNL + NDESS(I)
+ NEXSSEL = NEXSSEL + NSESS(I)
+ END DO
+ CALL I8I4 (NEXSIDS, NSESS, PNSESS4)
+ CALL I8I4 (NEXSIDS, NDESS, PNDESS4)
+ CALL I8I4 (NEXSIDS, IXEESS, PIXEESS4)
+ CALL I8I4 (NEXSIDS, IXNESS, PIXNESS4)
+ CALL I8I4 (NEXSSEL, LTEESS, PLTEESS4)
+ CALL I8I4 (NEXNSNL, LTNESS, PLTNESS4)
+ CALL I4ALLOC (NEXSSEL, PLTSESS4)
+ CALL EXCN2S4 (IDEXO4, NSESS4, NDESS4, IXEESS4, IXNESS4,
+ & LTEESS4, LTNESS4, LTSESS4, IERR4)
+ CALL I4I8 (NEXSSEL, PLTSESS4, LTSESS)
+ CALL I4FREE (PNSESS4)
+ CALL I4FREE (PNDESS4)
+ CALL I4FREE (PIXEESS4)
+ CALL I4FREE (PIXNESS4)
+ CALL I4FREE (PLTEESS4)
+ CALL I4FREE (PLTNESS4)
+ IERR = IERR4
+ END
+
+ INTEGER FUNCTION EXCRE (PATH, ICMODE, ICOMPWS, IOWS, IERR)
+C
+C CREATE EXODUS II FILE
+C
+ IMPLICIT NONE
+ CHARACTER* (*) PATH ! (R)
+ INTEGER ICMODE ! (R)
+ INTEGER ICOMPWS ! (RW)
+ INTEGER IOWS ! (RW)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 EXCRE4
+ EXTERNAL EXCRE4
+ INTEGER*4 IRET4
+ INTEGER IRET
+ INTEGER*4 ICMODE4 ! (R)
+ INTEGER*4 ICOMPWS4 ! (RW)
+ INTEGER*4 IOWS4 ! (RW)
+ INTEGER*4 IERR4 ! (W)
+
+ ICMODE4 = ICMODE
+
+C ... This needs to be set explicitly since all wrapper routines
+C are passing REAL*8 and the exo_jack.c routines all take double*
+ ICOMPWS4 = 8
+ IOWS4 = IOWS
+ IRET4 = EXCRE4 (PATH, ICMODE4, ICOMPWS4, IOWS4, IERR4)
+ ICOMPWS = ICOMPWS4
+ IOWS = IOWS4
+ IERR = IERR4
+ IRET = IRET4
+ EXCRE = IRET
+ END
+
+ SUBROUTINE EXERR (MODNAM, MSG, ERRNUM)
+C
+C ERROR REPORTING
+C
+ CHARACTER* (*) MODNAM ! (R)
+ CHARACTER* (*) MSG ! (R)
+ INTEGER ERRNUM ! (R)
+
+ INTEGER*4 ERRNUM4 ! (R)
+
+ ERRNUM4 = ERRNUM
+ CALL EXERR4 (MODNAM, MSG, ERRNUM4)
+ END
+
+ SUBROUTINE EXGATM (IDEXO, TIME, IERR)
+C
+C READ ALL TIME VALUES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ REAL TIME (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXGATM4 (IDEXO4, TIME, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGCNS (IDEXO, IDNPSS, NNNPS, NDNPS, IXNNPS,
+ & IXDNPS, LTNNPS, FACNPS, IERR)
+C
+C READ CONCATENATED NODE SETS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDNPSS (*) ! (W)
+ INTEGER NNNPS (*) ! (W)
+ INTEGER NDNPS (*) ! (W)
+ INTEGER IXNNPS (*) ! (W)
+ INTEGER IXDNPS (*) ! (W)
+ INTEGER LTNNPS (*) ! (W)
+ REAL FACNPS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDNPSS4 (1) ! (W)
+ INTEGER*4 NNNPS4 (1) ! (W)
+ INTEGER*4 NDNPS4 (1) ! (W)
+ INTEGER*4 IXNNPS4 (1) ! (W)
+ INTEGER*4 IXDNPS4 (1) ! (W)
+ INTEGER*4 LTNNPS4 (1) ! (W)
+ POINTER (PIDNPSS4, IDNPSS4)
+ POINTER (PNNNPS4, NNNPS4)
+ POINTER (PNDNPS4, NDNPS4)
+ POINTER (PIXNNPS4, IXNNPS4)
+ POINTER (PIXDNPS4, IXDNPS4)
+ POINTER (PLTNNPS4, LTNNPS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXNODS
+ INTEGER NEXNSNL
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXNODS
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXNODS = INTRET4
+ INFREQ4 = EXNSNL
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXNSNL = INTRET4
+ CALL I4ALLOC (NEXNODS, PIDNPSS4)
+ CALL I4ALLOC (NEXNODS, PNNNPS4)
+ CALL I4ALLOC (NEXNODS, PNDNPS4)
+ CALL I4ALLOC (NEXNODS, PIXNNPS4)
+ CALL I4ALLOC (NEXNODS, PIXDNPS4)
+ CALL I4ALLOC (NEXNSNL, PLTNNPS4)
+ CALL EXGCNS4 (IDEXO4, IDNPSS4, NNNPS4, NDNPS4, IXNNPS4,
+ & IXDNPS4, LTNNPS4, FACNPS, IERR4)
+ CALL I4I8 (NEXNODS, PIDNPSS4, IDNPSS)
+ CALL I4I8 (NEXNODS, PNNNPS4, NNNPS)
+ CALL I4I8 (NEXNODS, PNDNPS4, NDNPS)
+ CALL I4I8 (NEXNODS, PIXNNPS4, IXNNPS)
+ CALL I4I8 (NEXNODS, PIXDNPS4, IXDNPS)
+ CALL I4I8 (NEXNSNL, PLTNNPS4, LTNNPS)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGFRM (IDEXO, NFRAME, IDSCF, COORD, ITAGS, IERR)
+C
+C READ COORDINATE FRAMES
+C
+ implicit none
+ include 'exodusII.inc'
+
+ INTEGER IDEXO ! (R)
+ INTEGER NFRAME ! (R)
+ INTEGER IDSCF(*) ! (W)
+ INTEGER ITAGS(*) ! (W)
+ INTEGER IERR ! (W)
+
+ REAL COORD(*) ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ integer*4 nframe4 ! (R)
+ integer*4 idscf4(1) ! (W)
+ integer*4 itags4(1) ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ POINTER (PIDSCF4, IDSCF4)
+ POINTER (PITAGS4, ITAGS4)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ idexo4 = idexo
+ infreq4 = EXNCF
+
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+
+ NFRAME4 = INTRET4
+ NFRAME = NFRAME4
+ CALL I4ALLOC (NFRAME, PIDSCF4)
+ CALL I4ALLOC (NFRAME, PITAGS4)
+
+ call exgfrm4(idexo4, nframe4, idscf4, coord, itags4, ierr4)
+
+ CALL I4I8 (NFRAME, PIDSCF4, IDSCF)
+ CALL I4I8 (NFRAME, PITAGS4, ITAGS)
+ ierr = ierr4
+
+ END
+
+ SUBROUTINE EXPFRM (IDEXO, NFRAME, IDSCF, COORD, ITAGS, IERR)
+C
+C DEFINE/WRITE COORDINATE FRAMES
+C
+ implicit none
+ include 'exodusII.inc'
+
+ INTEGER IDEXO ! (R)
+ INTEGER NFRAME ! (R)
+ INTEGER IDSCF(*) ! (R)
+ INTEGER ITAGS(*) ! (R)
+ INTEGER IERR ! (W)
+
+ REAL COORD(*) ! (R)
+
+ INTEGER*4 IDEXO4 ! (R)
+ integer*4 nframe4 ! (R)
+ integer*4 idscf4(1) ! (R)
+ integer*4 itags4(1) ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ POINTER (PIDSCF4, IDSCF4)
+ POINTER (PITAGS4, ITAGS4)
+
+ idexo4 = idexo
+ NFRAME4 = NFRAME
+
+ CALL I8I4 (NFRAME, IDSCF, PIDSCF4)
+ CALL I8I4 (NFRAME, ITAGS, PITAGS4)
+
+ call expfrm4(idexo4, nframe4, idscf4, coord, itags4, ierr4)
+
+ CALL I4FREE (PIDSCF4)
+ CALL I4FREE (PITAGS4)
+ ierr = ierr4
+
+ END
+
+ SUBROUTINE EXGCON (IDEXO, NAMECO, IERR)
+C
+C READ COORDINATE NAMES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER* (*) NAMECO (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXGCON4 (IDEXO4, NAMECO, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGCOR (IDEXO, XN, YN, ZN, IERR)
+C
+C READ NODAL COORDINATES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ REAL XN (*) ! (W)
+ REAL YN (*) ! (W)
+ REAL ZN (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXGCOR4 (IDEXO4, XN, YN, ZN, IERR4)
+
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGCSS (IDEXO, IDESSS, NSESS, NDESS, IXEESS,
+ & IXDESS, LTEESS, LTSESS, FACESS, IERR)
+C
+C READ CONCATENATED SIDE SETS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESSS (*) ! (W)
+ INTEGER NSESS (*) ! (W)
+ INTEGER NDESS (*) ! (W)
+ INTEGER IXEESS (*) ! (W)
+ INTEGER IXDESS (*) ! (W)
+ INTEGER LTEESS (*) ! (W)
+ INTEGER LTSESS (*) ! (W)
+ REAL FACESS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESSS4 (1) ! (W)
+ INTEGER*4 NSESS4 (1) ! (W)
+ INTEGER*4 NDESS4 (1) ! (W)
+ INTEGER*4 IXEESS4 (1) ! (W)
+ INTEGER*4 IXDESS4 (1) ! (W)
+ INTEGER*4 LTEESS4 (1) ! (W)
+ INTEGER*4 LTSESS4 (1) ! (W)
+ POINTER (PIDESSS4, IDESSS4)
+ POINTER (PNSESS4, NSESS4)
+ POINTER (PNDESS4, NDESS4)
+ POINTER (PIXEESS4, IXEESS4)
+ POINTER (PIXDESS4, IXDESS4)
+ POINTER (PLTEESS4, LTEESS4)
+ POINTER (PLTSESS4, LTSESS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXSIDS
+ INTEGER NEXSSEL
+ INTEGER NEXSSDF
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXSIDS
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXSIDS = INTRET4
+ INFREQ4 = EXSSEL
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXSSEL = INTRET4
+ INFREQ4 = EXSSDF
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXSSDF = INTRET4
+ CALL I4ALLOC (NEXSIDS, PIDESSS4)
+ CALL I4ALLOC (NEXSIDS, PNSESS4)
+ CALL I4ALLOC (NEXSIDS, PNDESS4)
+ CALL I4ALLOC (NEXSIDS, PIXEESS4)
+ CALL I4ALLOC (NEXSIDS, PIXDESS4)
+ CALL I4ALLOC (NEXSSEL, PLTEESS4)
+ CALL I4ALLOC (NEXSSEL, PLTSESS4)
+ CALL EXGCSS4 (IDEXO4, IDESSS4, NSESS4, NDESS4, IXEESS4,
+ & IXDESS4, LTEESS4, LTSESS4, FACESS, IERR4)
+ CALL I4I8 (NEXSIDS, PIDESSS4, IDESSS)
+ CALL I4I8 (NEXSIDS, PNSESS4, NSESS)
+ CALL I4I8 (NEXSIDS, PNDESS4, NDESS)
+ CALL I4I8 (NEXSIDS, PIXEESS4, IXEESS)
+ CALL I4I8 (NEXSIDS, PIXDESS4, IXDESS)
+ CALL I4I8 (NEXSSEL, PLTEESS4, LTEESS)
+ CALL I4I8 (NEXSSEL, PLTSESS4, LTSESS)
+
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGCSSF (IDEXO, IDESSS, NSESS, NDESS, IXEESS,
+ & IXDESS, LTEESS, LTSESS, IERR)
+C
+C READ CONCATENATED SIDE SETS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESSS (*) ! (W)
+ INTEGER NSESS (*) ! (W)
+ INTEGER NDESS (*) ! (W)
+ INTEGER IXEESS (*) ! (W)
+ INTEGER IXDESS (*) ! (W)
+ INTEGER LTEESS (*) ! (W)
+ INTEGER LTSESS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESSS4 (1) ! (W)
+ INTEGER*4 NSESS4 (1) ! (W)
+ INTEGER*4 NDESS4 (1) ! (W)
+ INTEGER*4 IXEESS4 (1) ! (W)
+ INTEGER*4 IXDESS4 (1) ! (W)
+ INTEGER*4 LTEESS4 (1) ! (W)
+ INTEGER*4 LTSESS4 (1) ! (W)
+ POINTER (PIDESSS4, IDESSS4)
+ POINTER (PNSESS4, NSESS4)
+ POINTER (PNDESS4, NDESS4)
+ POINTER (PIXEESS4, IXEESS4)
+ POINTER (PIXDESS4, IXDESS4)
+ POINTER (PLTEESS4, LTEESS4)
+ POINTER (PLTSESS4, LTSESS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXSIDS
+ INTEGER NEXSSEL
+ INTEGER NEXSSDF
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXSIDS
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXSIDS = INTRET4
+ INFREQ4 = EXSSEL
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXSSEL = INTRET4
+ INFREQ4 = EXSSDF
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXSSDF = INTRET4
+ CALL I4ALLOC (NEXSIDS, PIDESSS4)
+ CALL I4ALLOC (NEXSIDS, PNSESS4)
+ CALL I4ALLOC (NEXSIDS, PNDESS4)
+ CALL I4ALLOC (NEXSIDS, PIXEESS4)
+ CALL I4ALLOC (NEXSIDS, PIXDESS4)
+ CALL I4ALLOC (NEXSSEL, PLTEESS4)
+ CALL I4ALLOC (NEXSSEL, PLTSESS4)
+ CALL EXGCSSF4 (IDEXO4, IDESSS4, NSESS4, NDESS4, IXEESS4,
+ & IXDESS4, LTEESS4, LTSESS4, IERR4)
+ CALL I4I8 (NEXSIDS, PIDESSS4, IDESSS)
+ CALL I4I8 (NEXSIDS, PNSESS4, NSESS)
+ CALL I4I8 (NEXSIDS, PNDESS4, NDESS)
+ CALL I4I8 (NEXSIDS, PIXEESS4, IXEESS)
+ CALL I4I8 (NEXSIDS, PIXDESS4, IXDESS)
+ CALL I4I8 (NEXSSEL, PLTEESS4, LTEESS)
+ CALL I4I8 (NEXSSEL, PLTSESS4, LTSESS)
+
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGEAT (IDEXO, IDELB, ATRIB, IERR)
+C
+C READ ELEMENT BLOCK ATTRIBUTES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB ! (R)
+ REAL ATRIB (*) ! (NUMATR,NUMELB) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDELB4 = IDELB
+ CALL EXGEAT4 (IDEXO4, IDELB4, ATRIB, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGEAN (IDEXO, IDELB, NATTR, NAMES, IERR)
+C
+C READ ELEMENT BLOCK ATTRIBUTES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB ! (R)
+ INTEGER NATTR ! (R)
+ CHARACTER* (*) NAMES (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 NATTR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDELB4 = IDELB
+ NATTR4 = NATTR
+ CALL EXGEAN4 (IDEXO4, IDELB4, NATTR4, NAMES, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGEBI (IDEXO, IDELBS, IERR)
+C
+C READ ELEMENT BLOCK IDS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELBS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELBS4 (1) ! (W)
+ POINTER (PIDELBS4, IDELBS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXELBL
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXELBL
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXELBL = INTRET4
+ CALL I4ALLOC (NEXELBL, PIDELBS4)
+ CALL EXGEBI4 (IDEXO4, IDELBS4, IERR4)
+ CALL I4I8 (NEXELBL, PIDELBS4, IDELBS)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGELB (IDEXO, IDELB, NAMELB, NUMELB, NUMLNK,
+ & NUMATR, IERR)
+C
+C READ ELEMENT BLOCK PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB ! (R)
+ CHARACTER* (*) NAMELB ! (W)
+ INTEGER NUMELB ! (W)
+ INTEGER NUMLNK ! (W)
+ INTEGER NUMATR ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 NUMELB4 ! (W)
+ INTEGER*4 NUMLNK4 ! (W)
+ INTEGER*4 NUMATR4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDELB4 = IDELB
+ CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
+ & NUMATR4, IERR4)
+ NUMELB = NUMELB4
+ NUMLNK = NUMLNK4
+ NUMATR = NUMATR4
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGELC (IDEXO, IDELB, LINK, IERR)
+C
+C READ ELEMENT BLOCK CONNECTIVITY
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB ! (R)
+ INTEGER LINK (*) ! (NUMLNK,NUMELB) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 LINK4 (1) ! (NUMLNK,NUMELB) ! (W)
+ POINTER (PLINK4, LINK4)
+ INTEGER*4 IERR4 ! (W)
+
+ CHARACTER* (MXSTLN) NAMELB
+ INTEGER*4 NUMELB4
+ INTEGER*4 NUMLNK4
+ INTEGER*4 NUMATR4
+ INTEGER NUMLNK
+ INTEGER NUMELB
+
+ IDEXO4 = IDEXO
+ IDELB4 = IDELB
+ CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
+ & NUMATR4, IERR4)
+ IF (NAMELB .EQ. 'NSIDED' .OR. NAMELB .EQ. 'nsided') THEN
+ NUMLNK = NUMLNK4
+ CALL I4ALLOC (NUMLNK, PLINK4)
+ CALL EXGELC4 (IDEXO4, IDELB4, LINK4, IERR4)
+ CALL I4I8 (NUMLNK, PLINK4, LINK)
+ ELSE
+ NUMLNK = NUMLNK4
+ NUMELB = NUMELB4
+ CALL I4ALLOC (NUMLNK*NUMELB, PLINK4)
+ CALL EXGELC4 (IDEXO4, IDELB4, LINK4, IERR4)
+ CALL I4I8 (NUMLNK*NUMELB, PLINK4, LINK)
+ ENDIF
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGECPP (IDEXO, ITYPE, IDELB, COUNTS, IERR)
+C
+C READ ENTITY_COUNT-PER-POLYHEDRA
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB ! (R)
+ INTEGER ITYPE ! (R)
+ INTEGER COUNTS (*) ! (NUMELB) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 COUNTS4 (1) ! (NUMELB) ! (W)
+ POINTER (PCOUNTS4, COUNTS4)
+ INTEGER*4 IERR4 ! (W)
+
+ CHARACTER* (MXSTLN) NAMELB
+ INTEGER*4 NUMELB4
+ INTEGER*4 NUMLNK4
+ INTEGER*4 NUMATR4
+
+ INTEGER NUMELB
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ IDELB4 = IDELB
+ CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
+ & NUMATR4, IERR4)
+ numelb = numelb4
+
+ CALL I4ALLOC (NUMELB, PCOUNTS4)
+ CALL EXGECPP4 (IDEXO4, ITYPE4, IDELB4, COUNTS4, IERR4)
+ CALL I4I8 (NUMELB, PCOUNTS4, COUNTS)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGENM (IDEXO, MAPEL, IERR)
+C
+C READ ELEMENT NUMBER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPEL (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPEL4 (1) ! (W)
+ POINTER (PMAPEL4, MAPEL4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXELEM
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXELEM
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXELEM = INTRET4
+ CALL I4ALLOC (NEXELEM, PMAPEL4)
+ CALL EXGENM4 (IDEXO4, MAPEL4, IERR4)
+ CALL I4I8 (NEXELEM, PMAPEL4, MAPEL)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGEM (IDEXO, MAPID, MAPEL, IERR)
+C
+C READ ELEMENT ORDER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPID ! (R)
+ INTEGER MAPEL (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPID4 ! (R)
+ INTEGER*4 MAPEL4 (1) ! (W)
+ POINTER (PMAPEL4, MAPEL4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXELEM
+
+ IDEXO4 = IDEXO
+ MAPID4 = MAPID
+ INFREQ4 = EXELEM
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXELEM = INTRET4
+ CALL I4ALLOC (NEXELEM, PMAPEL4)
+ CALL EXGEM4 (IDEXO4, MAPID4, MAPEL4, IERR4)
+ CALL I4I8 (NEXELEM, PMAPEL4, MAPEL)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGPEM (IDEXO, MAPID, ISTART, ICOUNT, MAPEL, IERR)
+C
+C READ ELEMENT ORDER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPID ! (R)
+ INTEGER ISTART ! (R)
+ INTEGER ICOUNT ! (R)
+ INTEGER MAPEL (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPID4 ! (R)
+ INTEGER*4 ISTART4 ! (R)
+ INTEGER*4 ICOUNT4 ! (R)
+ INTEGER*4 MAPEL4 (1) ! (W)
+ POINTER (PMAPEL4, MAPEL4)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ MAPID4 = MAPID
+ ISTART4 = ISTART
+ ICOUNT4 = ICOUNT
+ CALL I4ALLOC (ICOUNT, PMAPEL4)
+ CALL EXGPEM4 (IDEXO4, MAPID4, ISTART4, ICOUNT4, MAPEL4, IERR4)
+ CALL I4I8 (ICOUNT, PMAPEL4, MAPEL)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGEV (IDEXO, ISTEP, IXELEV, IDELB, NUMELB,
+ & VALEV, IERR)
+C
+C READ ELEMENT VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER IXELEV ! (R)
+ INTEGER IDELB ! (R)
+ INTEGER NUMELB ! (R)
+ REAL VALEV (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 IXELEV4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 NUMELB4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ IXELEV4 = IXELEV
+ IDELB4 = IDELB
+ NUMELB4 = NUMELB
+ CALL EXGEV4 (IDEXO4, ISTEP4, IXELEV4, IDELB4, NUMELB4,
+ & VALEV, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGEVT (IDEXO, IXELEV, IELNUM, ISTPB, ISTPE,
+ & VALEV, IERR)
+C
+C READ ELEMENT VARIABLE VALUES THROUGH TIME
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IXELEV ! (R)
+ INTEGER IELNUM ! (R)
+ INTEGER ISTPB ! (R)
+ INTEGER ISTPE ! (R)
+ REAL VALEV (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IXELEV4 ! (R)
+ INTEGER*4 IELNUM4 ! (R)
+ INTEGER*4 ISTPB4 ! (R)
+ INTEGER*4 ISTPE4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IXELEV4 = IXELEV
+ IELNUM4 = IELNUM
+ ISTPB4 = ISTPB
+ ISTPE4 = ISTPE
+
+ CALL EXGEVT4 (IDEXO4, IXELEV4, IELNUM4, ISTPB4, ISTPE4,
+ & VALEV, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNSV (IDEXO, ISTEP, IXV, ID, NUM, VAL, IERR)
+C
+C READ NODESET VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER IXV ! (R)
+ INTEGER ID ! (R)
+ INTEGER NUM ! (R)
+ REAL VAL (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 IXV4 ! (R)
+ INTEGER*4 ID4 ! (R)
+ INTEGER*4 NUM4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ IXV4 = IXV
+ ID4 = ID
+ NUM4 = NUM
+ CALL EXGNSV4 (IDEXO4, ISTEP4, IXV4, ID4, NUM4, VAL, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGSSV (IDEXO, ISTEP, IXV, ID, NUM, VAL, IERR)
+C
+C READ SIDESET VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER IXV ! (R)
+ INTEGER ID ! (R)
+ INTEGER NUM ! (R)
+ REAL VAL (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 IXV4 ! (R)
+ INTEGER*4 ID4 ! (R)
+ INTEGER*4 NUM4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ IXV4 = IXV
+ ID4 = ID
+ NUM4 = NUM
+ CALL EXGSSV4 (IDEXO4, ISTEP4, IXV4, ID4, NUM4, VAL, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGGV (IDEXO, ISTEP, NVARGL, VALGV, IERR)
+C
+C READ GLOBAL VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER NVARGL ! (R)
+ REAL VALGV (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 NVARGL4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ NVARGL4 = NVARGL
+ CALL EXGGV4 (IDEXO4, ISTEP4, NVARGL4, VALGV, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGGVT (IDEXO, IXGLOV, ISTPB, ISTPE, VALGV, IERR)
+C
+C READ GLOBAL VARIABLE VALUES THROUGH TIME
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IXGLOV ! (R)
+ INTEGER ISTPB ! (R)
+ INTEGER ISTPE ! (R)
+ REAL VALGV (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IXGLOV4 ! (R)
+ INTEGER*4 ISTPB4 ! (R)
+ INTEGER*4 ISTPE4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IXGLOV4 = IXGLOV
+ ISTPB4 = ISTPB
+ ISTPE4 = ISTPE
+ CALL EXGGVT4 (IDEXO4, IXGLOV4, ISTPB4, ISTPE4, VALGV, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGINF (IDEXO, INFO, IERR)
+C
+C READ INFORMATION RECORDS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER* (*) INFO (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXGINF4 (IDEXO4, INFO, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGINI (IDEXO, TITLE, NDIM, NUMNP, NUMEL, NELBLK,
+ & NUMNPS, NUMESS, IERR)
+C
+C READ INITIALIZATION PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER* (*) TITLE ! (W)
+ INTEGER NDIM ! (W)
+ INTEGER NUMNP ! (W)
+ INTEGER NUMEL ! (W)
+ INTEGER NELBLK ! (W)
+ INTEGER NUMNPS ! (W)
+ INTEGER NUMESS ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NDIM4 ! (W)
+ INTEGER*4 NUMNP4 ! (W)
+ INTEGER*4 NUMEL4 ! (W)
+ INTEGER*4 NELBLK4 ! (W)
+ INTEGER*4 NUMNPS4 ! (W)
+ INTEGER*4 NUMESS4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXGINI4 (IDEXO4, TITLE, NDIM4, NUMNP4, NUMEL4, NELBLK4,
+ & NUMNPS4, NUMESS4, IERR4)
+ NDIM = NDIM4
+ NUMNP = NUMNP4
+ NUMEL = NUMEL4
+ NELBLK = NELBLK4
+ NUMNPS = NUMNPS4
+ NUMESS = NUMESS4
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGMP (IDEXO, NNMAP, NEMAP, IERR)
+C
+C GET MAP PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NNMAP ! (W)
+ INTEGER NEMAP ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NNMAP4 ! (W)
+ INTEGER*4 NEMAP4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXGMP4 (IDEXO4, NNMAP4, NEMAP4, IERR4)
+ NNMAP = NNMAP4
+ NEMAP = NEMAP4
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPMP (IDEXO, NNMAP, NEMAP, IERR)
+C
+C PUT MAP PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NNMAP ! (W)
+ INTEGER NEMAP ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NNMAP4 ! (W)
+ INTEGER*4 NEMAP4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NNMAP4 = NNMAP
+ NEMAP4 = NEMAP
+ CALL EXPMP4 (IDEXO4, NNMAP4, NEMAP4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGMAP (IDEXO, MAPEL, IERR)
+C
+C READ ELEMENT ORDER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPEL (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPEL4 (1) ! (W)
+ POINTER (PMAPEL4, MAPEL4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXELEM
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXELEM
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXELEM = INTRET4
+ CALL I4ALLOC (NEXELEM, PMAPEL4)
+ CALL EXGMAP4 (IDEXO4, MAPEL4, IERR4)
+ CALL I4I8 (NEXELEM, PMAPEL4, MAPEL)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNNM (IDEXO, MAPNOD, IERR)
+C
+C READ NODE NUMBER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPNOD (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPNOD4 (1) ! (W)
+ POINTER (PMAPNOD4, MAPNOD4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXNODE
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXNODE
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXNODE = INTRET4
+ CALL I4ALLOC (NEXNODE, PMAPNOD4)
+ CALL EXGNNM4 (IDEXO4, MAPNOD4, IERR4)
+ CALL I4I8 (NEXNODE, PMAPNOD4, MAPNOD)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNM (IDEXO, MAPID, MAPNOD, IERR)
+C
+C READ NODE ORDER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPID ! (R)
+ INTEGER MAPNOD (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPID4 ! (R)
+ INTEGER*4 MAPNOD4 (1) ! (W)
+ POINTER (PMAPNOD4, MAPNOD4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXNODE
+
+ IDEXO4 = IDEXO
+ MAPID4 = MAPID
+ INFREQ4 = EXNODE
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXNODE = INTRET4
+ CALL I4ALLOC (NEXNODE, PMAPNOD4)
+ CALL EXGNM4 (IDEXO4, MAPID4, MAPNOD4, IERR4)
+ CALL I4I8 (NEXNODE, PMAPNOD4, MAPNOD)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNP (IDEXO, IDNPS, NNNPS, NDNPS, IERR)
+C
+C READ NODE SET PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDNPS ! (R)
+ INTEGER NNNPS ! (W)
+ INTEGER NDNPS ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDNPS4 ! (R)
+ INTEGER*4 NNNPS4 ! (W)
+ INTEGER*4 NDNPS4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDNPS4 = IDNPS
+ CALL EXGNP4 (IDEXO4, IDNPS4, NNNPS4, NDNPS4, IERR4)
+ NNNPS = NNNPS4
+ NDNPS = NDNPS4
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNS (IDEXO, IDNPS, LTNNPS, IERR)
+C
+C READ NODE SET
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDNPS ! (R)
+ INTEGER LTNNPS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDNPS4 ! (R)
+ INTEGER*4 LTNNPS4 (1) ! (W)
+ POINTER (PLTNNPS4, LTNNPS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 NNNPS4
+ INTEGER*4 NDNPS4
+ integer nnnps
+
+ IDEXO4 = IDEXO
+ IDNPS4 = IDNPS
+ CALL EXGNP4 (IDEXO4, IDNPS4, NNNPS4, NDNPS4, IERR4)
+ nnnps = nnnps4
+ CALL I4ALLOC (NNNPS, PLTNNPS4)
+ CALL EXGNS4 (IDEXO4, IDNPS4, LTNNPS4, IERR4)
+ CALL I4I8 (NNNPS, PLTNNPS4, LTNNPS)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNSD (IDEXO, IDNPS, FACNPS, IERR)
+C
+C READ NODE SET DISTRIBUTION FACTORS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDNPS ! (R)
+ REAL FACNPS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDNPS4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDNPS4 = IDNPS
+
+ CALL EXGNSD4 (IDEXO4, IDNPS4, FACNPS, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNSI (IDEXO, IDNPSS, IERR)
+C
+C READ NODE SET IDS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDNPSS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDNPSS4 (1) ! (W)
+ POINTER (PIDNPSS4, IDNPSS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXNODS
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXNODS
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXNODS = INTRET4
+ CALL I4ALLOC (NEXNODS, PIDNPSS4)
+ CALL EXGNSI4 (IDEXO4, IDNPSS4, IERR4)
+ CALL I4I8 (NEXNODS, PIDNPSS4, IDNPSS)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNV (IDEXO, ISTEP, IXNODV, NUMNP, VALNV, IERR)
+C
+C READ NODAL VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER IXNODV ! (R)
+ INTEGER NUMNP ! (R)
+ REAL VALNV (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 IXNODV4 ! (R)
+ INTEGER*4 NUMNP4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ IXNODV4 = IXNODV
+ NUMNP4 = NUMNP
+ CALL EXGNV4 (IDEXO4, ISTEP4, IXNODV4, NUMNP4, VALNV, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNVT (IDEXO, IXNODV, NODNUM, ISTPB, ISTPE,
+ & VALNV, IERR)
+C
+C READ NODAL VARIABLE VALUES THROUGH TIME
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IXNODV ! (R)
+ INTEGER NODNUM ! (R)
+ INTEGER ISTPB ! (R)
+ INTEGER ISTPE ! (R)
+ REAL VALNV (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IXNODV4 ! (R)
+ INTEGER*4 NODNUM4 ! (R)
+ INTEGER*4 ISTPB4 ! (R)
+ INTEGER*4 ISTPE4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IXNODV4 = IXNODV
+ NODNUM4 = NODNUM
+ ISTPB4 = ISTPB
+ ISTPE4 = ISTPE
+ CALL EXGNVT4 (IDEXO4, IXNODV4, NODNUM4, ISTPB4, ISTPE4,
+ & VALNV, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGP (IDEXO, ITYPE, ID, NAMEPR, IVAL, IERR)
+C
+C READ OBJECT PROPERTY
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ITYPE ! (R)
+ INTEGER ID ! (R)
+ CHARACTER* (*) NAMEPR ! (R)
+ INTEGER IVAL ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 ID4 ! (R)
+ INTEGER*4 IVAL4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ ID4 = ID
+ CALL EXGP4 (IDEXO4, ITYPE4, ID4, NAMEPR, IVAL4, IERR4)
+ IVAL = IVAL4
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGPA (IDEXO, ITYPE, NAMEPR, IVAL, IERR)
+C
+C READ OBJECT PROPERTY ARRAY
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ITYPE ! (R)
+ CHARACTER* (*) NAMEPR ! (R)
+ INTEGER IVAL (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 IVAL4 (1) ! (W)
+ POINTER (PIVAL4, IVAL4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NUMOBJ
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ IF (ITYPE4 .EQ. EXEBLK) THEN
+ INFREQ4 = EXELBL
+ ELSE IF (ITYPE4 .EQ. EXNSET) THEN
+ INFREQ4 = EXNODS
+ ELSE IF (ITYPE4 .EQ. EXSSET) THEN
+ INFREQ4 = EXSIDS
+ ELSE IF (ITYPE4 .EQ. EXEMAP) THEN
+ INFREQ4 = EXNEM
+ ELSE IF (ITYPE4 .EQ. EXNMAP) THEN
+ INFREQ4 = EXNNM
+ END IF
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NUMOBJ = INTRET4
+ CALL I4ALLOC (NUMOBJ, PIVAL4)
+ CALL EXGPA4 (IDEXO4, ITYPE4, NAMEPR, IVAL4, IERR4)
+ CALL I4I8 (NUMOBJ, PIVAL4, IVAL)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGPN (IDEXO, ITYPE, NAMEPR, IERR)
+C
+C READ PROPERTY ARRAY NAMES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ITYPE ! (R)
+ CHARACTER* (*) NAMEPR (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ CALL EXGPN4 (IDEXO4, ITYPE4, NAMEPR, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGQA (IDEXO, QAREC, IERR)
+C
+C READ QA RECORDS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER* (*) QAREC (4,*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXGQA4 (IDEXO4, QAREC, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGSP (IDEXO, IDESS, NSESS, NDESS, IERR)
+C
+C READ SIDE SET PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESS ! (R)
+ INTEGER NSESS ! (W)
+ INTEGER NDESS ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESS4 ! (R)
+ INTEGER*4 NSESS4 ! (W)
+ INTEGER*4 NDESS4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDESS4 = IDESS
+ CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
+ NSESS = NSESS4
+ NDESS = NDESS4
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGSNL (IDEXO, IDESS, NNESS, IERR)
+C
+C GET SIDE SET NODELIST LENGTH
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESS ! (R)
+ INTEGER NNESS ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESS4 ! (R)
+ INTEGER*4 NNESS4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDESS4 = IDESS
+ CALL EXGSNL4 (IDEXO4, IDESS4, NNESS4, IERR4)
+ NNESS = NNESS4
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGSS (IDEXO, IDESS, LTEESS, LTSESS, IERR)
+C
+C READ SIDE SET
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESS ! (R)
+ INTEGER LTEESS (*) ! (W)
+ INTEGER LTSESS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESS4 ! (R)
+ INTEGER*4 LTEESS4 (1) ! (W)
+ INTEGER*4 LTSESS4 (1) ! (W)
+ POINTER (PLTEESS4, LTEESS4)
+ POINTER (PLTSESS4, LTSESS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 NSESS4
+ INTEGER*4 NDESS4
+
+ integer nsess
+
+ IDEXO4 = IDEXO
+ IDESS4 = IDESS
+ CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
+ nsess = nsess4
+ CALL I4ALLOC (NSESS, PLTEESS4)
+ CALL I4ALLOC (NSESS, PLTSESS4)
+ CALL EXGSS4 (IDEXO4, IDESS4, LTEESS4, LTSESS4, IERR4)
+ CALL I4I8 (NSESS, PLTEESS4, LTEESS)
+ CALL I4I8 (NSESS, PLTSESS4, LTSESS)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGSSD (IDEXO, IDESS, FACESS, IERR)
+C
+C READ SIDE SET DISTRIBUTION FACTORS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESS ! (R)
+ REAL FACESS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESS4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+
+ IDEXO4 = IDEXO
+ IDESS4 = IDESS
+ CALL EXGSSD4 (IDEXO4, IDESS4, FACESS, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGSSI (IDEXO, IDESSS, IERR)
+C
+C READ SIDE SET IDS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESSS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESSS4 (1) ! (W)
+ POINTER (PIDESSS4, IDESSS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+ INTEGER NEXSIDS
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXSIDS
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXSIDS = INTRET4
+ CALL I4ALLOC (NEXSIDS, PIDESSS4)
+ CALL EXGSSI4 (IDEXO4, IDESSS4, IERR4)
+ CALL I4I8 (NEXSIDS, PIDESSS4, IDESSS)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGSSN (IDEXO, IDESS, INCNT, LTNESS, IERR)
+C
+C READ SIDE SET NODE LIST
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESS ! (R)
+ INTEGER INCNT (*) ! (W)
+ INTEGER LTNESS (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESS4 ! (R)
+ INTEGER*4 INCNT4 (1) ! (W)
+ INTEGER*4 LTNESS4 (1) ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 TMP4(1)
+ POINTER (PTMP4, TMP4)
+ POINTER (PINCNT4, INCNT4)
+ POINTER (PLTNESS4, LTNESS4)
+
+ INTEGER*4 NSESS4
+ INTEGER*4 NDESS4
+ INTEGER NLTNESS
+
+ INTEGER NINCNT
+ integer i
+
+ IDEXO4 = IDEXO
+ IDESS4 = IDESS
+C ... NOTE: It is not permissible to assume that the number of
+C distribution factors is the same as the number of
+C nodes associated with a sideset since some codes
+C are not maintaining that associativity...
+ CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
+ NINCNT = NSESS4
+
+C MUST COMPUTE NODE LIST SIZE
+
+ NINCNT = NSESS4
+ CALL I4ALLOC (NINCNT, PTMP4)
+
+ CALL EXGSSC4 (IDEXO4, IDESS4, TMP4, IERR4)
+ nltness = 0
+ do 11 i=1, nincnt
+ nltness = nltness + tmp4(i)
+ 11 continue
+ CALL I4FREE (PTMP4)
+ CALL I4ALLOC (NINCNT, PINCNT4)
+ CALL I4ALLOC (NLTNESS, PLTNESS4)
+
+ CALL EXGSSN4 (IDEXO4, IDESS4, INCNT4, LTNESS4, IERR4)
+ CALL I4I8 (NLTNESS, PLTNESS4, LTNESS)
+ CALL I4I8 (NINCNT, PINCNT4, INCNT)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGSSC (IDEXO, IDESS, INCNT, IERR)
+C
+C READ SIDE SET NODE LIST
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESS ! (R)
+ INTEGER INCNT (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESS4 ! (R)
+ INTEGER*4 INCNT4 (1) ! (W)
+ POINTER (PINCNT4, INCNT4)
+ INTEGER*4 IERR4 ! (W)
+
+ integer*4 nsess4
+ integer*4 ndess4
+ INTEGER NINCNT
+
+ IDEXO4 = IDEXO
+ IDESS4 = IDESS
+ CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
+ NINCNT = NSESS4
+ CALL I4ALLOC (NINCNT, PINCNT4)
+
+ CALL EXGSSC4 (IDEXO4, IDESS4, INCNT4, IERR4)
+
+ CALL I4I8 (NINCNT, PINCNT4, INCNT)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGCSSC (IDEXO, INCNT, IERR)
+C
+C READ CONCATENATED SIDE SET NODE COUNT LIST
+C (nodes/face for all faces)
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER INCNT (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 INCNT4 (1) ! (W)
+ POINTER (PINCNT4, INCNT4)
+ INTEGER*4 IERR4 ! (W)
+
+ integer*4 nsess4
+ INTEGER NINCNT
+
+ INTEGER*4 INFREQ4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXSSEL
+ CALL EXINQ4 (IDEXO4, INFREQ4, NSESS4, RELRET4, CHRRET, IERR4)
+ NINCNT = NSESS4
+ CALL I4ALLOC (NINCNT, PINCNT4)
+
+ CALL EXGCSSC4 (IDEXO4, INCNT4, IERR4)
+
+ CALL I4I8 (NINCNT, PINCNT4, INCNT)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGTIM (IDEXO, NSTEP, TIME, IERR)
+C
+C READ TIME VALUE FOR A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NSTEP ! (R)
+ REAL TIME ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NSTEP4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NSTEP4 = NSTEP
+ CALL EXGTIM4 (IDEXO4, NSTEP4, TIME, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGVAN (IDEXO, VARTYP, NVAR, NAMES, IERR)
+C
+C READ RESULTS VARIABLE NAMES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER*1 VARTYP ! (R)
+ INTEGER NVAR ! (R)
+ CHARACTER* (*) NAMES (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NVAR4 = NVAR
+ CALL EXGVAN4 (IDEXO4, VARTYP, NVAR4, NAMES, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGVNM (IDEXO, VARTYP, NVAR, NAME, IERR)
+C
+C READ RESULTS VARIABLE NAME
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER*1 VARTYP ! (R)
+ INTEGER NVAR ! (R)
+ CHARACTER* (*) NAME ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NVAR4 = NVAR
+ CALL EXGVNM4 (IDEXO4, VARTYP, NVAR4, NAME, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPVNM (IDEXO, VARTYP, NVAR, NAME, IERR)
+C
+C WRITE RESULTS VARIABLE NAME
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER*1 VARTYP ! (R)
+ INTEGER NVAR ! (R)
+ CHARACTER* (*) NAME ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NVAR4 = NVAR
+ CALL EXPVNM4 (IDEXO4, VARTYP, NVAR4, NAME, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGVP (IDEXO, VARTYP, NVAR, IERR)
+C
+C READ RESULTS VARIABLE PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER*1 VARTYP ! (R)
+ INTEGER NVAR ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NVAR4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXGVP4 (IDEXO4, VARTYP, NVAR4, IERR4)
+ NVAR = NVAR4
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGVTT (IDEXO, NELBLK, NVAREL, ISEVOK, IERR)
+C
+C READ ELEMENT VARIABLE TRUTH TABLE
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NELBLK ! (R)
+ INTEGER NVAREL ! (R)
+ INTEGER ISEVOK(*) ! (NVAREL,NELBLK) (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NELBLK4 ! (R)
+ INTEGER*4 NVAREL4 ! (R)
+ INTEGER*4 ISEVOK4(1) ! (NVAREL,NELBLK) (W)
+ POINTER (PISEVOK4, ISEVOK4)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NELBLK4 = NELBLK
+ NVAREL4 = NVAREL
+ CALL I4ALLOC (NVAREL*NELBLK, PISEVOK4)
+ CALL EXGVTT4 (IDEXO4, NELBLK4, NVAREL4, ISEVOK4, IERR4)
+ CALL I4I8 (NVAREL*NELBLK, PISEVOK4, ISEVOK)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNSTT (IDEXO, NBLK, NVAR, ISVOK, IERR)
+C
+C READ NODESET VARIABLE TRUTH TABLE
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NBLK ! (R)
+ INTEGER NVAR ! (R)
+ INTEGER ISVOK(*) ! (NVAR,NBLK) (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NBLK4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 ISVOK4(1) ! (NVAR,NBLK) (W)
+ POINTER (PISVOK4, ISVOK4)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NBLK4 = NBLK
+ NVAR4 = NVAR
+ CALL I4ALLOC (NVAR*NBLK, PISVOK4)
+ CALL EXGNSTT4 (IDEXO4, NBLK4, NVAR4, ISVOK4, IERR4)
+ CALL I4I8 (NVAR*NBLK, PISVOK4, ISVOK)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGSSTT (IDEXO, NBLK, NVAR, ISVOK, IERR)
+C
+C READ SIDESET VARIABLE TRUTH TABLE
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NBLK ! (R)
+ INTEGER NVAR ! (R)
+ INTEGER ISVOK(*) ! (NVAR,NBLK) (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NBLK4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 ISVOK4(1) ! (NVAR,NBLK) (W)
+ POINTER (PISVOK4, ISVOK4)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NBLK4 = NBLK
+ NVAR4 = NVAR
+ CALL I4ALLOC (NVAR*NBLK, PISVOK4)
+ CALL EXGSSTT4 (IDEXO4, NBLK4, NVAR4, ISVOK4, IERR4)
+ CALL I4I8 (NVAR*NBLK, PISVOK4, ISVOK)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXINQ (IDEXO, INFREQ, INTRET, RELRET, CHRRET, IERR)
+C
+C INQUIRE EXODUS PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER INFREQ ! (R)
+ INTEGER INTRET ! (W)
+ REAL RELRET ! (W)
+ CHARACTER* (*) CHRRET ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 INFREQ4 ! (R)
+ INTEGER*4 INTRET4 ! (W)
+ REAL*4 RELRET4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ INFREQ4 = INFREQ
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ INTRET = INTRET4
+ RELRET = RELRET4
+ IERR = IERR4
+ END
+
+ INTEGER FUNCTION EXOPEN (PATH, IMODE, ICOMPWS, IOWS, VERS, IERR)
+C
+C OPEN EXODUS II FILE
+C
+ IMPLICIT NONE
+ CHARACTER* (*) PATH ! (R)
+ INTEGER IMODE ! (R)
+ INTEGER ICOMPWS ! (RW)
+ INTEGER IOWS ! (RW)
+ REAL VERS ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 EXOPEN4
+ EXTERNAL EXOPEN4
+ INTEGER*4 IRET4
+ INTEGER IRET
+ INTEGER*4 IMODE4 ! (R)
+ INTEGER*4 ICOMPWS4 ! (RW)
+ INTEGER*4 IOWS4 ! (RW)
+ REAL*4 VERS4 ! (W)
+ INTEGER*4 IERR4 ! (W)
+
+ IMODE4 = IMODE
+
+C ... This needs to be set explicitly since all wrapper routines
+C are passing REAL*8 and the exo_jack.c routines all take double*
+ ICOMPWS4 = 8
+ IOWS4 = IOWS
+ IRET4 = EXOPEN4 (PATH, IMODE4, ICOMPWS4, IOWS4, VERS4, IERR4)
+ ICOMPWS = ICOMPWS4
+ IOWS = IOWS4
+ VERS = VERS4
+ IERR = IERR4
+ IRET = IRET4
+ EXOPEN = IRET
+ END
+
+ INTEGER FUNCTION EXLGMD (IDEXO)
+ IMPLICIT NONE
+ INTEGER IDEXO ! (R)
+ INTEGER IRET
+
+ INTEGER*4 EXLGMD4
+ EXTERNAL EXLGMD4
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IRET4
+
+ IDEXO4 = IDEXO
+ IRET4 = EXLGMD4(IDEXO4)
+ IRET = IRET4
+ EXLGMD = IRET
+ END
+
+ SUBROUTINE EXOPTS (OPTVAL, IERR)
+C
+C SET ERROR REPORTING LEVEL
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER OPTVAL ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 OPTVAL4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ OPTVAL4 = OPTVAL
+ CALL EXOPTS4 (OPTVAL4, IERR4)
+ IERR = IERR4
+ END
+
+
+ SUBROUTINE EXMXNM (IDEXO, LENGTH, IERR)
+C
+C SET MAXIMUM NAME LENGTH
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER LENGTH ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 LENGTH4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ LENGTH4 = LENGTH
+ CALL EXMXNM4 (IDEXO4, LENGTH4, IERR4)
+ IERR = IERR4
+ END
+
+
+ SUBROUTINE EXPCNS (IDEXO, IDNPSS, NNNPS, NDNPS, IXNNPS,
+ & IXDNPS, LTNNPS, FACNPS, IERR)
+C
+C WRITE CONCATENATED NODE SETS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDNPSS (*) ! (R)
+ INTEGER NNNPS (*) ! (R)
+ INTEGER NDNPS (*) ! (R)
+ INTEGER IXNNPS (*) ! (R)
+ INTEGER IXDNPS (*) ! (R)
+ INTEGER LTNNPS (*) ! (R)
+ REAL FACNPS (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDNPSS4 (1) ! (R)
+ INTEGER*4 NNNPS4 (1) ! (R)
+ INTEGER*4 NDNPS4 (1) ! (R)
+ INTEGER*4 IXNNPS4 (1) ! (R)
+ INTEGER*4 IXDNPS4 (1) ! (R)
+ INTEGER*4 LTNNPS4 (1) ! (R)
+ POINTER (PIDNPSS4, IDNPSS4)
+ POINTER (PNNNPS4, NNNPS4)
+ POINTER (PNDNPS4, NDNPS4)
+ POINTER (PIXNNPS4, IXNNPS4)
+ POINTER (PIXDNPS4, IXDNPS4)
+ POINTER (PLTNNPS4, LTNNPS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXNODS
+ INTEGER NEXNSNL
+ INTEGER I
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXNODS
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXNODS = INTRET4
+ NEXNSNL = 0
+ DO I = 1, NEXNODS
+ NEXNSNL = NEXNSNL + NNNPS(I)
+ END DO
+ CALL I8I4 (NEXNODS, IDNPSS, PIDNPSS4)
+ CALL I8I4 (NEXNODS, NNNPS, PNNNPS4)
+ CALL I8I4 (NEXNODS, NDNPS, PNDNPS4)
+ CALL I8I4 (NEXNODS, IXNNPS, PIXNNPS4)
+ CALL I8I4 (NEXNODS, IXDNPS, PIXDNPS4)
+ CALL I8I4 (NEXNSNL, LTNNPS, PLTNNPS4)
+ CALL EXPCNS4 (IDEXO4, IDNPSS4, NNNPS4, NDNPS4, IXNNPS4,
+ & IXDNPS4, LTNNPS4, FACNPS, IERR4)
+ CALL I4FREE (PIDNPSS4)
+ CALL I4FREE (PNNNPS4)
+ CALL I4FREE (PNDNPS4)
+ CALL I4FREE (PIXNNPS4)
+ CALL I4FREE (PIXDNPS4)
+ CALL I4FREE (PLTNNPS4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPCON (IDEXO, NAMECO, IERR)
+C
+C WRITE COORDINATE NAMES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER* (*) NAMECO (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXPCON4 (IDEXO4, NAMECO, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPCOR (IDEXO, XN, YN, ZN, IERR)
+C
+C WRITE NODAL COORDINATES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ REAL XN (*) ! (R)
+ REAL YN (*) ! (R)
+ REAL ZN (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXPCOR4 (IDEXO4, XN, YN, ZN, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPCSS (IDEXO, IDESSS, NSESS, NDESS, IXEESS,
+ & IXDESS, LTEESS, LTSESS, FACESS, IERR)
+C
+C WRITE CONCATENATED SIDE SETS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESSS (*) ! (R)
+ INTEGER NSESS (*) ! (R)
+ INTEGER NDESS (*) ! (R)
+ INTEGER IXEESS (*) ! (R)
+ INTEGER IXDESS (*) ! (R)
+ INTEGER LTEESS (*) ! (R)
+ INTEGER LTSESS (*) ! (R)
+ REAL FACESS (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESSS4 (1) ! (R)
+ INTEGER*4 NSESS4 (1) ! (R)
+ INTEGER*4 NDESS4 (1) ! (R)
+ INTEGER*4 IXEESS4 (1) ! (R)
+ INTEGER*4 IXDESS4 (1) ! (R)
+ INTEGER*4 LTEESS4 (1) ! (R)
+ INTEGER*4 LTSESS4 (1) ! (R)
+ POINTER (PIDESSS4, IDESSS4)
+ POINTER (PNSESS4, NSESS4)
+ POINTER (PNDESS4, NDESS4)
+ POINTER (PIXEESS4, IXEESS4)
+ POINTER (PIXDESS4, IXDESS4)
+ POINTER (PLTEESS4, LTEESS4)
+ POINTER (PLTSESS4, LTSESS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXSIDS
+ INTEGER NEXSSEL
+ INTEGER I
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXSIDS
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXSIDS = INTRET4
+ NEXSSEL = 0
+ DO I = 1, NEXSIDS
+ NEXSSEL = NEXSSEL + NSESS(I)
+ END DO
+ CALL I8I4 (NEXSIDS, IDESSS, PIDESSS4)
+ CALL I8I4 (NEXSIDS, NSESS, PNSESS4)
+ CALL I8I4 (NEXSIDS, NDESS, PNDESS4)
+ CALL I8I4 (NEXSIDS, IXEESS, PIXEESS4)
+ CALL I8I4 (NEXSIDS, IXDESS, PIXDESS4)
+ CALL I8I4 (NEXSSEL, LTEESS, PLTEESS4)
+ CALL I8I4 (NEXSSEL, LTSESS, PLTSESS4)
+ CALL EXPCSS4 (IDEXO4, IDESSS4, NSESS4, NDESS4, IXEESS4,
+ & IXDESS4, LTEESS4, LTSESS4, FACESS, IERR4)
+ CALL I4FREE (PIDESSS4)
+ CALL I4FREE (PNSESS4)
+ CALL I4FREE (PNDESS4)
+ CALL I4FREE (PIXEESS4)
+ CALL I4FREE (PIXDESS4)
+ CALL I4FREE (PLTEESS4)
+ CALL I4FREE (PLTSESS4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPEAT (IDEXO, IDELB, ATRIB, IERR)
+C
+C WRITE ELEMENT BLOCK ATTRIBUTES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB ! (R)
+ REAL ATRIB(*) ! (NUMATR,NUMELB) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDELB4 = IDELB
+
+ CALL EXPEAT4 (IDEXO4, IDELB4, ATRIB, IERR4)
+
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPEAN (IDEXO, IDELB, NATTR, NAMES, IERR)
+C
+C WRITE ELEMENT BLOCK ATTRIBUTE NAMES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB ! (R)
+ INTEGER NATTR ! (R)
+ CHARACTER* (*) NAMES (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 NATTR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDELB4 = IDELB
+ NATTR4 = NATTR
+
+ CALL EXPEAN4 (IDEXO4, IDELB4, NATTR4, NAMES, IERR4)
+
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPCLB (IDEXO, IDELB, NAMELB, NUMELB, NUMLNK,
+ & NUMATR, MKMAP, IERR)
+C
+C WRITE ELEMENT BLOCK PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB(*) ! (R)
+ CHARACTER*(*) NAMELB(*) ! (R)
+ INTEGER NUMELB(*) ! (R)
+ INTEGER NUMLNK(*) ! (R)
+ INTEGER NUMATR(*) ! (R)
+ INTEGER MKMAP ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4(1) ! (R)
+ INTEGER*4 NUMELB4(1) ! (R)
+ INTEGER*4 NUMLNK4(1) ! (R)
+ INTEGER*4 NUMATR4(1) ! (R)
+ INTEGER*4 MKMAP4 ! (R)
+ POINTER (PIDELB4, IDELB4)
+ POINTER (PNUMELB4, NUMELB4)
+ POINTER (PNUMLNK4, NUMLNK4)
+ POINTER (PNUMATR4, NUMATR4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NUMBLK
+
+ IDEXO4 = IDEXO
+
+ INFREQ4 = EXELBL
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NUMBLK = INTRET4
+
+ CALL I8I4 (NUMBLK, IDELB, PIDELB4)
+ CALL I8I4 (NUMBLK, NUMELB, PNUMELB4)
+ CALL I8I4 (NUMBLK, NUMLNK, PNUMLNK4)
+ CALL I8I4 (NUMBLK, NUMATR, PNUMATR4)
+ MKMAP4 = MKMAP
+
+ CALL EXPCLB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
+ & NUMATR4, MKMAP4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPELB (IDEXO, IDELB, NAMELB, NUMELB, NUMLNK,
+ & NUMATR, IERR)
+C
+C WRITE ELEMENT BLOCK PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB ! (R)
+ CHARACTER* (*) NAMELB ! (R)
+ INTEGER NUMELB ! (R)
+ INTEGER NUMLNK ! (R)
+ INTEGER NUMATR ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 NUMELB4 ! (R)
+ INTEGER*4 NUMLNK4 ! (R)
+ INTEGER*4 NUMATR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDELB4 = IDELB
+ NUMELB4 = NUMELB
+ NUMLNK4 = NUMLNK
+ NUMATR4 = NUMATR
+ CALL EXPELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
+ & NUMATR4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPELC (IDEXO, IDELB, LINK, IERR)
+C
+C WRITE ELEMENT BLOCK CONNECTIVITY
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDELB ! (R)
+ INTEGER LINK (*) ! (NUMLNK,NUMELB) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 LINK4 (1) ! (NUMLNK,NUMELB) ! (R)
+ POINTER (PLINK4, LINK4)
+ INTEGER*4 IERR4 ! (W)
+
+ CHARACTER* (MXSTLN) NAMELB
+ INTEGER*4 NUMELB4
+ INTEGER*4 NUMLNK4
+ INTEGER*4 NUMATR4
+ INTEGER NUMLNK
+ INTEGER NUMELB
+
+ IDEXO4 = IDEXO
+ IDELB4 = IDELB
+ CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
+ & NUMATR4, IERR4)
+ NUMLNK = NUMLNK4
+ NUMELB = NUMELB4
+
+ IF (NAMELB .EQ. 'NSIDED' .OR. NAMELB .EQ. 'nsided') THEN
+ CALL I8I4 (NUMLNK, LINK, PLINK4)
+ ELSE
+ CALL I8I4 (NUMLNK*NUMELB, LINK, PLINK4)
+ ENDIF
+ CALL EXPELC4 (IDEXO4, IDELB4, LINK4, IERR4)
+ CALL I4FREE (PLINK4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPECPP (IDEXO, ITYPE, IDELB, COUNTS, IERR)
+C
+C WRITE ELEMENT BLOCK CONNECTIVITY
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ITYPE ! (R)
+ INTEGER IDELB ! (R)
+ INTEGER COUNTS (*) ! (NUMELB) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 COUNTS4 (1) ! (NUMELB) ! (R)
+ POINTER (PCOUNTS4, COUNTS4)
+ INTEGER*4 IERR4 ! (W)
+
+ CHARACTER* (MXSTLN) NAMELB
+ INTEGER*4 NUMELB4
+ INTEGER*4 NUMLNK4
+ INTEGER*4 NUMATR4
+
+ INTEGER NUMLNK
+ INTEGER NUMELB
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ IDELB4 = IDELB
+ CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
+ & NUMATR4, IERR4)
+ numelb = numelb4
+ CALL I8I4 (NUMELB, COUNTS, PCOUNTS4)
+ CALL EXPECPP4 (IDEXO4, ITYPE4, IDELB4, COUNTS4, IERR4)
+ CALL I4FREE (PCOUNTS4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPENM (IDEXO, MAPEL, IERR)
+C
+C WRITE ELEMENT NUMBER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPEL (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPEL4 (1) ! (R)
+ POINTER (PMAPEL4, MAPEL4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXELEM
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXELEM
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXELEM = INTRET4
+ CALL I8I4 (NEXELEM, MAPEL, PMAPEL4)
+ CALL EXPENM4 (IDEXO4, MAPEL4, IERR4)
+ CALL I4FREE (PMAPEL4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPEM (IDEXO, MAPID, MAPEL, IERR)
+C
+C WRITE ELEMENT NUMBER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPID ! (R)
+ INTEGER MAPEL (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPID4 ! (R)
+ INTEGER*4 MAPEL4 (1) ! (R)
+ POINTER (PMAPEL4, MAPEL4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXELEM
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXELEM
+ MAPID4 = MAPID
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXELEM = INTRET4
+ CALL I8I4 (NEXELEM, MAPEL, PMAPEL4)
+ CALL EXPEM4 (IDEXO4, MAPID4, MAPEL4, IERR4)
+ CALL I4FREE (PMAPEL4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPPEM (IDEXO, MAPID, ISTART, ICOUNT, MAPEL, IERR)
+C
+C WRITE ELEMENT NUMBER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPID ! (R)
+ INTEGER ISTART ! (R)
+ INTEGER ICOUNT ! (R)
+ INTEGER MAPEL (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPID4 ! (R)
+ INTEGER*4 ISTART4 ! (R)
+ INTEGER*4 ICOUNT4 ! (R)
+ INTEGER*4 MAPEL4 (1) ! (R)
+ POINTER (PMAPEL4, MAPEL4)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ MAPID4 = MAPID
+ ISTART4 = ISTART
+ ICOUNT4 = ICOUNT
+ CALL I8I4 (ICOUNT, MAPEL, PMAPEL4)
+ CALL EXPPEM4 (IDEXO4, MAPID4, ISTART4, ICOUNT4, MAPEL4, IERR4)
+ CALL I4FREE (PMAPEL4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPEV (IDEXO, ISTEP, IXELEV, IDELB, NUMELB,
+ & VALEV, IERR)
+C
+C WRITE ELEMENT VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER IXELEV ! (R)
+ INTEGER IDELB ! (R)
+ INTEGER NUMELB ! (R)
+ REAL VALEV (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 IXELEV4 ! (R)
+ INTEGER*4 IDELB4 ! (R)
+ INTEGER*4 NUMELB4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ IXELEV4 = IXELEV
+ IDELB4 = IDELB
+ NUMELB4 = NUMELB
+ CALL EXPEV4 (IDEXO4, ISTEP4, IXELEV4, IDELB4, NUMELB4,
+ & VALEV, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPNSV (IDEXO, ISTEP, IXV, ID, NUM, VAL, IERR)
+C
+C WRITE NODESET VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER IXV ! (R)
+ INTEGER ID ! (R)
+ INTEGER NUM ! (R)
+ REAL VAL (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 IXV4 ! (R)
+ INTEGER*4 ID4 ! (R)
+ INTEGER*4 NUM4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ IXV4 = IXV
+ ID4 = ID
+ NUM4 = NUM
+ CALL EXPNSV4 (IDEXO4, ISTEP4, IXV4, ID4, NUM4, VAL, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPSSV (IDEXO, ISTEP, IXV, ID, NUM, VAL, IERR)
+C
+C WRITE SIDESET VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER IXV ! (R)
+ INTEGER ID ! (R)
+ INTEGER NUM ! (R)
+ REAL VAL (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 IXV4 ! (R)
+ INTEGER*4 ID4 ! (R)
+ INTEGER*4 NUM4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ IXV4 = IXV
+ ID4 = ID
+ NUM4 = NUM
+ CALL EXPSSV4 (IDEXO4, ISTEP4, IXV4, ID4, NUM4, VAL, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPGV (IDEXO, ISTEP, NVARGL, VALGV, IERR)
+C
+C WRITE GLOBAL VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER NVARGL ! (R)
+ REAL VALGV (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 NVARGL4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ NVARGL4 = NVARGL
+ CALL EXPGV4 (IDEXO4, ISTEP4, NVARGL4, VALGV, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPINF (IDEXO, NINFO, INFO, IERR)
+C
+C WRITE INFORMATION RECORDS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NINFO ! (R)
+ CHARACTER* (*) INFO (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NINFO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NINFO4 = NINFO
+ CALL EXPINF4 (IDEXO4, NINFO4, INFO, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPINI (IDEXO, TITLE, NDIM, NUMNP, NUMEL, NELBLK,
+ & NUMNPS, NUMESS, IERR)
+C
+C WRITE INITIALIZATION PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER* (*) TITLE ! (R)
+ INTEGER NDIM ! (R)
+ INTEGER NUMNP ! (R)
+ INTEGER NUMEL ! (R)
+ INTEGER NELBLK ! (R)
+ INTEGER NUMNPS ! (R)
+ INTEGER NUMESS ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NDIM4 ! (R)
+ INTEGER*4 NUMNP4 ! (R)
+ INTEGER*4 NUMEL4 ! (R)
+ INTEGER*4 NELBLK4 ! (R)
+ INTEGER*4 NUMNPS4 ! (R)
+ INTEGER*4 NUMESS4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NDIM4 = NDIM
+ NUMNP4 = NUMNP
+ NUMEL4 = NUMEL
+ NELBLK4 = NELBLK
+ NUMNPS4 = NUMNPS
+ NUMESS4 = NUMESS
+ CALL EXPINI4 (IDEXO4, TITLE, NDIM4, NUMNP4, NUMEL4, NELBLK4,
+ & NUMNPS4, NUMESS4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPMAP (IDEXO, MAPEL, IERR)
+C
+C WRITE ELEMENT ORDER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPEL (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPEL4 (1) ! (R)
+ POINTER (PMAPEL4, MAPEL4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXELEM
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXELEM
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXELEM = INTRET4
+ CALL I8I4 (NEXELEM, MAPEL, PMAPEL4)
+ CALL EXPMAP4 (IDEXO4, MAPEL4, IERR4)
+ CALL I4FREE (PMAPEL4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPNNM (IDEXO, MAPNOD, IERR)
+C
+C WRITE NODE NUMBER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPNOD (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPNOD4 (1) ! (R)
+ POINTER (PMAPNOD4, MAPNOD4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXNODE
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXNODE
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXNODE = INTRET4
+ CALL I8I4 (NEXNODE, MAPNOD, PMAPNOD4)
+ CALL EXPNNM4 (IDEXO4, MAPNOD4, IERR4)
+ CALL I4FREE (PMAPNOD4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPNM (IDEXO, MAPID, MAPNOD, IERR)
+C
+C WRITE NODE NUMBER MAP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER MAPID ! (R)
+ INTEGER MAPNOD (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 MAPID4 ! (R)
+ INTEGER*4 MAPNOD4 (1) ! (R)
+ POINTER (PMAPNOD4, MAPNOD4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NEXNODE
+
+ IDEXO4 = IDEXO
+ INFREQ4 = EXNODE
+ MAPID4 = MAPID
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NEXNODE = INTRET4
+ CALL I8I4 (NEXNODE, MAPNOD, PMAPNOD4)
+ CALL EXPNM4 (IDEXO4, MAPID4, MAPNOD4, IERR4)
+ CALL I4FREE (PMAPNOD4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPNP (IDEXO, IDNPS, NNNPS, NDNPS, IERR)
+C
+C WRITE NODE SET PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDNPS ! (R)
+ INTEGER NNNPS ! (R)
+ INTEGER NDNPS ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDNPS4 ! (R)
+ INTEGER*4 NNNPS4 ! (R)
+ INTEGER*4 NDNPS4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDNPS4 = IDNPS
+ NNNPS4 = NNNPS
+ NDNPS4 = NDNPS
+ CALL EXPNP4 (IDEXO4, IDNPS4, NNNPS4, NDNPS4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPNS (IDEXO, IDNPS, LTNNPS, IERR)
+C
+C WRITE NODE SET
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDNPS ! (R)
+ INTEGER LTNNPS (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDNPS4 ! (R)
+ INTEGER*4 LTNNPS4 (1) ! (R)
+ POINTER (PLTNNPS4, LTNNPS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 NNNPS4
+ INTEGER*4 NDNPS4
+ integer nnnps
+
+ IDEXO4 = IDEXO
+ IDNPS4 = IDNPS
+ CALL EXGNP4 (IDEXO4, IDNPS4, NNNPS4, NDNPS4, IERR4)
+ nnnps = nnnps4
+ CALL I8I4 (NNNPS, LTNNPS, PLTNNPS4)
+ CALL EXPNS4 (IDEXO4, IDNPS4, LTNNPS4, IERR4)
+ CALL I4FREE (PLTNNPS4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPNSD (IDEXO, IDNPS, FACNPS, IERR)
+C
+C WRITE NODE SET DISTRIBUTION FACTORS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDNPS ! (R)
+ REAL FACNPS (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDNPS4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDNPS4 = IDNPS
+ CALL EXPNSD4 (IDEXO4, IDNPS4, FACNPS, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPNV (IDEXO, ISTEP, IXNODV, NUMNP, VALNV, IERR)
+C
+C WRITE NODAL VARIABLE VALUES AT A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ISTEP ! (R)
+ INTEGER IXNODV ! (R)
+ INTEGER NUMNP ! (R)
+ REAL VALNV (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ISTEP4 ! (R)
+ INTEGER*4 IXNODV4 ! (R)
+ INTEGER*4 NUMNP4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ISTEP4 = ISTEP
+ IXNODV4 = IXNODV
+ NUMNP4 = NUMNP
+ CALL EXPNV4 (IDEXO4, ISTEP4, IXNODV4, NUMNP4, VALNV, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPP (IDEXO, ITYPE, ID, NAMEPR, IVAL, IERR)
+C
+C WRITE OBJECT PROPERTY
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ITYPE ! (R)
+ INTEGER ID ! (R)
+ CHARACTER* (*) NAMEPR ! (R)
+ INTEGER IVAL ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 ID4 ! (R)
+ INTEGER*4 IVAL4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ ID4 = ID
+ IVAL4 = IVAL
+ CALL EXPP4 (IDEXO4, ITYPE4, ID4, NAMEPR, IVAL4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPPA (IDEXO, ITYPE, NAMEPR, IVAL, IERR)
+C
+C WRITE OBJECT PROPERTY ARRAY
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ITYPE ! (R)
+ CHARACTER* (*) NAMEPR ! (R)
+ INTEGER IVAL (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 IVAL4 (1) ! (R)
+ POINTER (PIVAL4, IVAL4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 INFREQ4
+ INTEGER*4 INTRET4
+ REAL*4 RELRET4
+ CHARACTER* (4) CHRRET
+
+ INTEGER NUMOBJ
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ IF (ITYPE4 .EQ. EXEBLK) THEN
+ INFREQ4 = EXELBL
+ ELSE IF (ITYPE4 .EQ. EXNSET) THEN
+ INFREQ4 = EXNODS
+ ELSE IF (ITYPE4 .EQ. EXSSET) THEN
+ INFREQ4 = EXSIDS
+ ELSE IF (ITYPE4 .EQ. EXEMAP) THEN
+ INFREQ4 = EXNEM
+ ELSE IF (ITYPE4 .EQ. EXNMAP) THEN
+ INFREQ4 = EXNNM
+ END IF
+ CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
+ NUMOBJ = INTRET4
+ CALL I8I4 (NUMOBJ, IVAL, PIVAL4)
+ CALL EXPPA4 (IDEXO4, ITYPE4, NAMEPR, IVAL4, IERR4)
+ CALL I4FREE (PIVAL4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPPN (IDEXO, ITYPE, NPROPS, NAMEPR, IERR)
+C
+C WRITE PROPERTY ARRAY NAMES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER ITYPE ! (R)
+ INTEGER NPROPS ! (R)
+ CHARACTER* (*) NAMEPR (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 NPROPS4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ NPROPS4 = NPROPS
+ CALL EXPPN4 (IDEXO4, ITYPE4, NPROPS4, NAMEPR, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPQA (IDEXO, NQAREC, QAREC, IERR)
+C
+C WRITE QA RECORDS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NQAREC ! (R)
+ CHARACTER* (*) QAREC (4,*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NQAREC4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NQAREC4 = NQAREC
+ CALL EXPQA4 (IDEXO4, NQAREC4, QAREC, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPSP (IDEXO, IDESS, NSESS, NDESS, IERR)
+C
+C WRITE SIDE SET PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESS ! (R)
+ INTEGER NSESS ! (R)
+ INTEGER NDESS ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESS4 ! (R)
+ INTEGER*4 NSESS4 ! (R)
+ INTEGER*4 NDESS4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDESS4 = IDESS
+ NSESS4 = NSESS
+ NDESS4 = NDESS
+ CALL EXPSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPSS (IDEXO, IDESS, LTEESS, LTSESS, IERR)
+C
+C WRITE SIDE SET
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESS ! (R)
+ INTEGER LTEESS (*) ! (R)
+ INTEGER LTSESS (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESS4 ! (R)
+ INTEGER*4 LTEESS4 (1) ! (R)
+ INTEGER*4 LTSESS4 (1) ! (R)
+ POINTER (PLTEESS4, LTEESS4)
+ POINTER (PLTSESS4, LTSESS4)
+ INTEGER*4 IERR4 ! (W)
+
+ INTEGER*4 NSESS4
+ INTEGER*4 NDESS4
+ integer nsess
+
+ IDEXO4 = IDEXO
+ IDESS4 = IDESS
+ CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
+ nsess = nsess4
+ CALL I8I4 (NSESS, LTEESS, PLTEESS4)
+ CALL I8I4 (NSESS, LTSESS, PLTSESS4)
+ CALL EXPSS4 (IDEXO4, IDESS4, LTEESS4, LTSESS4, IERR4)
+ CALL I4FREE (PLTEESS4)
+ CALL I4FREE (PLTSESS4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPSSD (IDEXO, IDESS, FACESS, IERR)
+C
+C WRITE SIDE SET DISTRIBUTION FACTORS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IDESS ! (R)
+ REAL FACESS (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IDESS4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ IDESS4 = IDESS
+ CALL EXPSSD4 (IDEXO4, IDESS4, FACESS, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPTIM (IDEXO, NSTEP, TIME, IERR)
+C
+C WRITE TIME VALUE FOR A TIME STEP
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NSTEP ! (R)
+ REAL TIME ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NSTEP4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NSTEP4 = NSTEP
+ CALL EXPTIM4 (IDEXO4, NSTEP4, TIME, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPVAN (IDEXO, VARTYP, NVAR, NAMES, IERR)
+C
+C WRITE RESULTS VARIABLE NAMES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER*1 VARTYP ! (R)
+ INTEGER NVAR ! (R)
+ CHARACTER* (*) NAMES (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NVAR4 = NVAR
+ CALL EXPVAN4 (IDEXO4, VARTYP, NVAR4, NAMES, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPVP (IDEXO, VARTYP, NVAR, IERR)
+C
+C WRITE RESULTS VARIABLE PARAMETERS
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ CHARACTER*1 VARTYP ! (R)
+ INTEGER NVAR ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NVAR4 = NVAR
+ CALL EXPVP4 (IDEXO4, VARTYP, NVAR4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPVTT (IDEXO, NELBLK, NVAREL, ISEVOK, IERR)
+C
+C WRITE ELEMENT VARIABLE TRUTH TABLE
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NELBLK ! (R)
+ INTEGER NVAREL ! (R)
+ INTEGER ISEVOK (*) ! (NVAREL,NELBLK) (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NELBLK4 ! (R)
+ INTEGER*4 NVAREL4 ! (R)
+ INTEGER*4 ISEVOK4 (1) ! (NVAREL,NELBLK) (R)
+ POINTER (PISEVOK4, ISEVOK4)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NELBLK4 = NELBLK
+ NVAREL4 = NVAREL
+ CALL I8I4 (NVAREL*NELBLK, ISEVOK, PISEVOK4)
+ CALL EXPVTT4 (IDEXO4, NELBLK4, NVAREL4, ISEVOK4, IERR4)
+ CALL I4FREE (PISEVOK4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPNSTT (IDEXO, NBLK, NVAR, ISVOK, IERR)
+C
+C WRITE NODESET VARIABLE TRUTH TABLE
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NBLK ! (R)
+ INTEGER NVAR ! (R)
+ INTEGER ISVOK (*) ! (NVAR,NBLK) (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NBLK4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 ISVOK4 (1) ! (NVAR,NBLK) (R)
+ POINTER (PISVOK4, ISVOK4)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NBLK4 = NBLK
+ NVAR4 = NVAR
+ CALL I8I4 (NVAR*NBLK, ISVOK, PISVOK4)
+ CALL EXPNSTT4 (IDEXO4, NBLK4, NVAR4, ISVOK4, IERR4)
+ CALL I4FREE (PISVOK4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPSSTT (IDEXO, NBLK, NVAR, ISVOK, IERR)
+C
+C WRITE SIDESET VARIABLE TRUTH TABLE
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NBLK ! (R)
+ INTEGER NVAR ! (R)
+ INTEGER ISVOK (*) ! (NVAR,NBLK) (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 NBLK4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 ISVOK4 (1) ! (NVAR,NBLK) (R)
+ POINTER (PISVOK4, ISVOK4)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ NBLK4 = NBLK
+ NVAR4 = NVAR
+ CALL I8I4 (NVAR*NBLK, ISVOK, PISVOK4)
+ CALL EXPSSTT4 (IDEXO4, NBLK4, NVAR4, ISVOK4, IERR4)
+ CALL I4FREE (PISVOK4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXGNAMS (IDEXO, ITYPE, NVAR, NAMES, IERR)
+C
+C READ OBJECT NAMES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NVAR ! (R)
+ INTEGER ITYPE ! (R)
+ CHARACTER* (*) NAMES (*) ! (W)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ NVAR4 = NVAR
+ CALL EXGNAMS4 (IDEXO4, ITYPE4, NVAR4, NAMES, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXPNAMS (IDEXO, ITYPE, NVAR, NAMES, IERR)
+C
+C WRITE OBJECT NAMES
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER NVAR ! (R)
+ INTEGER ITYPE ! (R)
+ CHARACTER* (*) NAMES (*) ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 ITYPE4 ! (R)
+ INTEGER*4 NVAR4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ ITYPE4 = ITYPE
+ NVAR4 = NVAR
+ CALL EXPNAMS4 (IDEXO4, ITYPE4, NVAR4, NAMES, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXUPDA (IDEXO, IERR)
+C
+C UPDATE EXODUS II FILE
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO4 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO4 = IDEXO
+ CALL EXUPDA4 (IDEXO4, IERR4)
+ IERR = IERR4
+ END
+
+ SUBROUTINE EXCOPY (IDEXO1, IDEXO2, IERR)
+C
+C COPY EXODUS II FILE
+C
+ IMPLICIT NONE
+ INCLUDE 'exodusII.inc'
+ INTEGER IDEXO1 ! (R)
+ INTEGER IDEXO2 ! (R)
+ INTEGER IERR ! (W)
+
+ INTEGER*4 IDEXO14 ! (R)
+ INTEGER*4 IDEXO24 ! (R)
+ INTEGER*4 IERR4 ! (W)
+
+ IDEXO14 = IDEXO1
+ IDEXO24 = IDEXO2
+ CALL EXCOPY4 (IDEXO14, IDEXO24, IERR4)
+ IERR = IERR4
+ END
+
+
+ SUBROUTINE I8I4 (N, I8, PI4)
+C
+C CREATE I4 ARRAY AND COPY I8 ARRAY CONTENTS TO I4
+C
+ IMPLICIT NONE
+ INTEGER N
+ INTEGER I8 (*)
+ INTEGER*4 I4 (1)
+ POINTER (PI4, I4)
+ INTEGER I
+
+ CALL I4ALLOC (N, PI4)
+ DO I = 1, N
+ I4 (I) = I8 (I)
+ END DO
+ END
+
+ SUBROUTINE I4I8 (N, PI4, I8)
+C
+C COPY I4 ARRAY CONTENTS TO I8 AND FREE I4 ARRAY
+C
+ IMPLICIT NONE
+ INTEGER N
+ INTEGER*4 I4 (1)
+ POINTER (PI4, I4)
+ INTEGER I8 (*)
+ INTEGER I
+
+ DO I = 1, N
+ I8 (I) = I4 (I)
+ END DO
+ CALL I4FREE (PI4)
+ END
+
+ SUBROUTINE I4ALLOC (N, PI4)
+C
+C ALLOCATE DYNAMIC I4 ARRAY N ELEMENTS IN SIZE
+C
+ IMPLICIT NONE
+ INTEGER N
+ INTEGER*4 I4 (1)
+ POINTER (PI4, I4)
+ INTEGER MALLOC
+ INTEGER NB
+
+ PI4 = 0
+ IF (N .EQ. 0) RETURN
+ NB = N * 4
+ PI4 = MALLOC (NB)
+ if (PI4 .EQ. 0) then
+ write (*,*)
+ * 'ERROR: Unable to allocate array of size ',N,' in I4ALLOC'
+ stop 'Exodus Memory Allocation Error'
+ end if
+ END
+
+ SUBROUTINE I4FREE (PI4)
+C
+C FREE DYNAMIC MEMORY ASSOCIATED WITH I4 ARRAY REFERENCED BY PI4
+C
+ IMPLICIT NONE
+ INTEGER*4 I4 (1)
+ POINTER (PI4, I4)
+
+ IF (PI4 .EQ. 0) RETURN
+ CALL FREE (PI4)
+ PI4 = 0
+ END
+#endif
diff --git a/forbind/src/exo_jack.src b/exodus/forbind/src/exo_jack.src
similarity index 87%
rename from forbind/src/exo_jack.src
rename to exodus/forbind/src/exo_jack.src
index 991b93d..2bf999e 100644
--- a/forbind/src/exo_jack.src
+++ b/exodus/forbind/src/exo_jack.src
@@ -455,25 +455,14 @@ itos(ints, dims, ndims)
% )
% {
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- char errmsg[MAX_ERR_LENGTH];
-#endif
int slen;
char* name;
*ierr = 0;
- /* WARNING: titlelen SHOULD be MAX_LINE_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPINI spec. */
slen = MAX_LINE_LENGTH; /* max line size */
if (titlelen != MAX_LINE_LENGTH)
{
slen = titlelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,"Warning: title string length is %d in file id %d\n",
- titlelen, *idexo);
- ex_err("expini",errmsg,EX_MSG);
-#endif
}
name = malloc((slen + 1)*sizeof(char));
@@ -502,25 +491,14 @@ itos(ints, dims, ndims)
% )
% {
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- char errmsg[MAX_ERR_LENGTH];
-#endif
int slen;
char* name;
*ierr = 0;
- /* WARNING: titlelen SHOULD be MAX_LINE_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGINI spec. */
slen = MAX_LINE_LENGTH; /* max line size */
if (titlelen != MAX_LINE_LENGTH)
{
slen = titlelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,"Warning: title string length is %d in file id %d\n",
- titlelen, *idexo);
- ex_err("exgini",errmsg,EX_MSG);
-#endif
}
name = malloc((slen + 1)*sizeof(char));
@@ -555,20 +533,10 @@ itos(ints, dims, ndims)
*ierr=0; /* default no errror */
- /** if (exoptval & EX_DEBUG)
- print("[expqa] # of QA records: %d\n",*num_qa_records); **/
- /* WARNING: qa_recordslen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPQA spec. */
slen = MAX_STR_LENGTH; /* max str size */
if (qa_recordlen != MAX_STR_LENGTH)
{
slen = qa_recordlen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,"Warning: qa record string length is %d in file id %d\n",
- qa_recordlen, *idexo);
- ex_err("expqa",errmsg,EX_MSG);
-#endif
}
alen = 4; /* qa records are 4 strings deep */
@@ -605,10 +573,7 @@ itos(ints, dims, ndims)
return;
}
/* copy fortran string into allocated space */
- /** printf("[expqa] rec #: %d fortran str#: %d, loc: %ld , %8s\n",
- i,ii,qa_record+iii*slen,qa_record+iii*slen); **/
- ex_fstrncpy(*(sptr+iii),qa_record+iii*slen,slen);
- /**printf("[expqa] after ex_fstrncpy: %s\n",*(sptr+iii)); **/
+ ex_fstrncpy(*(sptr+iii),qa_record+iii*qa_recordlen,slen);
iii++; /* bump char array pointer */
}
}
@@ -645,43 +610,22 @@ itos(ints, dims, ndims)
char errmsg[MAX_ERR_LENGTH];
- char cdummy[2];
int num_qa_records;
- real rdummy;
char **sptr; /* internal string pointer array for malloc use */
int i,ii,iii,slen,alen;
*ierr=0; /* default no errror */
- /* WARNING: qa_recordslen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPQA spec. */
slen = MAX_STR_LENGTH; /* max str size */
if (qa_recordlen != MAX_STR_LENGTH)
{
slen = qa_recordlen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,"Warning: qa record string length is %d in file id %d\n",
- qa_recordlen, *idexo);
- ex_err("exgqa",errmsg,EX_MSG);
-#endif
}
alen = 4; /* qa records are 4 strings deep */
/* do ExodusII C call to find out how many qa records are avail */
- if (ex_inquire
- (*idexo,EX_INQ_QA,&num_qa_records,&rdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of qa records from file id %d",
- *idexo);
- ex_err("exgqa",errmsg,EX_MSG);
- }
- return;
- }
+ num_qa_records = ex_inquire_int(*idexo,EX_INQ_QA);
+
/** if (exoptval & EX_DEBUG)
print("[exgqa] # of QA records: %d\n",num_qa_records); **/
/* Allocate space for the QA string ptr array */
@@ -746,10 +690,7 @@ itos(ints, dims, ndims)
for (ii=0;ii<alen;ii++)
{
/* copy fortran string into allocated space */
- /** printf("[exgqa] rec #: %d C str#: %d, loc: %ld , %-8s\n",
- i,ii,*(sptr+iii),*(sptr+iii)); **/
- ex_fcdcpy(qa_record+iii*slen,slen,*(sptr+iii));
- /** printf("[exgqa] after ex_fstrncpy: %8s\n",qa_record+iii*slen); **/
+ ex_fcdcpy(qa_record+iii*qa_recordlen,slen,*(sptr+iii));
iii++; /* bump char array pointer */
}
}
@@ -787,20 +728,10 @@ itos(ints, dims, ndims)
int i,slen;
*ierr=0; /* default no errror */
- /** if (exoptval & EX_DEBUG)
- printf("[expinf] # of info records: %d\n",*num_info); **/
- /* WARNING: infolen SHOULD be MAX_LINE_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPINF spec. */
slen = MAX_LINE_LENGTH; /* max str size */
if (infolen != MAX_LINE_LENGTH)
{
slen = infolen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,"Warning: info record length is %d in file id %d\n",
- infolen, *idexo);
- ex_err("expinf",errmsg,EX_MSG);
-#endif
}
@@ -836,8 +767,7 @@ itos(ints, dims, ndims)
for (i=0;i<*num_info;i++)
{
*(aptr+i) = sptr+i*(slen+1); /* put address into ptr array */
- ex_fstrncpy(*(aptr+i),info+i*slen,slen); /* copy string into buffer */
- /* printf("[expinf] rec: %d , %s\n",i,*(aptr+i)); */
+ ex_fstrncpy(*(aptr+i),info+i*infolen,slen); /* copy string into buffer */
}
*(aptr+i) = 0; /* null out last ptr */
if (ex_put_info(*idexo,*num_info,aptr) == EX_FATAL)
@@ -877,39 +807,16 @@ itos(ints, dims, ndims)
char **aptr; /* internal string array pointer for malloc use */
char *sptr; /* internal string pointer for malloc use */
int i,slen,num_info;
- real fdummy;
- char cdummy[2];
*ierr=0; /* default no errror */
/* do exodusII C call to find out how many info records are avail */
- if (ex_inquire(*idexo,EX_INQ_INFO,&num_info,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of info records from file id %d",
- *idexo);
- ex_err("exginf",errmsg,EX_MSG);
- }
- return;
- }
- /** if (exoptval & EX_DEBUG)
- printf("[exginf] # of info records: %d\n",num_info); **/
+ num_info = ex_inquire_int(*idexo,EX_INQ_INFO);
- /* WARNING: infolen SHOULD be MAX_LINE_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGINF spec. */
slen = MAX_LINE_LENGTH; /* max str size */
if (infolen != MAX_LINE_LENGTH)
{
slen = infolen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,"Warning: info record length is %d in file id %d\n",
- infolen, *idexo);
- ex_err("exginf",errmsg,EX_MSG);
-#endif
}
/* Step 1: Allocate space for string ptr array
@@ -968,7 +875,7 @@ itos(ints, dims, ndims)
for (i=0;i<num_info;i++) /* Copy Fortran info records to staging space */
{
- ex_fcdcpy(info+i*slen,slen,*(aptr+i)); /* copy string into buffer */
+ ex_fcdcpy(info+i*infolen,slen,*(aptr+i)); /* copy string into buffer */
/** printf("[exginf] rec: %d , %s\n",i,*(aptr+i)); **/
}
@@ -1056,39 +963,17 @@ itos(ints, dims, ndims)
char **aptr; /* internal array of string pointers for malloc use */
char *sptr; /* internal string pointer for malloc use */
- char cdummy[2];
int i,ndim,slen;
- real fdummy;
*ierr=0; /* default no errror */
-/** printf("[expcon] ID: %d, len: %d\n",*idexo,coord_nameslen); **/
- /* WARNING: coord_nameslen SHOULD be MAX_STR_LENGTH, but may not be
- depending on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPCON spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (coord_nameslen != MAX_STR_LENGTH)
+ slen = ex_inquire_int(*idexo, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH); /* max str size */
+ if (coord_nameslen < slen)
{
slen = coord_nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,"Warning: coord name string length is %d in file id %d\n",
- coord_nameslen, *idexo);
- ex_err("expcon",errmsg,EX_MSG);
-#endif
}
/* do ExodusII C call to find out how many dimensions */
- if (ex_inquire(*idexo,EX_INQ_DIM,&ndim,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of dimensions from file id %d",
- *idexo);
- ex_err("expcon",errmsg,EX_MSG);
- }
- return;
- }
+ ndim = ex_inquire_int(*idexo,EX_INQ_DIM);
/* Allocate space for the name ptr array */
if (!(aptr=malloc((ndim+1)*sizeof(char *))))
@@ -1124,11 +1009,8 @@ itos(ints, dims, ndims)
for (i=0;i<ndim;i++)
{
*(aptr+i) = sptr+i*(slen+1);
- /* copy fortran string into allocated space */
- /* nstrncpy(*(aptr+i),coord_names+i*slen,slen); */
- ex_fstrncpy(*(aptr+i),coord_names+i*slen,slen);
- /**printf("[expcon] str#: %d,target: %ld, source: %ld, len: %d\n",
- i,*(aptr+i),coord_names+i*slen,slen); **/
+ /* copy fortran string into allocated space */
+ ex_fstrncpy(*(aptr+i),coord_names+i*coord_nameslen,slen);
}
*(aptr+i) = 0; /* set last pointer to null */
@@ -1164,39 +1046,21 @@ itos(ints, dims, ndims)
char **aptr; /* internal string array pointer for malloc use */
char *sptr; /* internal string pointer for malloc use */
- char cdummy[2];
int ndim;
- real fdummy;
int i,slen;
*ierr = 0; /* default no error */
/** if (exoptval & EX_DEBUG)
printf("[exgcon] Fortran target loc: %ld\n",coord_names); **/
- slen = MAX_STR_LENGTH; /* max string size */
- if (coord_nameslen != MAX_STR_LENGTH)
+ slen = ex_max_name_length; /* max string size */
+ if (coord_nameslen < slen)
{
slen = coord_nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,"Warning: coord name string length is %d in file id %d\n",
- coord_nameslen, *idexo);
- ex_err("exgcon",errmsg,EX_MSG);
-#endif
}
/* do ExodusII C call to find out how many dimensions */
- if (ex_inquire(*idexo,EX_INQ_DIM,&ndim,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of dimensions from file id %d",
- *idexo);
- ex_err("exgcon",errmsg,EX_MSG);
- }
- return;
- }
+ ndim = ex_inquire_int(*idexo,EX_INQ_DIM);
/* allocate memory to stage the coordinate name ptrs into */
if (!(aptr = malloc((ndim+1)*sizeof(char *))))
@@ -1255,11 +1119,12 @@ itos(ints, dims, ndims)
}
/* copy C strings to Fortran arrays */
+ memset(coord_names, 0, ndim*coord_nameslen);
for (i=0;i<ndim;i++)
{
if (exoptval & EX_DEBUG)
printf("[exgcon] name(%d): %s\n",i,*(aptr+i));
- ex_fcdcpy(coord_names+i*slen,slen,*(aptr+i)); /* copy and blank fill */
+ ex_fcdcpy(coord_names+i*coord_nameslen,slen,*(aptr+i)); /* copy and blank fill */
}
free(sptr); /* Free up string buffer space */
@@ -1344,8 +1209,6 @@ itos(ints, dims, ndims)
int num_elem_blk;
- char cdummy[2];
- real fdummy;
char **aptr;/* ptr to temp staging space for string array ptrs */
char *sptr; /* ptr to temp staging space for strings */
@@ -1353,32 +1216,12 @@ itos(ints, dims, ndims)
*ierr = 0; /* default no error */
- if (ex_inquire(*idexo,EX_INQ_ELEM_BLK,&num_elem_blk,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of sides sets for file id %d",
- *idexo);
- ex_err("expcss",errmsg,EX_MSG);
- }
- return;
- }
+ num_elem_blk = ex_inquire_int(*idexo,EX_INQ_ELEM_BLK);
- /* WARNING: elem_typelen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPCLB spec. */
slen = MAX_STR_LENGTH; /* max str size */
if (elem_typelen != MAX_STR_LENGTH)
{
slen = elem_typelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: element type string length is %d in file id %d\n",
- elem_typelen, *idexo);
- ex_err("expclb",errmsg,EX_MSG);
-#endif
}
@@ -1414,7 +1257,7 @@ itos(ints, dims, ndims)
for (i=0;i<num_elem_blk;i++)
{
*(aptr+i) = sptr+i*(slen+1); /* put address into ptr array */
- ex_fstrncpy(*(aptr+i),elem_type+i*slen,slen);/* copy string into buffer */
+ ex_fstrncpy(*(aptr+i),elem_type+i*elem_typelen,slen);/* copy string into buffer */
}
*(aptr+i) = 0; /* null out last ptr */
@@ -1458,19 +1301,10 @@ itos(ints, dims, ndims)
*ierr = 0; /* default no error */
- /* WARNING: elem_typelen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPELB spec. */
slen = MAX_STR_LENGTH; /* max str size */
if (elem_typelen != MAX_STR_LENGTH)
{
slen = elem_typelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: element type string length is %d in file id %d\n",
- elem_typelen, *idexo);
- ex_err("expelb",errmsg,EX_MSG);
-#endif
}
@@ -1493,7 +1327,6 @@ itos(ints, dims, ndims)
}
/* Copy element type names from Fortran array to staging area */
- /* nstrncpy(sptr,elem_type,slen); */
ex_fstrncpy(sptr,elem_type,slen);
if (ex_put_elem_block (*idexo, *elem_blk_id, sptr, *num_elem_this_blk,
@@ -1537,19 +1370,10 @@ itos(ints, dims, ndims)
*ierr = 0;
- /* WARNING: elem_typelen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGELB spec. */
slen = MAX_STR_LENGTH; /* max str size */
if (elem_typelen != MAX_STR_LENGTH)
{
slen = elem_typelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: element type string length is %d in file id %d\n",
- elem_typelen, *idexo);
- ex_err("exgelb",errmsg,EX_MSG);
-#endif
}
/* allocate memory to stage the element type names into */
@@ -1580,6 +1404,7 @@ itos(ints, dims, ndims)
return;
}
/* Copy element type name from staging area to Fortran array */
+ memset(elem_type, 0, elem_typelen);
ex_fcdcpy (elem_type, slen, sptr);
/* cstra2fstra(sptr,elem_type,elem_typelen,num_elem_this_blk); */
free(sptr);
@@ -1826,19 +1651,10 @@ itos(ints, dims, ndims)
*ierr=0; /* default no errror */
- /* WARNING: nameslen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGVAN spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (nameslen != MAX_STR_LENGTH)
+ slen = ex_max_name_length; /* max str size */
+ if (nameslen < slen)
{
slen = nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: variable names string length is %d in file id %d\n",
- nameslen, *idexo);
- ex_err("exgean",errmsg,EX_MSG);
-#endif
}
/* allocate memory to for pointer array */
@@ -1888,9 +1704,10 @@ itos(ints, dims, ndims)
}
}
/* Copy Fortran names from staging space */
+ memset(names, 0, *num_attr*nameslen);
for (i=0;i<*num_attr;i++)
{
- ex_fcdcpy(names+i*slen,slen,*(aptr+i));/* copy str into Fortran buffer */
+ ex_fcdcpy(names+i*nameslen,slen,*(aptr+i));/* copy str into Fortran buffer */
}
free(sptr); /* Free up string staging area */
@@ -1919,19 +1736,10 @@ itos(ints, dims, ndims)
*ierr=0; /* default no errror */
- /* WARNING: nameslen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGVAN spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (nameslen != MAX_STR_LENGTH)
+ slen = ex_inquire_int(*idexo, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH); /* max str size */
+ if (nameslen < slen)
{
slen = nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: variable names string length is %d in file id %d\n",
- nameslen, *idexo);
- ex_err("expean",errmsg,EX_MSG);
-#endif
}
/* allocate memory to for pointer array */
@@ -1967,7 +1775,7 @@ itos(ints, dims, ndims)
for (i=0;i<*num_attr;i++)
{
*(aptr+i) = sptr+i*(slen+1); /* put address into ptr array */
- ex_fstrncpy(*(aptr+i),names+i*slen,slen);/* copy string into buffer */
+ ex_fstrncpy(*(aptr+i),names+i*nameslen,slen);/* copy string into buffer */
}
*(aptr+i) = 0; /* null out last ptr */
@@ -2009,19 +1817,10 @@ itos(ints, dims, ndims)
*ierr=0; /* default no errror */
- /* WARNING: nameslen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPVAN spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (nameslen != MAX_STR_LENGTH)
+ slen = ex_inquire_int(*idexo, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH); /* max str size */
+ if (nameslen < slen)
{
slen = nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: variable names string length is %d in file id %d\n",
- nameslen, *idexo);
- ex_err("expnams",errmsg,EX_MSG);
-#endif
}
/* allocate memory for pointer array */
@@ -2056,7 +1855,7 @@ itos(ints, dims, ndims)
for (i=0;i<*num_obj;i++)
{
*(aptr+i) = sptr+i*(slen+1); /* put address into ptr array */
- ex_fstrncpy(*(aptr+i),names+i*slen,slen);/* copy string into buffer */
+ ex_fstrncpy(*(aptr+i),names+i*nameslen,slen);/* copy string into buffer */
}
*(aptr+i) = 0; /* null out last ptr */
/* do ExodusII C call to write results variables names */
@@ -2096,19 +1895,10 @@ itos(ints, dims, ndims)
*ierr=0; /* default no errror */
- /* WARNING: nameslen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGVAN spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (nameslen != MAX_STR_LENGTH)
+ slen = ex_max_name_length; /* max str size */
+ if (nameslen < slen)
{
slen = nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: variable names string length is %d in file id %d\n",
- nameslen, *idexo);
- ex_err("exgnams",errmsg,EX_MSG);
-#endif
}
/* allocate memory to for pointer array */
@@ -2160,9 +1950,10 @@ itos(ints, dims, ndims)
}
/* Copy Fortran names from staging space */
+ memset(names, 0, *num_obj*nameslen);
for (i=0;i<*num_obj;i++)
{
- ex_fcdcpy(names+i*slen,slen,*(aptr+i));/* copy str into Fortran buffer */
+ ex_fcdcpy(names+i*nameslen,slen,*(aptr+i));/* copy str into Fortran buffer */
}
free(sptr); /* Free up string staging area */
@@ -2190,18 +1981,10 @@ itos(ints, dims, ndims)
*ierr = 0;
- /* WARNING: prop_nameslen SHOULD be MAX_STR_LENGTH, but may not be depending on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPPN spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (prop_nameslen != MAX_STR_LENGTH)
+ slen = ex_inquire_int(*idexo, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH); /* max str size */
+ if (prop_nameslen < slen)
{
slen = prop_nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: property names string length is %d in file id %d\n",
- prop_nameslen, *idexo);
- ex_err("exppn",errmsg,EX_MSG);
-#endif
}
/* Allocate space for the name ptr array */
@@ -2240,10 +2023,7 @@ itos(ints, dims, ndims)
{
*(aptr+i) = sptr+i*(slen+1);
/* copy fortran string into allocated space */
- /* nstrncpy(*(aptr+i),prop_names+i*slen,slen); */
- ex_fstrncpy(*(aptr+i),prop_names+i*slen,slen);
- /**printf("[exppn] str#: %d,target: %ld, source: %ld, len: %d\n",
- i,*(aptr+i),prop_names+i*slen,slen); **/
+ ex_fstrncpy(*(aptr+i),prop_names+i*prop_nameslen,slen);
}
*(aptr+i) = 0; /* set last pointer to null */
@@ -2281,26 +2061,16 @@ itos(ints, dims, ndims)
char **aptr; /* internal string array pointer for malloc use */
char *sptr; /* internal string pointer for malloc use */
- char *cdummy = 0;
int i, slen;
ex_inquiry inq_code;
int num_props;
- real fdummy;
*ierr = 0;
- /* WARNING: prop_nameslen SHOULD be MAX_STR_LENGTH, but may not be depending on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPPN spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (prop_nameslen != MAX_STR_LENGTH)
+ slen = ex_max_name_length; /* max str size */
+ if (prop_nameslen < slen)
{
slen = prop_nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: property names string length is %d in file id %d\n",
- prop_nameslen, *idexo);
- ex_err("exgpn",errmsg,EX_MSG);
-#endif
}
switch ((ex_entity_type)*obj_type)
@@ -2331,19 +2101,7 @@ itos(ints, dims, ndims)
/* do ExodusII C call to find out how many properties */
- if (ex_inquire(*idexo,inq_code,&num_props,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of properties from file id %d",
- *idexo);
- ex_err("exgpn",errmsg,EX_MSG);
- }
- return;
- }
-
+ num_props = ex_inquire_int(*idexo,inq_code);
/* Allocate space for the name ptr array */
if (!(aptr=malloc((num_props+1)*sizeof(char *))))
@@ -2398,11 +2156,12 @@ itos(ints, dims, ndims)
return;
}
/* copy C strings to Fortran arrays */
+ memset(prop_names, 0, num_props*prop_nameslen);
for (i=0;i<num_props;i++)
{
if (exoptval & EX_DEBUG)
printf("[exgpn] name(%d): %s\n",i,*(aptr+i));
- ex_fcdcpy(prop_names+i*slen,slen,*(aptr+i)); /* copy and blank fill */
+ ex_fcdcpy(prop_names+i*prop_nameslen,slen,*(aptr+i)); /* copy and blank fill */
}
/* Free up the space we used */
@@ -2431,18 +2190,10 @@ itos(ints, dims, ndims)
*ierr = 0;
- /* WARNING: prop_namelen SHOULD be MAX_STR_LENGTH, but may not be depending on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPP spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (prop_namelen != MAX_STR_LENGTH)
+ slen = ex_inquire_int(*idexo, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH); /* max str size */
+ if (prop_namelen < slen)
{
slen = prop_namelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: property name string length is %d in file id %d\n",
- prop_namelen, *idexo);
- ex_err("expp",errmsg,EX_MSG);
-#endif
}
/* allocate memory to stage the property name into */
@@ -2498,18 +2249,10 @@ itos(ints, dims, ndims)
*ierr = 0;
- /* WARNING: prop_namelen SHOULD be MAX_STR_LENGTH, but may not be depending on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGP spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (prop_namelen != MAX_STR_LENGTH)
+ slen = ex_max_name_length; /* max str size */
+ if (prop_namelen < slen)
{
slen = prop_namelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: property name string length is %d in file id %d\n",
- prop_namelen, *idexo);
- ex_err("exgp",errmsg,EX_MSG);
-#endif
}
/* allocate memory to stage the property name into */
@@ -2526,7 +2269,6 @@ itos(ints, dims, ndims)
}
/* Copy property name from Fortran string to staging area */
- /* nstrncpy(sptr,prop_name,slen); */
ex_fstrncpy(sptr,prop_name,slen);
/* use exodusII C routine to get the property value */
@@ -2565,18 +2307,10 @@ itos(ints, dims, ndims)
*ierr = 0;
- /* WARNING: prop_namelen SHOULD be MAX_STR_LENGTH, but may not be depending on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGP spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (prop_namelen != MAX_STR_LENGTH)
+ slen = ex_max_name_length; /* max str size */
+ if (prop_namelen < slen)
{
slen = prop_namelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: property name string length is %d in file id %d\n",
- prop_namelen, *idexo);
- ex_err("exgpa",errmsg,EX_MSG);
-#endif
}
/* allocate memory to stage the property name into */
@@ -2594,7 +2328,6 @@ itos(ints, dims, ndims)
memset(sptr, 0, slen+1);
/* Copy property name from Fortran string to staging area */
- /* nstrncpy(sptr,prop_name,slen); */
ex_fstrncpy(sptr,prop_name,slen);
@@ -2634,18 +2367,10 @@ itos(ints, dims, ndims)
*ierr = 0;
- /* WARNING: prop_namelen SHOULD be MAX_STR_LENGTH, but may not be depending on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGP spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (prop_namelen != MAX_STR_LENGTH)
+ slen = ex_inquire_int(*idexo, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH); /* max str size */
+ if (prop_namelen < slen)
{
slen = prop_namelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: property name string length is %d in file id %d\n",
- prop_namelen, *idexo);
- ex_err("exppa",errmsg,EX_MSG);
-#endif
}
/* allocate memory to stage the property name into */
@@ -2662,7 +2387,6 @@ itos(ints, dims, ndims)
}
/* Copy property name from Fortran string to staging area */
- /* nstrncpy(sptr,prop_name,slen); */
ex_fstrncpy(sptr,prop_name,slen);
@@ -2916,23 +2640,10 @@ itos(ints, dims, ndims)
int num_node_sets, i, *node_index_ptr, *dist_index_ptr;
- char cdummy[2];
- real fdummy;
*ierr = 0;
- if (ex_inquire(*idexo,EX_INQ_NODE_SETS,&num_node_sets,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of nodes sets for file id %d",
- *idexo);
- ex_err("expcns",errmsg,EX_MSG);
- }
- return;
- }
+ num_node_sets = ex_inquire_int(*idexo,EX_INQ_NODE_SETS);
/* allocate memory for C node index array */
if (!(node_index_ptr=malloc(num_node_sets*sizeof(int))))
@@ -3019,23 +2730,10 @@ itos(ints, dims, ndims)
int num_node_sets, i, *node_index_ptr, *dist_index_ptr;
- real fdummy;
- char cdummy[2];
*ierr = 0;
- if (ex_inquire(*idexo,EX_INQ_NODE_SETS,&num_node_sets,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of node sets for file id %d",
- *idexo);
- ex_err("exgcns",errmsg,EX_MSG);
- }
- return;
- }
+ num_node_sets = ex_inquire_int(*idexo,EX_INQ_NODE_SETS);
/* allocate memory for C node index array */
if (!(node_index_ptr=malloc(num_node_sets*sizeof(int))))
@@ -3066,16 +2764,10 @@ itos(ints, dims, ndims)
return;
}
- /** if (exoptval & EX_DEBUG)
- printf("[exgcns] %d node sets defined\n",num_node_sets); **/
- ex_inquire(*idexo,EX_INQ_NS_NODE_LEN,&i,&fdummy,cdummy);
- /** if (exoptval & EX_DEBUG)
- printf("[exgcns] node set array length: %d\n",i); **/
-
if (ex_get_concat_node_sets(*idexo,node_set_ids,num_nodes_per_set,
- num_dist_per_set,node_index_ptr,
- dist_index_ptr,node_sets_node_list,
- node_sets_dist_fact) == EX_FATAL)
+ num_dist_per_set,node_index_ptr,
+ dist_index_ptr,node_sets_node_list,
+ node_sets_dist_fact) == EX_FATAL)
{
free(node_index_ptr);
free(dist_index_ptr);
@@ -3090,7 +2782,6 @@ itos(ints, dims, ndims)
return;
}
-
for (i=0;i<num_node_sets;i++) /* change from 0-based to 1 index */
{
node_sets_node_index[i] = node_index_ptr[i] + 1;
@@ -3371,8 +3062,6 @@ itos(ints, dims, ndims)
% )
% {
int num_side_sets, i, *elem_index_ptr, *dist_index_ptr;
- real fdummy;
- char *cdummy = 0;
char errmsg[MAX_ERR_LENGTH];
@@ -3381,18 +3070,7 @@ itos(ints, dims, ndims)
if (exoptval & EX_DEBUG) printf("[expcss]\n");
- if (ex_inquire(*idexo,EX_INQ_SIDE_SETS,&num_side_sets,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of sides sets for file id %d",
- *idexo);
- ex_err("expcss",errmsg,EX_MSG);
- }
- return;
- }
+ num_side_sets = ex_inquire_int(*idexo,EX_INQ_SIDE_SETS);
/* allocate memory for C element index array */
if (!(elem_index_ptr=malloc(num_side_sets*sizeof(int))))
@@ -3481,23 +3159,10 @@ itos(ints, dims, ndims)
int i, num_side_sets, *elem_index_ptr, *dist_index_ptr;
- real fdummy;
- char cdummy[2];
*ierr = 0;
- if (ex_inquire(*idexo,EX_INQ_SIDE_SETS,&num_side_sets,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of sides sets for file id %d",
- *idexo);
- ex_err("exgcss",errmsg,EX_MSG);
- }
- return;
- }
+ num_side_sets = ex_inquire_int(*idexo,EX_INQ_SIDE_SETS);
/* allocate memory for C elem index array */
if (!(elem_index_ptr=malloc(num_side_sets*sizeof(int))))
@@ -3600,23 +3265,10 @@ itos(ints, dims, ndims)
int i, num_side_sets, *elem_index_ptr, *dist_index_ptr;
- real fdummy;
- char cdummy[2];
*ierr = 0;
- if (ex_inquire(*idexo,EX_INQ_SIDE_SETS,&num_side_sets,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of sides sets for file id %d",
- *idexo);
- ex_err("exgcss",errmsg,EX_MSG);
- }
- return;
- }
+ num_side_sets = ex_inquire_int(*idexo,EX_INQ_SIDE_SETS);
/* allocate memory for C elem index array */
if (!(elem_index_ptr=malloc(num_side_sets*sizeof(int))))
@@ -3760,22 +3412,10 @@ itos(ints, dims, ndims)
*ierr=0; /* default no errror */
- /** if (exoptval & EX_DEBUG)
- printf("[expvan] # of variable names: %d\n",*num_vars); **/
-
- /* WARNING: var_nameslen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPVAN spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (var_nameslen != MAX_STR_LENGTH)
+ slen = ex_inquire_int(*idexo, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH); /* max str size */
+ if (var_nameslen < slen)
{
slen = var_nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: variable names string length is %d in file id %d\n",
- var_nameslen, *idexo);
- ex_err("expvan",errmsg,EX_MSG);
-#endif
}
/* allocate memory for pointer array */
@@ -3810,9 +3450,7 @@ itos(ints, dims, ndims)
for (i=0;i<*num_vars;i++)
{
*(aptr+i) = sptr+i*(slen+1); /* put address into ptr array */
- /* nstrncpy(*(aptr+i),var_names+i*slen,slen); */
- ex_fstrncpy(*(aptr+i),var_names+i*slen,slen);/* copy string into buffer */
- /** printf("[expvan] var_name(%d): %s\n",i,*(aptr+i)); **/
+ ex_fstrncpy(*(aptr+i),var_names+i*var_nameslen,slen);/* copy string into buffer */
}
*(aptr+i) = 0; /* null out last ptr */
/* do ExodusII C call to write results variables names */
@@ -3858,19 +3496,10 @@ itos(ints, dims, ndims)
/**if (exoptval & EX_DEBUG)
printf("[exgvan] # of variable names: %d\n",*num_vars); **/
- /* WARNING: var_nameslen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGVAN spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (var_nameslen != MAX_STR_LENGTH)
+ slen = ex_max_name_length; /* max str size */
+ if (var_nameslen < slen)
{
slen = var_nameslen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: variable names string length is %d in file id %d\n",
- var_nameslen, *idexo);
- ex_err("exgvan",errmsg,EX_MSG);
-#endif
}
/* allocate memory to for pointer array */
@@ -3922,10 +3551,11 @@ itos(ints, dims, ndims)
}
/* Copy Fortran variable names to staging space */
+ memset(var_names, 0, *num_vars*var_nameslen);
for (i=0;i<*num_vars;i++)
{
/** printf("[exgvan] var_name(%d): %s\n",i,*(aptr+i)); **/
- ex_fcdcpy(var_names+i*slen,slen,*(aptr+i));/* copy str into Fortran buffer */
+ ex_fcdcpy(var_names+i*var_nameslen,slen,*(aptr+i));/* copy str into Fortran buffer */
}
free(sptr); /* Free up string staging area */
@@ -4738,25 +4368,12 @@ itos(ints, dims, ndims)
% {
int i, num_side_sets, *node_index_ptr, *elem_index_ptr;
- real fdummy;
- char *cdummy = 0;
char errmsg[MAX_ERR_LENGTH];
*ierr = 0;
- if (ex_inquire(*idexo,EX_INQ_SIDE_SETS,&num_side_sets,&fdummy,cdummy) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get number of sides sets for file id %d",
- *idexo);
- ex_err("excn2s",errmsg,EX_MSG);
- }
- return;
- }
+ num_side_sets = ex_inquire_int(*idexo,EX_INQ_SIDE_SETS);
/* allocate memory for C element index array */
if (!(elem_index_ptr=malloc(num_side_sets*sizeof(int))))
@@ -4902,6 +4519,132 @@ itos(ints, dims, ndims)
}
}
+/* ex_get_coordinate_frames -- read coordinate frames */
+% void
+% exgfrm (
+% int *idexo,
+% int *nframeo,
+% int *cfids,
+% real *coord,
+% int *tags,
+% int *ierr
+% )
+% {
+ int i;
+ char *ctags = NULL;
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ /* Determine number of coordinate frames stored in file */
+ int nframe = ex_inquire_int(*idexo, EX_INQ_COORD_FRAMES);
+
+ if (nframe != *nframeo) {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG) {
+ sprintf(errmsg,
+ "Error: nframe argument (%d) does not match number found on file (%d) from file id %d",
+ *nframeo, nframe, *idexo);
+ ex_err("exgfrm",errmsg,EX_MSG);
+ }
+ return;
+ }
+
+ /* Create array of characters to store tags... */
+ if (nframe > 0) {
+ if (!(ctags = calloc(nframe, sizeof(char)))) {
+ *ierr = EX_MEMFAIL;
+ if (exoptval & EX_DEBUG) {
+ sprintf(errmsg,
+ "Error: failed to allocate space for node index array for file id %d",
+ *idexo);
+ ex_err("exgfrm",errmsg,EX_MEMFAIL);
+ }
+ return;
+ }
+
+ *ierr = 0;
+
+ if (ex_get_coordinate_frames (*idexo, &nframe, cfids, coord, ctags) == EX_FATAL) {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG) {
+ sprintf(errmsg,
+ "Error: failed to get coordinate frames from file id %d",
+ *idexo);
+ ex_err("exgfrm",errmsg,EX_MSG);
+ }
+ return;
+ }
+
+ /* Convert character tags back to integer tags for fortran */
+ for (i = 0; i < nframe; i++) {
+ if (ctags[i] == 'R' || ctags[i] == 'r')
+ tags[i] = EX_CF_RECTANGULAR;
+ else if (ctags[i] == 'C' || ctags[i] == 'c')
+ tags[i] = EX_CF_CYLINDRICAL;
+ else if (ctags[i] == 'S' || ctags[i] == 's')
+ tags[i] = EX_CF_SPHERICAL;
+ }
+ free(ctags);
+ }
+}
+
+/* ex_put_coordinate_frames -- define/write coordinate frames */
+% void
+% expfrm (
+% int *idexo,
+% int *nframe,
+% int *cfids,
+% real *coord,
+% int *tags,
+% int *ierr
+% )
+% {
+ int i;
+ char *ctags = NULL;
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ /* Create array of characters to store tags... */
+ if (*nframe > 0) {
+ if (!(ctags = calloc(*nframe, sizeof(char)))) {
+ *ierr = EX_MEMFAIL;
+ if (exoptval & EX_DEBUG) {
+ sprintf(errmsg,
+ "Error: failed to allocate space for node index array for file id %d",
+ *idexo);
+ ex_err("exgfrm",errmsg,EX_MEMFAIL);
+ }
+ return;
+ }
+
+ /* Convert fortran integer tags to C API character tags */
+ for (i = 0; i < *nframe; i++) {
+ if (tags[i] == EX_CF_RECTANGULAR)
+ ctags[i] = 'R';
+ else if (tags[i] == EX_CF_CYLINDRICAL)
+ ctags[i] = 'C';
+ else if (tags[i] == EX_CF_SPHERICAL)
+ ctags[i] = 'S';
+ }
+
+ *ierr = 0;
+
+ if (ex_put_coordinate_frames (*idexo, *nframe, cfids, coord, ctags) == EX_FATAL) {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG) {
+ sprintf(errmsg,
+ "Error: failed to define/write coordinate frames in file id %d",
+ *idexo);
+ ex_err("expfrm",errmsg,EX_MSG);
+ }
+ return;
+ }
+
+ free(ctags);
+ }
+}
+
+
/* Routine to return floating point word size */
% int
% excpws ()
@@ -4942,8 +4685,6 @@ itos(ints, dims, ndims)
EX_MEMFAIL);
return;
}
- /* printf("[exerr] called by: %s, msg: %s, msglen: %d\n",
- pname,err_string,err_stringlen); */
ex_fstrncpy(proc_name,pname,pnamelen);
ex_fstrncpy(error_string,err_string,err_stringlen);
ex_err(proc_name,error_string,*errcode);
@@ -4975,3 +4716,536 @@ itos(ints, dims, ndims)
}
}
}
+
+% void
+% exmxnm (
+% int *idexo, /* EXODUS file ID */
+% int *length, /* max length of names */
+% int *ierr /* error return code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ *ierr = ex_set_max_name_length(*idexo, *length);
+ if (*ierr != 0)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to set maximum name length to %d",
+ *length);
+ ex_err("exmxnm",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * copy EXODUS file
+ */
+% void
+% excopy (
+% int *idexo_in, /* input EXODUS file ID */
+% int *idexo_out, /* output EXODUS file ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ if (ex_copy (*idexo_in, *idexo_out) == EX_FATAL)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to copy EXODUS file id %d to file id %d",
+ *idexo_in, *idexo_out);
+ ex_err("excopy",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * get element map
+ */
+% void
+% exgem (
+% int *idexo, /* EXODUS file ID */
+% int *map_id, /* element map ID */
+% int *elem_map, /* returned element map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ *ierr = ex_get_elem_map (*idexo, *map_id, elem_map);
+ if (*ierr < 0)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to get element map from file id %d",
+ *idexo);
+ ex_err("exgem",errmsg,EX_MSG);
+ }
+ }
+}
+/*
+ * get partial_element map
+ */
+% void
+% exgpem (
+% int *idexo, /* EXODUS file ID */
+% int *map_id, /* element map ID */
+% int *start, /* starting entity */
+% int *count, /* number to read */
+% int *elem_map, /* returned element map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ *ierr = ex_get_partial_elem_map (*idexo, *map_id, *start, *count, elem_map);
+ if (*ierr < 0)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to get partial element map from file id %d",
+ *idexo);
+ ex_err("exgem",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * get element number map
+ */
+% void
+% exgenm (
+% int *idexo, /* EXODUS file ID */
+% int *elem_map, /* returned element order map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ *ierr = ex_get_elem_num_map (*idexo, elem_map);
+ if (*ierr < 0)
+/* if (ex_get_elem_num_map (*idexo, elem_map) == -1) */
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to get element number map from file id %d",
+ *idexo);
+ ex_err("exgenm",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * get map parameters
+ */
+% void
+% exgmp (
+% int *idexo, /* EXODUS file ID */
+% int *num_node_maps, /* returned number of node maps */
+% int *num_elem_maps, /* returned number of element maps */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ *ierr = ex_get_map_param (*idexo, num_node_maps, num_elem_maps);
+ if (*ierr < 0)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to get map parameters from file id %d",
+ *idexo);
+ ex_err("exgmp",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * get node map
+ */
+% void
+% exgnm (
+% int *idexo, /* EXODUS file ID */
+% int *map_id, /* node map ID */
+% int *node_map, /* returned node map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ *ierr = ex_get_node_map (*idexo, *map_id, node_map);
+ if (*ierr < 0)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to get node map from file id %d",
+ *idexo);
+ ex_err("exgem",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * get node number map
+ */
+% void
+% exgnnm (
+% int *idexo, /* EXODUS file ID */
+% int *node_map, /* returned node order map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ *ierr = ex_get_node_num_map (*idexo, node_map);
+ if (*ierr < 0)
+/* if (ex_get_node_num_map (*idexo, node_map) == -1) */
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to get node number map from file id %d",
+ *idexo);
+ ex_err("exgnnm",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * read results variables names
+ */
+% void
+% exgvnm (
+% int *idexo, /* EXODUS file ID */
+% string var_type, /* (single) character indicating the type of */
+% /* variable which is described */
+% int *var_index /* variable index to be read */
+% string var_name, /* returned string containing variable name */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ char *sptr; /* ptr to temp staging space for string */
+ int slen;
+ *ierr=0; /* default no errror */
+
+ slen = ex_max_name_length; /* max str size */
+ if (var_namelen < slen)
+ {
+ slen = var_namelen;
+ }
+
+ /* Allocate staging space for the variable name */
+ if (!(sptr=malloc((slen+1)*sizeof(char))))
+ {
+ *ierr = EX_MEMFAIL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to allocate space for results variable name for file id %d",
+ *idexo);
+ ex_err("exgvnm",errmsg,EX_MEMFAIL);
+ }
+ return;
+ }
+
+ /* do ExodusII C call to read results variables names */
+ if (ex_get_var_name(*idexo,var_type,*var_index,sptr) == EX_FATAL)
+ {
+ *ierr = EX_FATAL;
+ free(sptr); /* free up allocated space */
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to get results variable name from file id %d",
+ *idexo);
+ ex_err("exgvnm",errmsg,EX_MSG);
+ }
+ return;
+ }
+
+ /* Copy Fortran variable names to staging space */
+ /** printf("[exgvnm] var_name(%d): %s\n",*var_index,sptr)); **/
+ memset(var_name, 0, var_namelen);
+ ex_fcdcpy(var_name,slen,sptr);/* copy string into Fortran buffer */
+
+ free(sptr); /* Free up string staging area */
+}
+
+/*
+ * put element map
+ */
+% void
+% expem (
+% int *idexo, /* EXODUS file ID */
+% int *map_id, /* element map ID */
+% int *elem_map, /* element map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ if (ex_put_elem_map (*idexo, *map_id, elem_map) == EX_FATAL)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to store element map in file id %d",
+ *idexo);
+ ex_err("expem",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * put partial element map
+ */
+% void
+% exppem (
+% int *idexo, /* EXODUS file ID */
+% int *map_id, /* element map ID */
+% int *start, /* starting entity */
+% int *count, /* number to write */
+% int *elem_map, /* element map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ if (ex_put_partial_elem_map (*idexo, *map_id, *start, *count, elem_map) == EX_FATAL)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to store element map in file id %d",
+ *idexo);
+ ex_err("expem",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * put element number map
+ */
+% void
+% expenm (
+% int *idexo, /* EXODUS file ID */
+% int *elem_map, /* element order map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ if (ex_put_elem_num_map (*idexo, elem_map) == EX_FATAL)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to store element number map in file id %d",
+ *idexo);
+ ex_err("expenm",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * put map parameters
+ */
+% void
+% expmp (
+% int *idexo, /* EXODUS file ID */
+% int *num_node_maps, /* number of node maps */
+% int *num_elem_maps, /* number of element maps */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ if (ex_put_map_param (*idexo, *num_node_maps, *num_elem_maps) == EX_FATAL)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to put map parameters in file id %d",
+ *idexo);
+ ex_err("expmp",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * put node map
+ */
+% void
+% expnm (
+% int *idexo, /* EXODUS file ID */
+% int *map_id, /* node map ID */
+% int *node_map, /* node map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ if (ex_put_node_map (*idexo, *map_id, node_map) == EX_FATAL)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to store node map in file id %d",
+ *idexo);
+ ex_err("expnm",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * put node number map
+ */
+% void
+% expnnm (
+% int *idexo, /* EXODUS file ID */
+% int *node_map, /* node order map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ *ierr = 0;
+ if (ex_put_node_num_map (*idexo, node_map) == EX_FATAL)
+ {
+ *ierr = EX_FATAL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to store node number map in file id %d",
+ *idexo);
+ ex_err("expnnm",errmsg,EX_MSG);
+ }
+ }
+}
+
+/*
+ * write results variable name
+ */
+% void
+% expvnm (
+% int *idexo, /* EXODUS file ID */
+% string var_type, /* (single) character indicating the type of */
+% /* variable which is described */
+% int *var_index /* variable index to be read */
+% string var_name, /* string containing variable name */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+
+ char *sptr; /* ptr to temp staging space for string */
+ int slen;
+ *ierr=0; /* default no errror */
+
+ slen = ex_inquire_int(*idexo, EX_INQ_DB_MAX_ALLOWED_NAME_LENGTH); /* max str size */
+ if (var_namelen < slen)
+ {
+ slen = var_namelen;
+ }
+
+ /* Allocate staging space for the variable name */
+ if (!(sptr=(char *)malloc((slen+1)*sizeof(char))))
+ {
+ *ierr = EX_MEMFAIL;
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to allocate space for results variable name for file id %d",
+ *idexo);
+ ex_err("expvnm",errmsg,EX_MEMFAIL);
+ }
+ return;
+ }
+
+ ex_fstrncpy(sptr,var_name,slen);/* copy string into buffer */
+
+
+ /* do ExodusII C call to write results variable name */
+ if (ex_put_var_name(*idexo,var_type,*var_index,sptr) == EX_FATAL)
+ {
+ *ierr = EX_FATAL;
+ free(sptr); /* free up allocated space */
+ if (exoptval & EX_DEBUG)
+ {
+ sprintf(errmsg,
+ "Error: failed to get write variable name to file id %d",
+ *idexo);
+ ex_err("expvnm",errmsg,EX_MSG);
+ }
+ return;
+ }
+
+ free(sptr); /* Free up string staging area */
+}
diff --git a/exodus/forbind/test/CMakeLists.txt b/exodus/forbind/test/CMakeLists.txt
new file mode 100644
index 0000000..771ce3a
--- /dev/null
+++ b/exodus/forbind/test/CMakeLists.txt
@@ -0,0 +1,64 @@
+INCLUDE(PackageAddExecutable)
+INCLUDE(PackageAddTest)
+INCLUDE(PackageAddAdvancedTest)
+
+ADD_DEFINITIONS(-DUSING_CMAKE)
+
+find_program (${PACKAGE_NAME}_Netcdf_EXECUTABLE_NCDUMP
+ NAME ncdump
+ PATHS
+ $ENV{ACCESS}/bin
+ $ENV{NETCDF_DIR}/bin
+ $ENV{NETCDF_DIR}/ncdump
+ ENV PATH
+ )
+
+# ===============================================
+
+
+IF (${PACKAGE_NAME}_Netcdf_EXECUTABLE_NCDUMP)
+ SET( forbind_OLDTESTS
+ testwt
+ testwtd
+ testrd
+ testrd1
+ testrdd
+ testwt1
+ testwt2
+ testwtm
+ testcp
+ testcpnl
+ testcpln
+ testwt_nsid
+ testrd_nsid
+ )
+
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/testall.in
+ ${CMAKE_CURRENT_BINARY_DIR}/testall
+ @ONLY
+ )
+
+ # NOTE: The "LINKER_LANGUAGE CXX" is used to workaround an issue with
+ # the trilinos cmake adding the pamgen and pamgen_extras libraries as
+ # a dependency. These are C++ libraries and result in unresolved depedencies
+ # when built with shareable libraries on some platforms....
+
+ FOREACH ( testName ${forbind_OLDTESTS} )
+ PACKAGE_ADD_EXECUTABLE( f_${testName} NOEXEPREFIX LINKER_LANGUAGE Fortran SOURCES ${testName}.f DEPLIBS exodus_for)
+ ENDFOREACH ( testName )
+
+ PACKAGE_ADD_ADVANCED_TEST(
+ exodus_unit_tests
+ TEST_0 CMND /bin/csh ARGS ${CMAKE_CURRENT_BINARY_DIR}/testall
+ OUTPUT_FILE exodus_unit_tests.out
+ PASS_ANY
+ TEST_1 CMND diff ARGS ${CMAKE_CURRENT_SOURCE_DIR}/exodus_unit_tests.gold
+ ${CMAKE_CURRENT_BINARY_DIR}/exodus_unit_tests.out
+ COMM serial
+ FINAL_PASS_REGULAR_EXPRESSION
+ )
+ELSE()
+ MESSAGE(STATUS
+ "WARNING: ${PACKAGE_NAME}: Exodus unit tests will not be run due to failure finding ncdump executable.")
+ENDIF()
diff --git a/forbind/test/Imakefile b/exodus/forbind/test/Imakefile
similarity index 100%
rename from forbind/test/Imakefile
rename to exodus/forbind/test/Imakefile
diff --git a/forbind/test/Makefile.standalone b/exodus/forbind/test/Makefile.standalone
similarity index 85%
rename from forbind/test/Makefile.standalone
rename to exodus/forbind/test/Makefile.standalone
index ff02980..bc9da68 100644
--- a/forbind/test/Makefile.standalone
+++ b/exodus/forbind/test/Makefile.standalone
@@ -37,6 +37,7 @@ LOCALEXO = ../../libexoIIv2for.a ../../libexodus.a
LIBS = $(LOCALEXO) $(NETCDF_LIB)
PROGS = testwt testwtd testrd testrd1 testrdd testwt1 testwt2 testwtm testcp
+PROGS = testwt testwtd testrd testrd1 testrdd testwt1 testwt2 testwtm testcp testcpnl testcpln testwt_nsid testrd_nsid
all:: check
@@ -76,6 +77,22 @@ all:: testcp
testcp:: testcp.o $(LOCALEXO)
$(FC) $(FFLAGS) -o $@ testcp.o $(LDFLAGS) $(LIBS)
+all:: testcpnl
+testcpnl:: testcpnl.o $(LOCALEXO)
+ $(FC) $(FFLAGS) -o $@ testcpnl.o $(LDFLAGS) $(LIBS)
+
+all:: testcpln
+testcpln:: testcpln.o $(LOCALEXO)
+ $(FC) $(FFLAGS) -o $@ testcpln.o $(LDFLAGS) $(LIBS)
+
+all:: testwt_nsid
+testwt_nsid:: testwt_nsid.o $(LOCALEXO)
+ $(FC) $(FFLAGS) -o $@ testwt_nsid.o $(LDFLAGS) $(LIBS)
+
+all:: testrd_nsid
+testrd_nsid:: testrd_nsid.o $(LOCALEXO)
+ $(FC) $(FFLAGS) -o $@ testrd_nsid.o $(LDFLAGS) $(LIBS)
+
test: check
check: $(PROGS)
csh ./testall
diff --git a/exodus/forbind/test/exodus_unit_tests.gold b/exodus/forbind/test/exodus_unit_tests.gold
new file mode 100644
index 0000000..4bf9794
--- /dev/null
+++ b/exodus/forbind/test/exodus_unit_tests.gold
@@ -0,0 +1,19 @@
+************************************************************************
+************************************************************************
+testwt ...
+testrd ...
+testrd ... [Expect ex_create NOCLOBBER error from this test]
+testcp_ss ...
+testcpln ...
+testcpnl ...
+testwt1 ...
+testwt1 ... [Expect WEDGE6 warning from this test]
+testrd1 ...
+testrd1 ... [Expect failure locating elem var 1 for elem block 12]
+testwtd ...
+testrdd ...
+testwt2 ...
+testwt_nsid ...
+testrd_nsid ...
+************************************************************************
+************************************************************************
diff --git a/forbind/test/makedmp b/exodus/forbind/test/makedmp
similarity index 100%
rename from forbind/test/makedmp
rename to exodus/forbind/test/makedmp
diff --git a/forbind/test/t.f.tmp b/exodus/forbind/test/t.f.tmp
similarity index 100%
rename from forbind/test/t.f.tmp
rename to exodus/forbind/test/t.f.tmp
diff --git a/forbind/test/test-nsided.dmp b/exodus/forbind/test/test-nsided.dmp
similarity index 79%
rename from forbind/test/test-nsided.dmp
rename to exodus/forbind/test/test-nsided.dmp
index d582e7d..36f4533 100644
--- a/forbind/test/test-nsided.dmp
+++ b/exodus/forbind/test/test-nsided.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 33 ;
num_elem = 7 ;
@@ -12,6 +13,8 @@ dimensions:
num_nod_per_el1 = 37 ;
num_qa_rec = 2 ;
num_info = 3 ;
+ num_cframes = 3 ;
+ num_cframes_9 = 27 ;
variables:
float time_whole(time_step) ;
int eb_status(num_el_blk) ;
@@ -20,8 +23,8 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
int connect1(num_nod_per_el1) ;
connect1:elem_type = "nsided" ;
@@ -30,11 +33,15 @@ variables:
ebepecnt1:entity_type2 = "ELEM" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
+ float frame_coordinates(num_cframes_9) ;
+ int frame_ids(num_cframes) ;
+ char frame_tags(num_cframes) ;
// global attributes:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1 ;
@@ -78,4 +85,12 @@ data:
"This is the first information record.",
"This is the second information record.",
"This is the third information record." ;
+
+ frame_coordinates = 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.1, 1.2,
+ 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7,
+ 2.8, 2.9 ;
+
+ frame_ids = 1, 11, 111 ;
+
+ frame_tags = "RCS" ;
}
diff --git a/forbind/test/test.dmp b/exodus/forbind/test/test.dmp
similarity index 95%
rename from forbind/test/test.dmp
rename to exodus/forbind/test/test.dmp
index 46b3e61..65445e6 100644
--- a/forbind/test/test.dmp
+++ b/exodus/forbind/test/test.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -53,29 +54,29 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -110,12 +111,12 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var2eb1(time_step, num_el_in_blk1) ;
float vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -137,6 +138,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/forbind/test/test.exo_f b/exodus/forbind/test/test.exo_f
similarity index 100%
rename from forbind/test/test.exo_f
rename to exodus/forbind/test/test.exo_f
diff --git a/forbind/test/test1.dmp b/exodus/forbind/test/test1.dmp
similarity index 94%
rename from forbind/test/test1.dmp
rename to exodus/forbind/test/test1.dmp
index 3ffef5a..050a03c 100644
--- a/forbind/test/test1.dmp
+++ b/exodus/forbind/test/test1.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 28 ;
num_elem = 8 ;
@@ -61,17 +62,17 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int nm_prop1(num_node_maps) ;
nm_prop1:name = "ID" ;
- char nmap_names(num_node_maps, len_string) ;
+ char nmap_names(num_node_maps, len_name) ;
int node_map1(num_nodes) ;
int em_prop1(num_elem_maps) ;
em_prop1:name = "ID" ;
- char emap_names(num_elem_maps, len_string) ;
+ char emap_names(num_elem_maps, len_name) ;
int elem_map1(num_elem) ;
int elem_map2(num_elem) ;
int em_prop2(num_elem_maps) ;
@@ -84,31 +85,31 @@ variables:
nm_prop2:_FillValue = 0 ;
nm_prop2:name = "NUMBER" ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "circle" ;
float attrib6(num_el_in_blk6, num_att_in_blk6) ;
- char attrib_name6(num_att_in_blk6, len_string) ;
+ char attrib_name6(num_att_in_blk6, len_name) ;
int connect6(num_el_in_blk6, num_nod_per_el6) ;
connect6:elem_type = "sphere" ;
float attrib7(num_el_in_blk7, num_att_in_blk7) ;
- char attrib_name7(num_att_in_blk7, len_string) ;
+ char attrib_name7(num_att_in_blk7, len_name) ;
int connect7(num_el_in_blk7, num_nod_per_el7) ;
connect7:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -143,12 +144,12 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var1eb2(time_step, num_el_in_blk2) ;
float vals_elem_var1eb4(time_step, num_el_in_blk4) ;
@@ -174,6 +175,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is testwt1" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/forbind/test/test2-1.dmp b/exodus/forbind/test/test2-1.dmp
similarity index 94%
rename from forbind/test/test2-1.dmp
rename to exodus/forbind/test/test2-1.dmp
index a7801f6..25a44e0 100644
--- a/forbind/test/test2-1.dmp
+++ b/exodus/forbind/test/test2-1.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -53,29 +54,29 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -110,12 +111,12 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var2eb1(time_step, num_el_in_blk1) ;
float vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -137,6 +138,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is test 2" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/forbind/test/test2-2.dmp b/exodus/forbind/test/test2-2.dmp
similarity index 94%
rename from forbind/test/test2-2.dmp
rename to exodus/forbind/test/test2-2.dmp
index ba2bcba..60c1e02 100644
--- a/forbind/test/test2-2.dmp
+++ b/exodus/forbind/test/test2-2.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -53,29 +54,29 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -110,12 +111,12 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
float vals_glo_var(time_step, num_glo_var) ;
float vals_nod_var1(time_step, num_nodes) ;
float vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
float vals_elem_var1eb1(time_step, num_el_in_blk1) ;
float vals_elem_var2eb1(time_step, num_el_in_blk1) ;
float vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -137,6 +138,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is test 2" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/forbind/test/testall b/exodus/forbind/test/testall
similarity index 64%
copy from forbind/test/testall
copy to exodus/forbind/test/testall
index 4e8a175..7233ad2 100644
--- a/forbind/test/testall
+++ b/exodus/forbind/test/testall
@@ -38,73 +38,88 @@
#set PREFIX = "valgrind --tool=memcheck"
set PREFIX = ""
+set SUFFIX = ""
+set BINDIR = /Users/gdsjaar/src/exodusii-sf/exodus/forbind/test
+set SRCDIR = /Users/gdsjaar/src/exodusii-sf/exodus/forbind/test
+set NCDUMP = /Users/gdsjaar/src/SEACAS.git/bin/ncdump
# testwt - single precision write test
echo "************************************************************************"
echo "************************************************************************"
echo "testwt ..."
echo "begin testwt" > test.output
-${PREFIX} ./testwt >> test.output
+${PREFIX} ${BINDIR}/testwt${SUFFIX} >> test.output
echo "end testwt" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - test.dmp | tee testwt.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test.dmp | tee testwt.res
# testrd - single precision read test
echo "testrd ..."
echo "testrd ... [Expect ex_create NOCLOBBER error from this test]"
-${PREFIX} ./testrd | grep -v version | diff - testrd.dmp | tee testrd.res
+${PREFIX} ${BINDIR}/testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd.dmp | tee testrd.res
# testcp_ss - single-to-single precision copy test
echo "testcp_ss ..."
echo "begin testcp_ss" >> test.output
-${PREFIX} ./testcp >> test.output
+${PREFIX} ${BINDIR}/testcp${SUFFIX} >> test.output
echo "end testcp_ss" >> test.output
-ncdump -d5,5 testcp.exo | grep -v version | diff - testcp_ss.dmp | tee testcp_ss.res
+${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ss.dmp | tee testcp_ss.res
# testcpln - single-to-single, large to normal copy test
echo "testcpln ..."
echo "begin testcpln" >> test.output
-${PREFIX} ./testcpln >> test.output
+${PREFIX} ${BINDIR}/testcpln${SUFFIX} >> test.output
echo "end testcpln" >> test.output
-ncdump -d5,5 testcp.exo | grep -v version | diff - testcpln.dmp | tee testcpln.res
+${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcpln.dmp | tee testcpln.res
# testcpnl - single-to-single, normal to large copy test
echo "testcpnl ..."
echo "begin testcpnl" >> test.output
-${PREFIX} ./testcpnl >> test.output
+${PREFIX} ${BINDIR}/testcpnl${SUFFIX} >> test.output
echo "end testcpnl" >> test.output
-ncdump -d5,5 testcpnl.exo | grep -v version | diff - testcpnl.dmp | tee testcpnl.res
+${NCDUMP} -d5,5 testcpnl.exo | grep -v version | diff - ${SRCDIR}/testcpnl.dmp | tee testcpnl.res
# testwt1 - single precision write test with multiple side sets
echo "testwt1 ..."
echo "testwt1 ... [Expect WEDGE6 warning from this test]"
echo "begin testwt1" >> test.output
-${PREFIX} ./testwt1 >> test.output
+${PREFIX} ${BINDIR}/testwt1${SUFFIX} >> test.output
echo "end testwt1" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - test1.dmp | tee testwt1.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test1.dmp | tee testwt1.res
# testrd1 - single precision read test with multiple side sets
echo "testrd1 ..."
echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]"
-${PREFIX} ./testrd1 | grep -v version | diff - testrd1.dmp | tee testrd1.res
+${PREFIX} ${BINDIR}/testrd1${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd1.dmp | tee testrd1.res
# testwtd - double precision write test
echo "testwtd ..."
echo "begin testwtd" >> test.output
-${PREFIX} ./testwtd >> test.output
+${PREFIX} ${BINDIR}/testwtd${SUFFIX} >> test.output
echo "end testwtd" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - testd.dmp | tee testwtd.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testd.dmp | tee testwtd.res
# testrdd - double precision read test
echo "testrdd ..."
-${PREFIX} ./testrdd | grep -v version | diff - testrdd.dmp | tee testrdd.res
+${PREFIX} ${BINDIR}/testrdd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrdd.dmp | tee testrdd.res
# testwt2 - single precision write 2 files (simultaneously open) test
echo "testwt2 ..."
echo "begin testwt2" >> test.output
-${PREFIX} ./testwt2 >> test.output |&grep -v "property name string"
+${PREFIX} ${BINDIR}/testwt2${SUFFIX} >> test.output |&grep -v "property name string"
echo "end testwt2" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - test2-1.dmp | tee testwt2-1.res
-ncdump -d5,5 test2.exo | grep -v version | diff - test2-2.dmp | tee testwt2-2.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test2-1.dmp | tee testwt2-1.res
+${NCDUMP} -d5,5 test2.exo | grep -v version | diff - ${SRCDIR}/test2-2.dmp | tee testwt2-2.res
+
+echo "testwt_nsid ..."
+echo "begin testwt_nsid" > test.output
+${PREFIX} ${BINDIR}/testwt_nsid${SUFFIX} >> test.output
+echo "end testwt_nsid" >> test.output
+${NCDUMP} -d5,5 test-nsided.exo | grep -v version | diff - ${SRCDIR}/test-nsided.dmp | tee testwt_nsid.res
+
+# testrd_nsid - single precision read test
+echo "testrd_nsid ..."
+${PREFIX} ${BINDIR}/testrd_nsid${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_nsid.dmp | tee testrd_nsid.res
+
echo "************************************************************************"
echo "************************************************************************"
diff --git a/forbind/test/testall b/exodus/forbind/test/testall.in
similarity index 64%
copy from forbind/test/testall
copy to exodus/forbind/test/testall.in
index 4e8a175..4569236 100644
--- a/forbind/test/testall
+++ b/exodus/forbind/test/testall.in
@@ -38,73 +38,88 @@
#set PREFIX = "valgrind --tool=memcheck"
set PREFIX = ""
+set SUFFIX = ".exe"
+set BINDIR = @CMAKE_CURRENT_BINARY_DIR@
+set SRCDIR = @CMAKE_CURRENT_SOURCE_DIR@
+set NCDUMP = @NETCDF_NCDUMP@
# testwt - single precision write test
echo "************************************************************************"
echo "************************************************************************"
echo "testwt ..."
echo "begin testwt" > test.output
-${PREFIX} ./testwt >> test.output
+${PREFIX} ${BINDIR}/f_testwt${SUFFIX} >> test.output
echo "end testwt" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - test.dmp | tee testwt.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test.dmp | tee testwt.res
# testrd - single precision read test
echo "testrd ..."
echo "testrd ... [Expect ex_create NOCLOBBER error from this test]"
-${PREFIX} ./testrd | grep -v version | diff - testrd.dmp | tee testrd.res
+${PREFIX} ${BINDIR}/f_testrd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd.dmp | tee testrd.res
# testcp_ss - single-to-single precision copy test
echo "testcp_ss ..."
echo "begin testcp_ss" >> test.output
-${PREFIX} ./testcp >> test.output
+${PREFIX} ${BINDIR}/f_testcp${SUFFIX} >> test.output
echo "end testcp_ss" >> test.output
-ncdump -d5,5 testcp.exo | grep -v version | diff - testcp_ss.dmp | tee testcp_ss.res
+${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcp_ss.dmp | tee testcp_ss.res
# testcpln - single-to-single, large to normal copy test
echo "testcpln ..."
echo "begin testcpln" >> test.output
-${PREFIX} ./testcpln >> test.output
+${PREFIX} ${BINDIR}/f_testcpln${SUFFIX} >> test.output
echo "end testcpln" >> test.output
-ncdump -d5,5 testcp.exo | grep -v version | diff - testcpln.dmp | tee testcpln.res
+${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - ${SRCDIR}/testcpln.dmp | tee testcpln.res
# testcpnl - single-to-single, normal to large copy test
echo "testcpnl ..."
echo "begin testcpnl" >> test.output
-${PREFIX} ./testcpnl >> test.output
+${PREFIX} ${BINDIR}/f_testcpnl${SUFFIX} >> test.output
echo "end testcpnl" >> test.output
-ncdump -d5,5 testcpnl.exo | grep -v version | diff - testcpnl.dmp | tee testcpnl.res
+${NCDUMP} -d5,5 testcpnl.exo | grep -v version | diff - ${SRCDIR}/testcpnl.dmp | tee testcpnl.res
# testwt1 - single precision write test with multiple side sets
echo "testwt1 ..."
echo "testwt1 ... [Expect WEDGE6 warning from this test]"
echo "begin testwt1" >> test.output
-${PREFIX} ./testwt1 >> test.output
+${PREFIX} ${BINDIR}/f_testwt1${SUFFIX} >> test.output
echo "end testwt1" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - test1.dmp | tee testwt1.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test1.dmp | tee testwt1.res
# testrd1 - single precision read test with multiple side sets
echo "testrd1 ..."
echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]"
-${PREFIX} ./testrd1 | grep -v version | diff - testrd1.dmp | tee testrd1.res
+${PREFIX} ${BINDIR}/f_testrd1${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd1.dmp | tee testrd1.res
# testwtd - double precision write test
echo "testwtd ..."
echo "begin testwtd" >> test.output
-${PREFIX} ./testwtd >> test.output
+${PREFIX} ${BINDIR}/f_testwtd${SUFFIX} >> test.output
echo "end testwtd" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - testd.dmp | tee testwtd.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/testd.dmp | tee testwtd.res
# testrdd - double precision read test
echo "testrdd ..."
-${PREFIX} ./testrdd | grep -v version | diff - testrdd.dmp | tee testrdd.res
+${PREFIX} ${BINDIR}/f_testrdd${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrdd.dmp | tee testrdd.res
# testwt2 - single precision write 2 files (simultaneously open) test
echo "testwt2 ..."
echo "begin testwt2" >> test.output
-${PREFIX} ./testwt2 >> test.output |&grep -v "property name string"
+${PREFIX} ${BINDIR}/f_testwt2${SUFFIX} >> test.output |&grep -v "property name string"
echo "end testwt2" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - test2-1.dmp | tee testwt2-1.res
-ncdump -d5,5 test2.exo | grep -v version | diff - test2-2.dmp | tee testwt2-2.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - ${SRCDIR}/test2-1.dmp | tee testwt2-1.res
+${NCDUMP} -d5,5 test2.exo | grep -v version | diff - ${SRCDIR}/test2-2.dmp | tee testwt2-2.res
+
+echo "testwt_nsid ..."
+echo "begin testwt_nsid" > test.output
+${PREFIX} ${BINDIR}/f_testwt_nsid${SUFFIX} >> test.output
+echo "end testwt_nsid" >> test.output
+${NCDUMP} -d5,5 test-nsided.exo | grep -v version | diff - ${SRCDIR}/test-nsided.dmp | tee testwt_nsid.res
+
+# testrd_nsid - single precision read test
+echo "testrd_nsid ..."
+${PREFIX} ${BINDIR}/f_testrd_nsid${SUFFIX} | grep -v version | diff - ${SRCDIR}/testrd_nsid.dmp | tee testrd_nsid.res
+
echo "************************************************************************"
echo "************************************************************************"
diff --git a/forbind/test/testall b/exodus/forbind/test/testall.in1
similarity index 68%
rename from forbind/test/testall
rename to exodus/forbind/test/testall.in1
index 4e8a175..92050d3 100644
--- a/forbind/test/testall
+++ b/exodus/forbind/test/testall.in1
@@ -38,73 +38,86 @@
#set PREFIX = "valgrind --tool=memcheck"
set PREFIX = ""
+set SRCDIR = .
+set NCDUMP = @<BINDIR>@/ncdump
# testwt - single precision write test
echo "************************************************************************"
echo "************************************************************************"
echo "testwt ..."
echo "begin testwt" > test.output
-${PREFIX} ./testwt >> test.output
+${PREFIX} ${SRCDIR}/testwt >> test.output
echo "end testwt" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - test.dmp | tee testwt.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - test.dmp | tee testwt.res
# testrd - single precision read test
echo "testrd ..."
echo "testrd ... [Expect ex_create NOCLOBBER error from this test]"
-${PREFIX} ./testrd | grep -v version | diff - testrd.dmp | tee testrd.res
+${PREFIX} ${SRCDIR}/testrd | grep -v version | diff - testrd.dmp | tee testrd.res
# testcp_ss - single-to-single precision copy test
echo "testcp_ss ..."
echo "begin testcp_ss" >> test.output
-${PREFIX} ./testcp >> test.output
+${PREFIX} ${SRCDIR}/testcp >> test.output
echo "end testcp_ss" >> test.output
-ncdump -d5,5 testcp.exo | grep -v version | diff - testcp_ss.dmp | tee testcp_ss.res
+${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - testcp_ss.dmp | tee testcp_ss.res
# testcpln - single-to-single, large to normal copy test
echo "testcpln ..."
echo "begin testcpln" >> test.output
-${PREFIX} ./testcpln >> test.output
+${PREFIX} ${SRCDIR}/testcpln >> test.output
echo "end testcpln" >> test.output
-ncdump -d5,5 testcp.exo | grep -v version | diff - testcpln.dmp | tee testcpln.res
+${NCDUMP} -d5,5 testcp.exo | grep -v version | diff - testcpln.dmp | tee testcpln.res
# testcpnl - single-to-single, normal to large copy test
echo "testcpnl ..."
echo "begin testcpnl" >> test.output
-${PREFIX} ./testcpnl >> test.output
+${PREFIX} ${SRCDIR}/testcpnl >> test.output
echo "end testcpnl" >> test.output
-ncdump -d5,5 testcpnl.exo | grep -v version | diff - testcpnl.dmp | tee testcpnl.res
+${NCDUMP} -d5,5 testcpnl.exo | grep -v version | diff - testcpnl.dmp | tee testcpnl.res
# testwt1 - single precision write test with multiple side sets
echo "testwt1 ..."
echo "testwt1 ... [Expect WEDGE6 warning from this test]"
echo "begin testwt1" >> test.output
-${PREFIX} ./testwt1 >> test.output
+${PREFIX} ${SRCDIR}/testwt1 >> test.output
echo "end testwt1" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - test1.dmp | tee testwt1.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - test1.dmp | tee testwt1.res
# testrd1 - single precision read test with multiple side sets
echo "testrd1 ..."
echo "testrd1 ... [Expect failure locating elem var 1 for elem block 12]"
-${PREFIX} ./testrd1 | grep -v version | diff - testrd1.dmp | tee testrd1.res
+${PREFIX} ${SRCDIR}/testrd1 | grep -v version | diff - testrd1.dmp | tee testrd1.res
# testwtd - double precision write test
echo "testwtd ..."
echo "begin testwtd" >> test.output
-${PREFIX} ./testwtd >> test.output
+${PREFIX} ${SRCDIR}/testwtd >> test.output
echo "end testwtd" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - testd.dmp | tee testwtd.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - testd.dmp | tee testwtd.res
# testrdd - double precision read test
echo "testrdd ..."
-${PREFIX} ./testrdd | grep -v version | diff - testrdd.dmp | tee testrdd.res
+${PREFIX} ${SRCDIR}/testrdd | grep -v version | diff - testrdd.dmp | tee testrdd.res
# testwt2 - single precision write 2 files (simultaneously open) test
echo "testwt2 ..."
echo "begin testwt2" >> test.output
-${PREFIX} ./testwt2 >> test.output |&grep -v "property name string"
+${PREFIX} ${SRCDIR}/testwt2 >> test.output |&grep -v "property name string"
echo "end testwt2" >> test.output
-ncdump -d5,5 test.exo | grep -v version | diff - test2-1.dmp | tee testwt2-1.res
-ncdump -d5,5 test2.exo | grep -v version | diff - test2-2.dmp | tee testwt2-2.res
+${NCDUMP} -d5,5 test.exo | grep -v version | diff - test2-1.dmp | tee testwt2-1.res
+${NCDUMP} -d5,5 test2.exo | grep -v version | diff - test2-2.dmp | tee testwt2-2.res
+
+echo "testwt_nsid ..."
+echo "begin testwt_nsid" > test.output
+${PREFIX} ${SRCDIR}/testwt_nsid >> test.output
+echo "end testwt_nsid" >> test.output
+${NCDUMP} -d5,5 test-nsided.exo | grep -v version | diff - test-nsided.dmp | tee testwt_nsid.res
+
+# testrd_nsid - single precision read test
+echo "testrd_nsid ..."
+${PREFIX} ${SRCDIR}/testrd_nsid | grep -v version | diff - testrd_nsid.dmp | tee testrd_nsid.res
+
echo "************************************************************************"
echo "************************************************************************"
diff --git a/forbind/test/testcp.f b/exodus/forbind/test/testcp.f
similarity index 100%
rename from forbind/test/testcp.f
rename to exodus/forbind/test/testcp.f
diff --git a/forbind/test/testcp_dd.dmp b/exodus/forbind/test/testcp_dd.dmp
similarity index 96%
rename from forbind/test/testcp_dd.dmp
rename to exodus/forbind/test/testcp_dd.dmp
index 6c860af..a6b1eb0 100644
--- a/forbind/test/testcp_dd.dmp
+++ b/exodus/forbind/test/testcp_dd.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 2 ;
num_nodes = 8 ;
num_elem = 2 ;
@@ -34,7 +35,7 @@ variables:
int ss_prop1(num_side_sets) ;
ss_prop1:name = "ID" ;
double coord(num_dim, num_nodes) ;
- char coor_names(num_dim, len_string) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
double attrib1(num_el_in_blk1, num_att_in_blk1) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
@@ -69,6 +70,7 @@ variables:
:floating_point_word_size = 8 ;
:file_size = 0 ;
:title = "This is a test" ;
+ :maximum_name_length = 9 ;
data:
eb_status = 1, 1 ;
diff --git a/forbind/test/testcp_ds.dmp b/exodus/forbind/test/testcp_ds.dmp
similarity index 96%
rename from forbind/test/testcp_ds.dmp
rename to exodus/forbind/test/testcp_ds.dmp
index 104f54e..89a80d1 100644
--- a/forbind/test/testcp_ds.dmp
+++ b/exodus/forbind/test/testcp_ds.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 2 ;
num_nodes = 8 ;
num_elem = 2 ;
@@ -34,7 +35,7 @@ variables:
int ss_prop1(num_side_sets) ;
ss_prop1:name = "ID" ;
float coord(num_dim, num_nodes) ;
- char coor_names(num_dim, len_string) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
@@ -69,6 +70,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 0 ;
:title = "This is a test" ;
+ :maximum_name_length = 9 ;
data:
eb_status = 1, 1 ;
diff --git a/forbind/test/testcp_sd.dmp b/exodus/forbind/test/testcp_sd.dmp
similarity index 98%
rename from forbind/test/testcp_sd.dmp
rename to exodus/forbind/test/testcp_sd.dmp
index da8663c..f155d88 100644
--- a/forbind/test/testcp_sd.dmp
+++ b/exodus/forbind/test/testcp_sd.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -46,7 +47,7 @@ variables:
int ss_prop1(num_side_sets) ;
ss_prop1:name = "ID" ;
double coord(num_dim, num_nodes) ;
- char coor_names(num_dim, len_string) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
double attrib1(num_el_in_blk1, num_att_in_blk1) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
@@ -96,6 +97,7 @@ variables:
:floating_point_word_size = 8 ;
:file_size = 0 ;
:title = "This is a test" ;
+ :maximum_name_length = 9 ;
data:
eb_status = 1, 1, 1, 1, 1 ;
diff --git a/forbind/test/testcp_ss.dmp b/exodus/forbind/test/testcp_ss.dmp
similarity index 91%
rename from forbind/test/testcp_ss.dmp
rename to exodus/forbind/test/testcp_ss.dmp
index 0ab1a37..dd831ee 100644
--- a/forbind/test/testcp_ss.dmp
+++ b/exodus/forbind/test/testcp_ss.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -48,29 +49,29 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -108,6 +109,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1 ;
diff --git a/forbind/test/testcpd.f b/exodus/forbind/test/testcpd.f
similarity index 100%
rename from forbind/test/testcpd.f
rename to exodus/forbind/test/testcpd.f
diff --git a/forbind/test/testcpln.dmp b/exodus/forbind/test/testcpln.dmp
similarity index 90%
rename from forbind/test/testcpln.dmp
rename to exodus/forbind/test/testcpln.dmp
index 40930c4..27eb951 100644
--- a/forbind/test/testcpln.dmp
+++ b/exodus/forbind/test/testcpln.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -46,29 +47,29 @@ variables:
int ss_prop1(num_side_sets) ;
ss_prop1:name = "ID" ;
float coord(num_dim, num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -106,6 +107,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 0 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 0, 0, 0, 0, 0 ;
diff --git a/forbind/test/testcpln.f b/exodus/forbind/test/testcpln.f
similarity index 100%
rename from forbind/test/testcpln.f
rename to exodus/forbind/test/testcpln.f
diff --git a/forbind/test/testcpnl.dmp b/exodus/forbind/test/testcpnl.dmp
similarity index 91%
rename from forbind/test/testcpnl.dmp
rename to exodus/forbind/test/testcpnl.dmp
index 09c1138..c852d32 100644
--- a/forbind/test/testcpnl.dmp
+++ b/exodus/forbind/test/testcpnl.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (0 currently)
+ len_name = 33 ;
num_dim = 3 ;
num_nodes = 26 ;
num_elem = 5 ;
@@ -48,29 +49,29 @@ variables:
float coordx(num_nodes) ;
float coordy(num_nodes) ;
float coordz(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
float attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
float attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
float attrib3(num_el_in_blk3, num_att_in_blk3) ;
- char attrib_name3(num_att_in_blk3, len_string) ;
+ char attrib_name3(num_att_in_blk3, len_name) ;
int connect3(num_el_in_blk3, num_nod_per_el3) ;
connect3:elem_type = "hex" ;
float attrib4(num_el_in_blk4, num_att_in_blk4) ;
- char attrib_name4(num_att_in_blk4, len_string) ;
+ char attrib_name4(num_att_in_blk4, len_name) ;
int connect4(num_el_in_blk4, num_nod_per_el4) ;
connect4:elem_type = "tetra" ;
float attrib5(num_el_in_blk5, num_att_in_blk5) ;
- char attrib_name5(num_att_in_blk5, len_string) ;
+ char attrib_name5(num_att_in_blk5, len_name) ;
int connect5(num_el_in_blk5, num_nod_per_el5) ;
connect5:elem_type = "wedge" ;
int eb_prop2(num_el_blk) ;
@@ -108,6 +109,7 @@ variables:
:floating_point_word_size = 4 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
eb_status = 1, 1, 1, 1, 1 ;
diff --git a/forbind/test/testcpnl.f b/exodus/forbind/test/testcpnl.f
similarity index 100%
rename from forbind/test/testcpnl.f
rename to exodus/forbind/test/testcpnl.f
diff --git a/forbind/test/testd.dmp b/exodus/forbind/test/testd.dmp
similarity index 92%
rename from forbind/test/testd.dmp
rename to exodus/forbind/test/testd.dmp
index 0a30771..fff4f18 100644
--- a/forbind/test/testd.dmp
+++ b/exodus/forbind/test/testd.dmp
@@ -4,6 +4,7 @@ dimensions:
len_line = 81 ;
four = 4 ;
time_step = UNLIMITED ; // (10 currently)
+ len_name = 33 ;
num_dim = 2 ;
num_nodes = 8 ;
num_elem = 2 ;
@@ -40,17 +41,17 @@ variables:
ss_prop1:name = "ID" ;
double coordx(num_nodes) ;
double coordy(num_nodes) ;
- char eb_names(num_el_blk, len_string) ;
- char ns_names(num_node_sets, len_string) ;
- char ss_names(num_side_sets, len_string) ;
- char coor_names(num_dim, len_string) ;
+ char eb_names(num_el_blk, len_name) ;
+ char ns_names(num_node_sets, len_name) ;
+ char ss_names(num_side_sets, len_name) ;
+ char coor_names(num_dim, len_name) ;
int elem_map(num_elem) ;
double attrib1(num_el_in_blk1, num_att_in_blk1) ;
- char attrib_name1(num_att_in_blk1, len_string) ;
+ char attrib_name1(num_att_in_blk1, len_name) ;
int connect1(num_el_in_blk1, num_nod_per_el1) ;
connect1:elem_type = "quad" ;
double attrib2(num_el_in_blk2, num_att_in_blk2) ;
- char attrib_name2(num_att_in_blk2, len_string) ;
+ char attrib_name2(num_att_in_blk2, len_name) ;
int connect2(num_el_in_blk2, num_nod_per_el2) ;
connect2:elem_type = "quad" ;
int eb_prop2(num_el_blk) ;
@@ -79,12 +80,12 @@ variables:
ss_prop2:name = "COLOR" ;
char qa_records(num_qa_rec, four, len_string) ;
char info_records(num_info, len_line) ;
- char name_glo_var(num_glo_var, len_string) ;
+ char name_glo_var(num_glo_var, len_name) ;
double vals_glo_var(time_step, num_glo_var) ;
double vals_nod_var1(time_step, num_nodes) ;
double vals_nod_var2(time_step, num_nodes) ;
- char name_nod_var(num_nod_var, len_string) ;
- char name_elem_var(num_elem_var, len_string) ;
+ char name_nod_var(num_nod_var, len_name) ;
+ char name_elem_var(num_elem_var, len_name) ;
double vals_elem_var1eb1(time_step, num_el_in_blk1) ;
double vals_elem_var2eb1(time_step, num_el_in_blk1) ;
double vals_elem_var3eb1(time_step, num_el_in_blk1) ;
@@ -97,6 +98,7 @@ variables:
:floating_point_word_size = 8 ;
:file_size = 1 ;
:title = "This is a test" ;
+ :maximum_name_length = 32 ;
data:
time_whole = 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1 ;
diff --git a/forbind/test/testrd.dmp b/exodus/forbind/test/testrd.dmp
similarity index 99%
rename from forbind/test/testrd.dmp
rename to exodus/forbind/test/testrd.dmp
index 5ba9438..a136ffa 100644
--- a/forbind/test/testrd.dmp
+++ b/exodus/forbind/test/testrd.dmp
@@ -2,6 +2,7 @@
after exopen, error = 0
I/O word size 4
Model Size 1
+ Maximum Allowed/Used DB Name Size 3232
after exgini, error = 0
database parameters:
diff --git a/forbind/test/testrd.f b/exodus/forbind/test/testrd.f
similarity index 98%
rename from forbind/test/testrd.f
rename to exodus/forbind/test/testrd.f
index 12cf32c..d70fab8 100644
--- a/forbind/test/testrd.f
+++ b/exodus/forbind/test/testrd.f
@@ -30,6 +30,7 @@ c 09/07/93 V.R. Yarberry - Modified for API 2.00
integer elem_num
integer cpu_ws,io_ws, mod_sz
integer num_props, prop_value
+ integer mxalnmlen, mxusnmlen
real time_value, time_values(100), var_values(100)
real x(100), y(100), z(100)
@@ -65,6 +66,12 @@ c
mod_sz = exlgmd(exoid)
write (iout, '(" Model Size",i2)') mod_sz
+ call exinq (exoid, EXNEBP, num_props, fdum, cdum, ierr)
+ call exinq (exoid, EXDBMXALNM, mxalnmlen, fdum, cdum, ierr)
+ call exinq (exoid, EXDBMXUSNM, mxusnmlen, fdum, cdum, ierr)
+ write (iout, '(" Maximum Allowed/Used DB Name Size ",i2,i2)')
+ * mxalnmlen, mxusnmlen
+
c
c read database parameters
c
diff --git a/forbind/test/testrd1.dmp b/exodus/forbind/test/testrd1.dmp
similarity index 100%
rename from forbind/test/testrd1.dmp
rename to exodus/forbind/test/testrd1.dmp
diff --git a/forbind/test/testrd1.f b/exodus/forbind/test/testrd1.f
similarity index 100%
rename from forbind/test/testrd1.f
rename to exodus/forbind/test/testrd1.f
diff --git a/forbind/test/testrd_nsid.dmp b/exodus/forbind/test/testrd_nsid.dmp
similarity index 79%
rename from forbind/test/testrd_nsid.dmp
rename to exodus/forbind/test/testrd_nsid.dmp
index f3c59b9..e956f17 100644
--- a/forbind/test/testrd_nsid.dmp
+++ b/exodus/forbind/test/testrd_nsid.dmp
@@ -151,4 +151,12 @@ connect array for elem block 10
Element 6, Nodes/Element = 8 -- 17 18 19 20 27 28 30 29
Element 7, Nodes/Element = 3 -- 31 32 33
+after exinq, error = 0
+
+There are 3 coordinate frames
+after exgfrm, error = 0
+ 1 RECTANGULAR 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90
+ 11 CYLINDRICAL 1.10 1.20 1.30 1.40 1.50 1.60 1.70 1.80 1.90
+ 111 SPHERICAL 2.10 2.20 2.30 2.40 2.50 2.60 2.70 2.80 2.90
+
after exclos, error = 0
diff --git a/forbind/test/testrd_nsid.f b/exodus/forbind/test/testrd_nsid.f
similarity index 82%
rename from forbind/test/testrd_nsid.f
rename to exodus/forbind/test/testrd_nsid.f
index 4a389bf..114d73f 100644
--- a/forbind/test/testrd_nsid.f
+++ b/exodus/forbind/test/testrd_nsid.f
@@ -173,9 +173,53 @@ c
end if
60 continue
+C ... Test coordinate frames
+ call getfrm(exoid)
+
call exclos (exoid, ierr)
write (iout, '(/"after exclos, error = ", i3)' ) ierr
100 format(' Element ',I3,', Nodes/Element = ',I3,' -- ',20I3)
stop
end
+ subroutine getfrm(exoid)
+ implicit none
+ include 'exodusII.inc'
+
+ real fdum
+ character*1 cdum
+ integer iout
+
+ integer exoid, ierr, i, j
+ integer numfrm; ! Assumed to be 3 for remaining dimensions
+ integer cfids(3), tags(3)
+ character*32 ctag
+ real coord(27)
+
+ data iout /6/
+
+ call exinq(exoid, EXNCF, numfrm, fdum, cdum, ierr)
+ write (iout, '(/"after exinq, error = ", i3)' ) ierr
+ write (iout,
+ 1 '(/"There are ",i2," coordinate frames")')
+ 2 numfrm
+
+ call exgfrm(exoid, numfrm, cfids, coord, tags, ierr);
+ write (6,'("after exgfrm, error = ", i4)') ierr
+
+! NOTE: These values may not be sensical; just used for testing.
+ do i=0,2
+ if (tags(i+1) .eq. EXCFREC) then
+ ctag = 'RECTANGULAR'
+ else if (tags(i+1) .eq. EXCFCYL) then
+ ctag = 'CYLINDRICAL'
+ else if (tags(i+1) .eq. EXCFSPH) then
+ ctag = 'SPHERICAL'
+ end if
+
+ write (iout, 100) cfids(i+1), ctag, (COORD(9*i+j),j=1,9)
+ end do
+
+ 100 format(i5, 3x, A, 9F10.2)
+ return
+ end
diff --git a/forbind/test/testrdd.dmp b/exodus/forbind/test/testrdd.dmp
similarity index 100%
rename from forbind/test/testrdd.dmp
rename to exodus/forbind/test/testrdd.dmp
diff --git a/forbind/test/testrdd.f b/exodus/forbind/test/testrdd.f
similarity index 100%
rename from forbind/test/testrdd.f
rename to exodus/forbind/test/testrdd.f
diff --git a/forbind/test/testwt.f b/exodus/forbind/test/testwt.f
similarity index 99%
rename from forbind/test/testwt.f
rename to exodus/forbind/test/testwt.f
index 65bbb0b..4a8e058 100644
--- a/forbind/test/testwt.f
+++ b/exodus/forbind/test/testwt.f
@@ -3,13 +3,6 @@ c
c This is a test program for the Fortran binding of the EXODUS II
c database write routines.
c
-
-c history -
-c Original L.A. Schoof
-c 02/25/93 V.R. Yarberry - Added error checks for file creation.
-c 03/04/93 V.R. Yarberry - Fixed bug in expvtt test, ebids was not passed
-c 08/31/93 VRY - updated to match API version 2.00
-c
include 'exodusII.inc'
integer iin, iout
@@ -66,7 +59,6 @@ c
num_elem_blk = 5
num_node_sets = 2
num_side_sets = 5
-
call expini (exoid, "This is a test", num_dim, num_nodes,
1 num_elem, num_elem_blk, num_node_sets,
2 num_side_sets, ierr)
@@ -970,7 +962,6 @@ c
call exit (0)
endif
-
c write results variables parameters and names
num_glo_vars = 1
@@ -1156,3 +1147,4 @@ c
stop
end
+
diff --git a/forbind/test/testwt1.f b/exodus/forbind/test/testwt1.f
similarity index 100%
rename from forbind/test/testwt1.f
rename to exodus/forbind/test/testwt1.f
diff --git a/forbind/test/testwt2.f b/exodus/forbind/test/testwt2.f
similarity index 100%
rename from forbind/test/testwt2.f
rename to exodus/forbind/test/testwt2.f
diff --git a/forbind/test/testwt3.f b/exodus/forbind/test/testwt3.f
similarity index 100%
rename from forbind/test/testwt3.f
rename to exodus/forbind/test/testwt3.f
diff --git a/forbind/test/testwt_nsid.f b/exodus/forbind/test/testwt_nsid.f
similarity index 89%
rename from forbind/test/testwt_nsid.f
rename to exodus/forbind/test/testwt_nsid.f
index dea7ce7..44ce236 100644
--- a/forbind/test/testwt_nsid.f
+++ b/exodus/forbind/test/testwt_nsid.f
@@ -365,6 +365,9 @@ c
call exit (0)
endif
+c ... Define and write some coordinate frames
+ call putfrm(exoid)
+
c
c close the EXODUS files
c
@@ -373,3 +376,41 @@ c
stop
end
+
+ subroutine putfrm(exoid)
+ implicit none
+ include 'exodusII.inc'
+
+ integer exoid, ierr, i
+ integer numfrm; ! Assumed to be 3 for remaining dimensions
+ integer cfids(3), tags(3)
+ real coord(27)
+
+ numfrm = 3
+
+ cfids(1) = 1
+ cfids(2) = 11
+ cfids(3) = 111
+
+ tags(1) = EXCFREC
+ tags(2) = EXCFCYL
+ tags(3) = EXCFSPH
+
+! NOTE: These values may not be sensical; just used for testing.
+ do i=0,2
+ COORD(9*i+1) = i+0.1
+ COORD(9*i+2) = i+0.2
+ COORD(9*i+3) = i+0.3
+ COORD(9*i+4) = i+0.4
+ COORD(9*i+5) = i+0.5
+ COORD(9*i+6) = i+0.6
+ COORD(9*i+7) = i+0.7
+ COORD(9*i+8) = i+0.8
+ COORD(9*i+9) = i+0.9
+ end do
+
+ call expfrm(exoid, numfrm, cfids, coord, tags, ierr);
+ write (6,'("after expfrm, error = ", i4)') ierr
+
+ return
+ end
diff --git a/forbind/test/testwtd.f b/exodus/forbind/test/testwtd.f
similarity index 100%
rename from forbind/test/testwtd.f
rename to exodus/forbind/test/testwtd.f
diff --git a/forbind/test/testwtm.f b/exodus/forbind/test/testwtm.f
similarity index 100%
rename from forbind/test/testwtm.f
rename to exodus/forbind/test/testwtm.f
diff --git a/forbind/CVS/Entries b/forbind/CVS/Entries
deleted file mode 100644
index 1784810..0000000
--- a/forbind/CVS/Entries
+++ /dev/null
@@ -1 +0,0 @@
-D
diff --git a/forbind/CVS/Entries.Log b/forbind/CVS/Entries.Log
deleted file mode 100644
index 0d7c7bb..0000000
--- a/forbind/CVS/Entries.Log
+++ /dev/null
@@ -1,3 +0,0 @@
-A D/include////
-A D/src////
-A D/test////
diff --git a/forbind/CVS/Repository b/forbind/CVS/Repository
deleted file mode 100644
index 61b0d94..0000000
--- a/forbind/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii/forbind
diff --git a/forbind/CVS/Root b/forbind/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/forbind/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/forbind/include/CVS/Entries b/forbind/include/CVS/Entries
deleted file mode 100644
index a440a32..0000000
--- a/forbind/include/CVS/Entries
+++ /dev/null
@@ -1,4 +0,0 @@
-/Imakefile/1.13/Tue Jul 20 21:36:59 2010//
-/exodusII.inc/1.13/Tue Jul 20 21:36:59 2010//
-/exodusII_int.inc/1.13/Tue Jul 20 21:36:59 2010//
-D
diff --git a/forbind/include/CVS/Repository b/forbind/include/CVS/Repository
deleted file mode 100644
index 836d9fc..0000000
--- a/forbind/include/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii/forbind/include
diff --git a/forbind/include/CVS/Root b/forbind/include/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/forbind/include/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/forbind/include/exodusII.inc b/forbind/include/exodusII.inc
deleted file mode 100644
index 029faf9..0000000
--- a/forbind/include/exodusII.inc
+++ /dev/null
@@ -1,176 +0,0 @@
-! -*- mode: fortran -*-
-!
-! Copyright 1994 Sandia Corporation. Under the terms of Contract
-! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-! retains certain rights in this software.
-!
-! See the COPYRIGHT file for copying and redistribution conditions.
-!
-!***************************************************************
-!
-! Name: exodusII.inc - Exodus II Application include file
-!
-! Use this include file to define general Exodus II parameters
-!
-! author - Victor R. Yarberry, Sandia National Laboratories
-!
-! environment - UNIX F77
-!
-!*****************************************************************************
-!
-! Define Exodus functions that return values
-!
- integer excre,exopen,exlgmd
- external excre, exopen, exlgmd
-!
-! Define access modes
-!
- integer EXNOCL,EXCLOB,EXREAD,EXWRIT,EXWRT,EXNORM,EXLARG
- integer EXNET4, EXNOSH, EXSHAR
-! EXNOCL - File create with no overwrite (no clobber), default
- parameter (EXNOCL = 0)
-! EXCLOB - File create with overwrite (clobber)
- parameter (EXCLOB = 1)
-! EXNORM - Disable large model modifications
- parameter (EXNORM = 2)
-! EXLARG - Large model modifications
- parameter (EXLARG = 4)
-! EXNET4 - use the hdf5-based netcdf4 output
- parameter (EXNET4 = 8)
-! EXNOSH - Do not open netcdf file in "share" mode
- parameter (EXNOSH = 16)
-! EXSHAR - Do open netcdf file in "share" mode
- parameter (EXSHAR = 32)
-! EXREAD - File open for read
- parameter (EXREAD = 0)
-! EXWRIT, EXWRT - File open for write
- parameter (EXWRIT = 1, EXWRT = 1)
-!
-! --INQUIRE FLAGS
-! --
-! -- EXTYPE - EXODUS II file type is desired.
-! -- EXVERS - EXODUS API version number (in file) is desired
-! -- EXDBVR - EXODUS Database version number is desired
-! -- EXLBVR - EXODUS API Library version number is desired
-! -- EXTITL - Netcdf file title is desired
-! -- EXDIM - Dimensionality (the number of coordinates per node)
-! -- is desired.
-! -- EXNODE - The number of nodal points is desired.
-! -- EXELEM - The number of elements is desired.
-! -- EXELBL - The number of element blocks is desired.
-! -- EXNODS - The number of node sets is desired.
-! -- EXSSNL - The length of the concatenated node list for all the
-! -- node sets.
-! -- EXSIDS - The number of side sets is desired.
-! -- EXSSEL - The length of the concatenated element list for all
-! -- the side sets.
-! -- EXNSNL - The length of the concatenated node list for all the
-! -- side sets.
-! -- EXQA - The number of QA records is desired.
-! -- EXINFO - The number of information records is desired.
-! -- EXTIMS - The number of time steps is desired.
-! -- EXNEBP - The number of element block properties
-! -- EXNNSP - The number of node set properties
-! -- EXNSSP - The number of side set properties
-! -- EXNSDF - The length of the node set dist factors array
-! -- EXSSDF - The length of the side set dist factors array
-! -- EXNEMP - The number of element map properties
-! -- EXNNMP - The number of node map properties
-! -- EXNEM - The number of element maps
-! -- EXNNM - The number of node maps
-! --
- integer EXTYPE, EXVERS, EXDBVR, EXTITL, EXDIM, EXNODE, &
- & EXELEM, EXELBL, EXNODS, EXSIDS, EXQA, EXINFO, &
- & EXTIMS, EXSSNL, EXSSEL, EXNSNL, EXNEBP, EXNNSP, &
- & EXNSSP, EXNSDF, EXSSDF, EXLBVR, EXNEMP, EXNNMP, &
- & EXNEM, EXNNM
-!
- parameter (EXTYPE = 1)
- parameter (EXVERS = 2)
- parameter (EXDBVR = 3)
- parameter (EXTITL = 4)
- parameter (EXDIM = 5)
- parameter (EXNODE = 6)
- parameter (EXELEM = 7)
- parameter (EXELBL = 8)
- parameter (EXNODS = 9)
- parameter (EXNSNL = 10)
- parameter (EXSIDS = 11)
- parameter (EXSSNL = 12)
- parameter (EXSSEL = 13)
- parameter (EXQA = 14)
- parameter (EXINFO = 15)
- parameter (EXTIMS = 16)
- parameter (EXNEBP = 17)
- parameter (EXNNSP = 18)
- parameter (EXNSSP = 19)
- parameter (EXNSDF = 20)
- parameter (EXSSDF = 21)
- parameter (EXLBVR = 22)
- parameter (EXNEMP = 23)
- parameter (EXNNMP = 24)
- parameter (EXNEM = 25)
- parameter (EXNNM = 26)
-!
-! Define limits
-!
- integer MXSTLN, MXLNLN
-! MXSTLN - Maximum string length: used for store strings
- parameter (MXSTLN = 32)
-! MXLNLN - Maximum line string length
- parameter (MXLNLN = 80)
-!
-! properties
-!
- integer EXEBLK, EXNSET, EXSSET, EXEMAP, EXNMAP
-! EXEBLK - element block property code
- parameter (EXEBLK = 1)
-! EXNSPR - node set property code
- parameter (EXNSET = 2)
-! EXSSPR - side set property code
- parameter (EXSSET = 3)
-! EXEMAP - element map property code
- parameter (EXEMAP = 4)
-! EXNMAP - node map property code
- parameter (EXNMAP = 5)
-!
-! Define options codes
-!
- integer EXVRBS, EXDEBG, EXABRT
-! EXVRBS - verbose mode message flag
- parameter (EXVRBS = 1)
-! EXDEBG - debug mode message flag
- parameter (EXDEBG = 2)
-! EXABRT - abort mode flag
- parameter (EXABRT = 4)
-!
-! Define error return codes
-!
- integer EXFATL, EXOK, EXWARN
-! EXFATL - fatal error flag def
- parameter (EXFATL = -1)
-! EXOK - no err (success) flag def
- parameter (EXOK = 0)
-! EXWARN - warning flag def
- parameter (EXWARN = 1)
-!
-! Define error return codes and flags
-!
- integer EXMEMF, EXBFMD, EXBFID, EXBTID, EXBPRM, EXNULL, &
- & EXPMSG, EXLMSG
-! EXMEMF - memory allocation failure flag def
- parameter (EXMEMF = 1000)
-! EXBFMD - wrong file mode
- parameter (EXBFMD = 1001)
-! EXBFID - bad file id def
- parameter (EXBFID = 1002)
-! EXBTID - id table lookup failed
- parameter (EXBTID = 1004)
-! EXBPRM - bad parameter passed
- parameter (EXBPRM = 1005)
-! EXNULL - null entity found
- parameter (EXNULL = -1006)
-! EXPMSG - message print code - no error implied
- parameter (EXPMSG = -1000)
-! EXLMSG - print last error message msg code
- parameter (EXLMSG = -1001)
diff --git a/forbind/src/CVS/Entries b/forbind/src/CVS/Entries
deleted file mode 100644
index 1c36fef..0000000
--- a/forbind/src/CVS/Entries
+++ /dev/null
@@ -1,57 +0,0 @@
-/Imakefile/1.10/Wed Jul 15 19:17:38 2009//
-/Makefile.standalone/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/addrwrap.F/1.4/Sat Jan 23 01:15:17 2010//
-/aix.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/aix0.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/catamount.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/common.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/common.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/common2.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/cougar.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/cray.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/darwin.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/excopy_jack.src/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/exgem_jack.src/1.2/Wed Apr 12 17:44:34 2006//
-/exgenm_jack.src/1.10/Wed Jul 15 19:17:38 2009//
-/exgmp_jack.src/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/exgnm_jack.src/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/exgnnm_jack.src/1.10/Wed Jul 15 19:17:38 2009//
-/exgvnm_jack.src/1.10/Wed Jul 15 19:17:38 2009//
-/exo_jack.src/1.11/Sat Jan 23 01:15:18 2010//
-/exodus.hh/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/expem_jack.src/1.2/Wed Apr 12 17:44:34 2006//
-/expenm_jack.src/1.10/Wed Jul 15 19:17:38 2009//
-/expmp_jack.src/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/expnm_jack.src/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/expnnm_jack.src/1.10/Wed Jul 15 19:17:38 2009//
-/expvnm_jack.src/1.10/Wed Jul 15 19:17:38 2009//
-/fortc/1.2/Wed Jul 15 19:17:38 2009//
-/fortc1.sed/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/fortc2.sed/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/fortc3.sed/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/fortc3_.sed/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/hp.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/hpux.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/hpux0.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/interix.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/irix.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/irix0.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/linux.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/msoft.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/msoft0.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/osf.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/osf0.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/paragon.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/puma.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/pumagon.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/sgi.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/sun.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/sunos.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/sunos0.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/ultrix.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/ultrix0.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/unicos.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/unicos0.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/vms.m4/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/vms0.inc/1.1.1.1/Tue Sep 6 15:59:03 2005//
-D
diff --git a/forbind/src/CVS/Repository b/forbind/src/CVS/Repository
deleted file mode 100644
index 57b878d..0000000
--- a/forbind/src/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii/forbind/src
diff --git a/forbind/src/CVS/Root b/forbind/src/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/forbind/src/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/forbind/src/Imakefile b/forbind/src/Imakefile
deleted file mode 100644
index 6910420..0000000
--- a/forbind/src/Imakefile
+++ /dev/null
@@ -1,233 +0,0 @@
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-#if defined CrayArchitecture || defined SunArchitecture || defined AIXArchitecture
-#define Libtype sharable
-#define ArNet ar
-#else
-#define Libtype nonsharable
-#define ArNet ar clr
-#endif
-
-#if defined CatamountArchitecture
-#define OSystem catamount
-
-#elif defined CougarArchitecture
-#define OSystem cougar
-
-#elif defined SGIArchitecture
-#define OSystem irix
-
-#elif defined CrayArchitecture
-#define OSystem unicos
-
-#elif defined SunArchitecture
-#define OSystem sunos
-
-#elif defined HPArchitecture
-#define OSystem hpux
-
-#elif defined UltrixArchitecture
-#define OSystem ultrix
-
-#elif defined OSF1Architecture
-#define OSystem osf
-
-#elif defined AIXArchitecture
-#define OSystem aix
-
-#elif defined InterixArchitecture
-#define OSystem interix
-
-#elif defined AlphaArchitecture
-#define OSystem linux
-
-#elif defined i386Architecture
-#define OSystem linux
-
-#elif defined x86_64Architecture
-#define OSystem linux
-
-#elif defined ia64Architecture
-#define OSystem linux
-
-#elif defined DarwinArchitecture
-#define OSystem darwin
-
-#else
-#define OSystem ""
-#error "Could not determine Operating System type in exodusii/forbind/src/Imakefile."
-#endif
-
-#ifndef CArchive
-#define CArchive ""
-#endif
-
-/* Use *.h files in ../../cbind/include/ instead of installed *.h files */
-INCLUDES = IncRef-I../../cbind/include
-F77EXTRAOPTIONS = IncRef-I../include
-
-OS_TYPE = OSystem
-
-DEFINES = -DEX_ERR_STR
-
-F77CPPFLAGS = F77CppFlags
-
-SRCS = exo_jack.c exgenm_jack.c expenm_jack.c exgnnm_jack.c \
- exgvnm_jack.c expvnm_jack.c expnnm_jack.c excopy_jack.c \
- exgem_jack.c exgmp_jack.c exgnm_jack.c expem_jack.c \
- expmp_jack.c expnm_jack.c
-
-SRCSF = addrwrap.f
-
-OBJS = ${SRCS:.c=.o} ${SRCSF:.f=.o}
-
-#if Build64BitAccess == YES
-#define Bits 64
-#else
-#define Bits 32
-#endif
-
-BITS = Bits
-
-#if Build64BitAccess == YES
-
-SRCS32 = exo_jack32.c exgenm_jack32.c expenm_jack32.c exgnnm_jack32.c \
- exgvnm_jack32.c expvnm_jack32.c expnnm_jack32.c excopy_jack32.c \
- exgem_jack32.c exgmp_jack32.c exgnm_jack32.c expem_jack32.c \
- expmp_jack32.c expnm_jack32.c
-
-OBJS32 = ${SRCS32:.c=.o}
-
-exo_jack32.c: exo_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) exo_jack.src > $@
-
-exgenm_jack32.c: exgenm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) exgenm_jack.src > $@
-
-expenm_jack32.c: expenm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) expenm_jack.src > $@
-
-exgnnm_jack32.c: exgnnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) exgnnm_jack.src > $@
-
-expnnm_jack32.c: expnnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) expnnm_jack.src > $@
-
-exgvnm_jack32.c: exgvnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) exgvnm_jack.src > $@
-
-expvnm_jack32.c: expvnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) expvnm_jack.src > $@
-
-excopy_jack32.c: excopy_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) excopy_jack.src > $@
-
-exgem_jack32.c: exgem_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) exgem_jack.src > $@
-
-exgmp_jack32.c: exgmp_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) exgmp_jack.src > $@
-
-exgnm_jack32.c: exgnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) exgnm_jack.src > $@
-
-expem_jack32.c: expem_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) expem_jack.src > $@
-
-expmp_jack32.c: expmp_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) expmp_jack.src > $@
-
-expnm_jack32.c: expnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P 32 -O $(OS_TYPE) expnm_jack.src > $@
-
-all:: libexoIIv2for32.a
-libexoIIv2for32.a: $(OBJS32)
- $(AR) $@ $?
- $(_NULLCMD_)
- $(_NULLCMD_)
- $(CP) libexoIIv2for32.a ../../
-
-#endif
-
-
-exo_jack.c: exo_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exo_jack.src > $@
-
-exgenm_jack.c: exgenm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgenm_jack.src > $@
-
-expenm_jack.c: expenm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expenm_jack.src > $@
-
-exgnnm_jack.c: exgnnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgnnm_jack.src > $@
-
-expnnm_jack.c: expnnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expnnm_jack.src > $@
-
-exgvnm_jack.c: exgvnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgvnm_jack.src > $@
-
-expvnm_jack.c: expvnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expvnm_jack.src > $@
-
-excopy_jack.c: excopy_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) excopy_jack.src > $@
-
-exgem_jack.c: exgem_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgem_jack.src > $@
-
-exgmp_jack.c: exgmp_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgmp_jack.src > $@
-
-exgnm_jack.c: exgnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgnm_jack.src > $@
-
-expem_jack.c: expem_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expem_jack.src > $@
-
-expmp_jack.c: expmp_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expmp_jack.src > $@
-
-expnm_jack.c: expnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expnm_jack.src > $@
-
-LibraryTargetSubdirsCopy(libexoIIv2for.a,$(OBJS),../../)
-
-ExtraStuffToClean(*.c)
-CleanupCapF(addrwrap.f)
-
-DependTarget()
-
diff --git a/forbind/src/Makefile.standalone b/forbind/src/Makefile.standalone
deleted file mode 100644
index 4058a3b..0000000
--- a/forbind/src/Makefile.standalone
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-INCLUDES = -I../../cbind/include
-F77EXTRAOPTIONS = -I../include
-
-SRCS = exo_jack.c exgenm_jack.c expenm_jack.c exgnnm_jack.c \
- exgvnm_jack.c expvnm_jack.c expnnm_jack.c excopy_jack.c exgem_jack.c \
- exgmp_jack.c exgnm_jack.c expem_jack.c expmp_jack.c expnm_jack.c
-
-SRCSF = addrwrap.f
-
-OBJS = ${SRCS:.c=.o} ${SRCSF:.f=.o}
-
-exo_jack.c: exo_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exo_jack.src > $@
-
-exgenm_jack.c: exgenm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgenm_jack.src > $@
-
-expenm_jack.c: expenm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expenm_jack.src > $@
-
-exgnnm_jack.c: exgnnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgnnm_jack.src > $@
-
-expnnm_jack.c: expnnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expnnm_jack.src > $@
-
-exgvnm_jack.c: exgvnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgvnm_jack.src > $@
-
-expvnm_jack.c: expvnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expvnm_jack.src > $@
-
-excopy_jack.c: excopy_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) excopy_jack.src > $@
-
-exgem_jack.c: exgem_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgem_jack.src > $@
-
-exgmp_jack.c: exgmp_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgmp_jack.src > $@
-
-exgnm_jack.c: exgnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) exgnm_jack.src > $@
-
-expem_jack.c: expem_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expem_jack.src > $@
-
-expmp_jack.c: expmp_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expmp_jack.src > $@
-
-expnm_jack.c: expnm_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
- ./fortc -L . -P $(BITS) -O $(OS_TYPE) expnm_jack.src > $@
-
-all:: libexoIIv2for.a
-libexoIIv2for.a: $(OBJS)
- $(AR) $@ $?
- $(RANLIB) $@
- cp libexoIIv2for.a ../../
-
-clean::
- rm -f *.c
-
-clean::
- rm -f *.CKP *.ln *.BAK *.bak *.o *.M *.mod core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"*
-
-.SUFFIXES: .c .F .f
-.c.o:
- $(CC) -c $(CFLAGS) $*.c
-.f.o:
- $(FC) -c $(FFLAGS) $*.f
-.F.o:
- $(FC) -c $(DEFINES) $(FFLAGS) $*.F
-
-# ----------------------------------------------------------------------
-# dependencies generated by makedepend or sfmakedepend
-
diff --git a/forbind/src/addrwrap.F b/forbind/src/addrwrap.F
deleted file mode 100644
index 83ae5be..0000000
--- a/forbind/src/addrwrap.F
+++ /dev/null
@@ -1,3325 +0,0 @@
-C Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-C DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-C retains certain rights in this software.
-C
-C Redistribution and use in source and binary forms, with or without
-C modification, are permitted provided that the following conditions are
-C met:
-C
-C * Redistributions of source code must retain the above copyright
-C notice, this list of conditions and the following disclaimer.
-C
-C * Redistributions in binary form must reproduce the above
-C copyright notice, this list of conditions and the following
-C disclaimer in the documentation and/or other materials provided
-C with the distribution.
-C
-C * Neither the name of Sandia Corporation nor the names of its
-C contributors may be used to endorse or promote products derived
-C from this software without specific prior written permission.
-C
-C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-C "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-C LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-C A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-C OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-C SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-C LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-C THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-C (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-C OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-C
-
- SUBROUTINE ADRDUM
- END
-
-#ifdef Build64
- SUBROUTINE EXCLOS (IDEXO, IERR)
-C
-C CLOSE EXODUS II FILE
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXCLOS4 (IDEXO4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXCN2S (IDEXO, NSESS, NDESS, IXEESS, IXNESS,
- & LTEESS, LTNESS, LTSESS, IERR)
-C
-C CONVERT SIDE SET NODES TO SIDES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NSESS (*) ! (R)
- INTEGER NDESS (*) ! (R)
- INTEGER IXEESS (*) ! (R)
- INTEGER IXNESS (*) ! (R)
- INTEGER LTEESS (*) ! (R)
- INTEGER LTNESS (*) ! (R)
- INTEGER LTSESS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NSESS4 (1) ! (R)
- INTEGER*4 NDESS4 (1) ! (R)
- INTEGER*4 IXEESS4 (1) ! (R)
- INTEGER*4 IXNESS4 (1) ! (R)
- INTEGER*4 LTEESS4 (1) ! (R)
- INTEGER*4 LTNESS4 (1) ! (R)
- INTEGER*4 LTSESS4 (1) ! (W)
- POINTER (PNSESS4, NSESS4)
- POINTER (PNDESS4, NDESS4)
- POINTER (PIXEESS4, IXEESS4)
- POINTER (PIXNESS4, IXNESS4)
- POINTER (PLTEESS4, LTEESS4)
- POINTER (PLTNESS4, LTNESS4)
- POINTER (PLTSESS4, LTSESS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXSIDS
- INTEGER*4 NEXELEM
- INTEGER*4 NEXNODE
- INTEGER*4 NEXNSNL
- INTEGER*4 NEXSSEL
- INTEGER*4 I
-
- IDEXO4 = IDEXO
- INFREQ4 = EXSIDS
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXSIDS = INTRET4
- INFREQ4 = EXELEM
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXELEM = INTRET4
- INFREQ4 = EXNODE
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXNODE = INTRET4
- NEXNSNL = 0
- NEXSSEL = 0
- DO I = 1, NEXSIDS
- NEXNSNL = NEXNSNL + NDESS(I)
- NEXSSEL = NEXSSEL + NSESS(I)
- END DO
- CALL I8I4 (NEXSIDS, NSESS, PNSESS4)
- CALL I8I4 (NEXSIDS, NDESS, PNDESS4)
- CALL I8I4 (NEXSIDS, IXEESS, PIXEESS4)
- CALL I8I4 (NEXSIDS, IXNESS, PIXNESS4)
- CALL I8I4 (NEXSSEL, LTEESS, PLTEESS4)
- CALL I8I4 (NEXNSNL, LTNESS, PLTNESS4)
- CALL I4ALLOC (NEXSSEL, PLTSESS4)
- CALL EXCN2S4 (IDEXO4, NSESS4, NDESS4, IXEESS4, IXNESS4,
- & LTEESS4, LTNESS4, LTSESS4, IERR4)
- CALL I4I8 (NEXSSEL, PLTSESS4, LTSESS)
- CALL I4FREE (PNSESS4)
- CALL I4FREE (PNDESS4)
- CALL I4FREE (PIXEESS4)
- CALL I4FREE (PIXNESS4)
- CALL I4FREE (PLTEESS4)
- CALL I4FREE (PLTNESS4)
- IERR = IERR4
- END
-
- INTEGER FUNCTION EXCRE (PATH, ICMODE, ICOMPWS, IOWS, IERR)
-C
-C CREATE EXODUS II FILE
-C
- IMPLICIT NONE
- CHARACTER* (*) PATH ! (R)
- INTEGER ICMODE ! (R)
- INTEGER ICOMPWS ! (RW)
- INTEGER IOWS ! (RW)
- INTEGER IERR ! (W)
-
- INTEGER*4 EXCRE4
- EXTERNAL EXCRE4
- INTEGER*4 IRET4
- INTEGER IRET
- INTEGER*4 ICMODE4 ! (R)
- INTEGER*4 ICOMPWS4 ! (RW)
- INTEGER*4 IOWS4 ! (RW)
- INTEGER*4 IERR4 ! (W)
-
- ICMODE4 = ICMODE
-
-C ... This needs to be set explicitly since all wrapper routines
-C are passing REAL*8 and the exo_jack.c routines all take double*
- ICOMPWS4 = 8
- IOWS4 = IOWS
- IRET4 = EXCRE4 (PATH, ICMODE4, ICOMPWS4, IOWS4, IERR4)
- ICOMPWS = ICOMPWS4
- IOWS = IOWS4
- IERR = IERR4
- IRET = IRET4
- EXCRE = IRET
- END
-
- SUBROUTINE EXERR (MODNAM, MSG, ERRNUM)
-C
-C ERROR REPORTING
-C
- CHARACTER* (*) MODNAM ! (R)
- CHARACTER* (*) MSG ! (R)
- INTEGER ERRNUM ! (R)
-
- INTEGER*4 ERRNUM4 ! (R)
-
- ERRNUM4 = ERRNUM
- CALL EXERR4 (MODNAM, MSG, ERRNUM4)
- END
-
- SUBROUTINE EXGATM (IDEXO, TIME, IERR)
-C
-C READ ALL TIME VALUES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- REAL TIME (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXGATM4 (IDEXO4, TIME, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGCNS (IDEXO, IDNPSS, NNNPS, NDNPS, IXNNPS,
- & IXDNPS, LTNNPS, FACNPS, IERR)
-C
-C READ CONCATENATED NODE SETS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDNPSS (*) ! (W)
- INTEGER NNNPS (*) ! (W)
- INTEGER NDNPS (*) ! (W)
- INTEGER IXNNPS (*) ! (W)
- INTEGER IXDNPS (*) ! (W)
- INTEGER LTNNPS (*) ! (W)
- REAL FACNPS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDNPSS4 (1) ! (W)
- INTEGER*4 NNNPS4 (1) ! (W)
- INTEGER*4 NDNPS4 (1) ! (W)
- INTEGER*4 IXNNPS4 (1) ! (W)
- INTEGER*4 IXDNPS4 (1) ! (W)
- INTEGER*4 LTNNPS4 (1) ! (W)
- POINTER (PIDNPSS4, IDNPSS4)
- POINTER (PNNNPS4, NNNPS4)
- POINTER (PNDNPS4, NDNPS4)
- POINTER (PIXNNPS4, IXNNPS4)
- POINTER (PIXDNPS4, IXDNPS4)
- POINTER (PLTNNPS4, LTNNPS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXNODS
- INTEGER*4 NEXNSNL
- INTEGER*4 NEXNSDF
-
- IDEXO4 = IDEXO
- INFREQ4 = EXNODS
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXNODS = INTRET4
- INFREQ4 = EXNSNL
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXNSNL = INTRET4
- CALL I4ALLOC (NEXNODS, PIDNPSS4)
- CALL I4ALLOC (NEXNODS, PNNNPS4)
- CALL I4ALLOC (NEXNODS, PNDNPS4)
- CALL I4ALLOC (NEXNODS, PIXNNPS4)
- CALL I4ALLOC (NEXNODS, PIXDNPS4)
- CALL I4ALLOC (NEXNSNL, PLTNNPS4)
- CALL EXGCNS4 (IDEXO4, IDNPSS4, NNNPS4, NDNPS4, IXNNPS4,
- & IXDNPS4, LTNNPS4, FACNPS, IERR4)
- CALL I4I8 (NEXNODS, PIDNPSS4, IDNPSS)
- CALL I4I8 (NEXNODS, PNNNPS4, NNNPS)
- CALL I4I8 (NEXNODS, PNDNPS4, NDNPS)
- CALL I4I8 (NEXNODS, PIXNNPS4, IXNNPS)
- CALL I4I8 (NEXNODS, PIXDNPS4, IXDNPS)
- CALL I4I8 (NEXNSNL, PLTNNPS4, LTNNPS)
- IERR = IERR4
- END
-
- SUBROUTINE EXGCON (IDEXO, NAMECO, IERR)
-C
-C READ COORDINATE NAMES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER* (*) NAMECO (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXGCON4 (IDEXO4, NAMECO, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGCOR (IDEXO, XN, YN, ZN, IERR)
-C
-C READ NODAL COORDINATES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- REAL XN (*) ! (W)
- REAL YN (*) ! (W)
- REAL ZN (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXGCOR4 (IDEXO4, XN, YN, ZN, IERR4)
-
- IERR = IERR4
- END
-
- SUBROUTINE EXGCSS (IDEXO, IDESSS, NSESS, NDESS, IXEESS,
- & IXDESS, LTEESS, LTSESS, FACESS, IERR)
-C
-C READ CONCATENATED SIDE SETS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESSS (*) ! (W)
- INTEGER NSESS (*) ! (W)
- INTEGER NDESS (*) ! (W)
- INTEGER IXEESS (*) ! (W)
- INTEGER IXDESS (*) ! (W)
- INTEGER LTEESS (*) ! (W)
- INTEGER LTSESS (*) ! (W)
- REAL FACESS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESSS4 (1) ! (W)
- INTEGER*4 NSESS4 (1) ! (W)
- INTEGER*4 NDESS4 (1) ! (W)
- INTEGER*4 IXEESS4 (1) ! (W)
- INTEGER*4 IXDESS4 (1) ! (W)
- INTEGER*4 LTEESS4 (1) ! (W)
- INTEGER*4 LTSESS4 (1) ! (W)
- POINTER (PIDESSS4, IDESSS4)
- POINTER (PNSESS4, NSESS4)
- POINTER (PNDESS4, NDESS4)
- POINTER (PIXEESS4, IXEESS4)
- POINTER (PIXDESS4, IXDESS4)
- POINTER (PLTEESS4, LTEESS4)
- POINTER (PLTSESS4, LTSESS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXSIDS
- INTEGER*4 NEXSSEL
- INTEGER*4 NEXSSDF
-
- IDEXO4 = IDEXO
- INFREQ4 = EXSIDS
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXSIDS = INTRET4
- INFREQ4 = EXSSEL
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXSSEL = INTRET4
- INFREQ4 = EXSSDF
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXSSDF = INTRET4
- CALL I4ALLOC (NEXSIDS, PIDESSS4)
- CALL I4ALLOC (NEXSIDS, PNSESS4)
- CALL I4ALLOC (NEXSIDS, PNDESS4)
- CALL I4ALLOC (NEXSIDS, PIXEESS4)
- CALL I4ALLOC (NEXSIDS, PIXDESS4)
- CALL I4ALLOC (NEXSSEL, PLTEESS4)
- CALL I4ALLOC (NEXSSEL, PLTSESS4)
- CALL EXGCSS4 (IDEXO4, IDESSS4, NSESS4, NDESS4, IXEESS4,
- & IXDESS4, LTEESS4, LTSESS4, FACESS, IERR4)
- CALL I4I8 (NEXSIDS, PIDESSS4, IDESSS)
- CALL I4I8 (NEXSIDS, PNSESS4, NSESS)
- CALL I4I8 (NEXSIDS, PNDESS4, NDESS)
- CALL I4I8 (NEXSIDS, PIXEESS4, IXEESS)
- CALL I4I8 (NEXSIDS, PIXDESS4, IXDESS)
- CALL I4I8 (NEXSSEL, PLTEESS4, LTEESS)
- CALL I4I8 (NEXSSEL, PLTSESS4, LTSESS)
-
- IERR = IERR4
- END
-
- SUBROUTINE EXGCSSF (IDEXO, IDESSS, NSESS, NDESS, IXEESS,
- & IXDESS, LTEESS, LTSESS, IERR)
-C
-C READ CONCATENATED SIDE SETS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESSS (*) ! (W)
- INTEGER NSESS (*) ! (W)
- INTEGER NDESS (*) ! (W)
- INTEGER IXEESS (*) ! (W)
- INTEGER IXDESS (*) ! (W)
- INTEGER LTEESS (*) ! (W)
- INTEGER LTSESS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESSS4 (1) ! (W)
- INTEGER*4 NSESS4 (1) ! (W)
- INTEGER*4 NDESS4 (1) ! (W)
- INTEGER*4 IXEESS4 (1) ! (W)
- INTEGER*4 IXDESS4 (1) ! (W)
- INTEGER*4 LTEESS4 (1) ! (W)
- INTEGER*4 LTSESS4 (1) ! (W)
- POINTER (PIDESSS4, IDESSS4)
- POINTER (PNSESS4, NSESS4)
- POINTER (PNDESS4, NDESS4)
- POINTER (PIXEESS4, IXEESS4)
- POINTER (PIXDESS4, IXDESS4)
- POINTER (PLTEESS4, LTEESS4)
- POINTER (PLTSESS4, LTSESS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXSIDS
- INTEGER*4 NEXSSEL
- INTEGER*4 NEXSSDF
-
- IDEXO4 = IDEXO
- INFREQ4 = EXSIDS
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXSIDS = INTRET4
- INFREQ4 = EXSSEL
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXSSEL = INTRET4
- INFREQ4 = EXSSDF
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXSSDF = INTRET4
- CALL I4ALLOC (NEXSIDS, PIDESSS4)
- CALL I4ALLOC (NEXSIDS, PNSESS4)
- CALL I4ALLOC (NEXSIDS, PNDESS4)
- CALL I4ALLOC (NEXSIDS, PIXEESS4)
- CALL I4ALLOC (NEXSIDS, PIXDESS4)
- CALL I4ALLOC (NEXSSEL, PLTEESS4)
- CALL I4ALLOC (NEXSSEL, PLTSESS4)
- CALL EXGCSSF4 (IDEXO4, IDESSS4, NSESS4, NDESS4, IXEESS4,
- & IXDESS4, LTEESS4, LTSESS4, IERR4)
- CALL I4I8 (NEXSIDS, PIDESSS4, IDESSS)
- CALL I4I8 (NEXSIDS, PNSESS4, NSESS)
- CALL I4I8 (NEXSIDS, PNDESS4, NDESS)
- CALL I4I8 (NEXSIDS, PIXEESS4, IXEESS)
- CALL I4I8 (NEXSIDS, PIXDESS4, IXDESS)
- CALL I4I8 (NEXSSEL, PLTEESS4, LTEESS)
- CALL I4I8 (NEXSSEL, PLTSESS4, LTSESS)
-
- IERR = IERR4
- END
-
- SUBROUTINE EXGEAT (IDEXO, IDELB, ATRIB, IERR)
-C
-C READ ELEMENT BLOCK ATTRIBUTES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB ! (R)
- REAL ATRIB (*) ! (NUMATR,NUMELB) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDELB4 = IDELB
- CALL EXGEAT4 (IDEXO4, IDELB4, ATRIB, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGEAN (IDEXO, IDELB, NATTR, NAMES, IERR)
-C
-C READ ELEMENT BLOCK ATTRIBUTES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB ! (R)
- INTEGER NATTR ! (R)
- CHARACTER* (*) NAMES (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 NATTR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDELB4 = IDELB
- NATTR4 = NATTR
- CALL EXGEAN4 (IDEXO4, IDELB4, NATTR4, NAMES, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGEBI (IDEXO, IDELBS, IERR)
-C
-C READ ELEMENT BLOCK IDS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELBS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELBS4 (1) ! (W)
- POINTER (PIDELBS4, IDELBS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXELBL
-
- IDEXO4 = IDEXO
- INFREQ4 = EXELBL
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXELBL = INTRET4
- CALL I4ALLOC (NEXELBL, PIDELBS4)
- CALL EXGEBI4 (IDEXO4, IDELBS4, IERR4)
- CALL I4I8 (NEXELBL, PIDELBS4, IDELBS)
- IERR = IERR4
- END
-
- SUBROUTINE EXGELB (IDEXO, IDELB, NAMELB, NUMELB, NUMLNK,
- & NUMATR, IERR)
-C
-C READ ELEMENT BLOCK PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB ! (R)
- CHARACTER* (*) NAMELB ! (W)
- INTEGER NUMELB ! (W)
- INTEGER NUMLNK ! (W)
- INTEGER NUMATR ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 NUMELB4 ! (W)
- INTEGER*4 NUMLNK4 ! (W)
- INTEGER*4 NUMATR4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDELB4 = IDELB
- CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
- & NUMATR4, IERR4)
- NUMELB = NUMELB4
- NUMLNK = NUMLNK4
- NUMATR = NUMATR4
- IERR = IERR4
- END
-
- SUBROUTINE EXGELC (IDEXO, IDELB, LINK, IERR)
-C
-C READ ELEMENT BLOCK CONNECTIVITY
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB ! (R)
- INTEGER LINK (*) ! (NUMLNK,NUMELB) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 LINK4 (1) ! (NUMLNK,NUMELB) ! (W)
- POINTER (PLINK4, LINK4)
- INTEGER*4 IERR4 ! (W)
-
- CHARACTER* (MXSTLN) NAMELB
- INTEGER*4 NUMELB4
- INTEGER*4 NUMLNK4
- INTEGER*4 NUMATR4
-
- IDEXO4 = IDEXO
- IDELB4 = IDELB
- CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
- & NUMATR4, IERR4)
- IF (NAMELB .EQ. 'NSIDED' .OR. NAMELB .EQ. 'nsided') THEN
- 1 CALL I4ALLOC (NUMLNK4, PLINK4)
- CALL EXGELC4 (IDEXO4, IDELB4, LINK4, IERR4)
- CALL I4I8 (NUMLNK4, PLINK4, LINK)
- ELSE
- CALL I4ALLOC (NUMLNK4*NUMELB4, PLINK4)
- CALL EXGELC4 (IDEXO4, IDELB4, LINK4, IERR4)
- CALL I4I8 (NUMLNK4*NUMELB4, PLINK4, LINK)
- ENDIF
- IERR = IERR4
- END
-
- SUBROUTINE EXGECPP (IDEXO, ITYPE, IDELB, COUNTS, IERR)
-C
-C READ ENTITY_COUNT-PER-POLYHEDRA
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB ! (R)
- INTEGER ITYPE ! (R)
- INTEGER COUNTS (*) ! (NUMELB) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 COUNTS4 (1) ! (NUMELB) ! (W)
- POINTER (PCOUNTS4, COUNTS4)
- INTEGER*4 IERR4 ! (W)
-
- CHARACTER* (MXSTLN) NAMELB
- INTEGER*4 NUMELB4
- INTEGER*4 NUMLNK4
- INTEGER*4 NUMATR4
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- IDELB4 = IDELB
- CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
- & NUMATR4, IERR4)
- CALL I4ALLOC (NUMELB4, PCOUNTS4)
- CALL EXGECPP4 (IDEXO4, ITYPE4, IDELB4, COUNTS4, IERR4)
- CALL I4I8 (NUMELB4, PCOUNTS4, COUNTS)
- IERR = IERR4
- END
-
- SUBROUTINE EXGENM (IDEXO, MAPEL, IERR)
-C
-C READ ELEMENT NUMBER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPEL (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPEL4 (1) ! (W)
- POINTER (PMAPEL4, MAPEL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXELEM
-
- IDEXO4 = IDEXO
- INFREQ4 = EXELEM
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXELEM = INTRET4
- CALL I4ALLOC (NEXELEM, PMAPEL4)
- CALL EXGENM4 (IDEXO4, MAPEL4, IERR4)
- CALL I4I8 (NEXELEM, PMAPEL4, MAPEL)
- IERR = IERR4
- END
-
- SUBROUTINE EXGEM (IDEXO, MAPID, MAPEL, IERR)
-C
-C READ ELEMENT ORDER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPID ! (R)
- INTEGER MAPEL (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPID4 ! (R)
- INTEGER*4 MAPEL4 (1) ! (W)
- POINTER (PMAPEL4, MAPEL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXELEM
-
- IDEXO4 = IDEXO
- MAPID4 = MAPID
- INFREQ4 = EXELEM
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXELEM = INTRET4
- CALL I4ALLOC (NEXELEM, PMAPEL4)
- CALL EXGEM4 (IDEXO4, MAPID4, MAPEL4, IERR4)
- CALL I4I8 (NEXELEM, PMAPEL4, MAPEL)
- IERR = IERR4
- END
-
- SUBROUTINE EXGPEM (IDEXO, MAPID, ISTART, ICOUNT, MAPEL, IERR)
-C
-C READ ELEMENT ORDER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPID ! (R)
- INTEGER ISTART ! (R)
- INTEGER ICOUNT ! (R)
- INTEGER MAPEL (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPID4 ! (R)
- INTEGER*4 ISTART4 ! (R)
- INTEGER*4 ICOUNT4 ! (R)
- INTEGER*4 MAPEL4 (1) ! (W)
- POINTER (PMAPEL4, MAPEL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- IDEXO4 = IDEXO
- MAPID4 = MAPID
- ISTART4 = ISTART
- ICOUNT4 = ICOUNT
- INFREQ4 = EXELEM
- CALL I4ALLOC (ICOUNT4, PMAPEL4)
- CALL EXGPEM4 (IDEXO4, MAPID4, ISTART4, ICOUNT4, MAPEL4, IERR4)
- CALL I4I8 (ICOUNT4, PMAPEL4, MAPEL)
- IERR = IERR4
- END
-
- SUBROUTINE EXGEV (IDEXO, ISTEP, IXELEV, IDELB, NUMELB,
- & VALEV, IERR)
-C
-C READ ELEMENT VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER IXELEV ! (R)
- INTEGER IDELB ! (R)
- INTEGER NUMELB ! (R)
- REAL VALEV (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 IXELEV4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 NUMELB4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- IXELEV4 = IXELEV
- IDELB4 = IDELB
- NUMELB4 = NUMELB
- CALL EXGEV4 (IDEXO4, ISTEP4, IXELEV4, IDELB4, NUMELB4,
- & VALEV, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGEVT (IDEXO, IXELEV, IELNUM, ISTPB, ISTPE,
- & VALEV, IERR)
-C
-C READ ELEMENT VARIABLE VALUES THROUGH TIME
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IXELEV ! (R)
- INTEGER IELNUM ! (R)
- INTEGER ISTPB ! (R)
- INTEGER ISTPE ! (R)
- REAL VALEV (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IXELEV4 ! (R)
- INTEGER*4 IELNUM4 ! (R)
- INTEGER*4 ISTPB4 ! (R)
- INTEGER*4 ISTPE4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IXELEV4 = IXELEV
- IELNUM4 = IELNUM
- ISTPB4 = ISTPB
- ISTPE4 = ISTPE
-
- CALL EXGEVT4 (IDEXO4, IXELEV4, IELNUM4, ISTPB4, ISTPE4,
- & VALEV, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNSV (IDEXO, ISTEP, IXV, ID, NUM, VAL, IERR)
-C
-C READ NODESET VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER IXV ! (R)
- INTEGER ID ! (R)
- INTEGER NUM ! (R)
- REAL VAL (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 IXV4 ! (R)
- INTEGER*4 ID4 ! (R)
- INTEGER*4 NUM4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- IXV4 = IXV
- ID4 = ID
- NUM4 = NUM
- CALL EXGNSV4 (IDEXO4, ISTEP4, IXV4, ID4, NUM4, VAL, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGSSV (IDEXO, ISTEP, IXV, ID, NUM, VAL, IERR)
-C
-C READ SIDESET VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER IXV ! (R)
- INTEGER ID ! (R)
- INTEGER NUM ! (R)
- REAL VAL (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 IXV4 ! (R)
- INTEGER*4 ID4 ! (R)
- INTEGER*4 NUM4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- IXV4 = IXV
- ID4 = ID
- NUM4 = NUM
- CALL EXGSSV4 (IDEXO4, ISTEP4, IXV4, ID4, NUM4, VAL, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGGV (IDEXO, ISTEP, NVARGL, VALGV, IERR)
-C
-C READ GLOBAL VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER NVARGL ! (R)
- REAL VALGV (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 NVARGL4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- NVARGL4 = NVARGL
- CALL EXGGV4 (IDEXO4, ISTEP4, NVARGL4, VALGV, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGGVT (IDEXO, IXGLOV, ISTPB, ISTPE, VALGV, IERR)
-C
-C READ GLOBAL VARIABLE VALUES THROUGH TIME
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IXGLOV ! (R)
- INTEGER ISTPB ! (R)
- INTEGER ISTPE ! (R)
- REAL VALGV (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IXGLOV4 ! (R)
- INTEGER*4 ISTPB4 ! (R)
- INTEGER*4 ISTPE4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IXGLOV4 = IXGLOV
- ISTPB4 = ISTPB
- ISTPE4 = ISTPE
- CALL EXGGVT4 (IDEXO4, IXGLOV4, ISTPB4, ISTPE4, VALGV, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGINF (IDEXO, INFO, IERR)
-C
-C READ INFORMATION RECORDS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER* (*) INFO (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXGINF4 (IDEXO4, INFO, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGINI (IDEXO, TITLE, NDIM, NUMNP, NUMEL, NELBLK,
- & NUMNPS, NUMESS, IERR)
-C
-C READ INITIALIZATION PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER* (*) TITLE ! (W)
- INTEGER NDIM ! (W)
- INTEGER NUMNP ! (W)
- INTEGER NUMEL ! (W)
- INTEGER NELBLK ! (W)
- INTEGER NUMNPS ! (W)
- INTEGER NUMESS ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NDIM4 ! (W)
- INTEGER*4 NUMNP4 ! (W)
- INTEGER*4 NUMEL4 ! (W)
- INTEGER*4 NELBLK4 ! (W)
- INTEGER*4 NUMNPS4 ! (W)
- INTEGER*4 NUMESS4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXGINI4 (IDEXO4, TITLE, NDIM4, NUMNP4, NUMEL4, NELBLK4,
- & NUMNPS4, NUMESS4, IERR4)
- NDIM = NDIM4
- NUMNP = NUMNP4
- NUMEL = NUMEL4
- NELBLK = NELBLK4
- NUMNPS = NUMNPS4
- NUMESS = NUMESS4
- IERR = IERR4
- END
-
- SUBROUTINE EXGMP (IDEXO, NNMAP, NEMAP, IERR)
-C
-C GET MAP PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NNMAP ! (W)
- INTEGER NEMAP ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NNMAP4 ! (W)
- INTEGER*4 NEMAP4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXGMP4 (IDEXO4, NNMAP4, NEMAP4, IERR4)
- NNMAP = NNMAP4
- NEMAP = NEMAP4
- IERR = IERR4
- END
-
- SUBROUTINE EXPMP (IDEXO, NNMAP, NEMAP, IERR)
-C
-C PUT MAP PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NNMAP ! (W)
- INTEGER NEMAP ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NNMAP4 ! (W)
- INTEGER*4 NEMAP4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NNMAP4 = NNMAP
- NEMAP4 = NEMAP
- CALL EXPMP4 (IDEXO4, NNMAP4, NEMAP4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGMAP (IDEXO, MAPEL, IERR)
-C
-C READ ELEMENT ORDER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPEL (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPEL4 (1) ! (W)
- POINTER (PMAPEL4, MAPEL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXELEM
-
- IDEXO4 = IDEXO
- INFREQ4 = EXELEM
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXELEM = INTRET4
- CALL I4ALLOC (NEXELEM, PMAPEL4)
- CALL EXGMAP4 (IDEXO4, MAPEL4, IERR4)
- CALL I4I8 (NEXELEM, PMAPEL4, MAPEL)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNNM (IDEXO, MAPNOD, IERR)
-C
-C READ NODE NUMBER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPNOD (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPNOD4 (1) ! (W)
- POINTER (PMAPNOD4, MAPNOD4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXNODE
-
- IDEXO4 = IDEXO
- INFREQ4 = EXNODE
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXNODE = INTRET4
- CALL I4ALLOC (NEXNODE, PMAPNOD4)
- CALL EXGNNM4 (IDEXO4, MAPNOD4, IERR4)
- CALL I4I8 (NEXNODE, PMAPNOD4, MAPNOD)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNM (IDEXO, MAPID, MAPNOD, IERR)
-C
-C READ NODE ORDER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPID ! (R)
- INTEGER MAPNOD (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPID4 ! (R)
- INTEGER*4 MAPNOD4 (1) ! (W)
- POINTER (PMAPNOD4, MAPNOD4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXNODE
-
- IDEXO4 = IDEXO
- MAPID4 = MAPID
- INFREQ4 = EXNODE
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXNODE = INTRET4
- CALL I4ALLOC (NEXNODE, PMAPNOD4)
- CALL EXGNM4 (IDEXO4, MAPID4, MAPNOD4, IERR4)
- CALL I4I8 (NEXNODE, PMAPNOD4, MAPNOD)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNP (IDEXO, IDNPS, NNNPS, NDNPS, IERR)
-C
-C READ NODE SET PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDNPS ! (R)
- INTEGER NNNPS ! (W)
- INTEGER NDNPS ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDNPS4 ! (R)
- INTEGER*4 NNNPS4 ! (W)
- INTEGER*4 NDNPS4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDNPS4 = IDNPS
- CALL EXGNP4 (IDEXO4, IDNPS4, NNNPS4, NDNPS4, IERR4)
- NNNPS = NNNPS4
- NDNPS = NDNPS4
- IERR = IERR4
- END
-
- SUBROUTINE EXGNS (IDEXO, IDNPS, LTNNPS, IERR)
-C
-C READ NODE SET
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDNPS ! (R)
- INTEGER LTNNPS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDNPS4 ! (R)
- INTEGER*4 LTNNPS4 (1) ! (W)
- POINTER (PLTNNPS4, LTNNPS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 NNNPS4
- INTEGER*4 NDNPS4
-
- IDEXO4 = IDEXO
- IDNPS4 = IDNPS
- CALL EXGNP4 (IDEXO4, IDNPS4, NNNPS4, NDNPS4, IERR4)
- CALL I4ALLOC (NNNPS4, PLTNNPS4)
- CALL EXGNS4 (IDEXO4, IDNPS4, LTNNPS4, IERR4)
- CALL I4I8 (NNNPS4, PLTNNPS4, LTNNPS)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNSD (IDEXO, IDNPS, FACNPS, IERR)
-C
-C READ NODE SET DISTRIBUTION FACTORS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDNPS ! (R)
- REAL FACNPS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDNPS4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDNPS4 = IDNPS
-
- CALL EXGNSD4 (IDEXO4, IDNPS4, FACNPS, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNSI (IDEXO, IDNPSS, IERR)
-C
-C READ NODE SET IDS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDNPSS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDNPSS4 (1) ! (W)
- POINTER (PIDNPSS4, IDNPSS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXNODS
-
- IDEXO4 = IDEXO
- INFREQ4 = EXNODS
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXNODS = INTRET4
- CALL I4ALLOC (NEXNODS, PIDNPSS4)
- CALL EXGNSI4 (IDEXO4, IDNPSS4, IERR4)
- CALL I4I8 (NEXNODS, PIDNPSS4, IDNPSS)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNV (IDEXO, ISTEP, IXNODV, NUMNP, VALNV, IERR)
-C
-C READ NODAL VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER IXNODV ! (R)
- INTEGER NUMNP ! (R)
- REAL VALNV (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 IXNODV4 ! (R)
- INTEGER*4 NUMNP4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- IXNODV4 = IXNODV
- NUMNP4 = NUMNP
- CALL EXGNV4 (IDEXO4, ISTEP4, IXNODV4, NUMNP4, VALNV, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNVT (IDEXO, IXNODV, NODNUM, ISTPB, ISTPE,
- & VALNV, IERR)
-C
-C READ NODAL VARIABLE VALUES THROUGH TIME
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IXNODV ! (R)
- INTEGER NODNUM ! (R)
- INTEGER ISTPB ! (R)
- INTEGER ISTPE ! (R)
- REAL VALNV (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IXNODV4 ! (R)
- INTEGER*4 NODNUM4 ! (R)
- INTEGER*4 ISTPB4 ! (R)
- INTEGER*4 ISTPE4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IXNODV4 = IXNODV
- NODNUM4 = NODNUM
- ISTPB4 = ISTPB
- ISTPE4 = ISTPE
- CALL EXGNVT4 (IDEXO4, IXNODV4, NODNUM4, ISTPB4, ISTPE4,
- & VALNV, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGP (IDEXO, ITYPE, ID, NAMEPR, IVAL, IERR)
-C
-C READ OBJECT PROPERTY
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ITYPE ! (R)
- INTEGER ID ! (R)
- CHARACTER* (*) NAMEPR ! (R)
- INTEGER IVAL ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 ID4 ! (R)
- INTEGER*4 IVAL4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- ID4 = ID
- CALL EXGP4 (IDEXO4, ITYPE4, ID4, NAMEPR, IVAL4, IERR4)
- IVAL = IVAL4
- IERR = IERR4
- END
-
- SUBROUTINE EXGPA (IDEXO, ITYPE, NAMEPR, IVAL, IERR)
-C
-C READ OBJECT PROPERTY ARRAY
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ITYPE ! (R)
- CHARACTER* (*) NAMEPR ! (R)
- INTEGER IVAL (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 IVAL4 (1) ! (W)
- POINTER (PIVAL4, IVAL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NUMOBJ
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- IF (ITYPE4 .EQ. EXEBLK) THEN
- INFREQ4 = EXELBL
- ELSE IF (ITYPE4 .EQ. EXNSET) THEN
- INFREQ4 = EXNODS
- ELSE IF (ITYPE4 .EQ. EXSSET) THEN
- INFREQ4 = EXSIDS
- ELSE IF (ITYPE4 .EQ. EXEMAP) THEN
- INFREQ4 = EXNEM
- ELSE IF (ITYPE4 .EQ. EXNMAP) THEN
- INFREQ4 = EXNNM
- END IF
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NUMOBJ = INTRET4
- CALL I4ALLOC (NUMOBJ, PIVAL4)
- CALL EXGPA4 (IDEXO4, ITYPE4, NAMEPR, IVAL4, IERR4)
- CALL I4I8 (NUMOBJ, PIVAL4, IVAL)
- IERR = IERR4
- END
-
- SUBROUTINE EXGPN (IDEXO, ITYPE, NAMEPR, IERR)
-C
-C READ PROPERTY ARRAY NAMES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ITYPE ! (R)
- CHARACTER* (*) NAMEPR (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- CALL EXGPN4 (IDEXO4, ITYPE4, NAMEPR, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGQA (IDEXO, QAREC, IERR)
-C
-C READ QA RECORDS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER* (*) QAREC (4,*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXGQA4 (IDEXO4, QAREC, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGSP (IDEXO, IDESS, NSESS, NDESS, IERR)
-C
-C READ SIDE SET PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- INTEGER NSESS ! (W)
- INTEGER NDESS ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 NSESS4 ! (W)
- INTEGER*4 NDESS4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDESS4 = IDESS
- CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
- NSESS = NSESS4
- NDESS = NDESS4
- IERR = IERR4
- END
-
- SUBROUTINE EXGSNL (IDEXO, IDESS, NNESS, IERR)
-C
-C GET SIDE SET NODELIST LENGTH
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- INTEGER NNESS ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 NNESS4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDESS4 = IDESS
- CALL EXGSNL4 (IDEXO4, IDESS4, NNESS4, IERR4)
- NNESS = NNESS4
- IERR = IERR4
- END
-
- SUBROUTINE EXGSS (IDEXO, IDESS, LTEESS, LTSESS, IERR)
-C
-C READ SIDE SET
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- INTEGER LTEESS (*) ! (W)
- INTEGER LTSESS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 LTEESS4 (1) ! (W)
- INTEGER*4 LTSESS4 (1) ! (W)
- POINTER (PLTEESS4, LTEESS4)
- POINTER (PLTSESS4, LTSESS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 NSESS4
- INTEGER*4 NDESS4
-
- IDEXO4 = IDEXO
- IDESS4 = IDESS
- CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
- CALL I4ALLOC (NSESS4, PLTEESS4)
- CALL I4ALLOC (NSESS4, PLTSESS4)
- CALL EXGSS4 (IDEXO4, IDESS4, LTEESS4, LTSESS4, IERR4)
- CALL I4I8 (NSESS4, PLTEESS4, LTEESS)
- CALL I4I8 (NSESS4, PLTSESS4, LTSESS)
- IERR = IERR4
- END
-
- SUBROUTINE EXGSSD (IDEXO, IDESS, FACESS, IERR)
-C
-C READ SIDE SET DISTRIBUTION FACTORS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- REAL FACESS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
-
- IDEXO4 = IDEXO
- IDESS4 = IDESS
- CALL EXGSSD4 (IDEXO4, IDESS4, FACESS, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGSSI (IDEXO, IDESSS, IERR)
-C
-C READ SIDE SET IDS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESSS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESSS4 (1) ! (W)
- POINTER (PIDESSS4, IDESSS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
- INTEGER*4 NEXSIDS
-
- IDEXO4 = IDEXO
- INFREQ4 = EXSIDS
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXSIDS = INTRET4
- CALL I4ALLOC (NEXSIDS, PIDESSS4)
- CALL EXGSSI4 (IDEXO4, IDESSS4, IERR4)
- CALL I4I8 (NEXSIDS, PIDESSS4, IDESSS)
- IERR = IERR4
- END
-
- SUBROUTINE EXGSSN (IDEXO, IDESS, INCNT, LTNESS, IERR)
-C
-C READ SIDE SET NODE LIST
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- INTEGER INCNT (*) ! (W)
- INTEGER LTNESS (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 INCNT4 (1) ! (W)
- INTEGER*4 LTNESS4 (1) ! (W)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 TMP4(1)
- POINTER (PTMP4, TMP4)
- POINTER (PINCNT4, INCNT4)
- POINTER (PLTNESS4, LTNESS4)
-
- INTEGER*4 NSESS4
- INTEGER*4 NDESS4
- INTEGER*4 NLTNESS
-
- INTEGER*4 NINCNT
- integer i
-
- IDEXO4 = IDEXO
- IDESS4 = IDESS
-C ... NOTE: It is not permissible to assume that the number of
-C distribution factors is the same as the number of
-C nodes associated with a sideset since some codes
-C are not maintaining that associativity...
- CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
- NINCNT = NSESS4
-
-C MUST COMPUTE NODE LIST SIZE
-
- NINCNT = NSESS4
- CALL I4ALLOC (NINCNT, PTMP4)
-
- CALL EXGSSC4 (IDEXO4, IDESS4, TMP4, IERR4)
- nltness = 0
- do 11 i=1, nincnt
- nltness = nltness + tmp4(i)
- 11 continue
- CALL I4FREE (PTMP4)
- CALL I4ALLOC (NINCNT, PINCNT4)
- CALL I4ALLOC (NLTNESS, PLTNESS4)
-
- CALL EXGSSN4 (IDEXO4, IDESS4, INCNT4, LTNESS4, IERR4)
- CALL I4I8 (NLTNESS, PLTNESS4, LTNESS)
- CALL I4I8 (NINCNT, PINCNT4, INCNT)
- IERR = IERR4
- END
-
- SUBROUTINE EXGSSC (IDEXO, IDESS, INCNT, IERR)
-C
-C READ SIDE SET NODE LIST
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- INTEGER INCNT (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 INCNT4 (1) ! (W)
- POINTER (PINCNT4, INCNT4)
- INTEGER*4 IERR4 ! (W)
-
- integer*4 nsess4
- integer*4 ndess4
- INTEGER*4 NINCNT
-
- IDEXO4 = IDEXO
- IDESS4 = IDESS
- CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
- NINCNT = NSESS4
- CALL I4ALLOC (NINCNT, PINCNT4)
-
- CALL EXGSSC4 (IDEXO4, IDESS4, INCNT4, IERR4)
-
- CALL I4I8 (NINCNT, PINCNT4, INCNT)
- IERR = IERR4
- END
-
- SUBROUTINE EXGCSSC (IDEXO, INCNT, IERR)
-C
-C READ CONCATENATED SIDE SET NODE COUNT LIST
-C (nodes/face for all faces)
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- INTEGER INCNT (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 INCNT4 (1) ! (W)
- POINTER (PINCNT4, INCNT4)
- INTEGER*4 IERR4 ! (W)
-
- integer*4 nsess4
- INTEGER*4 NINCNT
-
- INTEGER*4 INFREQ4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- IDEXO4 = IDEXO
- INFREQ4 = EXSSEL
- CALL EXINQ4 (IDEXO4, INFREQ4, NSESS4, RELRET4, CHRRET, IERR4)
- NINCNT = NSESS4
- CALL I4ALLOC (NINCNT, PINCNT4)
-
- CALL EXGCSSC4 (IDEXO4, INCNT4, IERR4)
-
- CALL I4I8 (NINCNT, PINCNT4, INCNT)
- IERR = IERR4
- END
-
- SUBROUTINE EXGTIM (IDEXO, NSTEP, TIME, IERR)
-C
-C READ TIME VALUE FOR A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NSTEP ! (R)
- REAL TIME ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NSTEP4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NSTEP4 = NSTEP
- CALL EXGTIM4 (IDEXO4, NSTEP4, TIME, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGVAN (IDEXO, VARTYP, NVAR, NAMES, IERR)
-C
-C READ RESULTS VARIABLE NAMES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER*1 VARTYP ! (R)
- INTEGER NVAR ! (R)
- CHARACTER* (*) NAMES (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NVAR4 = NVAR
- CALL EXGVAN4 (IDEXO4, VARTYP, NVAR4, NAMES, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGVNM (IDEXO, VARTYP, NVAR, NAME, IERR)
-C
-C READ RESULTS VARIABLE NAME
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER*1 VARTYP ! (R)
- INTEGER NVAR ! (R)
- CHARACTER* (*) NAME ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NVAR4 = NVAR
- CALL EXGVNM4 (IDEXO4, VARTYP, NVAR4, NAME, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPVNM (IDEXO, VARTYP, NVAR, NAME, IERR)
-C
-C WRITE RESULTS VARIABLE NAME
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER*1 VARTYP ! (R)
- INTEGER NVAR ! (R)
- CHARACTER* (*) NAME ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NVAR4 = NVAR
- CALL EXPVNM4 (IDEXO4, VARTYP, NVAR4, NAME, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGVP (IDEXO, VARTYP, NVAR, IERR)
-C
-C READ RESULTS VARIABLE PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER*1 VARTYP ! (R)
- INTEGER NVAR ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NVAR4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXGVP4 (IDEXO4, VARTYP, NVAR4, IERR4)
- NVAR = NVAR4
- IERR = IERR4
- END
-
- SUBROUTINE EXGVTT (IDEXO, NELBLK, NVAREL, ISEVOK, IERR)
-C
-C READ ELEMENT VARIABLE TRUTH TABLE
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NELBLK ! (R)
- INTEGER NVAREL ! (R)
- INTEGER ISEVOK(*) ! (NVAREL,NELBLK) (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NELBLK4 ! (R)
- INTEGER*4 NVAREL4 ! (R)
- INTEGER*4 ISEVOK4(1) ! (NVAREL,NELBLK) (W)
- POINTER (PISEVOK4, ISEVOK4)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NELBLK4 = NELBLK
- NVAREL4 = NVAREL
- CALL I4ALLOC (NVAREL4*NELBLK4, PISEVOK4)
- CALL EXGVTT4 (IDEXO4, NELBLK4, NVAREL4, ISEVOK4, IERR4)
- CALL I4I8 (NVAREL4*NELBLK4, PISEVOK4, ISEVOK)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNSTT (IDEXO, NBLK, NVAR, ISVOK, IERR)
-C
-C READ NODESET VARIABLE TRUTH TABLE
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NBLK ! (R)
- INTEGER NVAR ! (R)
- INTEGER ISVOK(*) ! (NVAR,NBLK) (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NBLK4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 ISVOK4(1) ! (NVAR,NBLK) (W)
- POINTER (PISVOK4, ISVOK4)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NBLK4 = NBLK
- NVAR4 = NVAR
- CALL I4ALLOC (NVAR4*NBLK4, PISVOK4)
- CALL EXGNSTT4 (IDEXO4, NBLK4, NVAR4, ISVOK4, IERR4)
- CALL I4I8 (NVAR4*NBLK4, PISVOK4, ISVOK)
- IERR = IERR4
- END
-
- SUBROUTINE EXGSSTT (IDEXO, NBLK, NVAR, ISVOK, IERR)
-C
-C READ SIDESET VARIABLE TRUTH TABLE
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NBLK ! (R)
- INTEGER NVAR ! (R)
- INTEGER ISVOK(*) ! (NVAR,NBLK) (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NBLK4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 ISVOK4(1) ! (NVAR,NBLK) (W)
- POINTER (PISVOK4, ISVOK4)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NBLK4 = NBLK
- NVAR4 = NVAR
- CALL I4ALLOC (NVAR4*NBLK4, PISVOK4)
- CALL EXGSSTT4 (IDEXO4, NBLK4, NVAR4, ISVOK4, IERR4)
- CALL I4I8 (NVAR4*NBLK4, PISVOK4, ISVOK)
- IERR = IERR4
- END
-
- SUBROUTINE EXINQ (IDEXO, INFREQ, INTRET, RELRET, CHRRET, IERR)
-C
-C INQUIRE EXODUS PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER INFREQ ! (R)
- INTEGER INTRET ! (W)
- REAL RELRET ! (W)
- CHARACTER* (*) CHRRET ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 INFREQ4 ! (R)
- INTEGER*4 INTRET4 ! (W)
- REAL*4 RELRET4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- INFREQ4 = INFREQ
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- INTRET = INTRET4
- RELRET = RELRET4
- IERR = IERR4
- END
-
- INTEGER FUNCTION EXOPEN (PATH, IMODE, ICOMPWS, IOWS, VERS, IERR)
-C
-C OPEN EXODUS II FILE
-C
- IMPLICIT NONE
- CHARACTER* (*) PATH ! (R)
- INTEGER IMODE ! (R)
- INTEGER ICOMPWS ! (RW)
- INTEGER IOWS ! (RW)
- REAL VERS ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 EXOPEN4
- EXTERNAL EXOPEN4
- INTEGER*4 IRET4
- INTEGER IRET
- INTEGER*4 IMODE4 ! (R)
- INTEGER*4 ICOMPWS4 ! (RW)
- INTEGER*4 IOWS4 ! (RW)
- REAL*4 VERS4 ! (W)
- INTEGER*4 IERR4 ! (W)
-
- IMODE4 = IMODE
-
-C ... This needs to be set explicitly since all wrapper routines
-C are passing REAL*8 and the exo_jack.c routines all take double*
- ICOMPWS4 = 8
- IOWS4 = IOWS
- IRET4 = EXOPEN4 (PATH, IMODE4, ICOMPWS4, IOWS4, VERS4, IERR4)
- ICOMPWS = ICOMPWS4
- IOWS = IOWS4
- VERS = VERS4
- IERR = IERR4
- IRET = IRET4
- EXOPEN = IRET
- END
-
- INTEGER FUNCTION EXLGMD (IDEXO)
- IMPLICIT NONE
- INTEGER IDEXO ! (R)
- INTEGER IRET
-
- INTEGER*4 EXLGMD4
- EXTERNAL EXLGMD4
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IRET4
-
- IDEXO4 = IDEXO
- IRET4 = EXLGMD4(IDEXO4)
- IRET = IRET4
- EXLGMD = IRET
- END
-
- SUBROUTINE EXOPTS (OPTVAL, IERR)
-C
-C SET ERROR REPORTING LEVEL
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER OPTVAL ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 OPTVAL4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- OPTVAL4 = OPTVAL
- CALL EXOPTS4 (OPTVAL4, IERR4)
- IERR = IERR4
- END
-
-
- SUBROUTINE EXPCNS (IDEXO, IDNPSS, NNNPS, NDNPS, IXNNPS,
- & IXDNPS, LTNNPS, FACNPS, IERR)
-C
-C WRITE CONCATENATED NODE SETS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDNPSS (*) ! (R)
- INTEGER NNNPS (*) ! (R)
- INTEGER NDNPS (*) ! (R)
- INTEGER IXNNPS (*) ! (R)
- INTEGER IXDNPS (*) ! (R)
- INTEGER LTNNPS (*) ! (R)
- REAL FACNPS (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDNPSS4 (1) ! (R)
- INTEGER*4 NNNPS4 (1) ! (R)
- INTEGER*4 NDNPS4 (1) ! (R)
- INTEGER*4 IXNNPS4 (1) ! (R)
- INTEGER*4 IXDNPS4 (1) ! (R)
- INTEGER*4 LTNNPS4 (1) ! (R)
- POINTER (PIDNPSS4, IDNPSS4)
- POINTER (PNNNPS4, NNNPS4)
- POINTER (PNDNPS4, NDNPS4)
- POINTER (PIXNNPS4, IXNNPS4)
- POINTER (PIXDNPS4, IXDNPS4)
- POINTER (PLTNNPS4, LTNNPS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXNODS
- INTEGER*4 NEXNSNL
- INTEGER*4 I
-
- IDEXO4 = IDEXO
- INFREQ4 = EXNODS
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXNODS = INTRET4
-C INFREQ4 = EXNSNL
-C CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
-C NEXNSNL = INTRET4
-C INFREQ4 = EXNSDF
-C CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
-C NEXNSDF = INTRET4
- NEXNSNL = 0
- DO I = 1, NEXNODS
- NEXNSNL = NEXNSNL + NNNPS(I)
- END DO
- CALL I8I4 (NEXNODS, IDNPSS, PIDNPSS4)
- CALL I8I4 (NEXNODS, NNNPS, PNNNPS4)
- CALL I8I4 (NEXNODS, NDNPS, PNDNPS4)
- CALL I8I4 (NEXNODS, IXNNPS, PIXNNPS4)
- CALL I8I4 (NEXNODS, IXDNPS, PIXDNPS4)
- CALL I8I4 (NEXNSNL, LTNNPS, PLTNNPS4)
- CALL EXPCNS4 (IDEXO4, IDNPSS4, NNNPS4, NDNPS4, IXNNPS4,
- & IXDNPS4, LTNNPS4, FACNPS, IERR4)
- CALL I4FREE (PIDNPSS4)
- CALL I4FREE (PNNNPS4)
- CALL I4FREE (PNDNPS4)
- CALL I4FREE (PIXNNPS4)
- CALL I4FREE (PIXDNPS4)
- CALL I4FREE (PLTNNPS4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPCON (IDEXO, NAMECO, IERR)
-C
-C WRITE COORDINATE NAMES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER* (*) NAMECO (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXPCON4 (IDEXO4, NAMECO, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPCOR (IDEXO, XN, YN, ZN, IERR)
-C
-C WRITE NODAL COORDINATES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- REAL XN (*) ! (R)
- REAL YN (*) ! (R)
- REAL ZN (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXPCOR4 (IDEXO4, XN, YN, ZN, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPCSS (IDEXO, IDESSS, NSESS, NDESS, IXEESS,
- & IXDESS, LTEESS, LTSESS, FACESS, IERR)
-C
-C WRITE CONCATENATED SIDE SETS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESSS (*) ! (R)
- INTEGER NSESS (*) ! (R)
- INTEGER NDESS (*) ! (R)
- INTEGER IXEESS (*) ! (R)
- INTEGER IXDESS (*) ! (R)
- INTEGER LTEESS (*) ! (R)
- INTEGER LTSESS (*) ! (R)
- REAL FACESS (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESSS4 (1) ! (R)
- INTEGER*4 NSESS4 (1) ! (R)
- INTEGER*4 NDESS4 (1) ! (R)
- INTEGER*4 IXEESS4 (1) ! (R)
- INTEGER*4 IXDESS4 (1) ! (R)
- INTEGER*4 LTEESS4 (1) ! (R)
- INTEGER*4 LTSESS4 (1) ! (R)
- POINTER (PIDESSS4, IDESSS4)
- POINTER (PNSESS4, NSESS4)
- POINTER (PNDESS4, NDESS4)
- POINTER (PIXEESS4, IXEESS4)
- POINTER (PIXDESS4, IXDESS4)
- POINTER (PLTEESS4, LTEESS4)
- POINTER (PLTSESS4, LTSESS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXSIDS
- INTEGER*4 NEXSSEL
- INTEGER*4 NEXSSDF
- INTEGER*4 I
-
- IDEXO4 = IDEXO
- INFREQ4 = EXSIDS
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXSIDS = INTRET4
-C INFREQ4 = EXSSEL
-C CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
-C NEXSSEL = INTRET4
-C INFREQ4 = EXSSDF
-C CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
-C NEXSSDF = INTRET4
- NEXSSEL = 0
- DO I = 1, NEXSIDS
- NEXSSEL = NEXSSEL + NSESS(I)
- END DO
- CALL I8I4 (NEXSIDS, IDESSS, PIDESSS4)
- CALL I8I4 (NEXSIDS, NSESS, PNSESS4)
- CALL I8I4 (NEXSIDS, NDESS, PNDESS4)
- CALL I8I4 (NEXSIDS, IXEESS, PIXEESS4)
- CALL I8I4 (NEXSIDS, IXDESS, PIXDESS4)
- CALL I8I4 (NEXSSEL, LTEESS, PLTEESS4)
- CALL I8I4 (NEXSSEL, LTSESS, PLTSESS4)
- CALL EXPCSS4 (IDEXO4, IDESSS4, NSESS4, NDESS4, IXEESS4,
- & IXDESS4, LTEESS4, LTSESS4, FACESS, IERR4)
- CALL I4FREE (PIDESSS4)
- CALL I4FREE (PNSESS4)
- CALL I4FREE (PNDESS4)
- CALL I4FREE (PIXEESS4)
- CALL I4FREE (PIXDESS4)
- CALL I4FREE (PLTEESS4)
- CALL I4FREE (PLTSESS4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPEAT (IDEXO, IDELB, ATRIB, IERR)
-C
-C WRITE ELEMENT BLOCK ATTRIBUTES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB ! (R)
- REAL ATRIB(*) ! (NUMATR,NUMELB) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDELB4 = IDELB
-
- CALL EXPEAT4 (IDEXO4, IDELB4, ATRIB, IERR4)
-
- IERR = IERR4
- END
-
- SUBROUTINE EXPEAN (IDEXO, IDELB, NATTR, NAMES, IERR)
-C
-C WRITE ELEMENT BLOCK ATTRIBUTE NAMES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB ! (R)
- INTEGER NATTR ! (R)
- CHARACTER* (*) NAMES (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 NATTR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDELB4 = IDELB
- NATTR4 = NATTR
-
- CALL EXPEAN4 (IDEXO4, IDELB4, NATTR4, NAMES, IERR4)
-
- IERR = IERR4
- END
-
- SUBROUTINE EXPCLB (IDEXO, IDELB, NAMELB, NUMELB, NUMLNK,
- & NUMATR, MKMAP, IERR)
-C
-C WRITE ELEMENT BLOCK PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB(*) ! (R)
- CHARACTER*(*) NAMELB(*) ! (R)
- INTEGER NUMELB(*) ! (R)
- INTEGER NUMLNK(*) ! (R)
- INTEGER NUMATR(*) ! (R)
- INTEGER MKMAP ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4(1) ! (R)
- INTEGER*4 NUMELB4(1) ! (R)
- INTEGER*4 NUMLNK4(1) ! (R)
- INTEGER*4 NUMATR4(1) ! (R)
- INTEGER*4 MKMAP4 ! (R)
- POINTER (PIDELB4, IDELB4)
- POINTER (PNUMELB4, NUMELB4)
- POINTER (PNUMLNK4, NUMLNK4)
- POINTER (PNUMATR4, NUMATR4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NUMBLK
-
- IDEXO4 = IDEXO
-
- INFREQ4 = EXELBL
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NUMBLK = INTRET4
-
- CALL I8I4 (NUMBLK, IDELB, PIDELB4)
- CALL I8I4 (NUMBLK, NUMELB, PNUMELB4)
- CALL I8I4 (NUMBLK, NUMLNK, PNUMLNK4)
- CALL I8I4 (NUMBLK, NUMATR, PNUMATR4)
- MKMAP4 = MKMAP
-
- CALL EXPCLB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
- & NUMATR4, MKMAP4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPELB (IDEXO, IDELB, NAMELB, NUMELB, NUMLNK,
- & NUMATR, IERR)
-C
-C WRITE ELEMENT BLOCK PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB ! (R)
- CHARACTER* (*) NAMELB ! (R)
- INTEGER NUMELB ! (R)
- INTEGER NUMLNK ! (R)
- INTEGER NUMATR ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 NUMELB4 ! (R)
- INTEGER*4 NUMLNK4 ! (R)
- INTEGER*4 NUMATR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDELB4 = IDELB
- NUMELB4 = NUMELB
- NUMLNK4 = NUMLNK
- NUMATR4 = NUMATR
- CALL EXPELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
- & NUMATR4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPELC (IDEXO, IDELB, LINK, IERR)
-C
-C WRITE ELEMENT BLOCK CONNECTIVITY
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDELB ! (R)
- INTEGER LINK (*) ! (NUMLNK,NUMELB) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 LINK4 (1) ! (NUMLNK,NUMELB) ! (R)
- POINTER (PLINK4, LINK4)
- INTEGER*4 IERR4 ! (W)
-
- CHARACTER* (MXSTLN) NAMELB
- INTEGER*4 NUMELB4
- INTEGER*4 NUMLNK4
- INTEGER*4 NUMATR4
-
- IDEXO4 = IDEXO
- IDELB4 = IDELB
- CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
- & NUMATR4, IERR4)
- IF (NAMELB .EQ. 'NSIDED' .OR. NAMELB .EQ. 'nsided') THEN
- CALL I8I4 (NUMLNK4, LINK, PLINK4)
- ELSE
- CALL I8I4 (NUMLNK4*NUMELB4, LINK, PLINK4)
- ENDIF
- CALL EXPELC4 (IDEXO4, IDELB4, LINK4, IERR4)
- CALL I4FREE (PLINK4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPECPP (IDEXO, ITYPE, IDELB, COUNTS, IERR)
-C
-C WRITE ELEMENT BLOCK CONNECTIVITY
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ITYPE ! (R)
- INTEGER IDELB ! (R)
- INTEGER COUNTS (*) ! (NUMELB) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 COUNTS4 (1) ! (NUMELB) ! (R)
- POINTER (PCOUNTS4, COUNTS4)
- INTEGER*4 IERR4 ! (W)
-
- CHARACTER* (MXSTLN) NAMELB
- INTEGER*4 NUMELB4
- INTEGER*4 NUMLNK4
- INTEGER*4 NUMATR4
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- IDELB4 = IDELB
- CALL EXGELB4 (IDEXO4, IDELB4, NAMELB, NUMELB4, NUMLNK4,
- & NUMATR4, IERR4)
- CALL I8I4 (NUMELB4, COUNTS, PCOUNTS4)
- CALL EXPECPP4 (IDEXO4, ITYPE4, IDELB4, COUNTS4, IERR4)
- CALL I4FREE (PCOUNTS4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPENM (IDEXO, MAPEL, IERR)
-C
-C WRITE ELEMENT NUMBER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPEL (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPEL4 (1) ! (R)
- POINTER (PMAPEL4, MAPEL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXELEM
-
- IDEXO4 = IDEXO
- INFREQ4 = EXELEM
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXELEM = INTRET4
- CALL I8I4 (NEXELEM, MAPEL, PMAPEL4)
- CALL EXPENM4 (IDEXO4, MAPEL4, IERR4)
- CALL I4FREE (PMAPEL4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPEM (IDEXO, MAPID, MAPEL, IERR)
-C
-C WRITE ELEMENT NUMBER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPID ! (R)
- INTEGER MAPEL (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPID4 ! (R)
- INTEGER*4 MAPEL4 (1) ! (R)
- POINTER (PMAPEL4, MAPEL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXELEM
-
- IDEXO4 = IDEXO
- INFREQ4 = EXELEM
- MAPID4 = MAPID
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXELEM = INTRET4
- CALL I8I4 (NEXELEM, MAPEL, PMAPEL4)
- CALL EXPEM4 (IDEXO4, MAPID4, MAPEL4, IERR4)
- CALL I4FREE (PMAPEL4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPPEM (IDEXO, MAPID, ISTART, ICOUNT, MAPEL, IERR)
-C
-C WRITE ELEMENT NUMBER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPID ! (R)
- INTEGER ISTART ! (R)
- INTEGER ICOUNT ! (R)
- INTEGER MAPEL (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPID4 ! (R)
- INTEGER*4 ISTART4 ! (R)
- INTEGER*4 ICOUNT4 ! (R)
- INTEGER*4 MAPEL4 (1) ! (R)
- POINTER (PMAPEL4, MAPEL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXELEM
-
- IDEXO4 = IDEXO
- INFREQ4 = EXELEM
- MAPID4 = MAPID
- ISTART4 = ISTART
- ICOUNT4 = ICOUNT
- CALL I8I4 (ICOUNT4, MAPEL, PMAPEL4)
- CALL EXPPEM4 (IDEXO4, MAPID4, ISTART4, ICOUNT4, MAPEL4, IERR4)
- CALL I4FREE (PMAPEL4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPEV (IDEXO, ISTEP, IXELEV, IDELB, NUMELB,
- & VALEV, IERR)
-C
-C WRITE ELEMENT VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER IXELEV ! (R)
- INTEGER IDELB ! (R)
- INTEGER NUMELB ! (R)
- REAL VALEV (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 IXELEV4 ! (R)
- INTEGER*4 IDELB4 ! (R)
- INTEGER*4 NUMELB4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- IXELEV4 = IXELEV
- IDELB4 = IDELB
- NUMELB4 = NUMELB
- CALL EXPEV4 (IDEXO4, ISTEP4, IXELEV4, IDELB4, NUMELB4,
- & VALEV, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPNSV (IDEXO, ISTEP, IXV, ID, NUM, VAL, IERR)
-C
-C WRITE NODESET VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER IXV ! (R)
- INTEGER ID ! (R)
- INTEGER NUM ! (R)
- REAL VAL (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 IXV4 ! (R)
- INTEGER*4 ID4 ! (R)
- INTEGER*4 NUM4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- IXV4 = IXV
- ID4 = ID
- NUM4 = NUM
- CALL EXPNSV4 (IDEXO4, ISTEP4, IXV4, ID4, NUM4, VAL, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPSSV (IDEXO, ISTEP, IXV, ID, NUM, VAL, IERR)
-C
-C WRITE SIDESET VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER IXV ! (R)
- INTEGER ID ! (R)
- INTEGER NUM ! (R)
- REAL VAL (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 IXV4 ! (R)
- INTEGER*4 ID4 ! (R)
- INTEGER*4 NUM4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- IXV4 = IXV
- ID4 = ID
- NUM4 = NUM
- CALL EXPSSV4 (IDEXO4, ISTEP4, IXV4, ID4, NUM4, VAL, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPGV (IDEXO, ISTEP, NVARGL, VALGV, IERR)
-C
-C WRITE GLOBAL VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER NVARGL ! (R)
- REAL VALGV (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 NVARGL4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- NVARGL4 = NVARGL
- CALL EXPGV4 (IDEXO4, ISTEP4, NVARGL4, VALGV, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPINF (IDEXO, NINFO, INFO, IERR)
-C
-C WRITE INFORMATION RECORDS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NINFO ! (R)
- CHARACTER* (*) INFO (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NINFO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NINFO4 = NINFO
- CALL EXPINF4 (IDEXO4, NINFO4, INFO, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPINI (IDEXO, TITLE, NDIM, NUMNP, NUMEL, NELBLK,
- & NUMNPS, NUMESS, IERR)
-C
-C WRITE INITIALIZATION PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER* (*) TITLE ! (R)
- INTEGER NDIM ! (R)
- INTEGER NUMNP ! (R)
- INTEGER NUMEL ! (R)
- INTEGER NELBLK ! (R)
- INTEGER NUMNPS ! (R)
- INTEGER NUMESS ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NDIM4 ! (R)
- INTEGER*4 NUMNP4 ! (R)
- INTEGER*4 NUMEL4 ! (R)
- INTEGER*4 NELBLK4 ! (R)
- INTEGER*4 NUMNPS4 ! (R)
- INTEGER*4 NUMESS4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NDIM4 = NDIM
- NUMNP4 = NUMNP
- NUMEL4 = NUMEL
- NELBLK4 = NELBLK
- NUMNPS4 = NUMNPS
- NUMESS4 = NUMESS
- CALL EXPINI4 (IDEXO4, TITLE, NDIM4, NUMNP4, NUMEL4, NELBLK4,
- & NUMNPS4, NUMESS4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPMAP (IDEXO, MAPEL, IERR)
-C
-C WRITE ELEMENT ORDER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPEL (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPEL4 (1) ! (R)
- POINTER (PMAPEL4, MAPEL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXELEM
-
- IDEXO4 = IDEXO
- INFREQ4 = EXELEM
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXELEM = INTRET4
- CALL I8I4 (NEXELEM, MAPEL, PMAPEL4)
- CALL EXPMAP4 (IDEXO4, MAPEL4, IERR4)
- CALL I4FREE (PMAPEL4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPNNM (IDEXO, MAPNOD, IERR)
-C
-C WRITE NODE NUMBER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPNOD (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPNOD4 (1) ! (R)
- POINTER (PMAPNOD4, MAPNOD4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXNODE
-
- IDEXO4 = IDEXO
- INFREQ4 = EXNODE
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXNODE = INTRET4
- CALL I8I4 (NEXNODE, MAPNOD, PMAPNOD4)
- CALL EXPNNM4 (IDEXO4, MAPNOD4, IERR4)
- CALL I4FREE (PMAPNOD4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPNM (IDEXO, MAPID, MAPNOD, IERR)
-C
-C WRITE NODE NUMBER MAP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER MAPID ! (R)
- INTEGER MAPNOD (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 MAPID4 ! (R)
- INTEGER*4 MAPNOD4 (1) ! (R)
- POINTER (PMAPNOD4, MAPNOD4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NEXNODE
-
- IDEXO4 = IDEXO
- INFREQ4 = EXNODE
- MAPID4 = MAPID
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NEXNODE = INTRET4
- CALL I8I4 (NEXNODE, MAPNOD, PMAPNOD4)
- CALL EXPNM4 (IDEXO4, MAPID4, MAPNOD4, IERR4)
- CALL I4FREE (PMAPNOD4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPNP (IDEXO, IDNPS, NNNPS, NDNPS, IERR)
-C
-C WRITE NODE SET PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDNPS ! (R)
- INTEGER NNNPS ! (R)
- INTEGER NDNPS ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDNPS4 ! (R)
- INTEGER*4 NNNPS4 ! (R)
- INTEGER*4 NDNPS4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDNPS4 = IDNPS
- NNNPS4 = NNNPS
- NDNPS4 = NDNPS
- CALL EXPNP4 (IDEXO4, IDNPS4, NNNPS4, NDNPS4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPNS (IDEXO, IDNPS, LTNNPS, IERR)
-C
-C WRITE NODE SET
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDNPS ! (R)
- INTEGER LTNNPS (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDNPS4 ! (R)
- INTEGER*4 LTNNPS4 (1) ! (R)
- POINTER (PLTNNPS4, LTNNPS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 NNNPS4
- INTEGER*4 NDNPS4
-
- IDEXO4 = IDEXO
- IDNPS4 = IDNPS
- CALL EXGNP4 (IDEXO4, IDNPS4, NNNPS4, NDNPS4, IERR4)
- CALL I8I4 (NNNPS4, LTNNPS, PLTNNPS4)
- CALL EXPNS4 (IDEXO4, IDNPS4, LTNNPS4, IERR4)
- CALL I4FREE (PLTNNPS4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPNSD (IDEXO, IDNPS, FACNPS, IERR)
-C
-C WRITE NODE SET DISTRIBUTION FACTORS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDNPS ! (R)
- REAL FACNPS (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDNPS4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDNPS4 = IDNPS
- CALL EXPNSD4 (IDEXO4, IDNPS4, FACNPS, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPNV (IDEXO, ISTEP, IXNODV, NUMNP, VALNV, IERR)
-C
-C WRITE NODAL VARIABLE VALUES AT A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ISTEP ! (R)
- INTEGER IXNODV ! (R)
- INTEGER NUMNP ! (R)
- REAL VALNV (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ISTEP4 ! (R)
- INTEGER*4 IXNODV4 ! (R)
- INTEGER*4 NUMNP4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ISTEP4 = ISTEP
- IXNODV4 = IXNODV
- NUMNP4 = NUMNP
- CALL EXPNV4 (IDEXO4, ISTEP4, IXNODV4, NUMNP4, VALNV, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPP (IDEXO, ITYPE, ID, NAMEPR, IVAL, IERR)
-C
-C WRITE OBJECT PROPERTY
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ITYPE ! (R)
- INTEGER ID ! (R)
- CHARACTER* (*) NAMEPR ! (R)
- INTEGER IVAL ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 ID4 ! (R)
- INTEGER*4 IVAL4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- ID4 = ID
- IVAL4 = IVAL
- CALL EXPP4 (IDEXO4, ITYPE4, ID4, NAMEPR, IVAL4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPPA (IDEXO, ITYPE, NAMEPR, IVAL, IERR)
-C
-C WRITE OBJECT PROPERTY ARRAY
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ITYPE ! (R)
- CHARACTER* (*) NAMEPR ! (R)
- INTEGER IVAL (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 IVAL4 (1) ! (R)
- POINTER (PIVAL4, IVAL4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 INFREQ4
- INTEGER*4 INTRET4
- REAL*4 RELRET4
- CHARACTER* (4) CHRRET
-
- INTEGER*4 NUMOBJ
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- IF (ITYPE4 .EQ. EXEBLK) THEN
- INFREQ4 = EXELBL
- ELSE IF (ITYPE4 .EQ. EXNSET) THEN
- INFREQ4 = EXNODS
- ELSE IF (ITYPE4 .EQ. EXSSET) THEN
- INFREQ4 = EXSIDS
- ELSE IF (ITYPE4 .EQ. EXEMAP) THEN
- INFREQ4 = EXNEM
- ELSE IF (ITYPE4 .EQ. EXNMAP) THEN
- INFREQ4 = EXNNM
- END IF
- CALL EXINQ4 (IDEXO4, INFREQ4, INTRET4, RELRET4, CHRRET, IERR4)
- NUMOBJ = INTRET4
- CALL I8I4 (NUMOBJ, IVAL, PIVAL4)
- CALL EXPPA4 (IDEXO4, ITYPE4, NAMEPR, IVAL4, IERR4)
- CALL I4FREE (PIVAL4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPPN (IDEXO, ITYPE, NPROPS, NAMEPR, IERR)
-C
-C WRITE PROPERTY ARRAY NAMES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER ITYPE ! (R)
- INTEGER NPROPS ! (R)
- CHARACTER* (*) NAMEPR (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 NPROPS4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- NPROPS4 = NPROPS
- CALL EXPPN4 (IDEXO4, ITYPE4, NPROPS4, NAMEPR, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPQA (IDEXO, NQAREC, QAREC, IERR)
-C
-C WRITE QA RECORDS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NQAREC ! (R)
- CHARACTER* (*) QAREC (4,*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NQAREC4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NQAREC4 = NQAREC
- CALL EXPQA4 (IDEXO4, NQAREC4, QAREC, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPSP (IDEXO, IDESS, NSESS, NDESS, IERR)
-C
-C WRITE SIDE SET PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- INTEGER NSESS ! (R)
- INTEGER NDESS ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 NSESS4 ! (R)
- INTEGER*4 NDESS4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDESS4 = IDESS
- NSESS4 = NSESS
- NDESS4 = NDESS
- CALL EXPSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPSS (IDEXO, IDESS, LTEESS, LTSESS, IERR)
-C
-C WRITE SIDE SET
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- INTEGER LTEESS (*) ! (R)
- INTEGER LTSESS (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 LTEESS4 (1) ! (R)
- INTEGER*4 LTSESS4 (1) ! (R)
- POINTER (PLTEESS4, LTEESS4)
- POINTER (PLTSESS4, LTSESS4)
- INTEGER*4 IERR4 ! (W)
-
- INTEGER*4 NSESS4
- INTEGER*4 NDESS4
-
- IDEXO4 = IDEXO
- IDESS4 = IDESS
- CALL EXGSP4 (IDEXO4, IDESS4, NSESS4, NDESS4, IERR4)
- CALL I8I4 (NSESS4, LTEESS, PLTEESS4)
- CALL I8I4 (NSESS4, LTSESS, PLTSESS4)
- CALL EXPSS4 (IDEXO4, IDESS4, LTEESS4, LTSESS4, IERR4)
- CALL I4FREE (PLTEESS4)
- CALL I4FREE (PLTSESS4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPSSD (IDEXO, IDESS, FACESS, IERR)
-C
-C WRITE SIDE SET DISTRIBUTION FACTORS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IDESS ! (R)
- REAL FACESS (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IDESS4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- IDESS4 = IDESS
- CALL EXPSSD4 (IDEXO4, IDESS4, FACESS, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPTIM (IDEXO, NSTEP, TIME, IERR)
-C
-C WRITE TIME VALUE FOR A TIME STEP
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NSTEP ! (R)
- REAL TIME ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NSTEP4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NSTEP4 = NSTEP
- CALL EXPTIM4 (IDEXO4, NSTEP4, TIME, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPVAN (IDEXO, VARTYP, NVAR, NAMES, IERR)
-C
-C WRITE RESULTS VARIABLE NAMES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER*1 VARTYP ! (R)
- INTEGER NVAR ! (R)
- CHARACTER* (*) NAMES (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NVAR4 = NVAR
- CALL EXPVAN4 (IDEXO4, VARTYP, NVAR4, NAMES, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPVP (IDEXO, VARTYP, NVAR, IERR)
-C
-C WRITE RESULTS VARIABLE PARAMETERS
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER*1 VARTYP ! (R)
- INTEGER NVAR ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NVAR4 = NVAR
- CALL EXPVP4 (IDEXO4, VARTYP, NVAR4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPVTT (IDEXO, NELBLK, NVAREL, ISEVOK, IERR)
-C
-C WRITE ELEMENT VARIABLE TRUTH TABLE
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NELBLK ! (R)
- INTEGER NVAREL ! (R)
- INTEGER ISEVOK (*) ! (NVAREL,NELBLK) (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NELBLK4 ! (R)
- INTEGER*4 NVAREL4 ! (R)
- INTEGER*4 ISEVOK4 (1) ! (NVAREL,NELBLK) (R)
- POINTER (PISEVOK4, ISEVOK4)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NELBLK4 = NELBLK
- NVAREL4 = NVAREL
- CALL I8I4 (NVAREL4*NELBLK4, ISEVOK, PISEVOK4)
- CALL EXPVTT4 (IDEXO4, NELBLK4, NVAREL4, ISEVOK4, IERR4)
- CALL I4FREE (PISEVOK4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPNSTT (IDEXO, NBLK, NVAR, ISVOK, IERR)
-C
-C WRITE NODESET VARIABLE TRUTH TABLE
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NBLK ! (R)
- INTEGER NVAR ! (R)
- INTEGER ISVOK (*) ! (NVAR,NBLK) (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NBLK4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 ISVOK4 (1) ! (NVAR,NBLK) (R)
- POINTER (PISVOK4, ISVOK4)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NBLK4 = NBLK
- NVAR4 = NVAR
- CALL I8I4 (NVAR4*NBLK4, ISVOK, PISVOK4)
- CALL EXPNSTT4 (IDEXO4, NBLK4, NVAR4, ISVOK4, IERR4)
- CALL I4FREE (PISVOK4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPSSTT (IDEXO, NBLK, NVAR, ISVOK, IERR)
-C
-C WRITE SIDESET VARIABLE TRUTH TABLE
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER NBLK ! (R)
- INTEGER NVAR ! (R)
- INTEGER ISVOK (*) ! (NVAR,NBLK) (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 NBLK4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 ISVOK4 (1) ! (NVAR,NBLK) (R)
- POINTER (PISVOK4, ISVOK4)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- NBLK4 = NBLK
- NVAR4 = NVAR
- CALL I8I4 (NVAR4*NBLK4, ISVOK, PISVOK4)
- CALL EXPSSTT4 (IDEXO4, NBLK4, NVAR4, ISVOK4, IERR4)
- CALL I4FREE (PISVOK4)
- IERR = IERR4
- END
-
- SUBROUTINE EXGNAMS (IDEXO, ITYPE, NVAR, NAMES, IERR)
-C
-C READ OBJECT NAMES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER*1 VARTYP ! (R)
- INTEGER NVAR ! (R)
- INTEGER ITYPE ! (R)
- CHARACTER* (*) NAMES (*) ! (W)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- NVAR4 = NVAR
- CALL EXGNAMS4 (IDEXO4, ITYPE4, NVAR4, NAMES, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXPNAMS (IDEXO, ITYPE, NVAR, NAMES, IERR)
-C
-C WRITE OBJECT NAMES
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- CHARACTER*1 VARTYP ! (R)
- INTEGER NVAR ! (R)
- INTEGER ITYPE ! (R)
- CHARACTER* (*) NAMES (*) ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 ITYPE4 ! (R)
- INTEGER*4 NVAR4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- ITYPE4 = ITYPE
- NVAR4 = NVAR
- CALL EXPNAMS4 (IDEXO4, ITYPE4, NVAR4, NAMES, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXUPDA (IDEXO, IERR)
-C
-C UPDATE EXODUS II FILE
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO4 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO4 = IDEXO
- CALL EXUPDA4 (IDEXO4, IERR4)
- IERR = IERR4
- END
-
- SUBROUTINE EXCOPY (IDEXO1, IDEXO2, IERR)
-C
-C COPY EXODUS II FILE
-C
- IMPLICIT NONE
- INCLUDE 'exodusII.inc'
- INTEGER IDEXO1 ! (R)
- INTEGER IDEXO2 ! (R)
- INTEGER IERR ! (W)
-
- INTEGER*4 IDEXO14 ! (R)
- INTEGER*4 IDEXO24 ! (R)
- INTEGER*4 IERR4 ! (W)
-
- IDEXO14 = IDEXO1
- IDEXO24 = IDEXO2
- CALL EXCOPY4 (IDEXO14, IDEXO24, IERR4)
- IERR = IERR4
- END
-
-
- SUBROUTINE I8I4 (N, I8, PI4)
-C
-C CREATE I4 ARRAY AND COPY I8 ARRAY CONTENTS TO I4
-C
- IMPLICIT NONE
- INTEGER*4 N
- INTEGER I8 (*)
- INTEGER*4 I4 (1)
- POINTER (PI4, I4)
- INTEGER*4 I
-
- CALL I4ALLOC (N, PI4)
- DO I = 1, N
- I4 (I) = I8 (I)
- END DO
- END
-
- SUBROUTINE I4I8 (N, PI4, I8)
-C
-C COPY I4 ARRAY CONTENTS TO I8 AND FREE I4 ARRAY
-C
- IMPLICIT NONE
- INTEGER*4 N
- INTEGER*4 I4 (1)
- POINTER (PI4, I4)
- INTEGER I8 (*)
- INTEGER*4 I
-
- DO I = 1, N
- I8 (I) = I4 (I)
- END DO
- CALL I4FREE (PI4)
- END
-
- SUBROUTINE I4ALLOC (N, PI4)
-C
-C ALLOCATE DYNAMIC I4 ARRAY N ELEMENTS IN SIZE
-C
- IMPLICIT NONE
- INTEGER*4 N
- INTEGER*4 I4 (1)
- POINTER (PI4, I4)
- INTEGER MALLOC
- INTEGER*4 NB
-
- PI4 = 0
- IF (N .EQ. 0) RETURN
- NB = N * 4
- PI4 = MALLOC (NB)
- END
-
- SUBROUTINE I4FREE (PI4)
-C
-C FREE DYNAMIC MEMORY ASSOCIATED WITH I4 ARRAY REFERENCED BY PI4
-C
- IMPLICIT NONE
- INTEGER*4 I4 (1)
- POINTER (PI4, I4)
-
- IF (PI4 .EQ. 0) RETURN
- CALL FREE (PI4)
- PI4 = 0
- END
-#endif
diff --git a/forbind/src/aix0.inc b/forbind/src/aix0.inc
deleted file mode 100644
index 8515772..0000000
--- a/forbind/src/aix0.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-c machine specific xdr infinity constants
-c
- double precision XDRDINF,XDRFINF
-c ifdef vax
-c
-c parameter(XDRDINF = 1.7014118346046923e+38)
-c parameter(XDRFINF = 2.93873588e-39)
-
-c ifdef sun
- parameter(XDRDINF = 1.797693134862315900e+308)
- parameter(XDRFINF = 3.40282357e+38)
-c
-c Fill values
-c These values are stuffed into newly allocated space as appropriate.
-c The hope is that one might use these to notice that a particular dataum
-c has not been set.
-c
- integer FILBYTE,FILCHAR, FILSHORT,FILLONG
- real FILFLOAT
- double precision FILDOUB
-c
-c Largest Negative value
- parameter(FILBYTE = 128)
- parameter(FILCHAR = 0)
- parameter(FILSHORT = 32768)
- parameter(FILLONG = -2147483647-1)
-c IEEE Infinity
- parameter(FILFLOAT = XDRFINF)
- parameter(FILDOUB = XDRDINF)
diff --git a/forbind/src/catamount.m4 b/forbind/src/catamount.m4
deleted file mode 100644
index d59dee7..0000000
--- a/forbind/src/catamount.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', cougar)
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# our C compiler replaces a "$" in a module name with an "_"
-# dont now what to do about that just yet
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer*1')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/common.inc b/forbind/src/common.inc
deleted file mode 100644
index ce6544d..0000000
--- a/forbind/src/common.inc
+++ /dev/null
@@ -1,153 +0,0 @@
-C*****************************************************************************
-C Copyright 1994 Sandia Corporation. Under the terms of Contract
-C DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-C retains certain rights in this software.
-C
-C See the COPYRIGHT file for copying and redistribution conditions.
-C
-C*****************************************************************************
-c
-c Functions in the FORTRAN interface
-c These declarations may cause "unused variable" warnings
- integer nccre, ncopn, ncddef, ncdid, ncvdef, ncvid, nctlen
- integer ncsfil
-
- integer NCRDWR,NCCREAT,NCEXCL,NCINDEF,NCNSYNC,NCHSYNC
- integer NCNDIRTY,NCHDIRTY,NCLINK,NCNOWRIT,NCWRITE
- integer NCCLOB,NCNOCLOB,NCGLOBAL,NCFILL,NCNOFILL
- integer MAXNCOP,MAXNCDIM,MAXNCATT,MAXNCVAR
- integer MAXNCNAM,MAXVDIMS,NCNOERR,NCEBADID
- integer NCENFILE,NCEEXIST,NCEINVAL,NCEPERM,NCENOTIN
- integer NCEINDEF,NCECOORD,NCEMAXDS,NCENAME
- integer NCENOATT,NCEMAXAT,NCEBADTY,NCEBADD, NCESTS
- integer NCEUNLIM,NCEMAXVS,NCENOTVR,NCEGLOB,NCENOTNC
- integer NCFOOBAR,NCSYSERR,NCFATAL,NCVERBOS, NCENTOOL
-
- integer NCBYTE,NCCHAR,NCSHORT,NCLONG,NCFLOAT,NCDOUBLE
-
- parameter(NCBYTE = 1)
- parameter(NCCHAR = 2)
- parameter(NCSHORT = 3)
- parameter(NCLONG = 4)
- parameter(NCFLOAT = 5)
- parameter(NCDOUBLE = 6)
-
-c
-c masks for the struct NC flag field; passed in as 'mode' arg to
-c nccreate and ncopen.
-c
-
-c read/write, 0 => readonly
- parameter(NCRDWR = 1)
-c in create phase, cleared by ncendef
- parameter(NCCREAT = 2)
-c on create destroy existing file
- parameter(NCEXCL = 4)
-c in define mode, cleared by ncendef
- parameter(NCINDEF = 8)
-c synchronise numrecs on change (X'10')
- parameter(NCNSYNC = 16)
-c synchronise whole header on change (X'20')
- parameter(NCHSYNC = 32)
-c numrecs has changed (X'40')
- parameter(NCNDIRTY = 64)
-c header info has changed (X'80')
- parameter(NCHDIRTY = 128)
-c prefill vars on endef and increase of record, the default behavior
- parameter(NCFILL = 0)
-c don't fill vars on endef and increase of record (X'100')
- parameter(NCNOFILL = 256)
-c isa link (X'8000')
- parameter(NCLINK = 32768)
-
-c
-c 'mode' arguments for nccreate and ncopen
-c
-
- parameter(NCNOWRIT = 0)
- parameter(NCWRITE = NCRDWR)
- parameter(NCCLOB = 11)
- parameter(NCNOCLOB = 15)
-c
-c 'size' argument to ncdimdef for an unlimited dimension
-c
- LONG_INT NCUNLIM
- parameter(NCUNLIM = 0)
-
-c
-c attribute id to put/get a global attribute
-c
- parameter(NCGLOBAL = 0)
-c
-c Advisory Maximums
-c
- parameter(MAXNCOP = 32)
- parameter(MAXNCDIM = 32)
- parameter(MAXNCATT = 512)
- parameter(MAXNCVAR = 512)
-c Not enforced
- parameter(MAXNCNAM = 128)
- parameter(MAXVDIMS = MAXNCDIM)
-
-
-c
-c The netcdf data types
-c
-
-c
-c Global netcdf error status variable
-c Initialized in error.c
-c
-
-c No Error
- parameter(NCNOERR = 0)
-c Not a netcdf id
- parameter(NCEBADID = 1)
-c Too many netcdfs open
- parameter(NCENFILE = 2)
-c netcdf file exists && NCNOCLOB
- parameter(NCEEXIST = 3)
-c Invalid Argument
- parameter(NCEINVAL = 4)
-c Write to read only
- parameter(NCEPERM = 5)
-c Operation not allowed in data mode
- parameter(NCENOTIN = 6)
-c Operation not allowed in define mode
- parameter(NCEINDEF = 7)
-c Coordinates out of Domain
- parameter(NCECOORD = 8)
-c MAXNCDIMS exceeded
- parameter(NCEMAXDS = 9)
-c String match to name in use
- parameter(NCENAME = 10)
-c Attribute not found
- parameter(NCENOATT = 11)
-c MAXNCATTRS exceeded
- parameter(NCEMAXAT = 12)
-c Not a netcdf data type
- parameter(NCEBADTY = 13)
-c Invalid dimension id
- parameter(NCEBADD = 14)
-c NCUNLIMITED in the wrong index
- parameter(NCEUNLIM = 15)
-c MAXNCVARS exceeded
- parameter(NCEMAXVS = 16)
-c Variable not found
- parameter(NCENOTVR = 17)
-c Action prohibited on NCGLOBAL varid
- parameter(NCEGLOB = 18)
-c Not a netcdf file
- parameter(NCENOTNC = 19)
- parameter(NCESTS = 20)
- parameter (NCENTOOL = 21)
- parameter(NCFOOBAR = 32)
- parameter(NCSYSERR = -1)
-
-
-c
-c Global options variable. Used to determine behavior of error handler.
-c Initialized in lerror.c
-c
- parameter(NCFATAL = 1)
- parameter(NCVERBOS = 2)
diff --git a/forbind/src/common.m4 b/forbind/src/common.m4
deleted file mode 100644
index b4d082d..0000000
--- a/forbind/src/common.m4
+++ /dev/null
@@ -1,79 +0,0 @@
-divert(-1)dnl
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-#
-# diversion 1 is for collecting formal arguments
-# diversion 2 is for extra formal arguments for string lengths
-# diversion 3 is for formal argument declarations
-# diversion 4 is for extra local variables derived from formal arguments
-#
-define(`STRING',`divert(1)ifdef(`INIT',,`, ')STRINGF(`$1')`'undefine(`INIT')divert(2)`'STRINGX(`$1')`'divert(3)`'STRINGD(`$1',`$2')`'divert(4)`'STRINGL(`$1')`'divert(0)')dnl
-define(`INTSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- int *$1; `$2'divert(0)')dnl
-define(`LONGSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- long *$1; `$2'divert(0)')dnl
-define(`FLOATSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- float *$1; `$2'divert(0)')dnl
-define(`DOUBLESTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- double *$1; `$2'divert(0)')dnl
-define(`REALSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- real *$1; `$2'divert(0)')dnl
-#
-# The following is for a pointer to a single character, not a Fortran
-# character variable
-#
-define(`CHARSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- char *$1; `$2'divert(0)')dnl
-define(`VOIDSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- void *$1; `$2'divert(0)')dnl
-define(`M4__PROTO',`define(`INIT',1)$2`'NAMEF($1)(undivert(1)undivert(2))undivert(3)')
-define(`M4__LOCALS',`undivert(4)')
-
-# Note: override the following default definitions in OS.m4, where necessary
-
-# Includes needed at the top of a file of C to be called from FORTRAN,
-# e.g. "#include descrip" for VMS
-define(`M4__STRING_DESCRIPTOR_INCLUDES',`')
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`')
-
-# FORTRAN syntax for including a file, e.g. `$include: "filename"' for msoft
-define(`M4__RIGHT_QUOTE',')
-define(`F_INCLUDE',` `include' M4__RIGHT_QUOTE`'$1`'M4__RIGHT_QUOTE')
-
-# include declaring C interfaces, needed in FORTRAN when calling C, e.g.
-# Microsoft FORTRAN needs to include msoft.int
-define(`M4__C_INTERFACE_DECLARATIONS',`')
-divert(0)dnl
diff --git a/forbind/src/common2.m4 b/forbind/src/common2.m4
deleted file mode 100644
index ebf44f8..0000000
--- a/forbind/src/common2.m4
+++ /dev/null
@@ -1,79 +0,0 @@
-divert(-1)dnl
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-#
-# diversion 1 is for collecting formal arguments
-# diversion 2 is for extra formal arguments for string lengths
-# diversion 3 is for formal argument declarations
-# diversion 4 is for extra local variables derived from formal arguments
-#
-define(`STRING',`divert(1)ifdef(`INIT',,`, ')STRINGF(`$1')`'undefine(`INIT')`'STRINGX(`$1')`'divert(3)`'STRINGD(`$1',`$2')`'divert(4)`'STRINGL(`$1')`'divert(0)')dnl
-define(`INTSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- int *$1; `$2'divert(0)')dnl
-define(`LONGSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- long *$1; `$2'divert(0)')dnl
-define(`FLOATSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- float *$1; `$2'divert(0)')dnl
-define(`DOUBLESTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- double *$1; `$2'divert(0)')dnl
-define(`REALSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- real *$1; `$2'divert(0)')dnl
-#
-# The following is for a pointer to a single character, not a Fortran
-# character variable
-#
-define(`CHARSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- char *$1; `$2'divert(0)')dnl
-define(`VOIDSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
- void *$1; `$2'divert(0)')dnl
-define(`M4__PROTO',`define(`INIT',1)$2`'NAMEF($1)(undivert(1)undivert(2))undivert(3)')
-define(`M4__LOCALS',`undivert(4)')
-
-# Note: override the following default definitions in OS.m4, where necessary
-
-# Includes needed at the top of a file of C to be called from FORTRAN,
-# e.g. "#include descrip" for VMS
-define(`M4__STRING_DESCRIPTOR_INCLUDES',`')
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`')
-
-# FORTRAN syntax for including a file, e.g. `$include: "filename"' for msoft
-define(`M4__RIGHT_QUOTE',')
-define(`F_INCLUDE',` `include' M4__RIGHT_QUOTE`'$1`'M4__RIGHT_QUOTE')
-
-# include declaring C interfaces, needed in FORTRAN when calling C, e.g.
-# Microsoft FORTRAN needs to include msoft.int
-define(`M4__C_INTERFACE_DECLARATIONS',`')
-divert(0)dnl
diff --git a/forbind/src/cougar.m4 b/forbind/src/cougar.m4
deleted file mode 100644
index d59dee7..0000000
--- a/forbind/src/cougar.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', cougar)
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# our C compiler replaces a "$" in a module name with an "_"
-# dont now what to do about that just yet
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer*1')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/cray.m4 b/forbind/src/cray.m4
deleted file mode 100644
index 5023fea..0000000
--- a/forbind/src/cray.m4
+++ /dev/null
@@ -1,82 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', UNICOS)
-
-# Includes needed at the top of a file of C to be called from FORTRAN
-define(`M4__STRING_DESCRIPTOR_INCLUDES',`
-#include <fortran.h> /* for _fcd functions */
-')
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`
-#define FORTRAN_HAS_NO_BYTE
-#define FORTRAN_HAS_NO_SHORT
-')
-
-# transformation from fortran name to name of C module
-# for unicos, just convert to uppercase
-define(`NAMEF',
- `translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)')
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1d')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`')
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- _fcd $1d; `$2'') # declare string parameter as type _fcd
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`
- char *$1 = _fcdtocp ($1d);
- unsigned $1len = _fcdlen ($1d);') # use _fcd functions
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`real')
-
-divert(0)dnl
diff --git a/forbind/src/darwin.m4 b/forbind/src/darwin.m4
deleted file mode 100755
index a07d019..0000000
--- a/forbind/src/darwin.m4
+++ /dev/null
@@ -1,73 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', DARWIN)
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`
-#define FORTRAN_HAS_NO_BYTE
-')
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/excopy_jack.src b/forbind/src/excopy_jack.src
deleted file mode 100644
index 7be9559..0000000
--- a/forbind/src/excopy_jack.src
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* excopy - ex_copy exodusII fortran jacket
-*
-* author - Larry A. Schoof, Sandia National Laboratories
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int in_exoid input exodus file id
-* int out_exoid output exodus file id
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * copy EXODUS file
- */
-% void
-% excopy (
-% int *idexo_in, /* input EXODUS file ID */
-% int *idexo_out, /* output EXODUS file ID */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- if (ex_copy (*idexo_in, *idexo_out) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to copy EXODUS file id %d to file id %d",
- *idexo_in, *idexo_out);
- ex_err("excopy",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/exgem_jack.src b/forbind/src/exgem_jack.src
deleted file mode 100644
index b055158..0000000
--- a/forbind/src/exgem_jack.src
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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 exodusII fortran jacket
-*
-* author - Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int map_id element map id
-*
-* exit conditions -
-* int* elem_map element map array
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * get element map
- */
-% void
-% exgem (
-% int *idexo, /* EXODUS file ID */
-% int *map_id, /* element map ID */
-% int *elem_map, /* returned element map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- *ierr = ex_get_elem_map (*idexo, *map_id, elem_map);
- if (*ierr < 0)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get element map from file id %d",
- *idexo);
- ex_err("exgem",errmsg,EX_MSG);
- }
- }
-}
-/*
- * get partial_element map
- */
-% void
-% exgpem (
-% int *idexo, /* EXODUS file ID */
-% int *map_id, /* element map ID */
-% int *start, /* starting entity */
-% int *count, /* number to read */
-% int *elem_map, /* returned element map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- *ierr = ex_get_partial_elem_map (*idexo, *map_id, *start, *count, elem_map);
- if (*ierr < 0)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get partial element map from file id %d",
- *idexo);
- ex_err("exgem",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/exgenm_jack.src b/forbind/src/exgenm_jack.src
deleted file mode 100644
index 5d8f6fb..0000000
--- a/forbind/src/exgenm_jack.src
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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 exodusII fortran jacket
-*
-* author - Victor R. Yarberry, Sandia National Laboratories
-* Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* int* elem_map element numbering map array
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * get element number map
- */
-% void
-% exgenm (
-% int *idexo, /* EXODUS file ID */
-% int *elem_map, /* returned element order map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- *ierr = ex_get_elem_num_map (*idexo, elem_map);
- if (*ierr < 0)
-/* if (ex_get_elem_num_map (*idexo, elem_map) == -1) */
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get element number map from file id %d",
- *idexo);
- ex_err("exgenm",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/exgmp_jack.src b/forbind/src/exgmp_jack.src
deleted file mode 100644
index 2bfa985..0000000
--- a/forbind/src/exgmp_jack.src
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* exgmp - ex_get_map_param exodusII fortran jacket
-*
-* author - Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* int* num_node_maps number of node maps
-* int* num_elem_maps number of element maps
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * get map parameters
- */
-% void
-% exgmp (
-% int *idexo, /* EXODUS file ID */
-% int *num_node_maps, /* returned number of node maps */
-% int *num_elem_maps, /* returned number of element maps */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- *ierr = ex_get_map_param (*idexo, num_node_maps, num_elem_maps);
- if (*ierr < 0)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get map parameters from file id %d",
- *idexo);
- ex_err("exgmp",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/exgnm_jack.src b/forbind/src/exgnm_jack.src
deleted file mode 100644
index 35a7923..0000000
--- a/forbind/src/exgnm_jack.src
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* exgnm - ex_get_node_map exodusII fortran jacket
-*
-* author - Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int map_id node map id
-*
-* exit conditions -
-* int* node_map node map array
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * get node map
- */
-% void
-% exgnm (
-% int *idexo, /* EXODUS file ID */
-% int *map_id, /* node map ID */
-% int *node_map, /* returned node map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- *ierr = ex_get_node_map (*idexo, *map_id, node_map);
- if (*ierr < 0)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get node map from file id %d",
- *idexo);
- ex_err("exgem",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/exgnnm_jack.src b/forbind/src/exgnnm_jack.src
deleted file mode 100644
index bb67c27..0000000
--- a/forbind/src/exgnnm_jack.src
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* exgnnm - ex_get_node_num_map exodusII fortran jacket
-*
-* author - Victor R. Yarberry, Sandia National Laboratories
-* Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-*
-* exit conditions -
-* int* node_map node numbering map array
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * get node number map
- */
-% void
-% exgnnm (
-% int *idexo, /* EXODUS file ID */
-% int *node_map, /* returned node order map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- *ierr = ex_get_node_num_map (*idexo, node_map);
- if (*ierr < 0)
-/* if (ex_get_node_num_map (*idexo, node_map) == -1) */
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get node number map from file id %d",
- *idexo);
- ex_err("exgnnm",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/exgvnm_jack.src b/forbind/src/exgvnm_jack.src
deleted file mode 100644
index 624d976..0000000
--- a/forbind/src/exgvnm_jack.src
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* exgvnm - ex_get_var_name exodusII fortran jacket
-*
-* author - Victor R. Yarberry, Sandia National Laboratories
-* Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int* idexo exodus file id
-* char* var_type variable type: G,N, or E
-* int* var_index variable index to read
-*
-* exit conditions -
-* char* var_name ptr to variable name
-* int* ierr returned error code
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-extern void ex_fcdcpy(char*, int, char*);
-/*
- * read results variables names
- */
-% void
-% exgvnm (
-% int *idexo, /* EXODUS file ID */
-% string var_type, /* (single) character indicating the type of */
-% /* variable which is described */
-% int *var_index /* variable index to be read */
-% string var_name, /* returned string containing variable name */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- char *sptr; /* ptr to temp staging space for string */
- int slen;
- *ierr=0; /* default no errror */
-
- /* WARNING: var_namelen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXGVNM spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (var_namelen != MAX_STR_LENGTH)
- {
- slen = var_namelen;
- sprintf(errmsg,
- "Warning: variable name string length is %d in file id %d\n",
- var_namelen, *idexo);
- ex_err("exgvnm",errmsg,EX_MSG);
- }
-
- /* Allocate staging space for the variable name */
- if (!(sptr=malloc((slen+1)*sizeof(char))))
- {
- *ierr = EX_MEMFAIL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to allocate space for results variable name for file id %d",
- *idexo);
- ex_err("exgvnm",errmsg,EX_MEMFAIL);
- }
- return;
- }
-
- /* do ExodusII C call to read results variables names */
- if (ex_get_var_name(*idexo,var_type,*var_index,sptr) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- free(sptr); /* free up allocated space */
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get results variable name from file id %d",
- *idexo);
- ex_err("exgvnm",errmsg,EX_MSG);
- }
- return;
- }
-
- /* Copy Fortran variable names to staging space */
- /** printf("[exgvnm] var_name(%d): %s\n",*var_index,sptr)); **/
- ex_fcdcpy(var_name,slen,sptr);/* copy string into Fortran buffer */
-
- free(sptr); /* Free up string staging area */
-}
diff --git a/forbind/src/exodus.hh b/forbind/src/exodus.hh
deleted file mode 100644
index e4c7a92..0000000
--- a/forbind/src/exodus.hh
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/*
- * This file contains defined constants that are used in the EXODUS II API.
- *
- * The first group of constants refer to netCDF variables, attributes, or
- * dimensions in which the EXODUS II data are stored. Using the defined
- * constants will allow the names of the netCDF entities to be changed easily
- * in the future if needed. The first three letters of the constant identify
- * the netCDF entity as a variable (VAR), dimension (DIM), or attribute (ATT).
- *
- * DEFINED CONSTANT ENTITY NAME DATA STORED IN ENTITY
- */
-#define ATT_FILE_TYPE "type" /* the EXODUS II file type */
- /* ("r" for regular or "h" */
- /* for history) */
-#define ATT_TITLE "title" /* the database title */
-#define ATT_VERSION "version" /* the EXODUS II version # */
-#define DIM_NUM_NODES "num_nodes" /* # of nodes */
-#define DIM_NUM_DIM "num_dim" /* # of dimensions; 2- or 3-d*/
-#define DIM_NUM_ELEM "num_elem" /* # of elements */
-#define DIM_NUM_EL_BLK "num_el_blk" /* # of element blocks */
-#define VAR_COORD "coord" /* nodal coordinates */
-#define VAR_NAME_COOR "coor_names" /* names of coordinates */
-#define VAR_ID_EL_BLK "el_blk_id" /* element block ids */
-#define ATT_NAME_ELB "elem_type" /* element type names for */
- /* each element block */
-#define DIM_NUM_EL_IN_BLK(num) catstr("num_el_in_blk",num)
- /* # of elements in element */
- /* block num */
-#define DIM_NUM_NOD_PER_EL(num) catstr("num_nod_per_el",num)
- /* # of nodes per element in */
- /* element block num */
-#define DIM_NUM_ATT_IN_BLK(num) catstr("num_att_in_blk",num)
- /* # of attributes in element*/
- /* block num */
-#define VAR_CONN(num) catstr("connect",num)
- /* element connectivity for */
- /* element block num */
-#define VAR_ATTRIB(num) catstr("attrib",num)
- /* list of attributes for */
- /* element block num */
-#define VAR_MAP "elem_map" /* element order map */
-#define DIM_NUM_SS "num_side_sets" /* # of side sets */
-#define VAR_SS_IDS "side_set_ids" /* side set id's */
-#define DIM_NUM_EL_SS(num) catstr("num_el_ss",num)
- /* # of elements in side set */
- /* num */
-#define DIM_NUM_NOD_SS(num) catstr("num_nod_ss",num)
- /* # of nodes in side set num*/
-#define VAR_FACT_SS(num) catstr("dist_fact_ss",num)
- /* the distribution factors */
- /* for each node in side */
- /* set num */
-#define VAR_ELEM_SS(num) catstr("elem_ss",num)
- /* list of elements in side */
- /* set num */
-#define VAR_NODE_SS(num) catstr("node_ss",num)
- /* list of nodes in side set */
- /* num */
-#define DIM_NUM_NS "num_node_sets" /* # of node sets */
-#define DIM_NUM_NOD_NS(num) catstr("num_nod_ns",num)
- /* # of nodes in node set */
- /* num */
-#define VAR_NS_IDS "node_set_ids" /* node set ids */
-#define VAR_NODE_NS(num) catstr("node_ns",num)
- /* list of nodes in node set */
- /* num */
-#define VAR_FACT_NS(num) catstr("dist_fact_ns",num)
- /* list of distribution */
- /* factors in node set num */
-#define DIM_NUM_QA "num_qa_rec" /* # of QA records */
-#define VAR_QA_TITLE "qa_records" /* QA records */
-#define DIM_NUM_INFO "num_info" /* # of information records */
-#define VAR_INFO "info_records" /* information records */
-#define VAR_HIS_TIME "time_hist" /* simulation times for */
- /* history time steps */
-#define VAR_WHOLE_TIME "time_whole" /* simulation times for whole*/
- /* time steps */
-#define VAR_ELEM_TAB "elem_var_tab" /* element variable truth */
- /* table */
-#define DIM_NUM_GLO_VAR "num_glo_var" /* # 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" /* # 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 */
-#define DIM_NUM_ELE_VAR "num_elem_var" /* # of element variables */
-#define VAR_NAME_ELE_VAR "name_elem_var" /* names of element variables*/
-#define VAR_ELEM_VAR(num1,num2) catstr2("vals_elem_var",num1,"eb",num2)
- /* values of element variable*/
- /* num1 in element block */
- /* num2 */
-#define DIM_NUM_HIS_VAR "num_his_var" /* # of history variables */
-#define VAR_NAME_HIS_VAR "name_his_var" /* names of history variables*/
-#define VAR_HIS_VAR "vals_his_var" /* values of history */
- /* variables */
-#define DIM_STR "len_string" /* general dimension of */
- /* length MAX_STR_LENGTH */
- /* used for name lengths */
-#define DIM_LIN "len_line" /* general dimension of */
- /* length MAX_LINE_LENGTH */
- /* used for long strings */
-#define DIM_N4 "four" /* general dimension of */
- /* length 4 */
-#define DIM_TIME "time_step" /* unlimited (expandable) */
- /* dimension for time steps*/
-#define DIM_HTIME "hist_time_step"/* unlimited (expandable) */
- /* dimension for history */
- /* variable time steps */
-
-/*
- * The following are miscellaneous constants used in the EXODUS II API.
- */
-
-#define EX_NOCLOBBER 0
-#define EX_CLOBBER 1
-
-#define EX_READ 0
-#define EX_WRITE 1
-
-#define EX_VERS 1.01
-
-#define EX_VERBOSE 1
-
-#define EX_INQ_FILE_TYPE 1 /* inquire EXODUS II file type*/
-#define EX_INQ_VERS 2 /* inquire version number */
-#define EX_INQ_TITLE 3 /* inquire database title */
-#define EX_INQ_DIM 4 /* inquire number of */
- /* dimensions */
-#define EX_INQ_NODES 5 /* inquire number of nodes */
-#define EX_INQ_ELEM 6 /* inquire number of elements */
-#define EX_INQ_ELEM_BLK 7 /* inquire number of element */
- /* blocks */
-#define EX_INQ_NODE_SETS 8 /* inquire number of node sets*/
-#define EX_INQ_NS_NODE_LEN 9 /* inquire length of node set */
- /* node list */
-#define EX_INQ_SIDE_SETS 10 /* inquire number of side sets*/
-#define EX_INQ_SS_NODE_LEN 11 /* inquire length of side set */
- /* node list */
-#define EX_INQ_SS_ELEM_LEN 12 /* inquire length of side set */
- /* element list */
-#define EX_INQ_QA 13 /* inquire number of QA */
- /* records */
-#define EX_INQ_INFO 14 /* inquire number of info */
- /* records */
-#define EX_INQ_TIME 15 /* inquire number of time */
- /* steps in the database */
-
-#define MAX_STR_LENGTH 8
-#define MAX_VAR_NAME_LENGTH 20
-#define MAX_LINE_LENGTH 80
-
-#define verbose 1
diff --git a/forbind/src/expem_jack.src b/forbind/src/expem_jack.src
deleted file mode 100644
index 20e706a..0000000
--- a/forbind/src/expem_jack.src
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* expem - ex_put_elem_map exodusII fortran jacket
-*
-* author - Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int map_id element map id
-* int* elem_map element map array
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * put element map
- */
-% void
-% expem (
-% int *idexo, /* EXODUS file ID */
-% int *map_id, /* element map ID */
-% int *elem_map, /* element map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- if (ex_put_elem_map (*idexo, *map_id, elem_map) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to store element map in file id %d",
- *idexo);
- ex_err("expem",errmsg,EX_MSG);
- }
- }
-}
-
-/*
- * put partial element map
- */
-% void
-% exppem (
-% int *idexo, /* EXODUS file ID */
-% int *map_id, /* element map ID */
-% int *start, /* starting entity */
-% int *count, /* number to write */
-% int *elem_map, /* element map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- if (ex_put_partial_elem_map (*idexo, *map_id, *start, *count, elem_map) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to store element map in file id %d",
- *idexo);
- ex_err("expem",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/expenm_jack.src b/forbind/src/expenm_jack.src
deleted file mode 100644
index f5c4142..0000000
--- a/forbind/src/expenm_jack.src
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* expenm - ex_put_elem_num_map exodusII fortran jacket
-*
-* author - Victor R. Yarberry, Sandia National Laboratories
-* Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int* elem_map element numbering map array
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * put element number map
- */
-% void
-% expenm (
-% int *idexo, /* EXODUS file ID */
-% int *elem_map, /* element order map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- if (ex_put_elem_num_map (*idexo, elem_map) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to store element number map in file id %d",
- *idexo);
- ex_err("expenm",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/expmp_jack.src b/forbind/src/expmp_jack.src
deleted file mode 100644
index 1e2b132..0000000
--- a/forbind/src/expmp_jack.src
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* expmp - ex_put_map_param exodusII fortran jacket
-*
-* author - Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int num_node_maps number of node maps
-* int num_elem_maps number of element maps
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * put map parameters
- */
-% void
-% expmp (
-% int *idexo, /* EXODUS file ID */
-% int *num_node_maps, /* number of node maps */
-% int *num_elem_maps, /* number of element maps */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- if (ex_put_map_param (*idexo, *num_node_maps, *num_elem_maps) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to put map parameters in file id %d",
- *idexo);
- ex_err("expmp",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/expnm_jack.src b/forbind/src/expnm_jack.src
deleted file mode 100644
index 047d2ce..0000000
--- a/forbind/src/expnm_jack.src
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* expnm - ex_put_node_map exodusII fortran jacket
-*
-* author - Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int map_id node map id
-* int* node_map node map array
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * put node map
- */
-% void
-% expnm (
-% int *idexo, /* EXODUS file ID */
-% int *map_id, /* node map ID */
-% int *node_map, /* node map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- if (ex_put_node_map (*idexo, *map_id, node_map) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to store node map in file id %d",
- *idexo);
- ex_err("expnm",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/expnnm_jack.src b/forbind/src/expnnm_jack.src
deleted file mode 100644
index fdc3cf1..0000000
--- a/forbind/src/expnnm_jack.src
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* expnnm - ex_put_node_num_map exodusII fortran jacket
-*
-* author - Victor R. Yarberry, Sandia National Laboratories
-* Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int* node_map node numbering map array
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-
-/*
- * put node number map
- */
-% void
-% expnnm (
-% int *idexo, /* EXODUS file ID */
-% int *node_map, /* node order map */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- *ierr = 0;
- if (ex_put_node_num_map (*idexo, node_map) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to store node number map in file id %d",
- *idexo);
- ex_err("expnnm",errmsg,EX_MSG);
- }
- }
-}
diff --git a/forbind/src/expvnm_jack.src b/forbind/src/expvnm_jack.src
deleted file mode 100644
index 861b831..0000000
--- a/forbind/src/expvnm_jack.src
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
- * 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 Sandia Corporation 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.
- *
- */
-/****************************************************************************
-*
-* expvnm - ex_get_var_name exodusII fortran jacket
-*
-* author - Victor R. Yarberry, Sandia National Laboratories
-* Larry A. Schoof - Original in C
-*
-* environment - UNIX
-*
-* entry conditions -
-* input parameters:
-* int* idexo exodus file id
-* char* var_type variable type: G,N, or E
-* int* var_index variable index to write
-* char* var_name ptr to variable name
-*
-* exit conditions -
- int* ierr returned error code
-*
-* revision history -
-*
-*
-*****************************************************************************/
-/*
- * OVERVIEW
- *
- * This file contains a jacket routine written in C for interfacing Fortran
- * ExodusII function calls to the actual C binding for ExodusII. This code
- * is written explicitly for M4__SYSTEM. In general, these functions handle
- * character-string parameter conventions, convert between
- * column-major-order arrays and row-major-order arrays, and map between
- * array indices beginning at one and array indices beginning at zero.
- *
- */
-
-/* LINTLIBRARY */
-#include <ctype.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "netcdf.h"
-#include "exodusII.h"
-#include "exodusII_int.h"
-
-M4__STRING_DESCRIPTOR_INCLUDES
-
-M4__FORTRAN_DEFINES
-
-/* global integer that contains a Exodus-specific error code */
-extern int exerrval;
-extern void ex_fstrncpy(char*, char*, int);
-
-/*
- * write results variable name
- */
-% void
-% expvnm (
-% int *idexo, /* EXODUS file ID */
-% string var_type, /* (single) character indicating the type of */
-% /* variable which is described */
-% int *var_index /* variable index to be read */
-% string var_name, /* string containing variable name */
-% int *ierr /* returned error code */
-% )
-% {
-
- char errmsg[MAX_ERR_LENGTH];
-
-
- char *sptr; /* ptr to temp staging space for string */
- int slen;
- *ierr=0; /* default no errror */
-
- /* WARNING: var_namelen SHOULD be MAX_STR_LENGTH, but may not be depending
- on how the Fortran programmer passed it. It is best at
- this time to hard code it per EXPVNM spec. */
- slen = MAX_STR_LENGTH; /* max str size */
- if (var_namelen != MAX_STR_LENGTH)
- {
- slen = var_namelen;
-#if defined(EXODUS_STRING_LENGTH_WARNING)
- sprintf(errmsg,
- "Warning: variable name string length is %d in file id %d\n",
- var_namelen, *idexo);
- ex_err("expvnm",errmsg,EX_MSG);
-#endif
- }
-
- /* Allocate staging space for the variable name */
- if (!(sptr=(char *)malloc((slen+1)*sizeof(char))))
- {
- *ierr = EX_MEMFAIL;
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to allocate space for results variable name for file id %d",
- *idexo);
- ex_err("expvnm",errmsg,EX_MEMFAIL);
- }
- return;
- }
-
- ex_fstrncpy(sptr,var_name,slen);/* copy string into buffer */
-
-
- /* do ExodusII C call to write results variable name */
- if (ex_put_var_name(*idexo,var_type,*var_index,sptr) == EX_FATAL)
- {
- *ierr = EX_FATAL;
- free(sptr); /* free up allocated space */
- if (exoptval & EX_DEBUG)
- {
- sprintf(errmsg,
- "Error: failed to get write variable name to file id %d",
- *idexo);
- ex_err("expvnm",errmsg,EX_MSG);
- }
- return;
- }
-
- free(sptr); /* Free up string staging area */
-}
diff --git a/forbind/src/fortc b/forbind/src/fortc
deleted file mode 100755
index c40b483..0000000
--- a/forbind/src/fortc
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-# fortc - make Fortran-callable C source
-# usage: fortc [-L LibDir] [-O OperSys] [file ...]
-
-#set -x
-
-InFiles=
-LibDir=/usr/local/ldm/lib
-
-while [ $# -gt 0 ]; do
- case $1 in
- -P) shift; ADDRMODE=$1; shift;;
- -P*)
- ADDRMODE=`echo $1 | sed 's/-.//'`; shift;;
- -L) shift; LibDir=$1; shift;;
- -L*)
- LibDir=`echo $1 | sed 's/-.//'`; shift;;
- -O) shift; OS=$1; shift;;
- -O*)
- OS=`echo $1 | sed 's/-.//'`; shift;;
- -*) echo 1>&2 "Option '$1' is unknown"; exit 1;;
- *) InFiles="$InFiles $1"; shift;;
- esac
-done
-
-case "$ADDRMODE" in
- 64)
- TYPE=double;;
- 32)
- TYPE=float;;
-esac
-
-# Default is invalid file if does not support 64-bit mode.
-# If is supported, use fortc3.sed if no underscore on name,
-# or use fortc3_.sed if underscore on function name.
-TO64=invalid.sed
-
-case "$OS" in
- aix*)
- OS=aix;COMMON=common;TO64=fortc3.sed;;
- msoft*)
- OS=msoft;COMMON=common2;;
- hp*)
- OS=hp;COMMON=common;TO64=fortc3.sed;;
- next*)
- OS=next;COMMON=common;;
- osf*)
- OS=osf;COMMON=common;;
- sun*)
- OS=sunos;COMMON=common;TO64=fortc3_.sed;;
- cougar*)
- OS=cougar;COMMON=common;;
- catamount*)
- OS=catamount;COMMON=common;TO64=fortc3_.sed;;
- interix*)
- OS=interix;COMMON=common;;
- irix*)
- OS=irix;COMMON=common;TO64=fortc3_.sed;;
- ultrix*)
- OS=ultrix;COMMON=common;;
- unicos*)
- OS=unicos;COMMON=common;;
- linux*)
- OS=linux;COMMON=common;TO64=fortc3_.sed;;
- darwin*)
- OS=darwin;COMMON=common;TO64=fortc3_.sed;;
- vms*)
- OS=vms;;
- "") echo 1>&2 \
- "$0: Operating-system not defined: environmental-variable OS not" \
- "set or option \"-O<system>\" not specified."
- exit 2;;
-esac
-
-sed -f $LibDir/fortc1.sed $InFiles |
- m4 $LibDir/$COMMON.m4 $LibDir/$OS.m4 - |
- sed -f $LibDir/fortc2.sed |
- sed s/real/$TYPE/g |
- (test "$ADDRMODE" -eq 64 && sed -f $LibDir/$TO64 || cat)
diff --git a/forbind/src/fortc1.sed b/forbind/src/fortc1.sed
deleted file mode 100644
index d99f3da..0000000
--- a/forbind/src/fortc1.sed
+++ /dev/null
@@ -1,95 +0,0 @@
-s/\([^a-zA-Z]\)len/\1M4_len_4M/g
-s/CHARSTAR/M4_CHARSTAR_4M/g
-s/DOUBLESTAR/M4_DOUBLESTAR_4M/g
-s/FLOATSTAR/M4_FLOATSTAR_4M/g
-s/REALSTAR/M4_REALSTAR_4M/g
-s/INTSTAR/M4_INTSTAR_4M/g
-s/LONGSTAR/M4_LONGSTAR_4M/g
-s/NAMEF/M4_NAMEF_4M/g
-s/STRINGD/M4_STRINGD_4M/g
-s/STRINGF/M4_STRINGF_4M/g
-s/STRINGL/M4_STRINGL_4M/g
-s/STRINGX/M4_STRINGX_4M/g
-s/VOIDSTAR/M4_VOIDSTAR_4M/g
-s/changecom/M4_changecom_4M/g
-s/changequote/M4_changequote_4M/g
-s/decr/M4_decr_4M/g
-s/define/M4_define_4M/g
-s/defn/M4_defn_4M/g
-s/divert/M4_divert_4M/g
-s/divnum/M4_divnum_4M/g
-s/dnl/M4_dnl_4M/g
-s/dumpdef/M4_dumpdef_4M/g
-s/errprint/M4_errprint_4M/g
-s/eval/M4_eval_4M/g
-s/ifdef/M4_ifdef_4M/g
-s/ifelse/M4_ifelse_4M/g
-s/include/M4_include_4M/g
-s/incr/M4_incr_4M/g
-s/index/M4_index_4M/g
-s/m4exit/M4_m4exit_4M/g
-s/m4wrap/M4_m4wrap_4M/g
-s/maketemp/M4_maketemp_4M/g
-s/popdef/M4_popdef_4M/g
-s/pushdef/M4_pushdef_4M/g
-s/shift/M4_shift_4M/g
-s/sinclude/M4_sinclude_4M/g
-s/substr/M4_substr_4M/g
-s/syscmd/M4_syscmd_4M/g
-s/sysval/M4_sysval_4M/g
-s/traceoff/M4_traceoff_4M/g
-s/traceon/M4_traceon_4M/g
-s/translit/M4_translit_4M/g
-s/undefine/M4_undefine_4M/g
-s/undivert/M4_undivert_4M/g
-s/unix/M4_unix_4M/g
-/^%\*/ {
- d
- b
-}
-/^\(%.*\)\/\*.*\*\/\(.*\)/s//\1\2/
-/^%[ ]*\([a-zA-Z0-9_]*\)[ ]*(/ {
- s//M4__PROTO(`\1',/
- b
-}
-/^%[ ]*string[ ]*\([a-zA-Z_][^ ]*\).*$/ {
- s//`STRING(\1)dnl'/
- b cleanup
-}
-/^%[ ]*int[ ]*\*[ ]*\([A-Za-z_][^ ]*\).*$/ {
- s//`INTSTAR(\1)dnl'/
- b cleanup
-}
-/^%[ ]*long[ ]*\*[ ]*\([A-Za-z_][^ ]*\).*$/ {
- s//`LONGSTAR(\1)dnl'/
- b cleanup
-}
-/^%[ ]*float[ ]*\*[ ]*\([A-Za-z_][^ ]*\).*$/ {
- s//`FLOATSTAR(\1)dnl'/
- b cleanup
-}
-/^%[ ]*double[ ]*\*[ ]*\([A-Za-z_][^ ]*\).*$/ {
- s//`DOUBLESTAR(\1)dnl'/
- b cleanup
-}
-/^%[ ]*real[ ]*\*[ ]*\([A-Za-z_][^ ]*\).*$/ {
- s//`REALSTAR(\1)dnl'/
- b cleanup
-}
-/^%[ ]*void[ ]*\*[ ]*\([A-Za-z_][^ ]*\).*$/ {
- s//`VOIDSTAR(\1)dnl'/
- b cleanup
-}
-/^%[ ]*char[ ]*\*[ ]*\([A-Za-z_][^ ]*\).*$/ {
- s//`CHARSTAR(\1)dnl'/
- b cleanup
-}
-/^%[ ]*{[ ]*$/ {
- s//{M4__LOCALS/
- b
-}
-/^%[ ]*\(.*\)$/s//\1/
- b
-: cleanup
- s/[ ]*$//
- s/,)/)/
diff --git a/forbind/src/fortc2.sed b/forbind/src/fortc2.sed
deleted file mode 100644
index 5b1658d..0000000
--- a/forbind/src/fortc2.sed
+++ /dev/null
@@ -1,44 +0,0 @@
-s/M4_CHARSTAR_4M/CHARSTAR/g
-s/M4_DOUBLESTAR_4M/DOUBLESTAR/g
-s/M4_FLOATSTAR_4M/FLOATSTAR/g
-s/M4_REALSTAR_4M/REALSTAR/g
-s/M4_INTSTAR_4M/INTSTAR/g
-s/M4_NAMEF_4M/NAMEF/g
-s/M4_STRINGD_4M/STRINGD/g
-s/M4_STRINGF_4M/STRINGF/g
-s/M4_STRINGL_4M/STRINGL/g
-s/M4_STRINGX_4M/STRINGX/g
-s/M4_VOIDSTAR_4M/VOIDSTAR/g
-s/M4_changecom_4M/changecom/g
-s/M4_changequote_4M/changequote/g
-s/M4_decr_4M/decr/g
-s/M4_define_4M/define/g
-s/M4_defn_4M/defn/g
-s/M4_divert_4M/divert/g
-s/M4_divnum_4M/divnum/g
-s/M4_dnl_4M/dnl/g
-s/M4_dumpdef_4M/dumpdef/g
-s/M4_errprint_4M/errprint/g
-s/M4_eval_4M/eval/g
-s/M4_ifdef_4M/ifdef/g
-s/M4_ifelse_4M/ifelse/g
-s/M4_include_4M/include/g
-s/M4_incr_4M/incr/g
-s/M4_index_4M/index/g
-s/M4_len_4M/len/g
-s/M4_m4exit_4M/m4exit/g
-s/M4_m4wrap_4M/m4wrap/g
-s/M4_maketemp_4M/maketemp/g
-s/M4_popdef_4M/popdef/g
-s/M4_pushdef_4M/pushdef/g
-s/M4_shift_4M/shift/g
-s/M4_sinclude_4M/sinclude/g
-s/M4_substr_4M/substr/g
-s/M4_syscmd_4M/syscmd/g
-s/M4_sysval_4M/sysval/g
-s/M4_traceoff_4M/traceoff/g
-s/M4_traceon_4M/traceon/g
-s/M4_translit_4M/translit/g
-s/M4_undefine_4M/undefine/g
-s/M4_undivert_4M/undivert/g
-s/M4_unix_4M/unix/g
diff --git a/forbind/src/fortc3.sed b/forbind/src/fortc3.sed
deleted file mode 100644
index 042d89c..0000000
--- a/forbind/src/fortc3.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/^\(ex[a-zA-Z0-9_]*\)(/\14(/
diff --git a/forbind/src/fortc3_.sed b/forbind/src/fortc3_.sed
deleted file mode 100644
index cf89f37..0000000
--- a/forbind/src/fortc3_.sed
+++ /dev/null
@@ -1 +0,0 @@
-s/^\(ex[a-zA-Z0-9_]*\)_(/\14_(/
diff --git a/forbind/src/hpux0.inc b/forbind/src/hpux0.inc
deleted file mode 100644
index 1083e80..0000000
--- a/forbind/src/hpux0.inc
+++ /dev/null
@@ -1,34 +0,0 @@
-c machine specific xdr infinity constants
-c
- real XDRFINF
- double precision XDRDINF
-c ifdef vax
-c
-c parameter(XDRDINF = 1.7014118346046923e+38)
-c parameter(XDRFINF = 2.93873588e-39)
-
-c ifdef sun
-c parameter(XDRDINF = 1.797693134862315900e+308)
-c parameter(XDRFINF = 3.40282357e+38)
-
-c ifdef hpux
- parameter(XDRDINF = Z'7FF0000000000000')
- parameter(XDRFINF = Z'7F800000')
-c
-c Fill values
-c These values are stuffed into newly allocated space as appropriate.
-c The hope is that one might use these to notice that a particular dataum
-c has not been set.
-c
- integer FILBYTE,FILCHAR, FILSHORT,FILLONG
- real FILFLOAT
- double precision FILDOUB
-c
-c Largest Negative value
- parameter(FILBYTE = 128)
- parameter(FILCHAR = 0)
- parameter(FILSHORT = 32768)
- parameter(FILLONG = -2147483647-1)
-c IEEE Infinity
- parameter(FILFLOAT = XDRFINF)
- parameter(FILDOUB = XDRDINF)
diff --git a/forbind/src/interix.m4 b/forbind/src/interix.m4
deleted file mode 100644
index 4eb8d02..0000000
--- a/forbind/src/interix.m4
+++ /dev/null
@@ -1,73 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', INTERIX)
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`
-#define FORTRAN_HAS_NO_BYTE
-')
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/irix.m4 b/forbind/src/irix.m4
deleted file mode 100644
index c7dc924..0000000
--- a/forbind/src/irix.m4
+++ /dev/null
@@ -1,73 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', IRIX)
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`
-#define FORTRAN_HAS_NO_BYTE
-')
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/irix0.inc b/forbind/src/irix0.inc
deleted file mode 100644
index d8b6178..0000000
--- a/forbind/src/irix0.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-c machine specific xdr infinity constants
-c
- double precision XDRDINF,XDRFINF
-c ifdef vax
-c
- parameter(XDRDINF = 1.70141178e+38)
- parameter(XDRFINF = 1.70141178e+38)
-c
-c Fill values
-c These values are stuffed into newly allocated space as appropriate.
-c The hope is that one might use these to notice that a particular dataum
-c has not been set.
-c
- integer FILBYTE,FILCHAR, FILSHORT,FILLONG
- real FILFLOAT
- double precision FILDOUB
-c
-c Largest Negative value
- parameter(FILBYTE = 128)
- parameter(FILCHAR = 0)
- parameter(FILSHORT = 32768)
- parameter(FILLONG = -2147483648)
-c IEEE Infinity
- parameter(FILFLOAT = XDRFINF)
- parameter(FILDOUB = XDRDINF)
diff --git a/forbind/src/linux.m4 b/forbind/src/linux.m4
deleted file mode 100644
index fb45ed7..0000000
--- a/forbind/src/linux.m4
+++ /dev/null
@@ -1,72 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', LINUX)
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`
-#define FORTRAN_HAS_NO_BYTE
-')
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/msoft.m4 b/forbind/src/msoft.m4
deleted file mode 100644
index 8e4c8df..0000000
--- a/forbind/src/msoft.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', MICROSOFT)
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`__stdcall translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)`'define(`STR_COUNT',1)')# for microsoft, just use upper case
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- unsigned $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer*4')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer*1')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-# FORTRAN syntax for including a file
-define(`F_INCLUDE',`$`include': "$1"')
-
-divert(0)dnl
diff --git a/forbind/src/msoft0.inc b/forbind/src/msoft0.inc
deleted file mode 100644
index f392ec3..0000000
--- a/forbind/src/msoft0.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-c machine specific xdr infinity constants
-c
- double precision XDRDINF,XDRFINF
-c ifdef vax
-c
-c parameter(XDRDINF = 1.7014118346046923e+38)
-c parameter(XDRFINF = 2.93873588e-39)
-
-c ifdef sun
- parameter(XDRDINF = 1.797693134862315809d+308)
- parameter(XDRFINF = 3.4028235677e+38)
-c
-c Fill values
-c These values are stuffed into newly allocated space as appropriate.
-c The hope is that one might use these to notice that a particular dataum
-c has not been set.
-c
- integer FILBYTE,FILCHAR, FILSHORT,FILLONG
- real FILFLOAT
- double precision FILDOUB
-c
-c Largest Negative value
- parameter(FILBYTE = 128)
- parameter(FILCHAR = 0)
- parameter(FILSHORT = 32768)
- parameter(FILLONG = -2147483647-1)
-c IEEE Infinity
- parameter(FILFLOAT = XDRFINF)
- parameter(FILDOUB = XDRDINF)
diff --git a/forbind/src/osf.m4 b/forbind/src/osf.m4
deleted file mode 100644
index 13bbc81..0000000
--- a/forbind/src/osf.m4
+++ /dev/null
@@ -1,73 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', OSF)
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# C integral type equivalent to a FORTRAN INTEGER
-define(`F_INTEGER',`int')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`byte')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/osf0.inc b/forbind/src/osf0.inc
deleted file mode 100644
index d8b6178..0000000
--- a/forbind/src/osf0.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-c machine specific xdr infinity constants
-c
- double precision XDRDINF,XDRFINF
-c ifdef vax
-c
- parameter(XDRDINF = 1.70141178e+38)
- parameter(XDRFINF = 1.70141178e+38)
-c
-c Fill values
-c These values are stuffed into newly allocated space as appropriate.
-c The hope is that one might use these to notice that a particular dataum
-c has not been set.
-c
- integer FILBYTE,FILCHAR, FILSHORT,FILLONG
- real FILFLOAT
- double precision FILDOUB
-c
-c Largest Negative value
- parameter(FILBYTE = 128)
- parameter(FILCHAR = 0)
- parameter(FILSHORT = 32768)
- parameter(FILLONG = -2147483648)
-c IEEE Infinity
- parameter(FILFLOAT = XDRFINF)
- parameter(FILDOUB = XDRDINF)
diff --git a/forbind/src/paragon.m4 b/forbind/src/paragon.m4
deleted file mode 100644
index b489ce6..0000000
--- a/forbind/src/paragon.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', Paragon)
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# our C compiler replaces a "$" in a module name with an "_"
-# dont now what to do about that just yet
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer*1')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/puma.m4 b/forbind/src/puma.m4
deleted file mode 100644
index b489ce6..0000000
--- a/forbind/src/puma.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', Paragon)
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# our C compiler replaces a "$" in a module name with an "_"
-# dont now what to do about that just yet
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer*1')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/pumagon.m4 b/forbind/src/pumagon.m4
deleted file mode 100644
index b489ce6..0000000
--- a/forbind/src/pumagon.m4
+++ /dev/null
@@ -1,71 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', Paragon)
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# our C compiler replaces a "$" in a module name with an "_"
-# dont now what to do about that just yet
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer*1')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/sgi.m4 b/forbind/src/sgi.m4
deleted file mode 100644
index c7dc924..0000000
--- a/forbind/src/sgi.m4
+++ /dev/null
@@ -1,73 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', IRIX)
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`
-#define FORTRAN_HAS_NO_BYTE
-')
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/sunos.m4 b/forbind/src/sunos.m4
deleted file mode 100644
index 4c781dc..0000000
--- a/forbind/src/sunos.m4
+++ /dev/null
@@ -1,68 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', Sun)
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`byte')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/sunos0.inc b/forbind/src/sunos0.inc
deleted file mode 100644
index 8515772..0000000
--- a/forbind/src/sunos0.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-c machine specific xdr infinity constants
-c
- double precision XDRDINF,XDRFINF
-c ifdef vax
-c
-c parameter(XDRDINF = 1.7014118346046923e+38)
-c parameter(XDRFINF = 2.93873588e-39)
-
-c ifdef sun
- parameter(XDRDINF = 1.797693134862315900e+308)
- parameter(XDRFINF = 3.40282357e+38)
-c
-c Fill values
-c These values are stuffed into newly allocated space as appropriate.
-c The hope is that one might use these to notice that a particular dataum
-c has not been set.
-c
- integer FILBYTE,FILCHAR, FILSHORT,FILLONG
- real FILFLOAT
- double precision FILDOUB
-c
-c Largest Negative value
- parameter(FILBYTE = 128)
- parameter(FILCHAR = 0)
- parameter(FILSHORT = 32768)
- parameter(FILLONG = -2147483647-1)
-c IEEE Infinity
- parameter(FILFLOAT = XDRFINF)
- parameter(FILDOUB = XDRDINF)
diff --git a/forbind/src/ultrix.m4 b/forbind/src/ultrix.m4
deleted file mode 100644
index 144a7f6..0000000
--- a/forbind/src/ultrix.m4
+++ /dev/null
@@ -1,73 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', ULTRIX)
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`
-#define FORTRAN_HAS_NO_BYTE
-')
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/ultrix0.inc b/forbind/src/ultrix0.inc
deleted file mode 100644
index d8b6178..0000000
--- a/forbind/src/ultrix0.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-c machine specific xdr infinity constants
-c
- double precision XDRDINF,XDRFINF
-c ifdef vax
-c
- parameter(XDRDINF = 1.70141178e+38)
- parameter(XDRFINF = 1.70141178e+38)
-c
-c Fill values
-c These values are stuffed into newly allocated space as appropriate.
-c The hope is that one might use these to notice that a particular dataum
-c has not been set.
-c
- integer FILBYTE,FILCHAR, FILSHORT,FILLONG
- real FILFLOAT
- double precision FILDOUB
-c
-c Largest Negative value
- parameter(FILBYTE = 128)
- parameter(FILCHAR = 0)
- parameter(FILSHORT = 32768)
- parameter(FILLONG = -2147483648)
-c IEEE Infinity
- parameter(FILFLOAT = XDRFINF)
- parameter(FILDOUB = XDRDINF)
diff --git a/forbind/src/unicos.m4 b/forbind/src/unicos.m4
deleted file mode 100644
index 5023fea..0000000
--- a/forbind/src/unicos.m4
+++ /dev/null
@@ -1,82 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', UNICOS)
-
-# Includes needed at the top of a file of C to be called from FORTRAN
-define(`M4__STRING_DESCRIPTOR_INCLUDES',`
-#include <fortran.h> /* for _fcd functions */
-')
-
-# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT
-define(`M4__FORTRAN_DEFINES',`
-#define FORTRAN_HAS_NO_BYTE
-#define FORTRAN_HAS_NO_SHORT
-')
-
-# transformation from fortran name to name of C module
-# for unicos, just convert to uppercase
-define(`NAMEF',
- `translit($1,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ)')
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1d')
-
-# extra arguments, if any, for string length
-define(`STRINGX',`')
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- _fcd $1d; `$2'') # declare string parameter as type _fcd
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`
- char *$1 = _fcdtocp ($1d);
- unsigned $1len = _fcdlen ($1d);') # use _fcd functions
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`integer')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`real')
-
-divert(0)dnl
diff --git a/forbind/src/unicos0.inc b/forbind/src/unicos0.inc
deleted file mode 100644
index b57ac08..0000000
--- a/forbind/src/unicos0.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-c machine specific xdr infinity constants
-c
- double precision XDRDINF,XDRFINF
-c ifdef vax
-c
-c parameter(XDRDINF = 1.7014118346046923e+38)
-c parameter(XDRFINF = 2.93873588e-39)
-
-c ifdef sun
- parameter(XDRDINF = 1.797693134862315900e+308)
- parameter(XDRFINF = 3.40282357e+38)
-c
-c Fill values
-c These values are stuffed into newly allocated space as appropriate.
-c The hope is that one might use these to notice that a particular dataum
-c has not been set.
-c
- integer FILBYTE,FILCHAR, FILSHORT,FILLONG
- real FILFLOAT
- double precision FILDOUB
-c
-c Largest Negative value
- parameter(FILBYTE = 128)
- parameter(FILCHAR = 0)
- parameter(FILSHORT = 32768)
- parameter(FILLONG = -2147483648)
-c IEEE Infinity
- parameter(FILFLOAT = XDRFINF)
- parameter(FILDOUB = XDRDINF)
diff --git a/forbind/src/vms.m4 b/forbind/src/vms.m4
deleted file mode 100644
index 5ea1ce8..0000000
--- a/forbind/src/vms.m4
+++ /dev/null
@@ -1,74 +0,0 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
-# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
-# 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 Sandia Corporation 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.
-#
-
-
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', VMS)
-
-# Includes needed at the top of a file of C to be called from FORTRAN
-define(`M4__STRING_DESCRIPTOR_INCLUDES',
-`#include descrip'
-)
-
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1') # for vms, just use same name
-
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1d') # append d for argument name descriptor
-
-# extra arguments, if any, for string length
-define(`STRINGX',`')
-
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- struct dsc$descriptor_s * $1d; `$2'')
-
-# declarations and initializations of canonical local variables
-define(`STRINGL',`
- char *$1 = $1d->dsc$a_pointer;
- int $1len = $1d->dsc$w_length;') # use descriptor components
-
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
-
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`byte')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/vms0.inc b/forbind/src/vms0.inc
deleted file mode 100644
index d3a3538..0000000
--- a/forbind/src/vms0.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-c machine specific xdr infinity constants
-c
- double precision XDRDINF,XDRFINF
-c ifdef vax
-c
- parameter(XDRDINF = 1.7014118346046923e+38)
- parameter(XDRFINF = 2.93873588e-39)
-
-c ifdef sun
-c parameter(XDRDINF = 1.797693134862315900e+308)
-c parameter(XDRFINF = 3.40282357e+38)
-c
-c Fill values
-c These values are stuffed into newly allocated space as appropriate.
-c The hope is that one might use these to notice that a particular dataum
-c has not been set.
-c
- integer FILBYTE,FILCHAR, FILSHORT,FILLONG
- real FILFLOAT
- double precision FILDOUB
-c
-c Largest Negative value
- parameter(FILBYTE = 128)
- parameter(FILCHAR = 0)
- parameter(FILSHORT = 32768)
- parameter(FILLONG = -2147483648)
-c IEEE Infinity
- parameter(FILFLOAT = XDRFINF)
- parameter(FILDOUB = XDRDINF)
diff --git a/forbind/test/CVS/Entries b/forbind/test/CVS/Entries
deleted file mode 100644
index 6f5cf27..0000000
--- a/forbind/test/CVS/Entries
+++ /dev/null
@@ -1,38 +0,0 @@
-/Imakefile/1.7/Tue Jul 20 21:36:59 2010//
-/Makefile.standalone/1.2/Tue Jul 20 21:36:59 2010//
-/makedmp/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/t.f.tmp/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/test-nsided.dmp/1.1/Sat Jan 23 01:15:18 2010//
-/test.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/test.exo_f/1.2/Wed Jul 15 19:17:38 2009//
-/test1.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/test2-1.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/test2-2.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testall/1.5/Thu Feb 26 20:01:44 2009//
-/testcp.f/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/testcp_dd.dmp/1.8/Thu Feb 26 20:01:44 2009//
-/testcp_ds.dmp/1.8/Thu Feb 26 20:01:44 2009//
-/testcp_sd.dmp/1.8/Thu Feb 26 20:01:44 2009//
-/testcp_ss.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testcpd.f/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/testcpln.dmp/1.5/Wed Feb 24 13:48:30 2010//
-/testcpln.f/1.2/Wed Feb 20 19:50:21 2008//
-/testcpnl.dmp/1.9/Wed Feb 24 13:48:30 2010//
-/testcpnl.f/1.1/Sun Nov 26 05:37:24 2006//
-/testd.dmp/1.11/Wed Feb 24 13:48:30 2010//
-/testrd.dmp/1.9/Thu Feb 26 20:01:44 2009//
-/testrd.f/1.3/Sun Nov 26 05:37:25 2006//
-/testrd1.dmp/1.8/Thu Feb 26 20:01:44 2009//
-/testrd1.f/1.2/Wed Apr 12 17:44:49 2006//
-/testrd_nsid.dmp/1.1/Sat Jan 23 01:15:18 2010//
-/testrd_nsid.f/1.1/Sat Jan 23 01:15:18 2010//
-/testrdd.dmp/1.8/Thu Feb 26 20:01:44 2009//
-/testrdd.f/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/testwt.f/1.2/Wed Apr 12 17:44:49 2006//
-/testwt1.f/1.2/Wed Apr 12 17:44:49 2006//
-/testwt2.f/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/testwt3.f/1.1.1.1/Tue Sep 6 15:59:03 2005//
-/testwt_nsid.f/1.1/Sat Jan 23 01:15:18 2010//
-/testwtd.f/1.1.1.1/Tue Sep 6 15:59:04 2005//
-/testwtm.f/1.1.1.1/Tue Sep 6 15:59:04 2005//
-D
diff --git a/forbind/test/CVS/Repository b/forbind/test/CVS/Repository
deleted file mode 100644
index d186d5d..0000000
--- a/forbind/test/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-exodusii/forbind/test
diff --git a/forbind/test/CVS/Root b/forbind/test/CVS/Root
deleted file mode 100644
index 187e03d..0000000
--- a/forbind/test/CVS/Root
+++ /dev/null
@@ -1 +0,0 @@
-:ext:gdsjaar at exodusii.cvs.sourceforge.net:/cvsroot/exodusii
diff --git a/nemesis/CMakeLists.txt b/nemesis/CMakeLists.txt
new file mode 100644
index 0000000..a50efde
--- /dev/null
+++ b/nemesis/CMakeLists.txt
@@ -0,0 +1,138 @@
+cmake_minimum_required(VERSION 2.6)
+PROJECT(Nemesis)
+
+SET(NEMESIS_VERSION_MAJOR "3")
+SET(NEMESIS_VERSION_MINOR "09")
+SET(NEMESIS_VERSION_PATCH "0")
+SET(NEMESIS_VERSION "${NEMESIS_VERSION_MAJOR}.${NEMESIS_VERSION_MINOR}")
+SET(NEMESIS_VERSION_FULL "${NEMESIS_VERSION}.${NEMESIS_VERSION_PATCH}")
+
+SET(NEMESIS_BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}")
+
+SET(HEADERS "ne_nemesisI.h")
+
+find_path( NETCDF_INCLUDE_DIR netcdf.h
+ $ENV{ACCESS}/inc
+ $ENV{NETCDF_DIR}/inc
+ $ENV{NETCDF_DIR}/include
+ $ENV{NETCDF_DIR}/libsrc
+ )
+
+find_library( NETCDF_LIBRARY netcdf
+ $ENV{ACCESS}/lib/shared
+ $ENV{ACCESS}/lib
+ $ENV{NETCDF_DIR}/lib
+ $ENV{NETCDF_DIR}/libsrc/.libs
+ )
+
+find_program (NETCDF_NCDUMP ncdump
+ $ENV{ACCESS}/bin
+ $ENV{NETCDF_DIR}/bin
+ $ENV{NETCDF_DIR}/ncdump
+ )
+
+find_library( EXODUS_LIBRARY exodus
+ $ENV{ACCESS}/lib/shared
+ $ENV{ACCESS}/lib
+ )
+
+# Hack for HDF5
+find_library( HDF5_LIBRARY hdf5
+ $ENV{ACCESS}/lib/shared
+ $ENV{ACCESS}/lib
+ $ENV{NETCDF_DIR}/lib
+ $ENV{NETCDF_DIR}/libsrc/.libs
+ /usr/local/hdf5/lib
+ )
+
+find_library( HDF5HL_LIBRARY hdf5_hl
+ $ENV{ACCESS}/lib/shared
+ $ENV{ACCESS}/lib
+ $ENV{NETCDF_DIR}/lib
+ $ENV{NETCDF_DIR}/libsrc/.libs
+ /usr/local/hdf5/lib
+ )
+
+find_library(Z_LIBRARY z
+ /usr/local/zlib/lib
+ )
+
+find_library(MATH_LIBRARY
+ NAMES m
+ PATHS /usr/lib64
+ /usr/lib
+)
+
+INCLUDE(CheckIncludeFile)
+CHECK_INCLUDE_FILE( malloc.h EX_HAVE_MALLOC_H )
+
+INCLUDE_DIRECTORIES(
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_BINARY_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../exodusii/cbind/include/"
+ "${CMAKE_CURRENT_BINARY_DIR}/../exodusii/cbind/include/"
+ "${NETCDF_INCLUDE_DIR}"
+)
+
+SET(SOURCES
+ne_gcmp.c
+ne_gebig.c
+ne_gelcm.c
+ne_gelm.c
+ne_gelt.c
+ne_gennm.c
+ne_genv.c
+ne_giinf.c
+ne_ginig.c
+ne_glbp.c
+ne_gncm.c
+ne_gncor.c
+ne_gneat.c
+ne_gnelc.c
+ne_gnm.c
+ne_gnnnm.c
+ne_gnns.c
+ne_gnnsd.c
+ne_gnnv.c
+ne_gnspg.c
+ne_gnss.c
+ne_gnssd.c
+ne_gsspg.c
+ne_pcmp.c
+ne_pcmpc.c
+ne_pebig.c
+ne_pelcm.c
+ne_pelm.c
+ne_pevs.c
+ne_pennm.c
+ne_piinf.c
+ne_pinig.c
+ne_plbp.c
+ne_plbpc.c
+ne_pncm.c
+ne_pncor.c
+ne_pneat.c
+ne_pnelc.c
+ne_pnm.c
+ne_pnnnm.c
+ne_pnns.c
+ne_pnnsd.c
+ne_pnspg.c
+ne_pnss.c
+ne_pnssd.c
+ne_pnvs.c
+ne_psspg.c
+ne_util.c
+)
+
+ADD_LIBRARY(nemesis ${SOURCES})
+TARGET_LINK_LIBRARIES(nemesis ${EXODUS_LIBRARY} ${NETCDF_LIBRARY} ${HDF5HL_LIBRARY} ${HDF5_LIBRARY} ${Z_LIBRARY} ${MATH_LIBRARY})
+
+ADD_EXECUTABLE(ne_test ne_test.c)
+TARGET_LINK_LIBRARIES( ne_test nemesis ${EXODUS_LIBRARY} ${NETCDF_LIBRARY} ${HDF5HL_LIBRARY} ${HDF5_LIBRARY} ${Z_LIBRARY} ${MATH_LIBRARY})
+
+INSTALL(TARGETS nemesis
+ RUNTIME DESTINATION lib COMPONENT Runtime
+ LIBRARY DESTINATION lib COMPONENT Runtime
+ ARCHIVE DESTINATION lib COMPONENT Development)
+INSTALL(FILES ${HEADERS} DESTINATION include COMPONENT Development)
diff --git a/COPYRIGHT b/nemesis/COPYRIGHT
similarity index 96%
rename from COPYRIGHT
rename to nemesis/COPYRIGHT
index f11b681..07f206f 100644
--- a/COPYRIGHT
+++ b/nemesis/COPYRIGHT
@@ -1,4 +1,4 @@
-Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
retains certain rights in this software.
diff --git a/nemesis/Imakefile b/nemesis/Imakefile
new file mode 100644
index 0000000..d19db30
--- /dev/null
+++ b/nemesis/Imakefile
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+XCOMM $Id: Imakefile,v 1.15 2008/01/24 19:43:41 gdsjaar Exp $
+XCOMM Imakefile for Nemesis libraries
+/* Building Nemesis libraries for installation
+ * % accmkmf
+ * % make Makefiles
+ * % make all
+ * % make install
+ *
+ * Building Nemesis libraries for debugging
+ * % accmkmf
+ * % make Makefiles
+ * % make DEBUG=-g
+ *
+ */
+
+#define IHaveSubdirs
+
+#define PassDebugFlags "DEBUG=$(DEBUG)" \
+ "CDEBUGFLAGS=$(CDEBUGFLAGS)" \
+ "CXXDEBUGFLAGS=$(CXXDEBUGFLAGS)" \
+ "F90DEBUGFLAGS=$(F90DEBUGFLAGS)" \
+ "F77DEBUGFLAGS=$(F77DEBUGFLAGS)"
+
+#define ExtraOptions "CCOPTIONS=$(CCOPTIONS)"
+
+#ifndef BuildSharedExodusLibrary
+#define BuildSharedExodusLibrary NO
+#endif
+
+#define DoNormalLib YES
+#define DoSharedLib BuildSharedExodusLibrary
+#define LibName nemesis
+SOREV = 4
+#define SoRev SOREV
+
+#ifdef PARALLEL
+CCOPTIONS = ParallelCCOptions
+F77OPTIONS = ParallelF77Options
+LIBDIR = $(PLIBDIR)
+#endif
+
+DEFINES = $(PICFLAGS)
+SUBDIRS = forbind
+
+INCLIST1 = ne_nemesisI.h ne_nemesisI_int.h
+INCLIST2 = ne_nemesis_int.inc
+
+SRCS = \
+ne_gcmp.c ne_gebig.c ne_gelcm.c ne_gelm.c ne_gelt.c ne_gennm.c \
+ne_genv.c ne_giinf.c ne_ginig.c ne_glbp.c ne_gncm.c ne_gncor.c \
+ne_gneat.c ne_gnelc.c ne_gnm.c ne_gnnnm.c ne_gnns.c ne_gnnsd.c \
+ne_gnnv.c ne_gnspg.c ne_gnss.c ne_gnssd.c ne_gsspg.c ne_pcmp.c \
+ne_pcmpc.c ne_pebig.c ne_pelcm.c ne_pelm.c ne_pennm.c ne_pevs.c \
+ne_piinf.c ne_pinig.c ne_plbp.c ne_plbpc.c ne_pncm.c ne_pncor.c \
+ne_pneat.c ne_pnelc.c ne_pnm.c ne_pnnnm.c ne_pnns.c ne_pnnsd.c \
+ne_pnspg.c ne_pnss.c ne_pnssd.c ne_pnvs.c ne_psspg.c ne_util.c
+
+OBJS = ${SRCS:.c=.o}
+
+REQUIREDLIBS = -L$(SHLIBDIR) $(EXOIIV2C) $(NETCDF)
+LIBS = $(NETCDF) $(EXOIIV2C)
+
+#include <Library.tmpl>
+
+#if Build64BitAccess == YES
+AllTarget(libnemesis.a libnemIf.a libnemIf32.a)
+#else
+AllTarget(libnemesis.a libnemIf.a)
+#endif
+
+InstallIncludeList(makeincludes,$(INCLIST1),$(INCDIR))
+InstallIncludeList(install,$(INCLIST1),$(INCDIR))
+
+InstallSubdirIncludeList(makeincludes,forbind,$(INCLIST2),$(INCDIR))
+
+/* Directory for nemesis c library */
+NormalLibraryTarget(nemesis,$(OBJS))
+
+/* Directory for nemesis fortran wrappers */
+NamedTargetSubdirs(libnemIf.a,forbind,"making nemIf ",PassDebugFlags ExtraOptions,libnemIf.a)
+
+#if Build64BitAccess == YES
+NamedTargetSubdirs(libnemIf32.a,forbind,"making nemIf32 ",PassDebugFlags ExtraOptions,libnemIf32.a)
+#endif
+
+InstallLibrary(nemesis,$(LIBDIR))
+InstallLibraryAlias(nemesis,nemIc,$(LIBDIR))
+InstallLibrary(nemIf,$(LIBDIR))
+
+#if Build64BitAccess == YES
+InstallLibrary(nemIf32,$(LIBDIR))
+#endif
+
+#if Parallel
+InstallParallelLibrary(nemesis,$(PLIBDIR))
+InstallParallelLibrary(nemIf,$(PLIBDIR))
+
+#if Build64BitAccess == YES
+InstallParallelLibrary(nemIf32,$(PLIBDIR))
+#endif
+
+#endif
+
+
+CTESTLIBS = $(EXOIIV2C) $(NETCDF) -lm
+FTESTLIBS = $(EXOIIV2FOR) $(EXOIIV2C) $(NETCDF) -lm
+
+test: libnemesis.a libnemIf.a ne_test.c forbind/ne_test.F
+ $(CC) -c $(CFLAGS) ne_test.c
+ $(CC) $(LDOPTIONS) -o ne_ctest ne_test.o libnemesis.a $(LIBPATH) $(CTESTLIBS)
+ $(FC) -c $(FFLAGS) $(STD_DEFINES) -I./forbind forbind/ne_test.F
+ $(FC) $(LDOPTIONS) -o ne_ftest ne_test.o libnemIf.a libnemesis.a $(LIBPATH) $(FTESTLIBS)
+
+ExtraStuffToClean(ne_ctest ne_ftest ne_test.exoII ne_test.nemI)
+
+DependTarget()
+LibraryObjectRule()
diff --git a/Makefile.standalone b/nemesis/Makefile.standalone
similarity index 69%
rename from Makefile.standalone
rename to nemesis/Makefile.standalone
index 8b42b40..de0f998 100644
--- a/Makefile.standalone
+++ b/nemesis/Makefile.standalone
@@ -1,4 +1,4 @@
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+# Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
# retains certain rights in this software.
#
@@ -51,10 +51,6 @@ SYSTEM := $(shell uname)
# Linux
#========================================================================
ifeq ($(SYSTEM),Linux)
-
-# Default Compiler:
-COMPILER = GNU
-
BITS = 32
RANLIB = ranlib
OS_TYPE = linux
@@ -76,7 +72,7 @@ endif
ifeq ($(COMPILER),GNU)
CC = gcc
FC = g77
-CCOPTIONS = -O2 -Wall
+CCOPTIONS = -O2 -Wall -Wno-deprecated
F77OPTIONS = -O2
endif
@@ -109,17 +105,28 @@ endif
# SGI
#========================================================================
ifeq ($(SYSTEM),IRIX64)
-BITS = 64
+
+DO32=FALSE
+
RANLIB = true
OS_TYPE = irix
-
AR = ar -rcv
CC = cc
FC = f77
+
+ifeq ($(DO32),TRUE)
+BITS = 32
+CCOPTIONS = -n32 -LANG:std
+F77OPTIONS = -n32
+F77PREC =
+
+else
+BITS = 64
CCOPTIONS = -64 -LANG:std
F77OPTIONS = -64
F77PREC = -DBuild64 -r8 -i8
endif
+endif
#========================================================================
# IBM
@@ -135,7 +142,7 @@ FC = xlf
CCOPTIONS = -q64 -w
F77OPTIONS = -q64 -w
F77PREC = -WF,-DBuild64 -qintsize=8 -qrealsize=8
-LDFLAGS = -bmaxdata:0x06FFFFFFFFFFFFF8 -bmaxstack:0x10000000
+SYSLIB = -lm
endif
#========================================================================
@@ -168,67 +175,68 @@ OS_TYPE = osf
AR = ar -crsv
CC = cc
FC = f77
-CCOPTIONS = -std
+CCOPTIONS = -std strict_ansi -ptr $(shell pwd)/OSF1/cxx_repository -noimplicit_include -ttimestamp
endif
#========================================================================
-#========================================================================
-# Darwin (Apple OSX)
-#========================================================================
-ifeq ($(SYSTEM),Darwin)
-BITS = 32
-RANLIB = ranlib
-OS_TYPE = darwin
+OPTIMIZE_FLAG = -O
+STD_DEFINES = -DVERBOSE
-AR = ar -crsv
-CC = gcc
-FC = g77
-CCOPTIONS =
-F77OPTIONS =
-endif
-#========================================================================
+CFLAGS = $(OPTIMIZE_FLAG) $(CCOPTIONS) $(STD_DEFINES) $(EXODUS_INC) $(NETCDF_INC)
+FFLAGS = $(OPTIMIZE_FLAG) $(F77OPTIONS) $(F77PREC) $(EXODUS_INC)
-OPTIMIZE_FLAG = -O2
-STD_DEFINES = -DVERBOSE
+NETCDF_INC = -I$(ACCESS)/inc
+EXODUS_INC = -I$(ACCESS)/inc
-CFLAGS = $(OPTIMIZE_FLAG) $(CCOPTIONS) $(STD_DEFINES) $(LOC_EXOII_INC) $(NETCDF_INC)
-FFLAGS = $(OPTIMIZE_FLAG) $(F77OPTIONS) $(LOC_EXOII_INC) $(F77PREC)
+NETCDF_LIB_DIR = ${ACCESS}/lib
+NETCDF_LIB = -L$(NETCDF_LIB_DIR) -lnetcdf
-# Use include files locates in exodusii/cbind/include
-LOC_EXOII_INC = -I../../cbind/include -I../../forbind/include
+EXODUS_LIB_DIR = ${ACCESS}/lib
+EXODUS_LIB = -L$(EXODUS_LIB_DIR) -lexodus
+EXODUS_FLIB = -L$(EXODUS_LIB_DIR) -lexoIIv2for
-NETCDF_INC = -I/usr/local/eng_sci/struct/x86_64/current64-gcc/inc
+EXT_LIBS = $(EXODUS_LIB) $(NETCDF_LIB)
+EXT_FLIBS = $(EXODUS_FLIB)
-NETCDF_LIB_DIR = /usr/local/eng_sci/struct/x86_64/current64-gcc/lib
-NETCDF_LIB = -L$(NETCDF_LIB_DIR) -lnetcdf
+SUBDIRS = forbind
+SRCS = ne_gcmp.c ne_gebig.c ne_gelcm.c ne_gelm.c ne_gelt.c ne_gennm.c \
+ ne_genv.c ne_giinf.c ne_ginig.c ne_glbp.c ne_gncm.c ne_gncor.c \
+ ne_gneat.c ne_gnelc.c ne_gnm.c ne_gnnnm.c ne_gnns.c ne_gnnsd.c \
+ ne_gnnv.c ne_gnspg.c ne_gnss.c ne_gnssd.c ne_gsspg.c ne_pcmp.c \
+ ne_pcmpc.c ne_pebig.c ne_pelcm.c ne_pelm.c ne_pennm.c ne_pevs.c \
+ ne_piinf.c ne_pinig.c ne_plbp.c ne_plbpc.c ne_pncm.c ne_pncor.c \
+ ne_pneat.c ne_pnelc.c ne_pnm.c ne_pnnnm.c ne_pnns.c ne_pnnsd.c \
+ ne_pnspg.c ne_pnss.c ne_pnssd.c ne_pnvs.c ne_psspg.c ne_util.c \
-SUBDIRS = cbind/src forbind/src cbind/test forbind/test
+OBJS = ${SRCS:.c=.o}
-all:: libexodus.a libexoIIv2for.a
+all:: libnemesis.a libnemIf.a
-libexodus.a::
- echo "making exodus in cbind/src"
- (cd cbind/src && $(MAKE) $(MFLAGS) -f Makefile.standalone "AR=$(AR)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "RANLIB=$(RANLIB)" libexodus.a)
- cp cbind/src/libexodus.a .
- $(RANLIB) libexodus.a
+libnemesis.a: $(OBJS)
+ $(AR) $@ $?
+ $(RANLIB) $@
-libexoIIv2for.a::
- echo "making exoIIv2for in forbind/src"
- (cd forbind/src && $(MAKE) $(MFLAGS) -f Makefile.standalone "BITS=$(BITS)" "AR=$(AR)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "FC=$(FC)" "FFLAGS=$(FFLAGS)" "RANLIB=$(RANLIB)" "SYSTEM=$(SYSTEM)" "OS_TYPE=$(OS_TYPE)" libexoIIv2for.a)
- cp forbind/src/libexoIIv2for.a .
- $(RANLIB) libexoIIv2for.a
+libnemIf.a:
+ (cd forbind && $(MAKE) $(MFLAGS) -f Makefile.standalone "BITS=$(BITS)" "AR=$(AR)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "FC=$(FC)" "FFLAGS=$(FFLAGS)" "RANLIB=$(RANLIB)" "SYSTEM=$(SYSTEM)" "OS_TYPE=$(OS_TYPE)" libnemIf.a)
+ cp forbind/libnemIf.a .
check: test
-test:: libexodus.a libexoIIv2for.a
+test:: ne_test.c libnemesis.a
+ $(CC) -c $(CFLAGS) ne_test.c
+ $(CC) $(CFLAGS) -o ne_ctest ne_test.o libnemesis.a $(EXT_LIBS) -lm
+ ./ne_ctest
-test::
- echo "making test in cbind/test"
- (cd cbind/test && $(MAKE) $(MFLAGS) -f Makefile.standalone "AR=$(AR)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)" "RANLIB=$(RANLIB)" "NETCDF_LIB=$(NETCDF_LIB)" all)
+test:: forbind/ne_test.f libnemIf.a
+ $(FC) -c $(FFLAGS) -I./forbind forbind/ne_test.f
+ $(FC) $(FFLAGS) -o ne_ftest ne_test.o libnemIf.a libnemesis.a $(EXT_FLIBS) $(EXT_LIBS) -lm
+ ./ne_ftest
-test::
- echo "making test in forbind/test"
- (cd forbind/test && $(MAKE) $(MFLAGS) -f Makefile.standalone "BITS=$(BITS)" "AR=$(AR)" "CC=$(CC)" "CFLAGS=$(CFLAGS)" "FC=$(FC)" "FFLAGS=$(FFLAGS)" "LDFLAGS=$(LDFLAGS)" "RANLIB=$(RANLIB)" "NETCDF_LIB=$(NETCDF_LIB)" "SYSTEM=$(SYSTEM)" all)
+clean::
+ rm -f *.CKP *.ln *.BAK *.bak *.o *.M *.mod core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"*
+
+clean::
+ rm -f ne_ctest ne_ftest ne_test.exoII ne_test.nemI
clean::
@for flag in $(MAKEFLAGS) ''; do \
@@ -241,3 +249,6 @@ clean::
fi; \
done
+.SUFFIXES: .c
+.c.o:
+ $(CC) -c -I. $(CFLAGS) $*.c
diff --git a/nemesis/README b/nemesis/README
new file mode 100644
index 0000000..31029c8
--- /dev/null
+++ b/nemesis/README
@@ -0,0 +1,27 @@
+The Nemesis 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 text.
+
+We appreciate feedback from users of this package. Please send
+comments, suggestions, and bug reports to Greg Sjaardema <gdsjaar at sandia.gov>.
+Please identify the version of the package.
+
+========================================================================
+
+NEMESIS is an enhancement to the EXODUSII finite element database
+model used to store and retrieve data for unstructured parallel finite
+element analyses. NEMESIS adds data structures which facilitate the
+partitioning of a scalar (standard serial) EXODUSII file onto parallel
+disk systems found on many parallel computers. Since the NEMESIS
+application programming interface (API) can be used to append
+information to an existing EXODUSII database, any existing software
+that reads EXODUSII files can be used on files which contain NEMESIS
+information. The NEMESIS information is written and read via C or C++
+callable functions which compromise the NEMESIS I API.
+
+The exodusII package is available at http://sourceforge.net/projects/exodusii
+
diff --git a/nemesis/doc/nemesis.pdf b/nemesis/doc/nemesis.pdf
new file mode 100644
index 0000000..169b3df
Binary files /dev/null and b/nemesis/doc/nemesis.pdf differ
diff --git a/forbind/src/hpux.m4 b/nemesis/forbind/Imakefile
similarity index 59%
rename from forbind/src/hpux.m4
rename to nemesis/forbind/Imakefile
index 3fb5382..61662ae 100644
--- a/forbind/src/hpux.m4
+++ b/nemesis/forbind/Imakefile
@@ -1,5 +1,4 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+# Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
# retains certain rights in this software.
#
@@ -32,37 +31,43 @@ divert(-1)
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+/* Use local include/XXX.h files instead of installed *.h files */
+ALTINC = IncRef-I../
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', HP-UX)
+F77CPPFLAGS = F77CppFlags
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1') # for HP-UX, use same name
+SRCS = ne_jack.c
+SRCSF = addrwrpn.F
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
+OBJS = ${SRCS:.c=.o} ${SRCSF:.F=.o}
+LibraryTargetSubdirsCopy(libnemIf.a,$(OBJS),../)
+CleanupCapF(addrwrpn.f)
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
+#if Build64BitAccess == YES
+/* Need to compile ne_jack.c without the -DBuild64 option
+ * real* -> float* (actually void* since it handles both float* and double*)
+ */
+ne_jack32.o: ne_jack.c
+ $(CC) -o ne_jack32.o -c $(CFLAGS) -DDEFAULT_REAL_INT ne_jack.c
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
+all:: libnemIf32.a
+libnemIf32.a: ne_jack32.o
+ $(AR) $@ $?
+ $(_NULLCMD_)
+ $(_NULLCMD_)
+ $(CP) $@ ../
+#endif
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
+/*
+ * 32-bit build:
+ * Compile ne_jack.c and put in libexoIIv2for.a archive.
+ *
+ * 64-bit build: (using 8-byte integer/real)
+ * Compile addrwrap.F (contains main api name 'func'; calls 'func4' name)
+ * Compile ne_jack.c with -DBuild64 (adds 4_ to function names)
+ * -- put above two object files into libnemIf.a
+ *
+ */
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
+DependTarget()
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
-
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`byte')
-
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
-
-divert(0)dnl
diff --git a/forbind/src/sun.m4 b/nemesis/forbind/Makefile.standalone
similarity index 59%
rename from forbind/src/sun.m4
rename to nemesis/forbind/Makefile.standalone
index b10da2b..952438b 100644
--- a/forbind/src/sun.m4
+++ b/nemesis/forbind/Makefile.standalone
@@ -1,5 +1,4 @@
-divert(-1)
-# Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+# Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
# retains certain rights in this software.
#
@@ -32,36 +31,38 @@ divert(-1)
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# Name of system platform (for use in comments)
-define(`M4__SYSTEM', Sun)
+INCLUDES = -I..
+F77EXTRAOPTIONS = -I..
-# transformation from fortran name to name of C module
-define(`NAMEF',`$1_') # for Sun and most unixes, just append an underscore
+SRCS = ne_jack.c
-# transformation from string name to corresponding argument name
-define(`STRINGF',`$1')
+SRCSF = addrwrpn.F
-# extra arguments, if any, for string length
-define(`STRINGX',`, $1len') # one extra stringlen parameter
+OBJS = ${SRCS:.c=.o} ${SRCSF:.F=.o}
-# declaration to be used for argument name descriptor
-define(`STRINGD',`
- char *$1; `$2'
- int $1`'`len';') # declare argument string with extra stringlen parameter
+ne_jack.c: ne_jack.src fortc1.sed fortc2.sed common.m4 $(OS_TYPE).m4
+ ./fortc -P $(BITS) -L . -O $(OS_TYPE) ne_jack.src > $@
-# declarations and initializations of canonical local variables
-define(`STRINGL',`')
+all:: libnemIf.a
+libnemIf.a: $(OBJS)
+ $(AR) $@ $?
+ $(RANLIB) $@
+ cp libnemIf.a ..
-# FORTRAN declaration for a long integer (e.g. integer*4 for Microsoft)
-define(`LONG_INT',`integer')
+clean::
+ rm -f *.c addrwrpn.f
-# FORTRAN declaration for a short integer (e.g. integer*2)
-define(`SHORT_INT',`integer*2')
+clean::
+ rm -f *.CKP *.ln *.BAK *.bak *.o *.M *.mod core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"*
-# FORTRAN declaration for an integer byte (e.g. integer*1 or byte)
-define(`BYTE_INT',`byte')
+.SUFFIXES: .c .F .f
+.c.o:
+ $(CC) -c -I.. $(CFLAGS) $*.c
+.f.o:
+ $(FC) -c $(FFLAGS) $*.f
+.F.o:
+ $(FC) -c -I.. $(DEFINES) $(FFLAGS) $*.F
-# FORTRAN declaration for double precision (e.g. real for a Cray)
-define(`DOUBLE_PRECISION',`double precision')
+# ----------------------------------------------------------------------
+# dependencies generated by makedepend or sfmakedepend
-divert(0)dnl
diff --git a/nemesis/forbind/addrwrpn.F b/nemesis/forbind/addrwrpn.F
new file mode 100644
index 0000000..78aebd1
--- /dev/null
+++ b/nemesis/forbind/addrwrpn.F
@@ -0,0 +1,2220 @@
+C Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+C DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+C retains certain rights in this software.
+C
+C Redistribution and use in source and binary forms, with or without
+C modification, are permitted provided that the following conditions are
+C met:
+C
+C * Redistributions of source code must retain the above copyright
+C notice, this list of conditions and the following disclaimer.
+C
+C * Redistributions in binary form must reproduce the above
+C copyright notice, this list of conditions and the following
+C disclaimer in the documentation and/or other materials provided
+C with the distribution.
+C
+C * Neither the name of Sandia Corporation nor the names of its
+C contributors may be used to endorse or promote products derived
+C from this software without specific prior written permission.
+C
+C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+C "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+C LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+C A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+C OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+C SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+C LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+C THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+C (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+C OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+C
+
+ subroutine adrdumn
+ end
+
+#ifdef Build64
+C-----------------------------------------------------------------------
+C
+C Get initial information from nemesis file
+C
+ subroutine negii (idne, nproc, nproc_in_f, ftype, ierr)
+ implicit none
+ integer idne
+ integer nproc
+ integer nproc_in_f
+ character*(*) ftype
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 nproc4
+ integer*4 nproc_in_f4
+ integer*4 ierr4
+C
+ idne4 = idne
+ call negii4 (idne4, nproc4, nproc_in_f4, ftype, ierr4)
+ nproc = nproc4
+ nproc_in_f = nproc_in_f4
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write initial information from nemesis file
+C
+ subroutine nepii (idne, nproc, nproc_in_f, ftype, ierr)
+ implicit none
+ integer idne
+ integer nproc
+ integer nproc_in_f
+ character*(*) ftype
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 nproc4
+ integer*4 nproc_in_f4
+ integer*4 ierr4
+C
+ idne4 = idne
+ nproc4 = nproc
+ nproc_in_f4 = nproc_in_f
+ call nepii4 (idne4, nproc4, nproc_in_f4, ftype, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read initial global information
+C
+ subroutine negig (idne, nnodes_g, nelems_g, nelem_blks_g,
+ $ nnode_sets_g, nside_sets_g, ierr)
+ implicit none
+ integer idne
+ integer nnodes_g
+ integer nelems_g
+ integer nelem_blks_g
+ integer nnode_sets_g
+ integer nside_sets_g
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 nnodes_g4
+ integer*4 nelems_g4
+ integer*4 nelem_blks_g4
+ integer*4 nnode_sets_g4
+ integer*4 nside_sets_g4
+ integer*4 ierr4
+C
+ idne4 = idne
+ call negig4 (idne4, nnodes_g4, nelems_g4, nelem_blks_g4,
+ $ nnode_sets_g4, nside_sets_g4, ierr4)
+ nnodes_g = nnodes_g4
+ nelems_g = nelems_g4
+ nelem_blks_g = nelem_blks_g4
+ nnode_sets_g = nnode_sets_g4
+ nside_sets_g = nside_sets_g4
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write initial global information
+C
+ subroutine nepig (idne, nnodes_g, nelems_g, nelem_blks_g,
+ $ nnode_sets_g, nside_sets_g, ierr)
+ implicit none
+ integer idne
+ integer nnodes_g
+ integer nelems_g
+ integer nelem_blks_g
+ integer nnode_sets_g
+ integer nside_sets_g
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 nnodes_g4
+ integer*4 nelems_g4
+ integer*4 nelem_blks_g4
+ integer*4 nnode_sets_g4
+ integer*4 nside_sets_g4
+ integer*4 ierr4
+C
+ idne4 = idne
+ nnodes_g4 = nnodes_g
+ nelems_g4 = nelems_g
+ nelem_blks_g4 = nelem_blks_g
+ nnode_sets_g4 = nnode_sets_g
+ nside_sets_g4 = nside_sets_g
+ call nepig4 (idne4, nnodes_g4, nelems_g4, nelem_blks_g4,
+ $ nnode_sets_g4, nside_sets_g4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read load balance parameters
+C
+ subroutine neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ implicit none
+ integer idne
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 nint_nodes4
+ integer*4 nbor_nodes4
+ integer*4 next_nodes4
+ integer*4 nint_elems4
+ integer*4 nbor_elems4
+ integer*4 nnode_cmaps4
+ integer*4 nelem_cmaps4
+ integer*4 processor4
+ integer*4 ierr4
+C
+ idne4 = idne
+ processor4 = processor
+ call neglbp4 (idne4, nint_nodes4, nbor_nodes4, next_nodes4,
+ $ nint_elems4, nbor_elems4, nnode_cmaps4, nelem_cmaps4,
+ $ processor4, ierr4)
+ nint_nodes = nint_nodes4
+ nbor_nodes = nbor_nodes4
+ next_nodes = next_nodes4
+ nint_elems = nint_elems4
+ nbor_elems = nbor_elems4
+ nnode_cmaps = nnode_cmaps4
+ nelem_cmaps = nelem_cmaps4
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write load balance parameters
+C
+ subroutine neplbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ implicit none
+ integer idne
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 nint_nodes4
+ integer*4 nbor_nodes4
+ integer*4 next_nodes4
+ integer*4 nint_elems4
+ integer*4 nbor_elems4
+ integer*4 nnode_cmaps4
+ integer*4 nelem_cmaps4
+ integer*4 processor4
+ integer*4 ierr4
+C
+ idne4 = idne
+ nint_nodes4 = nint_nodes
+ nbor_nodes4 = nbor_nodes
+ next_nodes4 = next_nodes
+ nint_elems4 = nint_elems
+ nbor_elems4 = nbor_elems
+ nnode_cmaps4 = nnode_cmaps
+ nelem_cmaps4 = nelem_cmaps
+ processor4 = processor
+ call neplbp4 (idne4, nint_nodes4, nbor_nodes4, next_nodes4,
+ $ nint_elems4, nbor_elems4, nnode_cmaps4, nelem_cmaps4,
+ $ processor4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write concatenated load balance parameters
+C
+ subroutine neplbpc (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps, ierr)
+ implicit none
+ integer idne
+ integer nint_nodes(*)
+ integer nbor_nodes(*)
+ integer next_nodes(*)
+ integer nint_elems(*)
+ integer nbor_elems(*)
+ integer nnode_cmaps(*)
+ integer nelem_cmaps(*)
+ integer ierr
+C
+ integer nproc
+ integer nproc_in_f
+ character*(80) ftype
+C
+ call negii (idne, nproc, nproc_in_f, ftype, ierr)
+ if (ierr.ne.0) return
+ call neplbpc2 (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps, ierr,
+ $ nproc_in_f)
+C
+ end
+C
+ subroutine neplbpc2 (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps, ierr,
+ $ nproc_in_f)
+ implicit none
+ integer idne
+ integer nproc_in_f
+ integer nint_nodes(nproc_in_f)
+ integer nbor_nodes(nproc_in_f)
+ integer next_nodes(nproc_in_f)
+ integer nint_elems(nproc_in_f)
+ integer nbor_elems(nproc_in_f)
+ integer nnode_cmaps(nproc_in_f)
+ integer nelem_cmaps(nproc_in_f)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 nint_nodes4(nproc_in_f)
+ integer*4 nbor_nodes4(nproc_in_f)
+ integer*4 next_nodes4(nproc_in_f)
+ integer*4 nint_elems4(nproc_in_f)
+ integer*4 nbor_elems4(nproc_in_f)
+ integer*4 nnode_cmaps4(nproc_in_f)
+ integer*4 nelem_cmaps4(nproc_in_f)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ DO J1X = 1, NPROC_IN_F
+ NINT_NODES4(J1X) = NINT_NODES(J1X)
+ NBOR_NODES4(J1X) = NBOR_NODES(J1X)
+ NEXT_NODES4(J1X) = NEXT_NODES(J1X)
+ NINT_ELEMS4(J1X) = NINT_ELEMS(J1X)
+ NBOR_ELEMS4(J1X) = NBOR_ELEMS(J1X)
+ NNODE_CMAPS4(J1X) = NNODE_CMAPS(J1X)
+ NELEM_CMAPS4(J1X) = NELEM_CMAPS(J1X)
+ END DO
+ call neplbpc4 (idne4, nint_nodes4, nbor_nodes4, next_nodes4,
+ $ nint_elems4, nbor_elems4, nnode_cmaps4, nelem_cmaps4,
+ $ ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read global node set parameters
+C
+ subroutine negnspg (idne, ns_ids_glob, ns_n_cnt_glob,
+ $ ns_df_cnt_glob, ierr)
+ implicit none
+ integer idne
+ integer ns_ids_glob(*)
+ integer ns_n_cnt_glob(*)
+ integer ns_df_cnt_glob(*)
+ integer ierr
+C
+ integer nnodes_g
+ integer nelems_g
+ integer nelem_blks_g
+ integer nnode_sets_g
+ integer nside_sets_g
+ call negig (idne, nnodes_g, nelems_g, nelem_blks_g,
+ $ nnode_sets_g, nside_sets_g, ierr)
+ if (ierr.ne.0) return
+ call negnspg2 (idne, ns_ids_glob, ns_n_cnt_glob,
+ $ ns_df_cnt_glob, ierr, nnode_sets_g)
+C
+ end
+C
+ subroutine negnspg2 (idne, ns_ids_glob, ns_n_cnt_glob,
+ $ ns_df_cnt_glob, ierr, nnode_sets_g)
+ implicit none
+ integer idne
+ integer nnode_sets_g
+ integer ns_ids_glob(nnode_sets_g)
+ integer ns_n_cnt_glob(nnode_sets_g)
+ integer ns_df_cnt_glob(nnode_sets_g)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ns_ids_glob4(nnode_sets_g)
+ integer*4 ns_n_cnt_glob4(nnode_sets_g)
+ integer*4 ns_df_cnt_glob4(nnode_sets_g)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ call negnspg4 (idne4, ns_ids_glob4, ns_n_cnt_glob4,
+ $ ns_df_cnt_glob4, ierr4)
+ DO J1X = 1, NNODE_SETS_G
+ NS_IDS_GLOB(J1X) = NS_IDS_GLOB4(J1X)
+ NS_N_CNT_GLOB(J1X) = NS_N_CNT_GLOB4(J1X)
+ NS_DF_CNT_GLOB(J1X) = NS_DF_CNT_GLOB4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write global node set parameters
+C
+ subroutine nepnspg (idne, global_ids, global_n_cnts,
+ $ global_df_cnts, ierr)
+ integer idne
+ integer global_ids(*)
+ integer global_n_cnts(*)
+ integer global_df_cnts(*)
+ integer ierr
+C
+ integer nnodes_g
+ integer nelems_g
+ integer nelem_blks_g
+ integer nnode_sets_g
+ integer nside_sets_g
+ call negig (idne, nnodes_g, nelems_g, nelem_blks_g,
+ $ nnode_sets_g, nside_sets_g, ierr)
+ if (ierr.ne.0) return
+ call nepnspg2 (idne, global_ids, global_n_cnts,
+ $ global_df_cnts, ierr, nnode_sets_g)
+C
+ end
+C
+ subroutine nepnspg2 (idne, global_ids, global_n_cnts,
+ $ global_df_cnts, ierr, nnode_sets_g)
+ implicit none
+ integer idne
+ integer nnode_sets_g
+ integer global_ids(nnode_sets_g)
+ integer global_n_cnts(nnode_sets_g)
+ integer global_df_cnts(nnode_sets_g)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 global_ids4(nnode_sets_g)
+ integer*4 global_n_cnts4(nnode_sets_g)
+ integer*4 global_df_cnts4(nnode_sets_g)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ DO J1X = 1, NNODE_SETS_G
+ GLOBAL_IDS4(J1X) = GLOBAL_IDS(J1X)
+ GLOBAL_N_CNTS4(J1X) = GLOBAL_N_CNTS(J1X)
+ GLOBAL_DF_CNTS4(J1X) = GLOBAL_DF_CNTS(J1X)
+ END DO
+ call nepnspg4 (idne4, global_ids4, global_n_cnts4,
+ $ global_df_cnts4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read global side set parameters
+C
+ subroutine negsspg (idne, ss_ids_glob, ss_n_cnt_glob,
+ $ ss_df_cnt_glob, ierr)
+ implicit none
+ integer idne
+ integer ss_ids_glob(*)
+ integer ss_n_cnt_glob(*)
+ integer ss_df_cnt_glob(*)
+ integer ierr
+C
+ integer nnodes_g
+ integer nelems_g
+ integer nelem_blks_g
+ integer nnode_sets_g
+ integer nside_sets_g
+C
+ call negig (idne, nnodes_g, nelems_g, nelem_blks_g,
+ $ nnode_sets_g, nside_sets_g, ierr)
+ if (ierr.ne.0) return
+ call negsspg2 (idne, ss_ids_glob, ss_n_cnt_glob,
+ $ ss_df_cnt_glob, ierr, nside_sets_g)
+C
+ end
+C
+ subroutine negsspg2 (idne, ss_ids_glob, ss_n_cnt_glob,
+ $ ss_df_cnt_glob, ierr, nside_sets_g)
+ implicit none
+ integer idne
+ integer nside_sets_g
+ integer ss_ids_glob(nside_sets_g)
+ integer ss_n_cnt_glob(nside_sets_g)
+ integer ss_df_cnt_glob(nside_sets_g)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ss_ids_glob4(nside_sets_g)
+ integer*4 ss_n_cnt_glob4(nside_sets_g)
+ integer*4 ss_df_cnt_glob4(nside_sets_g)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ call negsspg4 (idne4, ss_ids_glob4, ss_n_cnt_glob4,
+ $ ss_df_cnt_glob4, ierr4)
+ DO J1X = 1, NSIDE_SETS_G
+ SS_IDS_GLOB(J1X) = SS_IDS_GLOB4(J1X)
+ SS_N_CNT_GLOB(J1X) = SS_N_CNT_GLOB4(J1X)
+ SS_DF_CNT_GLOB(J1X) = SS_DF_CNT_GLOB4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write global side set parameters
+C
+ subroutine nepsspg (idne, global_ids, global_el_cnts,
+ $ global_df_cnts, ierr)
+ implicit none
+ integer idne
+ integer global_ids(*)
+ integer global_el_cnts(*)
+ integer global_df_cnts(*)
+ integer ierr
+C
+ integer nnodes_g
+ integer nelems_g
+ integer nelem_blks_g
+ integer nnode_sets_g
+ integer nside_sets_g
+C
+ call negig (idne, nnodes_g, nelems_g, nelem_blks_g,
+ $ nnode_sets_g, nside_sets_g, ierr)
+ if (ierr.ne.0) return
+ call nepsspg2 (idne, global_ids, global_el_cnts,
+ $ global_df_cnts, ierr, nside_sets_g)
+C
+ end
+C
+ subroutine nepsspg2 (idne, global_ids, global_el_cnts,
+ $ global_df_cnts, ierr, nside_sets_g)
+ implicit none
+ integer idne
+ integer nside_sets_g
+ integer global_ids(nside_sets_g)
+ integer global_el_cnts(nside_sets_g)
+ integer global_df_cnts(nside_sets_g)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 global_ids4(nside_sets_g)
+ integer*4 global_el_cnts4(nside_sets_g)
+ integer*4 global_df_cnts4(nside_sets_g)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ DO J1X = 1, NSIDE_SETS_G
+ GLOBAL_IDS4(J1X) = GLOBAL_IDS(J1X)
+ GLOBAL_EL_CNTS4(J1X) = GLOBAL_EL_CNTS(J1X)
+ GLOBAL_DF_CNTS4(J1X) = GLOBAL_DF_CNTS(J1X)
+ END DO
+ call nepsspg4 (idne4, global_ids4, global_el_cnts4,
+ $ global_df_cnts4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read global element block information
+C
+ subroutine negebig (idne, el_blk_ids, el_blk_cnts, ierr)
+ implicit none
+ integer idne
+ integer el_blk_ids(*)
+ integer el_blk_cnts(*)
+ integer ierr
+C
+ integer nnodes_g
+ integer nelems_g
+ integer nelem_blks_g
+ integer nnode_sets_g
+ integer nside_sets_g
+C
+ call negig (idne, nnodes_g, nelems_g, nelem_blks_g,
+ $ nnode_sets_g, nside_sets_g, ierr)
+ if (ierr.ne.0) return
+ call negebig2 (idne, el_blk_ids, el_blk_cnts, ierr,
+ $ nelem_blks_g)
+C
+ end
+C
+ subroutine negebig2 (idne, el_blk_ids, el_blk_cnts, ierr,
+ $ nelem_blks_g)
+ implicit none
+ integer idne
+ integer nelem_blks_g
+ integer el_blk_ids(nelem_blks_g)
+ integer el_blk_cnts(nelem_blks_g)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 el_blk_ids4(nelem_blks_g)
+ integer*4 el_blk_cnts4(nelem_blks_g)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ call negebig4 (idne4, el_blk_ids4, el_blk_cnts4, ierr4)
+ DO J1X = 1, NELEM_BLKS_G
+ EL_BLK_IDS(J1X) = EL_BLK_IDS4(J1X)
+ EL_BLK_CNTS(J1X) = EL_BLK_CNTS4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write global element block information
+C
+ subroutine nepebig (idne, el_blk_ids, el_blk_cnts, ierr)
+ implicit none
+ integer idne
+ integer el_blk_ids(*)
+ integer el_blk_cnts(*)
+ integer ierr
+C
+ integer nnodes_g
+ integer nelems_g
+ integer nelem_blks_g
+ integer nnode_sets_g
+ integer nside_sets_g
+C
+ call negig (idne, nnodes_g, nelems_g, nelem_blks_g,
+ $ nnode_sets_g, nside_sets_g, ierr)
+ if (ierr.ne.0) return
+ call nepebig2 (idne, el_blk_ids, el_blk_cnts, ierr,
+ $ nelem_blks_g)
+C
+ end
+C
+ subroutine nepebig2 (idne, el_blk_ids, el_blk_cnts, ierr,
+ $ nelem_blks_g)
+ implicit none
+ integer idne
+ integer nelem_blks_g
+ integer el_blk_ids(nelem_blks_g)
+ integer el_blk_cnts(nelem_blks_g)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 el_blk_ids4(nelem_blks_g)
+ integer*4 el_blk_cnts4(nelem_blks_g)
+ integer*4 ierr4
+C
+ idne4 = idne
+ el_blk_ids4(nelem_blks_g) = el_blk_ids(nelem_blks_g)
+ el_blk_cnts4(nelem_blks_g) = el_blk_cnts(nelem_blks_g)
+ call nepebig4 (idne4, el_blk_ids4, el_blk_cnts4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read side set element list and side set side list
+C
+ subroutine negnss (idne, ss_id, start_side_num, num_sides,
+ $ ss_elem_list, ss_side_list, ierr)
+ implicit none
+ integer idne
+ integer ss_id
+ integer start_side_num
+ integer num_sides
+ integer ss_elem_list(num_sides)
+ integer ss_side_list(num_sides)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ss_id4
+ integer*4 start_side_num4
+ integer*4 num_sides4
+ integer*4 ss_elem_list4(num_sides)
+ integer*4 ss_side_list4(num_sides)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ ss_id4 = ss_id
+ start_side_num4 = start_side_num
+ num_sides4 = num_sides
+ call negnss4 (idne4, ss_id4, start_side_num4, num_sides4,
+ $ ss_elem_list4, ss_side_list4, ierr4)
+ DO J1X = 1, NUM_SIDES
+ SS_ELEM_LIST(J1X) = SS_ELEM_LIST4(J1X)
+ SS_SIDE_LIST(J1X) = SS_SIDE_LIST4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write side set element list and side set side list
+C
+ subroutine nepnss (idne, ss_id, start_side_num, num_sides,
+ $ ss_elem_list, ss_side_list, ierr)
+ implicit none
+ integer idne
+ integer ss_id
+ integer start_side_num
+ integer num_sides
+ integer ss_elem_list(num_sides)
+ integer ss_side_list(num_sides)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ss_id4
+ integer*4 start_side_num4
+ integer*4 num_sides4
+ integer*4 ss_elem_list4(num_sides)
+ integer*4 ss_side_list4(num_sides)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ ss_id4 = ss_id
+ start_side_num4 = start_side_num
+ num_sides4 = num_sides
+ DO J1X = 1, NUM_SIDES
+ SS_ELEM_LIST4(J1X) = SS_ELEM_LIST(J1X)
+ SS_SIDE_LIST4(J1X) = SS_SIDE_LIST(J1X)
+ END DO
+ call nepnss4 (idne4, ss_id4, start_side_num4, num_sides4,
+ $ ss_elem_list4, ss_side_list4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read side set distribution factor
+C
+ subroutine negnssd (idne, ss_id, start_num, num_df_to_get,
+ $ ss_df, ierr)
+ implicit none
+ integer idne
+ integer ss_id
+ integer start_num
+ integer num_df_to_get
+ real ss_df(num_df_to_get)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ss_id4
+ integer*4 start_num4
+ integer*4 num_df_to_get4
+ integer*4 ierr4
+C
+ idne4 = idne
+ ss_id4 = ss_id
+ start_num4 = start_num
+ num_df_to_get4 = num_df_to_get
+ call negnssd4 (idne4, ss_id4, start_num4, num_df_to_get4,
+ $ ss_df, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write side set distribution factor
+C
+ subroutine nepnssd (idne, ss_id, start_num, num_df_to_get,
+ $ ss_df, ierr)
+ implicit none
+ integer idne
+ integer ss_id
+ integer start_num
+ integer num_df_to_get
+ real ss_df(num_df_to_get)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ss_id4
+ integer*4 start_num4
+ integer*4 num_df_to_get4
+ integer*4 ierr4
+C
+ idne4 = idne
+ ss_id4 = ss_id
+ start_num4 = start_num
+ num_df_to_get4 = num_df_to_get
+ call nepnssd4 (idne4, ss_id4, start_num4, num_df_to_get4,
+ $ ss_df, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read node set list for a single node set
+C
+ subroutine negnns (idne, ns_id, start_node_num, num_node,
+ $ ns_node_list, ierr)
+ implicit none
+ integer idne
+ integer ns_id
+ integer start_node_num
+ integer num_node
+ integer ns_node_list(num_node)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ns_id4
+ integer*4 start_node_num4
+ integer*4 num_node4
+ integer*4 ns_node_list4(num_node)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ ns_id4 = ns_id
+ start_node_num4 = start_node_num
+ num_node4 = num_node
+ call negnns4 (idne4, ns_id4, start_node_num4, num_node4,
+ $ ns_node_list4, ierr4)
+ DO J1X = 1, NUM_NODE
+ NS_NODE_LIST(J1X) = NS_NODE_LIST4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write node set list for a single node set
+C
+ subroutine nepnns (idne, ns_id, start_node_num, num_node,
+ $ ns_node_list, ierr)
+ implicit none
+ integer idne
+ integer ns_id
+ integer start_node_num
+ integer num_node
+ integer ns_node_list(num_node)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ns_id4
+ integer*4 start_node_num4
+ integer*4 num_node4
+ integer*4 ns_node_list4(num_node)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ ns_id4 = ns_id
+ start_node_num4 = start_node_num
+ num_node4 = num_node
+ DO J1X = 1, NUM_NODE
+ NS_NODE_LIST4(J1X) = NS_NODE_LIST(J1X)
+ END DO
+ call nepnns4 (idne4, ns_id4, start_node_num4, num_node4,
+ $ ns_node_list4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read node set distribution factor
+C
+ subroutine negnnsd (idne, ns_id, start_num, num_df_to_get,
+ $ ns_df, ierr)
+ implicit none
+ integer idne
+ integer ns_id
+ integer start_num
+ integer num_df_to_get
+ real ns_df(num_df_to_get)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ns_id4
+ integer*4 start_num4
+ integer*4 num_df_to_get4
+ integer*4 ierr4
+C
+ idne4 = idne
+ ns_id4 = ns_id
+ start_num4 = start_num
+ num_df_to_get4 = num_df_to_get
+ call negnnsd4 (idne4, ns_id4, start_num4, num_df_to_get4,
+ $ ns_df, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write node set distribution factor
+C
+ subroutine nepnnsd (idne, ns_id, start_num, num_df_to_get,
+ $ ns_df, ierr)
+ implicit none
+ integer idne
+ integer ns_id
+ integer start_num
+ integer num_df_to_get
+ real ns_df(num_df_to_get)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ns_id4
+ integer*4 start_num4
+ integer*4 num_df_to_get4
+ integer*4 ierr4
+C
+ idne4 = idne
+ ns_id4 = ns_id
+ start_num4 = start_num
+ num_df_to_get4 = num_df_to_get
+ call nepnnsd4 (idne4, ns_id4, start_num4, num_df_to_get4,
+ $ ns_df, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read coordinates of the nodes
+C
+ subroutine negcor (idne, start_node_num, num_nodes, x_coor,
+ $ y_coor, z_coor, ierr)
+ implicit none
+ integer idne
+ integer start_node_num
+ integer num_nodes
+ real x_coor(num_nodes)
+ real y_coor(num_nodes)
+ real z_coor(num_nodes)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 start_node_num4
+ integer*4 num_nodes4
+ integer*4 ierr4
+C
+ idne4 = idne
+ start_node_num4 = start_node_num
+ num_nodes4 = num_nodes
+ call negcor4 (idne4, start_node_num4, num_nodes4, x_coor,
+ $ y_coor, z_coor, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write coordinates of the nodes
+C
+ subroutine nepcor (idne, start_node_num, num_nodes, x_coor,
+ $ y_coor, z_coor, ierr)
+ implicit none
+ integer idne
+ integer start_node_num
+ integer num_nodes
+ real x_coor(num_nodes)
+ real y_coor(num_nodes)
+ real z_coor(num_nodes)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 start_node_num4
+ integer*4 num_nodes4
+ integer*4 ierr4
+C
+ idne4 = idne
+ start_node_num4 = start_node_num
+ num_nodes4 = num_nodes
+ call nepcor4 (idne4, start_node_num4, num_nodes4, x_coor,
+ $ y_coor, z_coor, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read an element blocks connectivity list
+C
+ subroutine negnec (idne, elem_blk_id, start_elem_num,
+ $ num_elems, connect, ierr)
+ implicit none
+ integer idne
+ integer elem_blk_id
+ integer start_elem_num
+ integer num_elems
+ integer connect(num_elems)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 elem_blk_id4
+ integer*4 start_elem_num4
+ integer*4 num_elems4
+ integer*4 connect4(num_elems)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ elem_blk_id4 = elem_blk_id
+ start_elem_num4 = start_elem_num
+ num_elems4 = num_elems
+ call negnec4 (idne4, elem_blk_id4, start_elem_num4,
+ $ num_elems4, connect4, ierr4)
+ DO J1X = 1, NUM_ELEMS
+ CONNECT(J1X) = CONNECT4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write an element blocks connectivity list
+C
+ subroutine nepnec (idne, elem_blk_id, start_elem_num,
+ $ num_elems, connect, ierr)
+ implicit none
+ integer idne
+ integer elem_blk_id
+ integer start_elem_num
+ integer num_elems
+ integer connect(num_elems)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 elem_blk_id4
+ integer*4 start_elem_num4
+ integer*4 num_elems4
+ integer*4 connect4(num_elems)
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ elem_blk_id4 = elem_blk_id
+ start_elem_num4 = start_elem_num
+ num_elems4 = num_elems
+ DO J1X = 1, NUM_ELEMS
+ CONNECT4(J1X) = CONNECT(J1X)
+ END DO
+ call nepnec4 (idne4, elem_blk_id4, start_elem_num4,
+ $ num_elems4, connect4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read an element blocks attributes
+C
+ subroutine negneat (idne, elem_blk_id, start_elem_num,
+ $ num_elems, attrib, ierr)
+ implicit none
+ integer idne
+ integer elem_blk_id
+ integer start_elem_num
+ integer num_elems
+ real attrib(num_elems)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 elem_blk_id4
+ integer*4 start_elem_num4
+ integer*4 num_elems4
+ integer*4 ierr4
+C
+ idne4 = idne
+ elem_blk_id4 = elem_blk_id
+ start_elem_num4 = start_elem_num
+ num_elems4 = num_elems
+ call negneat4 (idne4, elem_blk_id4, start_elem_num4,
+ $ num_elems4, attrib, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write an element blocks attributes
+C
+ subroutine nepneat (idne, elem_blk_id, start_elem_num,
+ $ num_elems, attrib, ierr)
+ implicit none
+ integer idne
+ integer elem_blk_id
+ integer start_elem_num
+ integer num_elems
+ real attrib(num_elems)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 elem_blk_id4
+ integer*4 start_elem_num4
+ integer*4 num_elems4
+ integer*4 ierr4
+C
+ idne4 = idne
+ elem_blk_id4 = elem_blk_id
+ start_elem_num4 = start_elem_num
+ num_elems4 = num_elems
+ call nepneat4 (idne4, elem_blk_id4, start_elem_num4,
+ $ num_elems4, attrib, ierr4)
+ ierr = ierr4
+C
+ end
+C
+C-----------------------------------------------------------------------
+C Read the element type for a specific element block
+C
+ subroutine negelt (idne, elem_blk_id, elem_type, ierr)
+ implicit none
+ integer idne
+ integer elem_blk_id
+ character*(*) elem_type
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 elem_blk_id4
+ integer*4 ierr4
+C
+ idne4 = idne
+ elem_blk_id4 = elem_blk_id
+ call negelt4 (idne4, elem_blk_id4, elem_type, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read a variable for an element block
+C
+ subroutine negnev (idne, time_step, elem_var_index,
+ $ elem_blk_id, num_elem_this_blk, start_elem_num,
+ $ num_elem, elem_var_vals, ierr)
+ implicit none
+ integer idne
+ integer time_step
+ integer elem_var_index
+ integer elem_blk_id
+ integer num_elem_this_blk
+ integer start_elem_num
+ integer num_elem
+ real elem_var_vals(num_elem)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 time_step4
+ integer*4 elem_var_index4
+ integer*4 elem_blk_id4
+ integer*4 num_elem_this_blk4
+ integer*4 start_elem_num4
+ integer*4 num_elem4
+ integer*4 ierr4
+C
+ idne4 = idne
+ time_step4 = time_step
+ elem_var_index4 = elem_var_index
+ elem_blk_id4 = elem_blk_id
+ num_elem_this_blk4 = num_elem_this_blk
+ start_elem_num4 = start_elem_num
+ num_elem4 = num_elem
+ call negnev4 (idne4, time_step4, elem_var_index4,
+ $ elem_blk_id4, num_elem_this_blk4, start_elem_num4,
+ $ num_elem4, elem_var_vals, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write a variable slab for an element block
+C
+ subroutine nepevs (idne, time_step, elem_var_index,
+ $ elem_blk_id, start_pos, num_vals, elem_var_vals,
+ $ ierr)
+ implicit none
+ integer idne
+ integer time_step
+ integer elem_var_index
+ integer elem_blk_id
+ integer start_pos
+ integer num_vals
+ real elem_var_vals(num_vals)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 time_step4
+ integer*4 elem_var_index4
+ integer*4 elem_blk_id4
+ integer*4 start_pos4
+ integer*4 num_vals4
+ integer*4 ierr4
+C
+ idne4 = idne
+ time_step4 = time_step
+ elem_var_index4 = elem_var_index
+ elem_blk_id4 = elem_blk_id
+ start_pos4 = start_pos
+ num_vals4 = num_vals
+ call nepevs4 (idne4, time_step4, elem_var_index4,
+ $ elem_blk_id4, start_pos4, num_vals4, elem_var_vals,
+ $ ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read the values of a single nodal variable for a single time step
+C
+ subroutine negnnv (idne, time_step, nodal_var_index,
+ $ start_node_num, num_nodes, nodal_vars, ierr)
+ implicit none
+ integer idne
+ integer time_step
+ integer nodal_var_index
+ integer start_node_num
+ integer num_nodes
+ real nodal_vars(num_nodes)
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 time_step4
+ integer*4 nodal_var_index4
+ integer*4 start_node_num4
+ integer*4 num_nodes4
+ integer*4 ierr4
+C
+ idne4 = idne
+ time_step4 = time_step
+ nodal_var_index4 = nodal_var_index
+ start_node_num4 = start_node_num
+ num_nodes4 = num_nodes
+ call negnnv4 (idne4, time_step4, nodal_var_index4,
+ $ start_node_num4, num_nodes4, nodal_vars, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write nodal variable slab
+C
+ subroutine nepnvs (idne, time_step, nodal_var_index,
+ $ start_pos, num_vals, nodal_var_vals, ierr)
+ implicit none
+ integer idne
+ integer time_step
+ integer nodal_var_index
+ integer start_pos
+ integer num_vals
+ real nodal_var_vals(num_vals)
+ integer ierr
+ integer i
+C
+ integer*4 idne4
+ integer*4 time_step4
+ integer*4 nodal_var_index4
+ integer*4 start_pos4
+ integer*4 num_vals4
+ integer*4 ierr4
+C
+ idne4 = idne
+ time_step4 = time_step
+ nodal_var_index4 = nodal_var_index
+ start_pos4 = start_pos
+ num_vals4 = num_vals
+ call nepnvs4 (idne4, time_step4, nodal_var_index4,
+ $ start_pos4, num_vals4, nodal_var_vals, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read the element numbering map
+C
+ subroutine negnenm (idne, starte, num_ent, elem_map, ierr)
+ implicit none
+ integer idne
+ integer starte
+ integer num_ent
+ integer elem_map(num_ent)
+ integer ierr
+ integer i
+C
+ integer*4 idne4
+ integer*4 starte4
+ integer*4 num_ent4
+ integer*4 elem_map4(num_ent)
+ integer*4 ierr4
+C
+ idne4 = idne
+ starte4 = starte
+ num_ent4 = num_ent
+ call negnenm4 (idne4, starte4, num_ent4, elem_map4, ierr4)
+ do i = 1, num_ent
+ elem_map(i) = elem_map4(i)
+ enddo
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write the element numbering map
+C
+ subroutine nepnenm (idne, starte, num_ent, elem_map, ierr)
+ implicit none
+ integer idne
+ integer starte
+ integer num_ent
+ integer elem_map(num_ent)
+ integer ierr
+ integer i
+C
+ integer*4 idne4
+ integer*4 starte4
+ integer*4 num_ent4
+ integer*4 elem_map4(num_ent)
+ integer*4 ierr4
+C
+ idne4 = idne
+ starte4 = starte
+ num_ent4 = num_ent
+ do i = 1, num_ent
+ elem_map4(i) = elem_map(i)
+ enddo
+ call nepnenm4 (idne4, starte4, num_ent4, elem_map4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read the node numbering map
+C
+ subroutine negnnnm (idne, startn, num_ent, node_map, ierr)
+ implicit none
+ integer idne
+ integer startn
+ integer num_ent
+ integer node_map(num_ent)
+ integer ierr
+ integer i
+C
+ integer*4 idne4
+ integer*4 startn4
+ integer*4 num_ent4
+ integer*4 node_map4(num_ent)
+ integer*4 ierr4
+C
+ idne4 = idne
+ startn4 = startn
+ num_ent4 = num_ent
+ call negnnnm4 (idne4, startn4, num_ent4, node_map4, ierr4)
+ do i = 1, num_ent
+ node_map(i) = node_map4(i)
+ enddo
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write the node numbering map
+C
+ subroutine nepnnnm (idne, startn, num_ent, node_map, ierr)
+ implicit none
+ integer idne
+ integer startn
+ integer num_ent
+ integer node_map(num_ent)
+ integer ierr
+ integer i
+C
+ integer*4 idne4
+ integer*4 startn4
+ integer*4 num_ent4
+ integer*4 node_map4(num_ent)
+ integer*4 ierr4
+C
+ idne4 = idne
+ startn4 = startn
+ num_ent4 = num_ent
+ do i = 1, num_ent
+ node_map4(i) = node_map(i)
+ enddo
+ call nepnnnm4 (idne4, startn4, num_ent4, node_map4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read the node map for a processor
+C
+ subroutine negnm (idne, node_mapi, node_mapb, node_mape,
+ $ processor, ierr)
+ implicit none
+ integer idne
+ integer node_mapi(*)
+ integer node_mapb(*)
+ integer node_mape(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call negnm2 (idne, node_mapi, node_mapb, node_mape,
+ $ processor, ierr,
+ $ nint_nodes, nbor_nodes, next_nodes)
+C
+ end
+C
+ subroutine negnm2 (idne, node_mapi, node_mapb, node_mape,
+ $ processor, ierr,
+ $ nint_nodes, nbor_nodes, next_nodes)
+ implicit none
+ integer idne
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer node_mapi(nint_nodes)
+ integer node_mapb(nbor_nodes)
+ integer node_mape(next_nodes)
+ integer processor
+ integer ierr
+ integer i
+C
+ integer*4 idne4
+ integer*4 node_mapi4(nint_nodes)
+ integer*4 node_mapb4(nbor_nodes)
+ integer*4 node_mape4(next_nodes)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ idne4 = idne
+ processor4 = processor
+ call negnm4 (idne4, node_mapi4, node_mapb4, node_mape4,
+ $ processor4, ierr4)
+ do i = 1, nint_nodes
+ node_mapi(i) = node_mapi4(i)
+ enddo
+ do i = 1, nbor_nodes
+ node_mapb(i) = node_mapb4(i)
+ enddo
+ do i = 1, next_nodes
+ node_mape(i) = node_mape4(i)
+ enddo
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write a node map for a processor
+C
+ subroutine nepnm (idne, node_mapi, node_mapb, node_mape,
+ $ processor, ierr)
+ implicit none
+ integer idne
+ integer node_mapi(*)
+ integer node_mapb(*)
+ integer node_mape(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call nepnm2 (idne, node_mapi, node_mapb, node_mape,
+ $ processor, ierr,
+ $ nint_nodes, nbor_nodes, next_nodes)
+C
+ end
+C
+ subroutine nepnm2 (idne, node_mapi, node_mapb, node_mape,
+ $ processor, ierr,
+ $ nint_nodes, nbor_nodes, next_nodes)
+ implicit none
+ integer idne
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer node_mapi(nint_nodes)
+ integer node_mapb(nbor_nodes)
+ integer node_mape(next_nodes)
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 node_mapi4(nint_nodes)
+ integer*4 node_mapb4(nbor_nodes)
+ integer*4 node_mape4(next_nodes)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ DO J1X = 1, NINT_NODES
+ NODE_MAPI4(J1X) = NODE_MAPI(J1X)
+ END DO
+ DO J1X = 1, NBOR_NODES
+ NODE_MAPB4(J1X) = NODE_MAPB(J1X)
+ END DO
+ DO J1X = 1, NEXT_NODES
+ NODE_MAPE4(J1X) = NODE_MAPE(J1X)
+ END DO
+ processor4 = processor
+ call nepnm4 (idne4, node_mapi4, node_mapb4, node_mape4,
+ $ processor4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read the element map for a processor
+C
+ subroutine negem (idne, elem_mapi, elem_mapb, processor, ierr)
+ implicit none
+ integer idne
+ integer elem_mapi(*)
+ integer elem_mapb(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call negem2 (idne, elem_mapi, elem_mapb, processor, ierr,
+ $ nint_elems, nbor_elems)
+C
+ end
+C
+ subroutine negem2 (idne, elem_mapi, elem_mapb, processor, ierr,
+ $ nint_elems, nbor_elems)
+ implicit none
+ integer idne
+ integer nint_elems
+ integer nbor_elems
+ integer elem_mapi(nint_elems)
+ integer elem_mapb(nbor_elems)
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 elem_mapi4(nint_elems)
+ integer*4 elem_mapb4(nbor_elems)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ processor4 = processor
+ call negem4 (idne4, elem_mapi4, elem_mapb4, processor4, ierr4)
+ DO J1X = 1, NINT_ELEMS
+ ELEM_MAPI(J1X) = ELEM_MAPI4(J1X)
+ END DO
+ DO J1X = 1, NBOR_ELEMS
+ ELEM_MAPB(J1X) = ELEM_MAPB4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write the element map for a processor
+C
+ subroutine nepem (idne, elem_mapi, elem_mapb, processor, ierr)
+ implicit none
+ integer idne
+ integer elem_mapi(*)
+ integer elem_mapb(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call nepem2 (idne, elem_mapi, elem_mapb, processor, ierr,
+ $ nint_elems, nbor_elems)
+C
+ end
+C
+ subroutine nepem2 (idne, elem_mapi, elem_mapb, processor, ierr,
+ $ nint_elems, nbor_elems)
+ implicit none
+ integer idne
+ integer nint_elems
+ integer nbor_elems
+ integer elem_mapi(nint_elems)
+ integer elem_mapb(nbor_elems)
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 elem_mapi4(nint_elems)
+ integer*4 elem_mapb4(nbor_elems)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ DO J1X = 1, NINT_ELEMS
+ ELEM_MAPI4(J1X) = ELEM_MAPI(J1X)
+ END DO
+ DO J1X = 1, NBOR_ELEMS
+ ELEM_MAPB4(J1X) = ELEM_MAPB(J1X)
+ END DO
+ processor4 = processor
+ call nepem4 (idne4, elem_mapi4, elem_mapb4, processor4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read the communications map parameters for a single processor
+C
+ subroutine negcmp (idne, ncmap_ids, ncmap_node_cnts,
+ $ ecmap_ids, ecmap_elem_cnts, processor, ierr)
+ implicit none
+ integer idne
+ integer ncmap_ids(*)
+ integer ncmap_node_cnts(*)
+ integer ecmap_ids(*)
+ integer ecmap_elem_cnts(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call negcmp2 (idne, ncmap_ids, ncmap_node_cnts,
+ $ ecmap_ids, ecmap_elem_cnts, processor, ierr,
+ $ nnode_cmaps, nelem_cmaps)
+C
+ end
+C
+ subroutine negcmp2 (idne, ncmap_ids, ncmap_node_cnts,
+ $ ecmap_ids, ecmap_elem_cnts, processor, ierr,
+ $ nnode_cmaps, nelem_cmaps)
+ implicit none
+ integer idne
+ integer nnode_cmaps
+ integer nelem_cmaps
+ integer ncmap_ids(nnode_cmaps)
+ integer ncmap_node_cnts(nnode_cmaps)
+ integer ecmap_ids(nelem_cmaps)
+ integer ecmap_elem_cnts(nelem_cmaps)
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 ncmap_ids4(nnode_cmaps)
+ integer*4 ncmap_node_cnts4(nnode_cmaps)
+ integer*4 ecmap_ids4(nelem_cmaps)
+ integer*4 ecmap_elem_cnts4(nelem_cmaps)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ processor4 = processor
+ call negcmp4 (idne4, ncmap_ids4, ncmap_node_cnts4,
+ $ ecmap_ids4, ecmap_elem_cnts4, processor4, ierr4)
+ DO J1X = 1, NNODE_CMAPS
+ NCMAP_IDS(J1X) = NCMAP_IDS4(J1X)
+ NCMAP_NODE_CNTS(J1X) = NCMAP_NODE_CNTS4(J1X)
+ END DO
+ DO J1X = 1, NELEM_CMAPS
+ ECMAP_IDS(J1X) = ECMAP_IDS4(J1X)
+ ECMAP_ELEM_CNTS(J1X) = ECMAP_ELEM_CNTS4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write the communications map parameters for a single processor
+C
+ subroutine nepcmp (idne, nmap_ids, nmap_node_cnts, emap_ids,
+ $ emap_elem_cnts, processor, ierr)
+ implicit none
+ integer idne
+ integer nmap_ids(*)
+ integer nmap_node_cnts(*)
+ integer emap_ids(*)
+ integer emap_elem_cnts(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call nepcmp2 (idne, nmap_ids, nmap_node_cnts, emap_ids,
+ $ emap_elem_cnts, processor, ierr,
+ $ nnode_cmaps, nelem_cmaps)
+C
+ end
+C
+ subroutine nepcmp2 (idne, nmap_ids, nmap_node_cnts, emap_ids,
+ $ emap_elem_cnts, processor, ierr,
+ $ nnode_cmaps, nelem_cmaps)
+ implicit none
+ integer idne
+ integer nnode_cmaps
+ integer nelem_cmaps
+ integer nmap_ids(nnode_cmaps)
+ integer nmap_node_cnts(nnode_cmaps)
+ integer emap_ids(nelem_cmaps)
+ integer emap_elem_cnts(nelem_cmaps)
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 nmap_ids4(nnode_cmaps)
+ integer*4 nmap_node_cnts4(nnode_cmaps)
+ integer*4 emap_ids4(nelem_cmaps)
+ integer*4 emap_elem_cnts4(nelem_cmaps)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ DO J1X = 1, NNODE_CMAPS
+ NMAP_IDS4(J1X) = NMAP_IDS(J1X)
+ NMAP_NODE_CNTS4(J1X) = NMAP_NODE_CNTS(J1X)
+ END DO
+ DO J1X = 1, NELEM_CMAPS
+ EMAP_IDS4(J1X) = EMAP_IDS(J1X)
+ EMAP_ELEM_CNTS4(J1X) = EMAP_ELEM_CNTS(J1X)
+ END DO
+ processor4 = processor
+ call nepcmp4 (idne4, nmap_ids4, nmap_node_cnts4, emap_ids4,
+ $ emap_elem_cnts4, processor4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write the communications map parameters for all processors
+C
+ subroutine nepcmpc (idne, nmap_ids, nmap_node_cnts,
+ $ nproc_ptrs, emap_ids, emap_elem_cnts, eproc_ptrs, ierr)
+ implicit none
+ integer idne
+ integer nmap_ids(*)
+ integer nmap_node_cnts(*)
+ integer nproc_ptrs(*)
+ integer emap_ids(*)
+ integer emap_elem_cnts(*)
+ integer eproc_ptrs(*)
+ integer ierr
+
+ write (0,*) 'nepcmpc: addrwrap not implemented'
+ stop
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read the nodal communications map for a single processor
+C
+ subroutine negncm (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr)
+ implicit none
+ integer idne
+ integer map_id
+ integer node_ids(*)
+ integer proc_ids(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call negncm2 (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr, nnode_cmaps, nelem_cmaps)
+C
+ end
+C
+ subroutine negncm2 (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr, nnode_cmaps, nelem_cmaps)
+ implicit none
+ integer idne
+ integer map_id
+ integer node_ids(*)
+ integer proc_ids(*)
+ integer processor
+ integer nnode_cmaps
+ integer nelem_cmaps
+ integer ierr
+C
+ integer ncmap_ids(nnode_cmaps)
+ integer ncmap_node_cnts(nnode_cmaps)
+ integer ecmap_ids(nelem_cmaps)
+ integer ecmap_elem_cnts(nelem_cmaps)
+ integer node_cnt, i
+C
+ call negcmp2 (idne, ncmap_ids, ncmap_node_cnts,
+ $ ecmap_ids, ecmap_elem_cnts, processor, ierr,
+ $ nnode_cmaps, nelem_cmaps)
+ if (ierr.ne.0) return
+ node_cnt = -1
+ do i = 1, nnode_cmaps
+ if (ncmap_ids(i) .eq. map_id) then
+ node_cnt = ncmap_node_cnts(i)
+ end if
+ end do
+ if (node_cnt .eq. -1) then
+ ierr = -1
+ return
+ end if
+ call negncm3 (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr, node_cnt)
+C
+ end
+C
+ subroutine negncm3 (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr, node_cnt)
+ implicit none
+ integer idne
+ integer map_id
+ integer node_cnt
+ integer node_ids(node_cnt)
+ integer proc_ids(node_cnt)
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 map_id4
+ integer*4 node_ids4(node_cnt)
+ integer*4 proc_ids4(node_cnt)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ map_id4 = map_id
+ processor4 = processor
+ call negncm4 (idne4, map_id4, node_ids4, proc_ids4,
+ $ processor4, ierr4)
+ DO J1X = 1, NODE_CNT
+ NODE_IDS(J1X) = NODE_IDS4(J1X)
+ PROC_IDS(J1X) = PROC_IDS4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write the nodal communications map for a single processor
+C
+ subroutine nepncm (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr)
+ implicit none
+ integer idne
+ integer map_id
+ integer node_ids(*)
+ integer proc_ids(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call nepncm2 (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr, nnode_cmaps, nelem_cmaps)
+C
+ end
+C
+ subroutine nepncm2 (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr, nnode_cmaps, nelem_cmaps)
+ implicit none
+
+
+
+
+
+
+
+
+
+
+
+
+
+ integer idne
+ integer map_id
+ integer node_ids(*)
+ integer proc_ids(*)
+ integer processor
+ integer nnode_cmaps
+ integer nelem_cmaps
+ integer ierr
+C
+ integer ncmap_ids(nnode_cmaps)
+ integer ncmap_node_cnts(nnode_cmaps)
+ integer ecmap_ids(nelem_cmaps)
+ integer ecmap_elem_cnts(nelem_cmaps)
+ integer node_cnt, i
+C
+ call negcmp2 (idne, ncmap_ids, ncmap_node_cnts,
+ $ ecmap_ids, ecmap_elem_cnts, processor, ierr,
+ $ nnode_cmaps, nelem_cmaps)
+ if (ierr.ne.0) return
+ node_cnt = -1
+ do i = 1, nnode_cmaps
+ if (ncmap_ids(i) .eq. map_id) then
+ node_cnt = ncmap_node_cnts(i)
+ end if
+ end do
+ if (node_cnt .eq. -1) then
+ ierr = -1
+ return
+ end if
+ call nepncm3 (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr, node_cnt)
+C
+ end
+C
+ subroutine nepncm3 (idne, map_id, node_ids, proc_ids,
+ $ processor, ierr, node_cnt)
+ implicit none
+ integer idne
+ integer map_id
+ integer node_cnt
+ integer node_ids(node_cnt)
+ integer proc_ids(node_cnt)
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 map_id4
+ integer*4 node_ids4(node_cnt)
+ integer*4 proc_ids4(node_cnt)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ map_id4 = map_id
+ DO J1X = 1, NODE_CNT
+ NODE_IDS4(J1X) = NODE_IDS(J1X)
+ PROC_IDS4(J1X) = PROC_IDS(J1X)
+ END DO
+ processor4 = processor
+ call nepncm4 (idne4, map_id4, node_ids4, proc_ids4,
+ $ processor4, ierr4)
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Read the elemental communications map for a single processor
+C
+ subroutine negecm (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr)
+ implicit none
+ integer idne
+ integer map_id
+ integer elem_ids(*)
+ integer side_ids(*)
+ integer proc_ids(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call negecm2 (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr, nnode_cmaps, nelem_cmaps)
+C
+ end
+C
+ subroutine negecm2 (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr, nnode_cmaps, nelem_cmaps)
+ implicit none
+ integer idne
+ integer map_id
+ integer elem_ids(*)
+ integer side_ids(*)
+ integer proc_ids(*)
+ integer processor
+ integer nnode_cmaps
+ integer nelem_cmaps
+ integer ierr
+C
+ integer ncmap_ids(nnode_cmaps)
+ integer ncmap_node_cnts(nnode_cmaps)
+ integer ecmap_ids(nelem_cmaps)
+ integer ecmap_elem_cnts(nelem_cmaps)
+ integer elem_cnt,i
+C
+ call negcmp2 (idne, ncmap_ids, ncmap_node_cnts,
+ $ ecmap_ids, ecmap_elem_cnts, processor, ierr,
+ $ nnode_cmaps, nelem_cmaps)
+ if (ierr.ne.0) return
+ elem_cnt = -1
+ do i = 1, nelem_cmaps
+ if (ecmap_ids(i) .eq. map_id) then
+ elem_cnt = ecmap_elem_cnts(i)
+ end if
+ end do
+ if (elem_cnt .eq. -1) then
+ ierr = -1
+ return
+ end if
+ call negecm3 (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr, elem_cnt)
+C
+ end
+C
+ subroutine negecm3 (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr, elem_cnt)
+ implicit none
+ integer idne
+ integer map_id
+ integer elem_cnt
+ integer elem_ids(elem_cnt)
+ integer side_ids(elem_cnt)
+ integer proc_ids(elem_cnt)
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 map_id4
+ integer*4 elem_ids4(elem_cnt)
+ integer*4 side_ids4(elem_cnt)
+ integer*4 proc_ids4(elem_cnt)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ map_id4 = map_id
+ processor4 = processor
+ call negecm4 (idne4, map_id4, elem_ids4, side_ids4,
+ $ proc_ids4, processor4, ierr4)
+ DO J1X = 1, ELEM_CNT
+ ELEM_IDS(J1X) = ELEM_IDS4(J1X)
+ SIDE_IDS(J1X) = SIDE_IDS4(J1X)
+ PROC_IDS(J1X) = PROC_IDS4(J1X)
+ END DO
+ ierr = ierr4
+C
+ end
+
+C-----------------------------------------------------------------------
+C
+C Write the elemental communications map for a single processor
+C
+ subroutine nepecm (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr)
+ implicit none
+ integer idne
+ integer map_id
+ integer elem_ids(*)
+ integer side_ids(*)
+ integer proc_ids(*)
+ integer processor
+ integer ierr
+C
+ integer nint_nodes
+ integer nbor_nodes
+ integer next_nodes
+ integer nint_elems
+ integer nbor_elems
+ integer nnode_cmaps
+ integer nelem_cmaps
+ call neglbp (idne, nint_nodes, nbor_nodes, next_nodes,
+ $ nint_elems, nbor_elems, nnode_cmaps, nelem_cmaps,
+ $ processor, ierr)
+ if (ierr.ne.0) return
+ call nepecm2 (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr, nnode_cmaps, nelem_cmaps)
+C
+ end
+C
+ subroutine nepecm2 (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr, nnode_cmaps, nelem_cmaps)
+ implicit none
+ integer idne
+ integer map_id
+ integer elem_ids(*)
+ integer side_ids(*)
+ integer proc_ids(*)
+ integer processor
+ integer nnode_cmaps
+ integer nelem_cmaps
+ integer ierr
+C
+ integer ncmap_ids(nnode_cmaps)
+ integer ncmap_node_cnts(nnode_cmaps)
+ integer ecmap_ids(nelem_cmaps)
+ integer ecmap_elem_cnts(nelem_cmaps)
+ integer elem_cnt,i
+C
+ call negcmp2 (idne, ncmap_ids, ncmap_node_cnts,
+ $ ecmap_ids, ecmap_elem_cnts, processor, ierr,
+ $ nnode_cmaps, nelem_cmaps)
+ if (ierr.ne.0) return
+ elem_cnt = -1
+ do i = 1, nelem_cmaps
+ if (ecmap_ids(i) .eq. map_id) then
+ elem_cnt = ecmap_elem_cnts(i)
+ end if
+ end do
+ if (elem_cnt .eq. -1) then
+ ierr = -1
+ return
+ end if
+ call nepecm3 (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr, elem_cnt)
+C
+ end
+C
+ subroutine nepecm3 (idne, map_id, elem_ids, side_ids,
+ $ proc_ids, processor, ierr, elem_cnt)
+ implicit none
+ integer idne
+ integer map_id
+ integer elem_cnt
+ integer elem_ids(elem_cnt)
+ integer side_ids(elem_cnt)
+ integer proc_ids(elem_cnt)
+ integer processor
+ integer ierr
+C
+ integer*4 idne4
+ integer*4 map_id4
+ integer*4 elem_ids4(elem_cnt)
+ integer*4 side_ids4(elem_cnt)
+ integer*4 proc_ids4(elem_cnt)
+ integer*4 processor4
+ integer*4 ierr4
+C
+ INTEGER J1X
+ idne4 = idne
+ map_id4 = map_id
+ DO J1X = 1, ELEM_CNT
+ ELEM_IDS4(J1X) = ELEM_IDS(J1X)
+ SIDE_IDS4(J1X) = SIDE_IDS(J1X)
+ PROC_IDS4(J1X) = PROC_IDS(J1X)
+ END DO
+ processor4 = processor
+ call nepecm4 (idne4, map_id4, elem_ids4, side_ids4,
+ $ proc_ids4, processor4, ierr4)
+ ierr = ierr4
+C
+ end
+C-----------------------------------------------------------------------
+#endif
diff --git a/nemesis/forbind/ne_jack.src b/nemesis/forbind/ne_jack.src
new file mode 100644
index 0000000..6e28b75
--- /dev/null
+++ b/nemesis/forbind/ne_jack.src
@@ -0,0 +1,1498 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*====================================================================
+ * ------------------------
+ * | CVS File Information |
+ * ------------------------
+ *
+ * $RCSfile: ne_jack.src,v $
+ *
+ * $Author: gdsjaar $
+ *
+ * $Date: 2007/10/31 21:39:17 $
+ *
+ * $Revision: 1.14 $
+ *
+ *====================================================================*/
+%*
+%* Meta-source for various versions of NemesisI FORTRAN jacket library.
+%*
+%* Patterned after the exo_jack.src ExodusII library.
+%*
+%* 02/03/97 M.M. St. John
+%*
+%* After minor preprocessing via a sed script, this file becomes source
+%* to the m4 macro processor for a C library to be called from FORTRAN.
+%* The main differences between this source and C are the way function
+%* prototypes are declared. All such declarations occur in lines beginning
+%* with the "%" character. A sed script converts these into calls to m4
+%* macros for handling the various conventions for calling C functions from
+%* FORTRAN. Formal parameters corresponding to FORTRAN character strings
+%* must be declared using the pseudo type "string". Appending "len" to the
+%* name of such variables is the convention used for variables representing
+%* the FORTRAN length of string parameters.
+%*
+%* For example, the following input
+%*
+%* % void
+%* % ncadel (
+%* % int *cdfid, /* netCDF ID */
+%* % int *varid, /* variable ID */
+%* % string attname, /* attribute name */
+%* % int *rcode /* returned error code */
+%* % )
+%* % {
+%*
+%* will be converted to the following m4 macro calls:
+%*
+%* void`'M4__dnl
+%* M4__PROTO(`ncadel',
+%* `INTSTAR(cdfid)',
+%* `INTSTAR(varid)',
+%* `STRING(attname)',
+%* `INTSTAR(rcode)'
+%* )
+%* {M4__LOCALS
+%*
+%* which may be converted to the following C, using sun.m4 and common.m4
+%*
+%* void
+%* ncadel_ (cdfid, varid, attname, rcode, attnamelen)
+%* int *cdfid;
+%* int *varid;
+%* char *attname;
+%* int attnamelen;
+%* int *rcode;
+%* {
+%*
+/*
+ * OVERVIEW
+ *
+ * This file contains jacket routines written in C for interfacing Fortran
+ * NemesisI function calls to the actual C binding for NemsisI. This code
+ * is written explicitly for M4__SYSTEM. In general, these functions handle
+ * character-string parameter conventions, convert between
+ * column-major-order arrays and row-major-order arrays, and map between
+ * array indices beginning at one and array indices beginning at zero.
+ *
+ */
+
+/* LINTLIBRARY */
+#include <ctype.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "netcdf.h"
+#include "exodusII.h"
+#include "exodusII_int.h"
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+M4__STRING_DESCRIPTOR_INCLUDES
+
+M4__FORTRAN_DEFINES
+extern int ncopts; /* default is (NC_FATAL | NC_VERBOSE) */
+extern int exerrval; /* global int that contains a Exodus-specific error code */
+
+/* blank fill C string to make FORTRAN string */
+void
+ne_fcdcpy (fstring, fslen, sstring)
+ char *fstring; /* output string to be blank-filled */
+ int fslen; /* length of output string */
+ char *sstring; /* input string, null-terminated */
+{
+ int i, len = strlen(sstring);
+
+ for (i = 0; i < len; i++)
+ *(fstring + i) = *(sstring + i);
+ for (i = len; i < fslen; i++)
+ *(fstring + i) = ' ';
+}
+
+/* ne_lenstr - string length (w/o trailing blanks) */
+int ne_lenstr (char *string)
+{
+ char *ptr;
+
+ ptr=string+strlen(string); /* start at end of string including blanks */
+ while (*(--ptr) == ' '); /* skip blanks */
+ return(ptr-string+1); /* return trimmed length of string */
+}
+
+/* copy function used to copy strings and strip trailing blanks */
+void
+ne_fstrncpy (target, source, maxlen)
+ char *target; /* space to be copied into */
+ char *source; /* string to be copied */
+ int maxlen; /* maximum length of *source */
+{
+ while (maxlen-- && *source != '\0')
+ *target++ = *source++;
+ while (*(--target) == ' '); /* strip blanks */
+ *(++target) = '\0'; /* insert new EOS marker */
+}
+
+/*
+ * NOTE: there were some other helper functions in exo_jack.src
+ * that might be needed for future functions in the NEMESIS API.
+ * However, in the interest of saving space I am removing these
+ * for now. The functions are:
+ * nstrncpy - copy string terminated with blanks
+ * fstra2cstra - copy 1D Fortran string arrays into C string arrays
+ * cstra2fstra - copy 1D C string arrays into Fortran string arrays
+ * fstra2cstra2d - copy 2D Fortran string arrays into C string arrays
+ * cstra2fstra2d - copy 2D C string arrays into Fortran string arrays
+ * dimprod - Compute product of dimensions
+ * itob - convert array of bytes stored in ints to array of bytes
+ * itos - convert array of shorts stored in ints to array of shorts
+ *
+ * any of these functions can be copied from exo_jack.src in the future
+ * if they are needed.
+ */
+
+/* ------------ M4__SYSTEM FORTRAN jackets for NEMESIS I Functions ---------- */
+
+/*
+ * Get initial information from nemesis file
+ */
+% void
+% negii (
+% int *idne, /* NEMESIS file ID */
+% int *nproc, /* Number of processors */
+% int *nproc_in_f, /* Number of procs in this file */
+% string ftype, /* NEMESIS file type (parallel or scaler) */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ int slen;
+ char *file_type;
+
+ /* WARNING: ftypelen SHOULD be 1, but may not be depending on how
+ the Fortran programmer passed it. It is best at
+ this time to hard code it per NEPII spec. */
+ slen = 1;
+ if (ftypelen != 1)
+ {
+ slen = ftypelen;
+#if defined(EXODUS_STRING_LENGTH_WARNING)
+ sprintf(errmsg,"Warning: file type string length is %d in file id %d\n",
+ ftypelen, *idne);
+ ex_err("negii",errmsg,EX_MSG);
+#endif
+ }
+
+ file_type = (char *) malloc((slen+1)*sizeof(char));
+
+ if ((*ierr = ne_get_init_info(*idne, nproc, nproc_in_f, file_type)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to get initial information from file id %d",
+ *idne);
+ ex_err("negii",errmsg,EX_MSG);
+ }
+
+ if (*ierr == 0)
+ ne_fcdcpy (ftype, slen, file_type);
+
+ free(file_type);
+}
+
+/*
+ * Write initial information from nemesis file
+ */
+% void
+% nepii (
+% int *idne, /* NEMESIS file ID */
+% int *nproc, /* Number of processors */
+% int *nproc_in_f, /* Number of procs in this file */
+% string ftype, /* NEMESIS file type (parallel or scaler) */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ int slen;
+ char *file_type;
+
+ /* WARNING: ftypelen SHOULD be 1, but may not be depending on how
+ the Fortran programmer passed it. It is best at
+ this time to hard code it per NEPII spec. */
+ slen = 1;
+ if (ftypelen != 1)
+ {
+ slen = ftypelen;
+#if defined(EXODUS_STRING_LENGTH_WARNING)
+ sprintf(errmsg,"Warning: file type string length is %d in file id %d\n",
+ ftypelen, *idne);
+ ex_err("nepii",errmsg,EX_MSG);
+#endif
+ }
+
+ file_type = (char *) malloc((slen+1)*sizeof(char));
+
+ (void) ne_fstrncpy (file_type, ftype, slen);
+
+ if ((*ierr = ne_put_init_info(*idne, *nproc, *nproc_in_f, file_type)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to put initial information in file id %d",
+ *idne);
+ ex_err("nepii",errmsg,EX_MSG);
+ }
+
+ free(file_type);
+}
+
+/*
+ * Read initial global information
+ */
+% void
+% negig (
+% int *idne, /* NEMESIS file ID */
+% int *nnodes_g, /* Number of global FEM nodes */
+% int *nelems_g, /* Number of global FEM elements */
+% int *nelem_blks_g, /* Number of global elem blocks */
+% int *nnode_sets_g, /* Number of global node sets */
+% int *nside_sets_g, /* Number of global side sets */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_init_global(*idne, nnodes_g, nelems_g, nelem_blks_g,
+ nnode_sets_g, nside_sets_g)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read initial global information from file id %d",
+ *idne);
+ ex_err("negig",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write initial global information
+ */
+% void
+% nepig (
+% int *idne, /* NEMESIS file ID */
+% int *nnodes_g, /* Number of global FEM nodes */
+% int *nelems_g, /* Number of global FEM elements */
+% int *nelem_blks_g, /* Number of global elem blocks */
+% int *nnode_sets_g, /* Number of global node sets */
+% int *nside_sets_g, /* Number of global side sets */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_init_global(*idne, *nnodes_g, *nelems_g, *nelem_blks_g,
+ *nnode_sets_g, *nside_sets_g)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to store initial global information in file id %d",
+ *idne);
+ ex_err("nepig",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read load balance parameters
+ */
+% void
+% neglbp (
+% int *idne, /* NEMESIS file ID */
+% int *nint_nodes, /* Number of internal FEM nodes */
+% int *nbor_nodes, /* Number of border FEM nodes */
+% int *next_nodes, /* Number of external FEM nodes */
+% int *nint_elems, /* Number of internal FEM elems */
+% int *nbor_elems, /* Number of border FEM elems */
+% int *nnode_cmaps, /* Number of nodal comm maps */
+% int *nelem_cmaps, /* Number of elemental comm maps */
+% int *processor, /* Processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_loadbal_param(*idne, nint_nodes, nbor_nodes,
+ next_nodes, nint_elems, nbor_elems,
+ nnode_cmaps, nelem_cmaps, *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read load balance parameters from file id %d",
+ *idne);
+ ex_err("neglbp",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write load balance parameters
+ */
+% void
+% neplbp (
+% int *idne, /* NEMESIS file ID */
+% int *nint_nodes, /* Number of internal FEM nodes */
+% int *nbor_nodes, /* Number of border FEM nodes */
+% int *next_nodes, /* Number of external FEM nodes */
+% int *nint_elems, /* Number of internal FEM elems */
+% int *nbor_elems, /* Number of border FEM elems */
+% int *nnode_cmaps, /* Number of nodal comm maps */
+% int *nelem_cmaps, /* Number of elemental comm maps */
+% int *processor, /* Processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_loadbal_param(*idne, *nint_nodes, *nbor_nodes,
+ *next_nodes, *nint_elems, *nbor_elems,
+ *nnode_cmaps, *nelem_cmaps,
+ *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to store load balance parameters in file id %d",
+ *idne);
+ ex_err("neplbp",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write concatenated load balance parameters
+ */
+% void
+% neplbpc (
+% int *idne, /* NEMESIS file ID */
+% int *nint_nodes, /* Number of internal node IDs */
+% int *nbor_nodes, /* Number of border node IDs */
+% int *next_nodes, /* Number of external node IDs */
+% int *nint_elems, /* Number of internal elem IDs */
+% int *nbor_elems, /* Number of border elem IDs */
+% int *nnode_cmaps, /* Number of nodal comm maps */
+% int *nelem_cmaps, /* Number of elem comm maps */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_loadbal_param_cc(*idne, nint_nodes, nbor_nodes,
+ next_nodes, nint_elems, nbor_elems,
+ nnode_cmaps, nelem_cmaps)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to store load balance parameters in file id %d",
+ *idne);
+ ex_err("neplbpc",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read global node set parameters
+ */
+% void
+% negnspg (
+% int *idne, /* NEMESIS file ID */
+% int *ns_ids_glob, /* Global IDs of node sets */
+% int *ns_n_cnt_glob, /* Count of nodes in node sets */
+% int *ns_df_cnt_glob, /* Count of dist. factors in ns */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_ns_param_global(*idne, ns_ids_glob, ns_n_cnt_glob,
+ ns_df_cnt_glob)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read global node set parameters from file id %d",
+ *idne);
+ ex_err("negnspg",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write global node set parameters
+ */
+% void
+% nepnspg (
+% int *idne, /* NEMESIS file ID */
+% int *global_ids, /* Vector of global node-set IDs */
+% int *global_n_cnts, /* Vector of node counts in node-sets */
+% int *global_df_cnts, /* Vector of dist factor counts in node-sets */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_ns_param_global(*idne, global_ids, global_n_cnts,
+ global_df_cnts)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to store global node set parameters in file id %d",
+ *idne);
+ ex_err("nepnspg",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read global side set parameters
+ */
+% void
+% negsspg (
+% int *idne, /* NEMESIS file ID */
+% int *ss_ids_glob, /* Global IDs of side sets */
+% int *ss_n_cnt_glob, /* Count of nodes in side sets */
+% int *ss_df_cnt_glob, /* Count of dist. factors in ss */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_ss_param_global(*idne, ss_ids_glob, ss_n_cnt_glob,
+ ss_df_cnt_glob)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read global side set parameters from file id %d",
+ *idne);
+ ex_err("negsspg",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write global side set parameters
+ */
+% void
+% nepsspg (
+% int *idne, /* NEMESIS file ID */
+% int *global_ids, /* Vector of global side-set IDs */
+% int *global_el_cnts, /* Vector of element/side counts in each side set */
+% int *global_df_cnts, /* Vector of dist. factor counts in each side set */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_ss_param_global(*idne, global_ids, global_el_cnts,
+ global_df_cnts)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to store global side set parameters in file id %d",
+ *idne);
+ ex_err("nepsspg",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read global element block information
+ */
+% void
+% negebig (
+% int *idne, /* NEMESIS file ID */
+% int *el_blk_ids, /* Vector of global element IDs */
+% int *el_blk_cnts, /* Vector of global element counts */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_eb_info_global(*idne, el_blk_ids, el_blk_cnts)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read global element block info from file id %d",
+ *idne);
+ ex_err("negebig",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write global element block information
+ */
+% void
+% nepebig (
+% int *idne, /* NEMESIS file ID */
+% int *el_blk_ids, /* Vector of global element IDs */
+% int *el_blk_cnts, /* Vector of global element counts */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_eb_info_global(*idne, el_blk_ids, el_blk_cnts)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to store global element block info in file id %d",
+ *idne);
+ ex_err("nepebig",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read side set element list and side set side list
+ */
+% void
+% negnss (
+% int *idne, /* NEMESIS file ID */
+% int *ss_id, /* Side-set ID to read */
+% int *start_side_num, /* Starting element number */
+% int *num_sides, /* Number of sides to read */
+% int *ss_elem_list, /* List of element IDs */
+% int *ss_side_list, /* List of side IDs */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_side_set(*idne, *ss_id, *start_side_num, *num_sides,
+ ss_elem_list, ss_side_list)) != 0)
+
+ {
+ sprintf(errmsg,
+ "Error: failed to read side set element list from file id %d",
+ *idne);
+ ex_err("negnss",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write side set element list and side set side list
+ */
+% void
+% nepnss (
+% int *idne, /* NEMESIS file ID */
+% int *ss_id, /* Side-set ID to write */
+% int *start_side_num, /* Starting element number */
+% int *num_sides, /* Number of sides to write */
+% int *ss_elem_list, /* List of element IDs */
+% int *ss_side_list, /* List of side IDs */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_n_side_set(*idne, *ss_id, *start_side_num, *num_sides,
+ ss_elem_list, ss_side_list)) != 0)
+
+ {
+ sprintf(errmsg,
+ "Error: failed to write side set element list to file id %d",
+ *idne);
+ ex_err("nepnss",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read side set distribution factor
+ */
+% void
+% negnssd (
+% int *idne, /* NEMESIS file ID */
+% int *ss_id, /* Side-set ID */
+% int *start_num, /* Starting df number */
+% int *num_df_to_get /* Number of df's to read */
+% real *ss_df, /* Distribution factors */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_side_set_df(*idne, *ss_id, *start_num,
+ *num_df_to_get, ss_df)) != 0)
+
+ {
+ sprintf(errmsg,
+ "Error: failed to read side set dist factor from file id %d",
+ *idne);
+ ex_err("negnssd",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write side set distribution factor
+ */
+% void
+% nepnssd (
+% int *idne, /* NEMESIS file ID */
+% int *ss_id, /* Side-set ID */
+% int *start_num, /* Starting df number */
+% int *num_df_to_get /* Number of df's to write */
+% real *ss_df, /* Distribution factors */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_n_side_set_df(*idne, *ss_id, *start_num,
+ *num_df_to_get, ss_df)) != 0)
+
+ {
+ sprintf(errmsg,
+ "Error: failed to write side set dist factor to file id %d",
+ *idne);
+ ex_err("nepnssd",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read node set list for a single node set
+ */
+% void
+% negnns (
+% int *idne, /* NEMESIS file ID */
+% int *ns_id, /* Node set ID */
+% int *start_node_num, /* Node index to start reading at */
+% int *num_node, /* Number of nodes to read */
+% int *ns_node_list, /* List of nodes in node set */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_node_set(*idne, *ns_id, *start_node_num,
+ *num_node, ns_node_list)) != 0)
+
+ {
+ sprintf(errmsg,
+ "Error: failed to read node set node list from file id %d",
+ *idne);
+ ex_err("negnns",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write node set list for a single node set
+ */
+% void
+% nepnns (
+% int *idne, /* NEMESIS file ID */
+% int *ns_id, /* Node set ID */
+% int *start_node_num, /* Node index to start writing at */
+% int *num_node, /* Number of nodes to write */
+% int *ns_node_list, /* List of nodes in node set */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_n_node_set(*idne, *ns_id, *start_node_num,
+ *num_node, ns_node_list)) != 0)
+
+ {
+ sprintf(errmsg,
+ "Error: failed to write node set node list to file id %d",
+ *idne);
+ ex_err("nepnns",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read node set distribution factor
+ */
+% void
+% negnnsd (
+% int *idne, /* NEMESIS file ID */
+% int *ns_id, /* Node-set ID */
+% int *start_num, /* Starting df number */
+% int *num_df_to_get /* Number of df's to read */
+% real *ns_df, /* Distribution factors */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_node_set_df(*idne, *ns_id, *start_num,
+ *num_df_to_get, ns_df)) != 0)
+
+ {
+ sprintf(errmsg,
+ "Error: failed to read node set dist factor from file id %d",
+ *idne);
+ ex_err("negnnsd",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write node set distribution factor
+ */
+% void
+% nepnnsd (
+% int *idne, /* NEMESIS file ID */
+% int *ns_id, /* Node-set ID */
+% int *start_num, /* Starting df number */
+% int *num_df_to_get /* Number of df's to write */
+% real *ns_df, /* Distribution factors */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_n_node_set_df(*idne, *ns_id, *start_num,
+ *num_df_to_get, ns_df)) != 0)
+
+ {
+ sprintf(errmsg,
+ "Error: failed to write node set dist factor to file id %d",
+ *idne);
+ ex_err("nepnnsd",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read coordinates of the nodes
+ */
+% void
+% negcor (
+% int *idne, /* NEMESIS file ID */
+% int *start_node_num, /* Starting position to read from */
+% int *num_nodes, /* Number of coords to read */
+% real *x_coor, /* Vector of X coordinates */
+% real *y_coor, /* Vector of Y coordinates */
+% real *z_coor, /* Vector of Z coordinates */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_coord(*idne, *start_node_num, *num_nodes,
+ x_coor, y_coor, z_coor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read node coordinates from file id %d",
+ *idne);
+ ex_err("negcor",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write coordinates of the nodes
+ */
+% void
+% nepcor (
+% int *idne, /* NEMESIS file ID */
+% int *start_node_num, /* Starting position to read from */
+% int *num_nodes, /* Number of coords to read */
+% real *x_coor, /* Vector of X coordinates */
+% real *y_coor, /* Vector of Y coordinates */
+% real *z_coor, /* Vector of Z coordinates */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_n_coord(*idne, *start_node_num, *num_nodes,
+ x_coor, y_coor, z_coor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write node coordinates to file id %d",
+ *idne);
+ ex_err("nepcor",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read an element block's connectivity list
+ */
+% void
+% negnec (
+% int *idne, /* NEMESIS file ID */
+% int *elem_blk_id, /* Element block ID */
+% int *start_elem_num, /* Starting position to read from */
+% int *num_elems, /* Number of elements to read */
+% int *connect, /* Connectivity vector */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_elem_conn(*idne, *elem_blk_id, *start_elem_num,
+ *num_elems, connect)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read element block connectivity from file id %d",
+ *idne);
+ ex_err("negnec",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write an element block's connectivity list
+ */
+% void
+% nepnec (
+% int *idne, /* NEMESIS file ID */
+% int *elem_blk_id, /* Element block ID */
+% int *start_elem_num, /* Starting position to write to */
+% int *num_elems, /* Number of elements to write */
+% int *connect, /* Connectivity vector */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_n_elem_conn(*idne, *elem_blk_id, *start_elem_num,
+ *num_elems, connect)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write element block connectivity to file id %d",
+ *idne);
+ ex_err("negnec",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read an element block's attributes
+ */
+% void
+% negneat (
+% int *idne, /* NEMESIS file ID */
+% int *elem_blk_id, /* Element block ID */
+% int *start_elem_num, /* Starting position to read from */
+% int *num_elems, /* Number of elements to read */
+% real *attrib, /* Attribute */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_elem_attr(*idne, *elem_blk_id, *start_elem_num,
+ *num_elems, attrib)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read element block attribute from file id %d",
+ *idne);
+ ex_err("negneat",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write an element block's attributes
+ */
+% void
+% nepneat (
+% int *idne, /* NEMESIS file ID */
+% int *elem_blk_id, /* Element block ID */
+% int *start_elem_num, /* Starting position to write to */
+% int *num_elems, /* Number of elements to write */
+% real *attrib, /* Attribute */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_n_elem_attr(*idne, *elem_blk_id, *start_elem_num,
+ *num_elems, attrib)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write element block attribute to file id %d",
+ *idne);
+ ex_err("nepneat",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read the element type for a specific element block
+ */
+% void
+% negelt (
+% int *idne, /* NEMESIS file ID */
+% int *elem_blk_id, /* Element block ID */
+% string elem_type, /* The name of the element type */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ int slen;
+ char *etype;
+
+ /* WARNING: ftypelen SHOULD be MAX_STR_LENGTH, but may not be depending
+ on how the Fortran programmer passed it. It is best at
+ this time to hard code it per NEMESIS spec. */
+ slen = MAX_STR_LENGTH;
+ if (elem_typelen != MAX_STR_LENGTH)
+ {
+ slen = elem_typelen;
+#if defined(EXODUS_STRING_LENGTH_WARNING)
+ sprintf(errmsg,"Warning: element type string length is %d in file id %d\n",
+ elem_typelen, *idne);
+ ex_err("negelt",errmsg,EX_MSG);
+#endif
+ }
+
+ etype = (char *) malloc((slen+1)*sizeof(char));
+
+ if ((*ierr = ne_get_elem_type(*idne, *elem_blk_id, etype)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read element block type from file id %d",
+ *idne);
+ ex_err("negelt",errmsg,EX_MSG);
+ }
+
+ if (*ierr == 0)
+ ne_fcdcpy (elem_type, slen, etype);
+
+ free(etype);
+}
+
+/*
+ * Read a variable for an element block
+ */
+% void
+% negnev (
+% int *idne, /* NEMESIS file ID */
+% int *time_step, /* time index */
+% int *elem_var_index, /* elemental variable index */
+% int *elem_blk_id, /* elemental block id */
+% int *num_elem_this_blk, /* number of elements in block */
+% int *start_elem_num, /* Starting position to read from */
+% int *num_elem, /* Number of elements to read */
+% real *elem_var_vals, /* variable values */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_elem_var(*idne, *time_step, *elem_var_index,
+ *elem_blk_id, *num_elem_this_blk,
+ *start_elem_num, *num_elem,
+ elem_var_vals)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read element block variable from file id %d",
+ *idne);
+ ex_err("negnec",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write a variable slab for an element block
+ */
+% void
+% nepevs (
+% int *idne, /* NEMESIS file ID */
+% int *time_step, /* time index */
+% int *elem_var_index, /* elemental variable index */
+% int *elem_blk_id, /* elemental block id */
+% int *start_pos, /* Starting position to read from */
+% int *num_vals, /* Number of elements to read */
+% real *elem_var_vals, /* variable values */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_elem_var_slab(*idne, *time_step, *elem_var_index,
+ *elem_blk_id, *start_pos, *num_vals,
+ elem_var_vals)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write elem block variable slab to file id %d",
+ *idne);
+ ex_err("negnec",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read the values of a single nodal variable for a single time step
+ */
+% void
+% negnnv (
+% int *idne, /* NEMESIS file ID */
+% int *time_step, /* whole time step number */
+% int *nodal_var_index, /* index of desired nodal var */
+% int *start_node_num, /* starting node number */
+% int *num_nodes, /* number of nodes to read */
+% real *nodal_vars, /* array of nodal var values */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_nodal_var(*idne, *time_step, *nodal_var_index,
+ *start_node_num, *num_nodes,
+ nodal_vars)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read nodal variable from file id %d",
+ *idne);
+ ex_err("negnnv",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write nodal variable slab
+ */
+% void
+% nepnvs (
+% int *idne, /* NEMESIS file ID */
+% int *time_step, /* The time step index */
+% int *nodal_var_index, /* Nodal variable index */
+% int *start_pos, /* Start position for write */
+% int *num_vals, /* Number of nodal variables */
+% real *nodal_var_vals, /* Nodal variable values */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_nodal_var_slab(*idne, *time_step, *nodal_var_index,
+ *start_pos, *num_vals,
+ nodal_var_vals)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write nodal variable slab to file id %d",
+ *idne);
+ ex_err("nepnvs",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read the element numbering map
+ */
+% void
+% negnenm (
+% int *idne, /* NEMESIS file ID */
+% int *starte, /* starting element number */
+% int *num_ent, /* number of elements to read */
+% int *elem_map, /* vector for element map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_elem_num_map(*idne, *starte, *num_ent, elem_map)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read element numbering map from file id %d",
+ *idne);
+ ex_err("negnenm",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write the element numbering map
+ */
+% void
+% nepnenm (
+% int *idne, /* NEMESIS file ID */
+% int *starte, /* starting element number */
+% int *num_ent, /* number of elements to write */
+% int *elem_map, /* vector for element map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_n_elem_num_map(*idne, *starte, *num_ent, elem_map)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write element numbering map to file id %d",
+ *idne);
+ ex_err("nepnenm",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read the node numbering map
+ */
+% void
+% negnnnm (
+% int *idne, /* NEMESIS file ID */
+% int *startn, /* starting node number */
+% int *num_ent, /* number of nodes to read */
+% int *node_map, /* vector for node map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_n_node_num_map(*idne, *startn, *num_ent, node_map)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read node numbering map from file id %d",
+ *idne);
+ ex_err("negnnnm",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write the node numbering map
+ */
+% void
+% nepnnnm (
+% int *idne, /* NEMESIS file ID */
+% int *startn, /* starting node number */
+% int *num_ent, /* number of nodes to write */
+% int *node_map, /* vector for node map */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_n_node_num_map(*idne, *startn, *num_ent, node_map)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write node numbering map to file id %d",
+ *idne);
+ ex_err("nepnnnm",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read the node map for a processor
+ */
+% void
+% negnm (
+% int *idne, /* NEMESIS file ID */
+% int *node_mapi, /* Internal FEM node IDs */
+% int *node_mapb, /* Border FEM node IDs */
+% int *node_mape, /* External FEM node IDs */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_node_map(*idne, node_mapi, node_mapb, node_mape,
+ *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read processor node map from file id %d",
+ *idne);
+ ex_err("negnm",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write a node map for a processor
+ */
+% void
+% nepnm (
+% int *idne, /* NEMESIS file ID */
+% int *node_mapi, /* Internal FEM node IDs */
+% int *node_mapb, /* Border FEM node IDs */
+% int *node_mape, /* External FEM node IDs */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_node_map(*idne, node_mapi, node_mapb, node_mape,
+ *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write processor node map to file id %d",
+ *idne);
+ ex_err("nepnm",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read the element map for a processor
+ */
+% void
+% negem (
+% int *idne, /* NEMESIS file ID */
+% int *elem_mapi, /* Internal FEM element IDs */
+% int *elem_mapb, /* Border FEM element IDs */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_elem_map(*idne, elem_mapi, elem_mapb, *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read processor element map from file id %d",
+ *idne);
+ ex_err("negem",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write the element map for a processor
+ */
+% void
+% nepem (
+% int *idne, /* NEMESIS file ID */
+% int *elem_mapi, /* Internal FEM element IDs */
+% int *elem_mapb, /* Border FEM element IDs */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_elem_map(*idne, elem_mapi, elem_mapb, *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write processor element map to file id %d",
+ *idne);
+ ex_err("nepem",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read the communications map parameters for a single processor
+ */
+% void
+% negcmp (
+% int *idne, /* NEMESIS file ID */
+% int *ncmap_ids, /* Node map IDs */
+% int *ncmap_node_cnts, /* Nodes in nodal comm */
+% int *ecmap_ids, /* Elem map IDs */
+% int *ecmap_elem_cnts, /* Elems in elemental comm */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_cmap_params(*idne, ncmap_ids, ncmap_node_cnts,
+ ecmap_ids, ecmap_elem_cnts, *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read comm map parameters from file id %d",
+ *idne);
+ ex_err("negcmp",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write the communications map parameters for a single processor
+ */
+% void
+% nepcmp (
+% int *idne, /* NEMESIS file ID */
+% int *nmap_ids, /* Node map IDs */
+% int *nmap_node_cnts, /* Nodes in nodal comm */
+% int *emap_ids, /* Elem map IDs */
+% int *emap_elem_cnts, /* Elems in elemental comm */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_cmap_params(*idne, nmap_ids, nmap_node_cnts,
+ emap_ids, emap_elem_cnts, *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write comm map parameters to file id %d",
+ *idne);
+ ex_err("nepcmp",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write the communications map parameters for all processors
+ */
+% void
+% nepcmpc (
+% int *idne, /* NEMESIS file ID */
+% int *nmap_ids, /* Node map IDs */
+% int *nmap_node_cnts, /* Nodes in nodal comm */
+% int *nproc_ptrs, /* Pointer into array for node maps */
+% int *emap_ids, /* Elem map IDs */
+% int *emap_elem_cnts, /* Elems in elemental comm */
+% int *eproc_ptrs, /* Pointer into array for elem maps */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_cmap_params_cc(*idne, nmap_ids, nmap_node_cnts,
+ nproc_ptrs, emap_ids, emap_elem_cnts,
+ eproc_ptrs)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write comm map parameters to file id %d",
+ *idne);
+ ex_err("nepcmpc",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read the nodal communications map for a single processor
+ */
+% void
+% negncm (
+% int *idne, /* NEMESIS file ID */
+% int *map_id, /* Nodal comm map ID */
+% int *node_ids, /* FEM node IDs */
+% int *proc_ids, /* Processor IDs */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_node_cmap(*idne, *map_id, node_ids, proc_ids,
+ *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read nodal communications map from file id %d",
+ *idne);
+ ex_err("negncm",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write the nodal communications map for a single processor
+ */
+% void
+% nepncm (
+% int *idne, /* NEMESIS file ID */
+% int *map_id, /* Nodal comm map ID */
+% int *node_ids, /* FEM node IDs */
+% int *proc_ids, /* Processor IDs */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_node_cmap(*idne, *map_id, node_ids, proc_ids,
+ *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write nodal communications map to file id %d",
+ *idne);
+ ex_err("nepncm",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Read the elemental communications map for a single processor
+ */
+% void
+% negecm (
+% int *idne, /* NEMESIS file ID */
+% int *map_id, /* Nodal comm map ID */
+% int *elem_ids, /* Vector of element IDs */
+% int *side_ids, /* Vector of side IDs */
+% int *proc_ids, /* Vector of processor IDs */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_get_elem_cmap(*idne, *map_id, elem_ids, side_ids, proc_ids,
+ *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to read elemental comm map from file id %d",
+ *idne);
+ ex_err("negecm",errmsg,EX_MSG);
+ }
+}
+
+/*
+ * Write the elemental communications map for a single processor
+ */
+% void
+% nepecm (
+% int *idne, /* NEMESIS file ID */
+% int *map_id, /* Nodal comm map ID */
+% int *elem_ids, /* Vector of element IDs */
+% int *side_ids, /* Vector of side IDs */
+% int *proc_ids, /* Vector of processor IDs */
+% int *processor, /* This processor ID */
+% int *ierr /* returned error code */
+% )
+% {
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ if ((*ierr = ne_put_elem_cmap(*idne, *map_id, elem_ids, side_ids, proc_ids,
+ *processor)) != 0)
+ {
+ sprintf(errmsg,
+ "Error: failed to write elemental comm map to file id %d",
+ *idne);
+ ex_err("nepecm",errmsg,EX_MSG);
+ }
+}
+
diff --git a/nemesis/forbind/ne_test.F b/nemesis/forbind/ne_test.F
new file mode 100644
index 0000000..1c5dde0
--- /dev/null
+++ b/nemesis/forbind/ne_test.F
@@ -0,0 +1,930 @@
+C Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+C DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+C retains certain rights in this software.
+C
+C Redistribution and use in source and binary forms, with or without
+C modification, are permitted provided that the following conditions are
+C met:
+C
+C * Redistributions of source code must retain the above copyright
+C notice, this list of conditions and the following disclaimer.
+C
+C * Redistributions in binary form must reproduce the above
+C copyright notice, this list of conditions and the following
+C disclaimer in the documentation and/or other materials provided
+C with the distribution.
+C
+C * Neither the name of Sandia Corporation nor the names of its
+C contributors may be used to endorse or promote products derived
+C from this software without specific prior written permission.
+C
+C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+C "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+C LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+C A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+C OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+C SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+C LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+C THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+C (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+C OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+C
+C=================================================================
+C
+C This is just a simple test program to test the fortran interface
+C for the NEMESIS I library.
+C
+C This file was created by translating ne_test.c into fortran.
+C
+C=================================================================
+
+C=================================================================
+ PROGRAM NETEST
+C=================================================================
+ INCLUDE 'exodusII.inc'
+ INCLUDE 'ne_test.inc'
+
+C local variables
+ INTEGER NEID, IO_WS, CPU_WS, T_PASS, T_FAIL, DBG_FLAG, IERR
+ CHARACTER FNAME*256, YO*6
+ REAL VERSION
+
+ YO = 'NETEST'
+ IO_WS = 0
+ CPU_WS = 0
+ T_PASS = 0
+ T_FAIL = 0
+ DBG_FLAG = 0
+
+C now let's get going...
+
+C I don't care about input arguements, so the file name will be ne_test.nemI
+ FNAME = 'ne_test.nemI'
+C and set the debug flag to 0
+ DBG_FLAG = 0
+
+ PRINT*, '******************Output Tests*****************'
+C create the exodus II file
+ PRINT*, 'creating ExodusII file...'
+ NEID = EXCRE(FNAME, EXCLOB, CPU_WS, IO_WS, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ PRINT*, YO, ': ERROR, unable to create test file', FNAME, '!'
+ GOTO 100
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test the output of initial information
+ PRINT*, 'testing init info output...'
+ CALL NEPII(NEID, NPROC, NPROCF, 'S', IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test the output of initial global information
+ PRINT*, 'testing global init info output...'
+ CALL NEPIG(NEID, NNG, NEG, NEBG, NNSG, NSSG, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test the output of the global element block IDs
+ PRINT*, 'testing global element block ID output...'
+ CALL NETPEBI(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test the output of the global node-set info
+ PRINT*, 'testing global node-set params output...'
+ CALL NETPNSP(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test the output of the global side-set info
+ PRINT*, 'testing global side-set params output...'
+ CALL NETPSSP(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test the output of the concatenated load-balance parameters
+ PRINT*, 'testing concatenated load balance info output...'
+ CALL NETPLBPC(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test the output of the node map
+ PRINT*, 'testing node map output...'
+ CALL NETPNM(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test the output of the element map
+ PRINT*, 'testing element map output...'
+ CALL NETPEM(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test the output of the concatenated communication map params
+#ifndef Build64
+ PRINT*, 'testing concatenated communication map params output...'
+ CALL NETPCMPC(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+#endif
+
+C Test nodal communication map output
+ PRINT*, 'testing nodal communication map output...'
+ CALL NETPNCM(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test elemental communication map output
+ PRINT*, 'testing elemental communication map output...'
+ CALL NETPECM(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Close the ExodusII/Nemesis test file
+ PRINT*, 'closing ExodusII file...'
+ CALL EXCLOS(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ PRINT*, YO, ': ERROR, unable to close test file', FNAME, '!'
+ GOTO 100
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C=================================================================
+C INPUT TEST SECTION
+C=================================================================
+
+ PRINT*, '******************Input Tests******************'
+
+C Re-open the ExodusII/NemesisI file
+ PRINT*, 'reopening ExodusII file...'
+ NEID = EXOPEN(FNAME, EXREAD, CPU_WS, IO_WS, VERSION, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ PRINT*, YO, ': ERROR, unable to open test file', FNAME, '!'
+ GOTO 100
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of of the initial information
+ PRINT*, 'testing init info input...'
+ CALL NETGII(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of initial global information
+ PRINT*, 'testing global init info input...'
+ CALL NETGIG(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of global element block IDs
+ PRINT*, 'testing global element block IDs input...'
+ CALL NETGEBI(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of global node-set params
+ PRINT*, 'testing global node-set params input...'
+ CALL NETGNSP(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of global side-set params
+ PRINT*, 'testing global side-set params input...'
+ CALL NETGSSP(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of load-balance params
+ PRINT*, 'testing load-balance params input...'
+ CALL NETGLBP(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of the node map
+ PRINT*, 'testing node map input...'
+ CALL NETGNM(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of the element map
+ PRINT*, 'testing element map input...'
+ CALL NETGEM(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of nodal communication maps
+ PRINT*, 'testing nodal communication map input...'
+ CALL NETGNCM(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Test read of elemental communication maps
+ PRINT*, 'testing elemental communication map input...'
+ CALL NETGECM(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ IF (DBG_FLAG.EQ.1) THEN
+ GOTO 100
+ END IF
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+C Close the ExodusII/Nemesis test file
+ PRINT*, 'closing ExodusII file...'
+ CALL EXCLOS(NEID, IERR)
+ IF (IERR.NE.0) THEN
+ PRINT*, '...FAILED'
+ T_FAIL = T_FAIL + 1
+ PRINT*, YO, ': ERROR, unable to close test file', FNAME, '!'
+ GOTO 100
+ ELSE
+ PRINT*, '...successful'
+ T_PASS = T_PASS + 1
+ END IF
+
+ PRINT*, 'Tests Passed: ', T_PASS
+ PRINT*, 'Tests Failed: ', T_FAIL
+
+ 100 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETPEBI(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER I, EBLK_IDS(NEBG)
+ INTEGER EBLK_CNTS(NEBG)
+
+ DO 110 I=1,NEBG
+ EBLK_IDS(I) = I
+ EBLK_CNTS(I) = 10
+ 110 CONTINUE
+
+ CALL NEPEBIG(NEID, EBLK_IDS, EBLK_CNTS, IERR)
+
+ END
+
+C=================================================================
+ SUBROUTINE NETPNSP(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER I, GLBL_IDS(NNSG), GLBL_NC(NNSG), GLBL_DFC(NNSG)
+
+ DO 120 I = 1,NNSG
+ GLBL_IDS(I) = 2 * I
+ GLBL_NC(I) = 3 * I
+ GLBL_DFC(I) = 1
+ 120 CONTINUE
+
+ CALL NEPNSPG(NEID, GLBL_IDS, GLBL_NC, GLBL_DFC, IERR)
+
+ END
+
+C=================================================================
+ SUBROUTINE NETPSSP(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER I, GLBL_IDS(NSSG), GLBL_ELC(NSSG), GLBL_DFC(NSSG)
+
+ DO 130 I = 1,NSSG
+ GLBL_IDS(I) = 3 * I
+ GLBL_ELC(I) = 2 * I
+ GLBL_DFC(I) = 1
+ 130 CONTINUE
+
+ CALL NEPSSPG(NEID, GLBL_IDS, GLBL_ELC, GLBL_DFC, IERR)
+
+ END
+
+C=================================================================
+ SUBROUTINE NETPLBPC(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, NUM_IN(NPROCF), NUM_BN(NPROCF), NUM_EN(NPROCF),
+ 1 NUM_IE(NPROCF), NUM_BE(NPROCF), NUM_NCM(NPROCF), NUM_ECM(NPROCF)
+
+ DO 140 IPROC = 1,NPROCF
+ NUM_IN(IPROC) = NINTN
+ NUM_BN(IPROC) = NBORN
+ NUM_EN(IPROC) = NEXTN
+
+ NUM_IE(IPROC) = NINTE
+ NUM_BE(IPROC) = NBORE
+
+ NUM_NCM(IPROC) = NNCMAP
+ NUM_ECM(IPROC) = NECMAP
+ 140 CONTINUE
+
+ CALL NEPLBPC(NEID, NUM_IN, NUM_BN, NUM_EN, NUM_IE, NUM_BE,
+ 1 NUM_NCM, NUM_ECM, IERR)
+
+ END
+
+C=================================================================
+ SUBROUTINE NETPNM(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, I, J, NMAPI(NINTN), NMAPB(NBORN), NMAPE(NEXTN)
+
+ I = 0
+ DO 200 IPROC = 0,(NPROCF-1)
+ DO 150 J = 1,NINTN
+ NMAPI(J) = I
+ I = I + 1
+ 150 CONTINUE
+ DO 160 J = 1,NBORN
+ NMAPB(J) = I
+ I = I + 1
+ 160 CONTINUE
+ DO 170 J = 1,NEXTN
+ NMAPE(J) = I
+ I = I + 1
+ 170 CONTINUE
+
+ I = 0
+
+ CALL NEPNM(NEID, NMAPI, NMAPB, NMAPE, IPROC, IERR)
+ IF (IERR.NE.0) GOTO 210
+
+ 200 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETPEM(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, I, J, EMAPI(NINTE), EMAPB(NBORE)
+
+ I = 0
+ DO 200 IPROC = 0,(NPROCF-1)
+ DO 150 J = 1,NINTE
+ EMAPI(J) = I
+ I = I + 1
+ 150 CONTINUE
+ DO 160 J = 1,NBORE
+ EMAPB(J) = I
+ I = I + 1
+ 160 CONTINUE
+
+ I = 0
+
+ CALL NEPEM(NEID, EMAPI, EMAPB, IPROC, IERR)
+ IF (IERR.NE.0) GOTO 210
+
+ 200 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETPCMPC(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, I, NCNTR, ECNTR, NMAPIDS(NNCXNPF),
+ 1 NMAPCNT(NNCXNPF), NMAPPROC(NPROCF+1), EMAPIDS(NECXNPF),
+ 1 EMAPCNT(NECXNPF), EMAPPROC(NPROCF+1)
+
+ NMAPPROC(1) = 0
+ EMAPPROC(1) = 0
+ NCNTR = 1
+ ECNTR = 1
+ DO 200 IPROC = 1,NPROCF
+ DO 150 I = 1,NNCMAP
+ NMAPIDS(NCNTR) = I
+ NMAPCNT(NCNTR) = NCNTCM
+ NCNTR = NCNTR + 1
+ 150 CONTINUE
+ DO 160 I = 1,NECMAP
+ EMAPIDS(ECNTR) = 2*I
+ EMAPCNT(ECNTR) = ECNTCM
+ ECNTR = ECNTR + 1
+ 160 CONTINUE
+
+ NMAPPROC(IPROC+1) = NMAPPROC(IPROC) + NNCMAP
+ EMAPPROC(IPROC+1) = EMAPPROC(IPROC) + NECMAP
+
+ 200 CONTINUE
+
+ CALL NEPCMPC(NEID, NMAPIDS, NMAPCNT, NMAPPROC, EMAPIDS, EMAPCNT,
+ 1 EMAPPROC, IERR)
+
+ END
+
+C=================================================================
+ SUBROUTINE NETPNCM(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, I, NMAPIDS(NNCMAP), NIDS(NCNTCM), PIDS(NCNTCM)
+
+ DO 200 IPROC = 0,(NPROCF-1)
+ DO 150 I = 1,NNCMAP
+ NMAPIDS(I) = I
+ 150 CONTINUE
+ DO 160 I = 1,NCNTCM
+ NIDS(I) = 2*I
+ PIDS(I) = 3*I
+ 160 CONTINUE
+
+ DO 170 I=1,NNCMAP
+ CALL NEPNCM(NEID, NMAPIDS(I), NIDS, PIDS, IPROC, IERR)
+ IF (IERR.NE.0) GOTO 210
+ 170 CONTINUE
+
+ 200 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETPECM(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, I, EMAPIDS(NECMAP), EIDS(ECNTCM), PIDS(ECNTCM),
+ 1 SIDS(ECNTCM)
+
+ DO 200 IPROC = 0,(NPROCF-1)
+ DO 150 I = 1,NECMAP
+ EMAPIDS(I) = 2*I
+ 150 CONTINUE
+ DO 160 I = 1,ECNTCM
+ EIDS(I) = 2*I
+ SIDS(I) = 3*I
+ PIDS(I) = 4*I
+ 160 CONTINUE
+
+ DO 170 I=1,NECMAP
+ CALL NEPECM(NEID, EMAPIDS(I), EIDS, SIDS, PIDS, IPROC, IERR)
+ IF (IERR.NE.0) GOTO 210
+ 170 CONTINUE
+
+ 200 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGII(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER NP, NPF
+ CHARACTER FTYPE*2
+
+ CALL NEGII(NEID, NP, NPF, FTYPE, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ IF (NP.NE.NPROC) IERR = -1
+ IF (NPF.NE.NPROCF) IERR = -1
+ IF (NP.NE.NPROC) IERR = -1
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGIG(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER NUMNG, NUMEG, NUMEBG, NUMNSG, NUMSSG
+
+ CALL NEGIG(NEID, NUMNG, NUMEG, NUMEBG, NUMNSG, NUMSSG, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ IF (NUMNG.NE.NNG) IERR = -1
+ IF (NUMEG.NE.NEG) IERR = -1
+ IF (NUMEBG.NE.NEBG) IERR = -1
+ IF (NUMNSG.NE.NNSG) IERR = -1
+ IF (NUMSSG.NE.NSSG) IERR = -1
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGEBI(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER I, EBLK_IDS(NEBG)
+ INTEGER EBLK_CNTS(NEBG)
+
+ CALL NEGEBIG(NEID, EBLK_IDS, EBLK_CNTS, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ DO 150 I=1,NEBG
+ IF (EBLK_IDS(I).NE.I) IERR = -1
+ IF (EBLK_CNTS(I) .NE. 10) IERR = -1
+ 150 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGNSP(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER I, GLBL_IDS(NNSG), GLBL_NC(NNSG), GLBL_DFC(NNSG)
+
+ CALL NEGNSPG(NEID, GLBL_IDS, GLBL_NC, GLBL_DFC, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ DO 150 I=1,NNSG
+ IF (GLBL_IDS(I).NE.(2*I)) IERR = -1
+ IF (GLBL_NC(I).NE.(3*I)) IERR = -1
+ IF (GLBL_DFC(I).NE.1) IERR = -1
+ 150 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGSSP(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER I, GLBL_IDS(NSSG), GLBL_EC(NSSG), GLBL_DFC(NSSG)
+
+ CALL NEGSSPG(NEID, GLBL_IDS, GLBL_EC, GLBL_DFC, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ DO 150 I=1,NNSG
+ IF (GLBL_IDS(I).NE.(3*I)) IERR = -1
+ IF (GLBL_EC(I).NE.(2*I)) IERR = -1
+ IF (GLBL_DFC(I).NE.1) IERR = -1
+ 150 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGLBP(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, NUM_IN, NUM_BN, NUM_EN, NUM_IE, NUM_BE,
+ * NUM_NCM, NUM_ECM
+
+ DO 150 IPROC = 0,(NPROCF-1)
+ CALL NEGLBP(NEID, NUM_IN, NUM_BN, NUM_EN, NUM_IE, NUM_BE,
+ 1 NUM_NCM, NUM_ECM, IPROC, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ IF(NUM_IN.NE.NINTN) IERR = -1
+ IF(NUM_BN.NE.NBORN) IERR = -1
+ IF(NUM_EN.NE.NEXTN) IERR = -1
+ IF(NUM_IE.NE.NINTE) IERR = -1
+ IF(NUM_BE.NE.NBORE) IERR = -1
+ IF(NUM_NCM.NE.NNCMAP) IERR = -1
+ IF(NUM_ECM.NE.NECMAP) IERR = -1
+ 150 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGNM(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, I, J, NMAPI(NINTN), NMAPB(NBORN), NMAPE(NEXTN)
+
+ I = 0
+ DO 200 IPROC = 0,(NPROCF-1)
+
+ CALL NEGNM(NEID, NMAPI, NMAPB, NMAPE, IPROC, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ DO 150 J = 1,NINTN
+ IF (NMAPI(J).NE.I) ERR = -1
+ I = I + 1
+ 150 CONTINUE
+ DO 160 J = 1,NBORN
+ IF (NMAPB(J).NE.I) ERR = -1
+ I = I + 1
+ 160 CONTINUE
+ DO 170 J = 1,NEXTN
+ IF (NMAPE(J).NE.I) ERR = -1
+ I = I + 1
+ 170 CONTINUE
+
+ I = 0
+
+ IF (IERR.NE.0) GOTO 210
+
+ 200 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGEM(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, I, J, EMAPI(NINTE), EMAPB(NBORE)
+
+ I = 0
+ DO 200 IPROC = 0,(NPROCF-1)
+ CALL NEGEM(NEID, EMAPI, EMAPB, IPROC, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ DO 150 J = 1,NINTE
+ IF (EMAPI(J).NE.I) ERR = -1
+ I = I + 1
+ 150 CONTINUE
+ DO 160 J = 1,NBORE
+ IF (EMAPB(J).NE.I) ERR = -1
+ I = I + 1
+ 160 CONTINUE
+
+ I = 0
+
+ IF (IERR.NE.0) GOTO 210
+
+ 200 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGNCM(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, I, J, NMAPIDS(NNCMAP), NMAPCNT(NNCMAP),
+ 1 NIDS(NCNTCM), PIDS(NCNTCM), EMAPIDS(NECMAP), EMAPCNT(NECMAP)
+
+ DO 200 IPROC = 0,(NPROCF-1)
+ CALL NEGCMP(NEID, NMAPIDS, NMAPCNT, EMAPIDS, EMAPCNT,
+ 1 IPROC, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ DO 170 I = 1,NNCMAP
+ CALL NEGNCM(NEID, NMAPIDS(I), NIDS, PIDS, IPROC, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ IF (NMAPIDS(I).NE.I) IERR = -1
+ DO 160 J = 1,NCNTCM
+ IF (NIDS(J).NE.2*J) IERR = -1
+ IF (PIDS(J).NE.3*J) IERR = -1
+ 160 CONTINUE
+
+ IF (IERR.NE.0) GOTO 210
+ 170 CONTINUE
+
+ 200 CONTINUE
+
+ 210 CONTINUE
+ END
+
+C=================================================================
+ SUBROUTINE NETGECM(NEID, IERR)
+C=================================================================
+
+ INCLUDE 'ne_test.inc'
+
+ INTEGER IPROC, I, EMAPIDS(NECMAP), EMAPCNT(NECMAP), EIDS(ECNTCM),
+ 1 PIDS(ECNTCM), SIDS(ECNTCM), NMAPIDS(NNCMAP), NMAPCNT(NNCMAP)
+
+ DO 200 IPROC = 0,(NPROCF-1)
+ CALL NEGCMP(NEID, NMAPIDS, NMAPCNT, EMAPIDS, EMAPCNT,
+ 1 IPROC, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ DO 170 I = 1,NECMAP
+ CALL NEGECM(NEID, EMAPIDS(I), EIDS, SIDS, PIDS, IPROC, IERR)
+
+ IF (IERR.NE.0) GOTO 210
+
+ IF (EMAPIDS(I).NE.(2*I)) IERR = -1
+ DO 160 J = 1,ECNTCM
+ IF (EIDS(J).NE.2*J) IERR = -1
+ IF (SIDS(J).NE.3*J) IERR = -1
+ IF (PIDS(J).NE.4*J) IERR = -1
+ 160 CONTINUE
+
+ IF (IERR.NE.0) GOTO 210
+ 170 CONTINUE
+
+ 200 CONTINUE
+
+ 210 CONTINUE
+ END
+
diff --git a/nemesis/ne_gcmp.c b/nemesis/ne_gcmp.c
new file mode 100644
index 0000000..bebf908
--- /dev/null
+++ b/nemesis/ne_gcmp.c
@@ -0,0 +1,392 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_cmap_params()
+ *****************************************************************************
+ * This function outputs the communication map parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * node_cmap_ids - Pointer to vector of nodal communication
+ * set IDs.
+ * node_cmap_node_cnts - Pointer to a vector which contains a count of
+ * the number of FEM nodes for each nodal
+ * communication map.
+ * elem_cmap_ids - Pointer to vector for retrieval of elemental
+ * communication set IDs.
+ * elem_cmap_elem_cnts - Pointer to a vector which contains a count of
+ * the number of FEM elements for each elemental
+ * communication map.
+ * processor - The processor the file being read was written
+ * for.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_cmap_params(int neid,
+ int *node_cmap_ids,
+ int *node_cmap_node_cnts,
+ int *elem_cmap_ids,
+ int *elem_cmap_elem_cnts,
+ int processor
+ )
+{
+ char *func_name="ne_get_cmap_params";
+
+ 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;
+ int status, map_idx, varid, dimid;
+
+ char errmsg[MAX_ERR_LENGTH];
+ /*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /*****************************************************************************/
+ /*****************************************************************************/
+ /* Nodal communication map(s) */
+ /*****************************************************************************/
+ /*****************************************************************************/
+
+ /* get the cmap information variables index */
+ if (ne_get_idx(neid, VAR_N_COMM_INFO_IDX, cmap_info_idx, processor) == -1) {
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_N_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the number of nodal communications maps in the file */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_N_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(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_N_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* set the end value for the node map */
+ 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];
+
+ if (num_n_comm_maps > 0) {
+ count[0] = num_n_comm_maps;
+
+ /* Get the variable ID for the vector of nodal comm map IDs */
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_IDS, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the vector of nodal communication map IDs */
+ if (node_cmap_ids != NULL) {
+ start[0] = cmap_info_idx[0];
+ status = nc_get_vara_int(neid, varid, start, count, node_cmap_ids);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_N_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_N_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ 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++) {
+
+ if ((map_idx=ne_id_lkup(neid, VAR_N_COMM_IDS, cmap_info_idx,
+ node_cmap_ids[cnt])) < 0) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: failed to find nodal comm map with ID %d in file ID %d",
+ node_cmap_ids[cnt], neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check the status of the node map */
+ start[0] = map_idx;
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_N_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+
+ /* get the cmap information variables index */
+ if (ne_get_idx(neid, VAR_N_COMM_DATA_IDX, cmap_data_idx,
+ map_idx) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_N_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (cmap_data_idx[1] == -1) {
+ /*
+ * Find the dimension ID of the variable containing the
+ * node count
+ */
+ if ((status = nc_inq_dimid(neid, DIM_NCNT_CMAP, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NCNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Find the value of the number of nodes in this nodal comm map */
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NCNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ cmap_data_idx[1] = count[0];
+ }
+
+ node_cmap_node_cnts[cnt] = cmap_data_idx[1] - cmap_data_idx[0];
+ }
+ else
+ 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(neid, DIM_NUM_N_CMAPS)) != -1)" */
+
+ /*****************************************************************************/
+ /*****************************************************************************/
+ /* Elemental communication map(s) */
+ /*****************************************************************************/
+ /*****************************************************************************/
+
+ /* get the cmap information variables index */
+ if (ne_get_idx(neid, VAR_E_COMM_INFO_IDX, cmap_info_idx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_E_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the number of elemental communications maps in the file */
+ if ((status = nc_inq_dimid(neid, 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(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_E_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* set the end value for the node map */
+ 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];
+
+ if (num_e_comm_maps > 0) {
+ count[0] = num_e_comm_maps;
+
+ /* Get the variable ID for the vector of nodal comm map IDs */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_IDS, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the vector of elemental communication map IDs */
+ if (elem_cmap_ids != NULL) {
+ start[0] = cmap_info_idx[0];
+ status = nc_get_vara_int(neid, varid, start, count, elem_cmap_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_E_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_E_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (elem_cmap_elem_cnts != NULL) {
+ /*
+ * Get the element counts in each of the elemental
+ * communication maps
+ */
+ for(cnt=0; cnt < num_e_comm_maps; cnt++) {
+
+ if ((map_idx=ne_id_lkup(neid, VAR_E_COMM_IDS, cmap_info_idx,
+ elem_cmap_ids[cnt])) < 0) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: failed to find elemental comm map with ID %d in file ID %d",
+ elem_cmap_ids[cnt], neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check the status of the requested elemental map */
+ start[0] = map_idx;
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_E_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+
+ /* get the cmap information variables index */
+ if (ne_get_idx(neid, VAR_E_COMM_DATA_IDX, cmap_data_idx,
+ map_idx) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_E_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (cmap_data_idx[1] == -1) {
+ /*
+ * Find the dimension ID of the variable containing the
+ * element count
+ */
+ if ((status = nc_inq_dimid(neid, DIM_ECNT_CMAP, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_ECNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /*
+ * Find the value of the number of elements in this elemental
+ * comm map
+ */
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_ECNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ cmap_data_idx[1] = count[0];
+ }
+ elem_cmap_elem_cnts[cnt] = cmap_data_idx[1] - cmap_data_idx[0];
+ }
+ else
+ 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(neid, DIM_NUM_E_CMAPS(processor))) != -1)" */
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gebig.c b/nemesis/ne_gebig.c
new file mode 100644
index 0000000..b9fcab0
--- /dev/null
+++ b/nemesis/ne_gebig.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_eb_info_global()
+ *****************************************************************************
+ * This function retrieves the global parameters of all the element blocks
+ * associated with a geometry.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * el_blk_ids - Pointer to vector of global element block IDs.
+ * el_blk_cnts - Pointer to vector of global element block counts.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_eb_info_global(int neid,
+ int *el_blk_ids,
+ int *el_blk_cnts)
+{
+ char *func_name="ne_get_eb_info_global";
+
+ int varid, status;
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Find the variable ID for the element block IDs */
+ if ((status = nc_inq_varid(neid, VAR_ELBLK_IDS_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_ELBLK_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the global element block IDs */
+ status = nc_get_var_int(neid, varid, el_blk_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_ELBLK_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Find the variable ID for the element block counts */
+ if ((status = nc_inq_varid(neid, VAR_ELBLK_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_ELBLK_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the global element block counts */
+ status = nc_get_var_int(neid, varid, el_blk_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_ELBLK_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gelcm.c b/nemesis/ne_gelcm.c
new file mode 100644
index 0000000..3af1458
--- /dev/null
+++ b/nemesis/ne_gelcm.c
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/****************************************************************************/
+/****************************************************************************/
+/* Function(s) in this file:
+ * ne_get_elem_cmap()
+ ****************************************************************************
+ * This function retrieves an elemental communication map.
+ ****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * map_id - The ID of the nodal communication map to retrieve.
+ * elem_ids - Pointer to vector for retrieval of FEM element IDs
+ * that make up this communication map.
+ * side_ids - Pointer to vector for retrieval of FEM element
+ * side IDs that make up this communication map.
+ * proc_ids - Pointer to vector for retrieval of the processors
+ * associated with each of the elements in this
+ * elemental communication map.
+ * processor - The processor the file being read was written for.
+ */
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_elem_cmap(int neid,
+ int map_id,
+ int *elem_ids,
+ int *side_ids,
+ int *proc_ids,
+ int processor
+ )
+{
+ char *func_name="ne_get_elem_cmap";
+
+ int map_idx, dimid, varid[3], status;
+ size_t start[1], count[1];
+ int64_t varidx[2];
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* get the cmap information variables index */
+ if (ne_get_idx(neid, VAR_E_COMM_INFO_IDX, varidx, processor) == -1) {
+ exerrval = -1;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_E_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * 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
+ */
+
+ /* Get the index of the elemental comm map with the given ID */
+ if ((map_idx=ne_id_lkup(neid, VAR_E_COMM_IDS, varidx, map_id)) < 0) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: failed to find elemental comm map with ID %d in file \
+ID %d",
+ map_id, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* get the cmap data variables index for this map */
+ if (ne_get_idx(neid, VAR_E_COMM_DATA_IDX, varidx, map_idx) == -1) {
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_E_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (varidx[1] == -1) {
+ /* Get the dimension of this elemental communication map */
+ if ((status = nc_inq_dimid(neid, DIM_ECNT_CMAP, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_ECNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_ECNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ varidx[1] = count[0];
+ }
+
+ /* Get the variable ID for the elemental comm map node IDs */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_EIDS, &varid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_EIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the elemental side set IDs */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_SIDS, &varid[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_SIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the elemental comm map processor IDs */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_PROC, &varid[2])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the elemental comm map element IDs */
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_get_vara_int(neid, varid[0], start, count, elem_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_E_COMM_EIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the elemental comm map side IDs */
+ status = nc_get_vara_int(neid, varid[1], start, count, side_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_E_COMM_SIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the elemental comm map processor IDs */
+ status = nc_get_vara_int(neid, varid[2], start, count, proc_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_E_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gelm.c b/nemesis/ne_gelm.c
new file mode 100644
index 0000000..0d64e09
--- /dev/null
+++ b/nemesis/ne_gelm.c
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_elem_map()
+ *
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * elem_mapi - Pointer to vector for retrieval of internal
+ * FEM element IDs.
+ * elem_mapb - Pointer to vector for retrieval of border
+ * FEM element IDs.
+ * processor - The processor the file being read was written for.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#include <netcdf.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_elem_map(int neid,
+ int *elem_mapi,
+ int *elem_mapb,
+ int processor
+ )
+{
+ char *func_name="ne_get_elem_map";
+
+ char ftype[2];
+ int dimid, varid, status;
+ size_t start[1], count[1];
+ int64_t varidx[2];
+ int emstat;
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ /* Get the file type */
+ if (ne_get_file_type(neid, ftype) != EX_NOERR) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: unable to find file type for file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Check the status of the internal element map */
+ if ((status = nc_inq_varid(neid, VAR_INT_E_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 'p')
+ start[0] = 0;
+ else
+ start[0] = processor;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &emstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (emstat == 1) {
+ /* get the index */
+ if (ne_get_idx(neid, VAR_ELEM_MAP_INT_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_ELEM_MAP_INT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (varidx[1] == -1) {
+ /* Get the size of the internal element map */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_INT_ELEMS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_INT_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_INT_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ varidx[1] = count[0];
+ }
+
+ /* Get the map */
+ if ((status = nc_inq_varid(neid, VAR_ELEM_MAP_INT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_ELEM_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_get_vara_int(neid, varid, start, count, elem_mapi);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_ELEM_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End "if (emstat == 1)" */
+
+ /* Check the status of the internal element map */
+ if ((status = nc_inq_varid(neid, VAR_BOR_E_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_BOR_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 'p')
+ start[0] = 0;
+ else
+ start[0] = processor;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &emstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (emstat == 1) {
+ /* get the index */
+ if (ne_get_idx(neid, VAR_ELEM_MAP_BOR_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_ELEM_MAP_BOR_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (varidx[1] == -1) {
+ /* Get the size of the border element map */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_BOR_ELEMS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_BOR_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_BOR_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ varidx[1] = count[0];
+ }
+
+ /* Get the map */
+ if ((status = nc_inq_varid(neid, VAR_ELEM_MAP_BOR, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_ELEM_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_get_vara_int(neid, varid, start, count, elem_mapb);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_ELEM_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "if (emstat == 1)" */
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gelt.c b/nemesis/ne_gelt.c
new file mode 100644
index 0000000..c9f5998
--- /dev/null
+++ b/nemesis/ne_gelt.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_get_elem_type()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * elem_blk_id - The element block ID to find the element type
+ * for.
+ * elem_type - The returned name of the element.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_elem_type (int neid, int elem_blk_id, char *elem_type)
+/*
+ * Reads the element type for a specific element block
+ * elem_type is assumed to have a length of MAX_STR_LENGTH+1
+ */
+{
+ char *func_name="ne_get_elem_type";
+
+ int connid, el_blk_id_ndx, status;
+ size_t len;
+ char errmsg[MAX_ERR_LENGTH];
+
+/*****************************************************************************/
+
+ /* inquire id's of previously defined dimensions */
+ if ((el_blk_id_ndx=ex_id_lkup(neid, EX_ELEM_BLOCK, elem_blk_id)) == -1) {
+ sprintf(errmsg,
+ "Error: failed to find element block ID %d in file %d",
+ elem_blk_id, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_CONN(el_blk_id_ndx), &connid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find connectivity variable in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* get the element type name */
+ if ((status = nc_inq_attlen(neid, connid, ATT_NAME_ELB, &len)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find attribute in file ID %d", neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (len > (MAX_STR_LENGTH+1)) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: Element type must be of length %d in file ID %d",
+ (int)len, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Make sure the end of the string is terminated with a null character */
+ elem_type[MAX_STR_LENGTH] = '\0';
+
+ if ((status = nc_get_att_text(neid, connid, ATT_NAME_ELB, (void *) elem_type)) != NC_NOERR ) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get attribute \"%s\" in file ID %d",
+ ATT_NAME_ELB, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gennm.c b/nemesis/ne_gennm.c
new file mode 100644
index 0000000..34d9b19
--- /dev/null
+++ b/nemesis/ne_gennm.c
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************
+*
+* ne_gennm - ne_get_n_elem_num_map
+*
+* environment - UNIX
+*
+* entry conditions -
+* input parameters:
+* int neid exodus file id
+* int start_ent starting location for read
+* int num_ents number of elemental points
+*
+* exit conditions -
+* int* elem_map element number map array
+*
+* revision history -
+*
+*****************************************************************************/
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI.h"
+
+/*
+ * reads the element numbering map from the database; allows element numbers
+ * to be noncontiguous
+ */
+
+int ne_get_n_elem_num_map (int neid,
+ int start_ent,
+ int num_ents,
+ int *elem_map)
+{
+ int numelemdim, mapid, i, status;
+ size_t num_elem, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* inquire id's of previously defined dimensions and variables */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_ELEM, &numelemdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of elements in file id %d",
+ neid);
+ ex_err("ne_get_n_elem_num_map",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen (neid, numelemdim, &num_elem)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of elements in file id %d",
+ neid);
+ ex_err("ne_get_n_elem_num_map",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_ent < 0 || start_ent > num_elem) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: Invalid input to function ne_get_n_elem_num_map!\n");
+ ex_err("ne_get_n_elem_num_map",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_ents < 0) {
+ exerrval = status;
+ sprintf(errmsg, "Error: Invalid number of entries in map!\n");
+ ex_err("ne_get_n_elem_num_map",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_ent now starts at 1, not 0 */
+ if ((start_ent + num_ents - 1) > num_elem) {
+ exerrval = status;
+ sprintf(errmsg, "Error: request range invalid!\n");
+ ex_err("ne_get_n_elem_num_map",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid (neid, VAR_ELEM_NUM_MAP, &mapid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: elem numbering map not stored in file id %d; returning default map",
+ neid);
+ ex_err("ne_get_n_elem_num_map",errmsg,exerrval);
+
+ /* generate default map of 1..n, where n is num_elem */
+ for (i=0; i<num_ents; i++)
+ elem_map[i] = start_ent+i;
+
+ return (EX_WARN);
+ }
+
+
+ /* read in the element numbering map */
+ start[0] = --start_ent;
+ count[0] = num_ents;
+
+ status = nc_get_vara_int (neid, mapid, start, count, elem_map);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get element number map in file id %d",
+ neid);
+ ex_err("ne_get_n_elem_num_map",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ return(EX_NOERR);
+
+}
diff --git a/nemesis/ne_genv.c b/nemesis/ne_genv.c
new file mode 100644
index 0000000..472074a
--- /dev/null
+++ b/nemesis/ne_genv.c
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_get_n_elem_var()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * time_step - The time step to write this data to.
+ * elem_var_index - The index of this elemental variable.
+ * elem_blk_id - The ID of the element block being written to.
+ * num_elem_this_blk - The number of elements in this block.
+ * start_elem_num - The start point for outputting data.
+ * num_elem - The number of values to be output.
+ * elem_var_vals - Pointer to the vector of values to be output.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+/*
+ * reads the values of a single element variable for one element block at
+ * one time step in the database; assume the first time step and
+ * element variable index is 1
+ */
+
+int ne_get_n_elem_var (int neid,
+ int time_step,
+ int elem_var_index,
+ int elem_blk_id,
+ int num_elem_this_blk,
+ int start_elem_num,
+ int num_elem,
+ void *elem_var_vals)
+{
+ int varid, elem_blk_id_ndx, status;
+ size_t start[2], count[2];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* Determine index of elem_blk_id in VAR_ID_EL_BLK array */
+ if ((elem_blk_id_ndx = ex_id_lkup(neid,EX_ELEM_BLOCK,elem_blk_id)) < 0) {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: no element variables for NULL block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_var",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+ sprintf(errmsg,
+ "Error: failed to locate element block id %d in %s variable in file id %d",
+ elem_blk_id, VAR_ID_EL_BLK, neid);
+ ex_err("ne_get_n_elem_var",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+
+ /* inquire previously defined variable */
+ if ((status = nc_inq_varid(neid,VAR_ELEM_VAR(elem_var_index,elem_blk_id_ndx), &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate elem var %d for elem block %d in file id %d",
+ elem_var_index,elem_blk_id,neid); /* this msg needs to be improved */
+ ex_err("ne_get_n_elem_var",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* read values of element variable */
+ start[0] = --time_step;
+ start[1] = --start_elem_num;
+
+ count[0] = 1;
+ if ((num_elem_this_blk - start_elem_num) > num_elem)
+ count[1] = num_elem;
+ else
+ count[1] = num_elem_this_blk - start_elem_num;
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, varid, start, count, elem_var_vals);
+ } else {
+ status = nc_get_vara_double(neid, varid, start, count, elem_var_vals);
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get elem var %d for block %d in file id %d",
+ elem_var_index,elem_blk_id,neid);/*this msg needs to be improved*/
+ ex_err("ne_get_n_elem_var",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_giinf.c b/nemesis/ne_giinf.c
new file mode 100644
index 0000000..fb59381
--- /dev/null
+++ b/nemesis/ne_giinf.c
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_init_info()
+ *****************************************************************************
+ * This function reads information about the processors for which the
+ * decomposition was performed.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * num_proc - The number of processors in the decomposition.
+ * num_proc_in_f - The number of processors the file contains
+ * information for.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+int ne_get_init_info(int neid,
+ int *num_proc,
+ int *num_proc_in_f,
+ char *ftype
+ )
+{
+ char *func_name="ne_get_init_info";
+
+ int dimid, status;
+ size_t ltempsv;
+
+ char errmsg[MAX_ERR_LENGTH];
+ /*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Get the file type */
+ if (ne_get_file_type(neid, ftype) != EX_NOERR) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: failed to get file type for file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimid(neid, DIM_NUM_PROCS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_PROCS, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the value of the number of processors */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_PROCS, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ *num_proc = ltempsv;
+
+ /* Get the dimension ID of processors that have info in this file */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_PROCS_F, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_PROCS_F, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the value of the number of processors that have info in this file */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_PROCS_F, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ *num_proc_in_f = ltempsv;
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_ginig.c b/nemesis/ne_ginig.c
new file mode 100644
index 0000000..6c98e77
--- /dev/null
+++ b/nemesis/ne_ginig.c
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_init_global()
+ *****************************************************************************
+ * This function reads the global initial information.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * num_nodes_g - The number of global FEM nodes. This is output as
+ * a NetCDF variable.
+ * num_elems_g - The number of global FEM elements. This is output
+ * as a NetCDF variable.
+ * num_elem_blks_g - The number of global element blocks. This is output
+ * as a NetCDF dimension.
+ * num_node_sets_g - The number of global node sets. This is output as
+ * a NetCDF dimension.
+ * num_side_sets_g - The number of global side sets. This is output as
+ * a NetCDF dimension.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_init_global(int neid,
+ int *num_nodes_g,
+ int *num_elems_g,
+ int *num_elem_blks_g,
+ int *num_node_sets_g,
+ int *num_side_sets_g
+ )
+{
+ char *func_name="ne_get_init_global";
+ int dimid, status;
+ size_t ltempsv;
+
+ char errmsg[MAX_ERR_LENGTH];
+ /*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error flag */
+
+ /* Check the file version information */
+ if ((dimid=ne_check_file_version(neid)) != EX_NOERR) return (dimid);
+
+ /* Get the dimension ID for the number of global FEM nodes */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_NODES_GLOBAL, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_NODES_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the value of the number of global FEM nodes */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_NODES_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ *num_nodes_g = ltempsv;
+
+ /* Get the dimension ID for the number of global FEM elements */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_ELEMS_GLOBAL, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_ELEMS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the value of the number of global FEM elements */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_ELEMS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ *num_elems_g = ltempsv;
+
+ /* Get the dimension ID for the number of global element blocks */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_ELBLK_GLOBAL, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_ELBLK_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the value of the number of global element blocks */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_ELBLK_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ *num_elem_blks_g = ltempsv;
+
+ /* Get the dimension ID for the number of global node sets */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_NS_GLOBAL, &dimid)) != NC_NOERR) {
+ *num_node_sets_g = (int) 0;
+ }
+ else {
+ /* Get the value of the number of global node sets */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_NS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ *num_node_sets_g = ltempsv;
+ }
+
+ /* Get the dimension ID for the number of global side sets */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_SS_GLOBAL, &dimid)) != NC_NOERR) {
+ *num_side_sets_g = (int) 0;
+ }
+ else {
+ /* Get the value of the number of global side sets */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_SS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ *num_side_sets_g = ltempsv;
+ }
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_glbp.c b/nemesis/ne_glbp.c
new file mode 100644
index 0000000..1d70a46
--- /dev/null
+++ b/nemesis/ne_glbp.c
@@ -0,0 +1,538 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_loadbal_param()
+ *****************************************************************************
+ * This function retrieves the load balance parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * num_int_nodes - The number of internal FEM nodes.
+ * num_bor_nodes - The number of border FEM nodes.
+ * num_ext_nodes - The number of external FEM nodes.
+ * num_int_elems - The number of internal FEM elements.
+ * num_bor_elems - The number of border FEM elements.
+ * num_node_cmaps - The number of nodal communication maps.
+ * num_elem_cmaps - The number of elemental communication maps.
+ * processor - The processor the file being read was written for.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+int ne_get_loadbal_param(int neid,
+ int *num_int_nodes,
+ int *num_bor_nodes,
+ int *num_ext_nodes,
+ int *num_int_elems,
+ int *num_bor_elems,
+ int *num_node_cmaps,
+ int *num_elem_cmaps,
+ int processor
+ )
+{
+ char *func_name="ne_get_loadbal_param";
+
+ int dimid, varid, status;
+ size_t start[1], ltempsv, ltempsv2;
+ int64_t varidx[2];
+ char ftype[2];
+ int nmstat;
+
+ char errmsg[MAX_ERR_LENGTH];
+ /*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Check the file version information */
+ if ((dimid=ne_check_file_version(neid)) != EX_NOERR) return (dimid);
+
+ /* Get the file type */
+ if (ne_get_file_type(neid, ftype) != EX_NOERR) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: unable to find file type for file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the status for this node map */
+ if ((status = nc_inq_varid(neid, VAR_INT_N_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 's')
+ start[0] = processor;
+ else
+ start[0] = 0;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ if (ne_get_idx(neid, VAR_NODE_MAP_INT_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_NODE_MAP_INT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension of the internal node map */
+ if (varidx[1] == -1) {
+ /* Get the dimension ID for the number of internal nodes */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_INT_NODES, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_INT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Get the value of the dimension representing the total number of
+ * internal FEM nodes.
+ */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_INT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* set the end value for the node map */
+ varidx[1] = ltempsv;
+ } /* End "if (varidx[1] = -1)" */
+
+ /* now get the number of nodes */
+ *num_int_nodes = varidx[1] - varidx[0];
+ }
+ else { /* if (nmstat != 1) */
+ *num_int_nodes = 0;
+
+ } /* End "if (nmstat == 1)" */
+
+ /* Get the status for this node map */
+ if ((status = nc_inq_varid(neid, VAR_BOR_N_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 's')
+ start[0] = processor;
+ else
+ start[0] = 0;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ if (ne_get_idx(neid, VAR_NODE_MAP_BOR_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_NODE_MAP_BOR_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension of the border node map */
+ if (varidx[1] == -1) {
+ /* Get the dimension ID for the number of border nodes */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_BOR_NODES, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_BOR_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Get the value of the dimension representing the number of border
+ * FEM nodes.
+ */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_BOR_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* set the end value for the node map */
+ varidx[1] = ltempsv;
+ } /* End "if (varidx[1] == -1)" */
+
+ /* now calculate the number of nodes */
+ *num_bor_nodes = varidx[1] - varidx[0];
+ }
+ else { /* if (nmstat != 1) */
+ *num_bor_nodes = 0;
+ }
+
+ /* Get the status for this node map */
+ if ((status = nc_inq_varid(neid, VAR_EXT_N_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 's')
+ start[0] = processor;
+ else
+ start[0] = 0;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ if (ne_get_idx(neid, VAR_NODE_MAP_EXT_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_NODE_MAP_EXT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension of the external node map */
+ if (varidx[1] == -1) {
+ /* Get the dimension ID for the number of external nodes */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_EXT_NODES, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_EXT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Get the value of the dimension representing the number of external
+ * FEM nodes.
+ */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_EXT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ /* set the end value for the node map */
+ varidx[1] = ltempsv;
+ } /* End "if (varidx[1] == -1)" */
+
+ /* now get the number of nodes */
+ *num_ext_nodes = varidx[1] - varidx[0];
+ }
+ else { /* if (nmstat != 1) */
+ *num_ext_nodes = 0;
+
+ } /* End "if (nmstat == 1)" */
+
+ /* Get the status for this element map */
+ if ((status = nc_inq_varid(neid, VAR_INT_E_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 's')
+ start[0] = processor;
+ else
+ start[0] = 0;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ if (ne_get_idx(neid, VAR_ELEM_MAP_INT_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_ELEM_MAP_INT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension of the internal element map */
+ if (varidx[1] == -1) {
+ /* Get the dimension ID for the number of internal elements */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_INT_ELEMS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" from file ID %d",
+ DIM_NUM_INT_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Get the value of the dimension representing the number of internal
+ * FEM elements.
+ */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimesion \"%s\" in file ID %d",
+ DIM_NUM_INT_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* set the end value for the node map */
+ varidx[1] = ltempsv;
+ } /* End "if (varidx[1] == -1)" */
+
+ /* now get the number of elements */
+ *num_int_elems = varidx[1] - varidx[0];
+ }
+ else { /* if (nmstat != 1) */
+ *num_int_elems = 0;
+
+ } /* End "if (nmstat == 1)" */
+
+ /* Get the status for this element map */
+ if ((status = nc_inq_varid(neid, VAR_BOR_E_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_BOR_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 's')
+ start[0] = processor;
+ else
+ start[0] = 0;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_BOR_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ if (ne_get_idx(neid, VAR_ELEM_MAP_BOR_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_ELEM_MAP_BOR_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension of the border element map */
+ if (varidx[1] == -1) {
+ /* Get the dimension ID for the number of border elements */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_BOR_ELEMS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" from file ID %d",
+ DIM_NUM_BOR_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Get the value of the dimension representing the number of internal
+ * FEM elements.
+ */
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimesion \"%s\" in file ID %d",
+ DIM_NUM_BOR_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* set the end value for the node map */
+ varidx[1] = ltempsv;
+ } /* End "if (varidx[1] == -1)" */
+
+ /* now get the number of nodes */
+ *num_bor_elems = varidx[1] - varidx[0];
+ }
+ else { /* if (nmstat != 1) */
+ *num_bor_elems = 0;
+
+ } /* End "if (nmstat == 1)" */
+
+ if (ne_get_idx(neid, VAR_N_COMM_INFO_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_N_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension of the nodal comm map */
+ if (varidx[1] == -1) {
+ /* Get the nodal comm map information */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_N_CMAPS, &dimid)) != NC_NOERR)
+ varidx[1] = 0;
+ else {
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv2)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_N_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ /* set the end value for the node map */
+ varidx[1] = ltempsv2;
+ }
+ } /* End "if (varidx[1] == -1)" */
+
+ *num_node_cmaps = varidx[1] - varidx[0];
+
+ if (ne_get_idx(neid, VAR_E_COMM_INFO_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_E_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* 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(neid, DIM_NUM_E_CMAPS, &dimid)) != NC_NOERR)
+ varidx[1] = 0;
+ else {
+ if ((status = nc_inq_dimlen(neid, dimid, <empsv2)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_E_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* set the end value for the node map */
+ varidx[1] = ltempsv2;
+ }
+ } /* End "if (varidx[1] == -1)" */
+
+ *num_elem_cmaps = varidx[1] - varidx[0];
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gncm.c b/nemesis/ne_gncm.c
new file mode 100644
index 0000000..3ec9d77
--- /dev/null
+++ b/nemesis/ne_gncm.c
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/****************************************************************************/
+/****************************************************************************/
+/* Function(s) in this file:
+ * ne_get_node_cmap()
+ *
+ ****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * map_id - The ID of the nodal communication map to retrieve.
+ * node_ids - Pointer to vector for retrieval of FEM node IDs
+ * that make up this communication map.
+ * proc_ids - Pointer to vector for retrieval of the processors
+ * associated with each of the nodes in this nodal
+ * communication map.
+ * processor - The processor the file being read was written for.
+ */
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <netcdf.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_node_cmap(int neid,
+ int map_id,
+ int *node_ids,
+ int *proc_ids,
+ int processor
+ )
+{
+ char *func_name="ne_get_node_cmap";
+
+ int map_idx, dimid, varid[2], status;
+ size_t start[1], count[1];
+ int64_t varidx[2];
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* get the cmap information variables index */
+ if (ne_get_idx(neid, VAR_N_COMM_INFO_IDX, varidx, processor) == -1) {
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_N_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * 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
+ */
+
+ /* Get the index of the nodal comm map with the given ID */
+ if ((map_idx=ne_id_lkup(neid, VAR_N_COMM_IDS, varidx, map_id)) < 0) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: failed to find nodal comm map with ID %d in file ID %d",
+ map_id, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* get the cmap data variables index for this map */
+ if (ne_get_idx(neid, VAR_N_COMM_DATA_IDX, varidx, map_idx) == -1) {
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_N_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (varidx[1] == -1) {
+ /* Get the dimension of this nodal communication map */
+ if ((status = nc_inq_dimid(neid, DIM_NCNT_CMAP, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NCNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid,count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NCNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ varidx[1] = count[0];
+ }
+
+ /* Get the variable ID for the nodal comm map node IDs */
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_NIDS, &varid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_NIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the nodal comm map processor IDs */
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_PROC, &varid[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the nodal comm map node IDs */
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_get_vara_int(neid, varid[0], start, count, node_ids);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_N_COMM_NIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the nodal comm map processor IDs */
+ status = nc_get_vara_int(neid, varid[1], start, count, proc_ids);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_N_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gncor.c b/nemesis/ne_gncor.c
new file mode 100644
index 0000000..db2cc86
--- /dev/null
+++ b/nemesis/ne_gncor.c
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_n_coord()
+ *****************************************************************************
+ * This function retrieves "n" coordinate values.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * start_node_num - The starting index of the coords to be obtained.
+ * num_nodes - The number of FEM nodes to read coords for.
+ * x_coor - Pointer to location of X coordinate vector.
+ * y_coor - Pointer to location of Y coordinate vector.
+ * z_coor - Pointer to location of Z coordinate vector.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * reads the coordinates of the nodes
+ */
+
+int ne_get_n_coord (int neid,
+ int start_node_num,
+ int num_nodes,
+ void *x_coor,
+ void *y_coor,
+ void *z_coor)
+{
+ int coordidx, coordidy, coordidz;
+ int coordid;
+ int status;
+ char *which = NULL;
+
+ int ndimdim, i;
+ size_t num_dim, start[2], count[2];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0;
+
+ if ((status = nc_inq_dimid(neid, DIM_NUM_DIM, &ndimdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file id %d",
+ DIM_NUM_DIM, neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, ndimdim, &num_dim)) != NC_NOERR) {
+ sprintf(errmsg,
+ "Error: failed to get number of dimensions in file id %d",
+ neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+
+ /* read in the coordinates */
+ if (ex_large_model(neid) == 0) {
+ if ((status = nc_inq_varid (neid, VAR_COORD, &coordid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate nodal coordinates in file id %d", neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ start_node_num--; /* do this here so it is only decremented once */
+ for (i=0; i<num_dim; i++) {
+ start[0] = i;
+ start[1] = start_node_num;
+
+ count[0] = 1;
+ count[1] = num_nodes;
+
+ if (i == 0 && x_coor != NULL) {
+ which = "X";
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, coordid, start, count, x_coor);
+ } else {
+ status = nc_get_vara_double(neid, coordid, start, count, x_coor);
+ }
+ }
+ else if (i == 1 && y_coor != NULL) {
+ which = "Y";
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, coordid, start, count, y_coor);
+ } else {
+ status = nc_get_vara_double(neid, coordid, start, count, y_coor);
+ }
+ }
+ else if (i == 2 && z_coor != NULL) {
+ which = "Z";
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, coordid, start, count, z_coor);
+ } else {
+ status = nc_get_vara_double(neid, coordid, start, count, z_coor);
+ }
+ }
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get %s coord array in file id %d", which, neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+ } else {
+
+ start_node_num--; /* do this here so it is only decremented once */
+ for (i=0; i<num_dim; i++) {
+ start[0] = start_node_num;
+ count[0] = num_nodes;
+
+ if (i == 0 && x_coor != NULL) {
+ which = "X";
+ if ((status = nc_inq_varid (neid, VAR_COORD_X, &coordidx)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: failed to locate %s-nodal coordinates in file id %d", which , neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_WARN);
+ }
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, coordidx, start, count, x_coor);
+ } else {
+ status = nc_get_vara_double(neid, coordidx, start, count, x_coor);
+ }
+ }
+ else if (i == 1 && y_coor != NULL) {
+ which = "Y";
+ if ((status = nc_inq_varid (neid, VAR_COORD_Y, &coordidy)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: failed to locate %s-nodal coordinates in file id %d", which , neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_WARN);
+ }
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, coordidy, start, count, y_coor);
+ } else {
+ status = nc_get_vara_double(neid, coordidy, start, count, y_coor);
+ }
+ }
+ else if (i == 2 && z_coor != NULL) {
+ which = "Z";
+ if ((status = nc_inq_varid (neid, VAR_COORD_Z, &coordidz)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: failed to locate %s-nodal coordinates in file id %d", which , neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_WARN);
+ }
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, coordidz, start, count, z_coor);
+ } else {
+ status = nc_get_vara_double(neid, coordidz, start, count, z_coor);
+ }
+ }
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get %s coord array in file id %d", which, neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gneat.c b/nemesis/ne_gneat.c
new file mode 100644
index 0000000..08e6c23
--- /dev/null
+++ b/nemesis/ne_gneat.c
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_get_n_elem_attr()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * elem_blk_id - The element block ID.
+ * start_elem_num - The starting index of the elements to be
+ * obtained.
+ * num_elems - The number of FEM elements to read coords for.
+ * attrib - Pointer to the attribute vector.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * reads the attributes for an element block
+ */
+
+int ne_get_n_elem_attr (int neid,
+ int elem_blk_id,
+ int start_elem_num,
+ int num_elems,
+ void *attrib)
+
+{
+ int numelbdim, numattrdim, attrid, elem_blk_id_ndx, status;
+ size_t num_elem_this_blk, num_attr, start[2], count[2];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* Determine index of elem_blk_id in VAR_ID_EL_BLK array */
+ if ((elem_blk_id_ndx = ex_id_lkup(neid, EX_ELEM_BLOCK, elem_blk_id)) < 0) {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: no attributes found for NULL block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_attr",errmsg,EX_MSG);
+ return (EX_WARN); /* no attributes for this element block */
+ } else {
+ sprintf(errmsg,
+ "Warning: failed to locate element block id %d in %s array in file id %d",
+ elem_blk_id,VAR_ID_EL_BLK, neid);
+ ex_err("ne_get_n_elem_attr",errmsg,exerrval);
+ return (EX_WARN);
+ }
+ }
+
+
+/* inquire id's of previously defined dimensions */
+
+ if ((status = nc_inq_dimid(neid, DIM_NUM_EL_IN_BLK(elem_blk_id_ndx), &numelbdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of elements for block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_get_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, numelbdim, &num_elem_this_blk)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of elements for block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimid(neid, DIM_NUM_ATT_IN_BLK(elem_blk_id_ndx), &numattrdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: no attributes found for block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_attr",errmsg,EX_MSG);
+ return (EX_WARN); /* no attributes for this element block */
+ }
+
+ if ((status = nc_inq_dimlen(neid, numattrdim, &num_attr)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of attributes for block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_ATTRIB(elem_blk_id_ndx), &attrid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate attributes for block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* do some error checking */
+ if (num_elem_this_blk < (start_elem_num + num_elems - 1)) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: requested attributes from too many elements in this block, %d",
+ elem_blk_id);
+ ex_err("ne_get_n_elem_attr",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+
+/* read in the attributes */
+
+ start[0] = --start_elem_num;
+ start[1] = 0;
+
+ count[0] = num_elems;
+ count[1] = num_attr;
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, attrid, start, count, attrib);
+ } else {
+ status = nc_get_vara_double(neid, attrid, start, count, attrib);
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get attributes for block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return(EX_NOERR);
+}
diff --git a/nemesis/ne_gnelc.c b/nemesis/ne_gnelc.c
new file mode 100644
index 0000000..9fe6429
--- /dev/null
+++ b/nemesis/ne_gnelc.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_get_n_elem_conn()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * elem_blk_id - The element block ID.
+ * start_elem_num - The starting index of the elements to be
+ * obtained.
+ * num_elems - The number of FEM elements to read coords for.
+ * connect - Pointer to the connectivity vector.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * reads the connectivity array for an element block
+ */
+
+int ne_get_n_elem_conn (int neid,
+ int elem_blk_id,
+ int start_elem_num,
+ int num_elems,
+ int *connect)
+{
+ int numelbdim, nelnoddim, connid, elem_blk_id_ndx, status;
+ size_t num_elem_this_blk, num_nod_per_elem, start[2], count[2];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+/* Locate index of element block id in VAR_ID_EL_BLK array */
+
+ if ((elem_blk_id_ndx = ex_id_lkup(neid, EX_ELEM_BLOCK, elem_blk_id)) < 0) {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: no connectivity array for NULL block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_conn",errmsg,EX_MSG);
+ return (EX_WARN); /* no connectivity array for this element block */
+ } else {
+ sprintf(errmsg,
+ "Error: failed to locate element block id %d in %s array in file id %d",
+ elem_blk_id,VAR_ID_EL_BLK,neid);
+ ex_err("ne_get_n_elem_conn",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_EL_IN_BLK(elem_blk_id_ndx), &numelbdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of elements in block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_conn",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, numelbdim, &num_elem_this_blk)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of elements in block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_conn",errmsg,exerrval);
+ return(EX_FATAL);
+ }
+
+
+ if ((status = nc_inq_dimid(neid, DIM_NUM_NOD_PER_EL(elem_blk_id_ndx), &nelnoddim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of nodes/elem for block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_conn",errmsg,exerrval);
+ return(EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, nelnoddim, &num_nod_per_elem)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of nodes/elem for block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_conn",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+
+
+ if ((status = nc_inq_varid(neid, VAR_CONN(elem_blk_id_ndx), &connid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate connectivity array for block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_conn",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+
+ /* do some error checking */
+ if (num_elem_this_blk < (start_elem_num + num_elems - 1)) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: requested connectivity from too many elements in this block, %d",
+ elem_blk_id);
+ ex_err("ne_get_n_elem_conn",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+
+ /* read in the connectivity array */
+ start[0] = --start_elem_num;
+ start[1] = 0;
+
+ count[0] = num_elems;
+ count[1] = num_nod_per_elem;
+
+ status = nc_get_vara_int(neid, connid, start, count, connect);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get connectivity array for block %d in file id %d",
+ elem_blk_id,neid);
+ ex_err("ne_get_n_elem_conn",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gnm.c b/nemesis/ne_gnm.c
new file mode 100644
index 0000000..a49bae4
--- /dev/null
+++ b/nemesis/ne_gnm.c
@@ -0,0 +1,339 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_node_map()
+ *****************************************************************************
+ * This function retrieves the nodal map.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * node_mapi - Pointer to vector for retrieval of internal FEM
+ * nodal IDs.
+ * node_mapb - Pointer to vector for retrieval of border FEM
+ * nodal IDs.
+ * node_mape - Pointer to vector for retrieval of external FEM
+ * nodal IDs.
+ * processor - The processor the file being read was written for.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <netcdf.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_node_map(int neid,
+ int *node_mapi,
+ int *node_mapb,
+ int *node_mape,
+ int processor
+ )
+{
+ char *func_name="ne_get_node_map";
+
+ char ftype[2];
+ int status, varid, dimid;
+ size_t start[1], count[1];
+ int64_t varidx[2];
+ int nmstat;
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Get the file type */
+ if (ne_get_file_type(neid, ftype) != EX_NOERR) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: unable to find file type for file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the status of this node map */
+ if ((status = nc_inq_varid(neid, VAR_INT_N_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 'p')
+ start[0] = 0;
+ else
+ start[0] = processor;
+
+ if (nc_get_var1_int(neid, varid, start, &nmstat) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" in file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ /* get the index */
+ if (ne_get_idx(neid, VAR_NODE_MAP_INT_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_NODE_MAP_INT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension */
+ if (varidx[1] == -1) {
+ if ((status = nc_inq_dimid(neid, DIM_NUM_INT_NODES, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_INT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_INT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ varidx[1] = count[0];
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_NODE_MAP_INT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NODE_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_get_vara_int(neid, varid, start, count, node_mapi);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_NODE_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End "if (nmstat == 1)" */
+
+ /* Get the status of this node map */
+ if ((status = nc_inq_varid(neid, VAR_BOR_N_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 'p')
+ start[0] = 0;
+ else
+ start[0] = processor;
+
+ if (nc_get_var1_int(neid, varid, start, &nmstat) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ /* get the index */
+ if (ne_get_idx(neid, VAR_NODE_MAP_BOR_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_NODE_MAP_BOR_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension */
+ if (varidx[1] == -1) {
+ if ((status = nc_inq_dimid(neid, DIM_NUM_BOR_NODES, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_BOR_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_BOR_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ varidx[1] = count[0];
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_NODE_MAP_BOR, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NODE_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_get_vara_int(neid, varid, start, count, node_mapb);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_NODE_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "if (nmstat == 1)" */
+
+ /* Get the status of this node map */
+ if ((status = nc_inq_varid(neid, VAR_EXT_N_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 'p')
+ start[0] = 0;
+ else
+ start[0] = processor;
+
+ if (nc_get_var1_int(neid, varid, start, &nmstat) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file ID %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ /* get the index */
+ if (ne_get_idx(neid, VAR_NODE_MAP_EXT_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_NODE_MAP_EXT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension */
+ if (varidx[1] == -1) {
+ if ((status = nc_inq_dimid(neid, DIM_NUM_EXT_NODES, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_EXT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_EXT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ varidx[1] = count[0];
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_NODE_MAP_EXT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NODE_MAP_EXT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_get_vara_int(neid, varid, start, count, node_mape);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_NODE_MAP_EXT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "if (nmstat == 1)" */
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gnnnm.c b/nemesis/ne_gnnnm.c
new file mode 100644
index 0000000..2f6c92b
--- /dev/null
+++ b/nemesis/ne_gnnnm.c
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************
+*
+* ne_gnnnm - ne_get_n_node_num_map
+*
+* environment - UNIX
+*
+* entry conditions -
+* input parameters:
+* int neid nemesis file id
+*
+* exit conditions -
+* int* node_map node numbering map array
+*
+* revision history -
+*
+*
+*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI.h"
+
+/*
+ * reads the node numbering map from the database
+ */
+
+int ne_get_n_node_num_map (int neid,
+ int start_ent,
+ int num_ents,
+ int *node_map)
+{
+ int numnodedim, mapid, i, status;
+ size_t num_nodes, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* inquire id's of previously defined dimensions and variables */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NODES, &numnodedim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of nodes in file id %d",
+ neid);
+ ex_err("ne_get_n_node_num_map",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, numnodedim, &num_nodes)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of nodes in file id %d",
+ neid);
+ ex_err("ne_get_n_node_num_map",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_ent < 0 || start_ent > num_nodes) {
+ fprintf(stderr, "ERROR: Invalid input to function"
+ " ne_get_n_node_num_map!\n");
+ return -1;
+ }
+
+ if (num_ents < 0) {
+ fprintf(stderr, "ERROR: Invalid number of entries in map!\n");
+ return -1;
+ }
+
+ /* start_ent now starts at 1, not 0 */
+ if ((start_ent + num_ents - 1) > num_nodes) {
+ fprintf(stderr, "ERROR: request range invalid!\n");
+ return -1;
+ }
+
+ if ((status = nc_inq_varid (neid, VAR_NODE_NUM_MAP, &mapid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: node numbering map not stored in file id %d; returning default map",
+ neid);
+ ex_err("ne_get_n_node_num_map",errmsg,exerrval);
+
+ /* generate default map of 1..n, where n is num_nodes */
+ for (i=0; i < num_ents; i++)
+ node_map[i] = start_ent+i;
+
+ return (EX_WARN);
+ }
+
+ /* read in the node numbering map */
+ start[0] = --start_ent;
+ count[0] = num_ents;
+
+ status = nc_get_vara_int(neid, mapid, start, count, node_map);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get node numbering map in file id %d",
+ neid);
+ ex_err("ne_get_n_node_num_map",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return(EX_NOERR);
+}
diff --git a/nemesis/ne_gnns.c b/nemesis/ne_gnns.c
new file mode 100644
index 0000000..393286c
--- /dev/null
+++ b/nemesis/ne_gnns.c
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_get_n_node_set()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * node_set_id - ID of node set to read.
+ * start_node_num - The starting index of the nodes to be read.
+ * num_nodes - The number of nodes to read in.
+ * node_set_node_list - List of node IDs in node set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+/*
+ * reads the node list for a single node set
+ */
+
+int ne_get_n_node_set (int neid,
+ int node_set_id,
+ int start_node_num,
+ int num_nodes,
+ int *node_set_node_list)
+{
+ int dimid, node_list_id, node_set_id_ndx, status;
+ size_t num_nodes_in_set, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* first check if any node sets are specified */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: no node sets defined in file id %d",
+ neid);
+ ex_err("ne_get_n_node_set",errmsg,exerrval);
+ return (EX_WARN);
+ }
+
+ /* Lookup index of node set id in VAR_NS_IDS array */
+ if ((node_set_id_ndx = ex_id_lkup(neid, EX_NODE_SET, node_set_id)) < 0) {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: node set %d is NULL in file id %d",
+ node_set_id,neid);
+ ex_err("ne_get_n_node_set",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+
+ sprintf(errmsg,
+ "Error: failed to locate node set id %d in %s in file id %d",
+ node_set_id,VAR_NS_IDS,neid);
+ ex_err("ne_get_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions and variables */
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NOD_NS(node_set_id_ndx), &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of nodes in node set %d in file id %d",
+ node_set_id,neid);
+ ex_err("ne_get_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &num_nodes_in_set)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of nodes in set %d in file id %d",
+ node_set_id, neid);
+ ex_err("ne_get_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_node_num < 0 || start_node_num > num_nodes_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid input");
+ ex_err("ne_get_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_nodes < 0) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid number of nodes in nodes set!");
+ ex_err("ne_get_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_node_num now starts at 1, not 0 */
+ if ((start_node_num + num_nodes - 1) > num_nodes_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: request larger than number of nodes in set!");
+ ex_err("ne_get_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid (neid, VAR_NODE_NS(node_set_id_ndx), &node_list_id)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate node set %d node list in file id %d",
+ node_set_id,neid);
+ ex_err("ne_get_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* read in the node list array */
+ start[0] = --start_node_num;
+ count[0] = num_nodes;
+
+ status = nc_get_vara_int(neid, node_list_id, start, count, node_set_node_list);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get node set node list in file id %d",
+ neid);
+ ex_err("ne_get_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gnnsd.c b/nemesis/ne_gnnsd.c
new file mode 100644
index 0000000..0a6609e
--- /dev/null
+++ b/nemesis/ne_gnnsd.c
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_get_n_node_set_df()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * node_set_id - ID of node set to read.
+ * start_num - The starting index of the dist fact to be read.
+ * num_df_to_get - The number of distribution factors to read in.
+ * node_set_dist_fact - List of distribution factors in node set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * reads the distribution factors for a single node set
+ */
+
+int ne_get_n_node_set_df (int neid,
+ int node_set_id,
+ int start_num,
+ int num_df_to_get,
+ void *node_set_dist_fact)
+{
+ int status;
+ int dimid, dist_id, node_set_id_ndx;
+ size_t num_nodes_in_set, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* first check if any node sets are specified */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: no node sets defined in file id %d",
+ neid);
+ ex_err("ne_get_n_node_set_df",errmsg,exerrval);
+ return (EX_WARN);
+ }
+
+ /* Lookup index of node set id in VAR_NS_IDS array */
+ if ((node_set_id_ndx = ex_id_lkup(neid,EX_NODE_SET,node_set_id)) < 0) {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: node set %d is NULL in file id %d",
+ node_set_id,neid);
+ ex_err("ne_get_n_node_set_df",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+
+ sprintf(errmsg,
+ "Error: failed to locate node set id %d in %s in file id %d",
+ node_set_id,VAR_NS_IDS,neid);
+ ex_err("ne_get_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions and variables */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NOD_NS(node_set_id_ndx), &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of nodes in node set %d in file id %d",
+ node_set_id,neid);
+ ex_err("ne_get_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &num_nodes_in_set)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of nodes in node set %d in file id %d",
+ node_set_id, neid);
+ ex_err("ne_get_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_num < 0 || start_num > num_nodes_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid input");
+ ex_err("ne_get_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_df_to_get < 0) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid number of nodes in nodes set!");
+ ex_err("ne_get_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_num now starts at 1, not 0 */
+ if ((start_num + num_df_to_get - 1) > num_nodes_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: request larger than number of nodes in set!");
+ ex_err("ne_get_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid (neid, VAR_FACT_NS(node_set_id_ndx), &dist_id)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: dist factors not stored for node set %d in file id %d",
+ node_set_id,neid);
+ ex_err("ne_get_n_node_set_df",errmsg,exerrval);
+ return (EX_WARN); /* complain - but not too loud */
+ }
+
+
+ /* read in the distribution factors array */
+ start[0] = --start_num;
+ count[0] = num_df_to_get;
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, dist_id, start, count, node_set_dist_fact);
+ } else {
+ status = nc_get_vara_double(neid, dist_id, start, count, node_set_dist_fact);
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get distribution factors in file id %d",
+ neid);
+ ex_err("ne_get_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/cbind/src/exgnv.c b/nemesis/ne_gnnv.c
similarity index 62%
rename from cbind/src/exgnv.c
rename to nemesis/ne_gnnv.c
index 1f99629..df5113a 100644
--- a/cbind/src/exgnv.c
+++ b/nemesis/ne_gnnv.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
* retains certain rights in this software.
*
@@ -34,60 +34,64 @@
*/
/*****************************************************************************
*
-* exgnv - ex_get_nodal_var
+* exgnnv - ex_get_n_nodal_var
*
-* entry conditions -
+* environment - UNIX
+*
+* entry conditions -
* input parameters:
-* int exoid exodus file id
-* int time_step whole time step number
-* int nodeal_var_index index of desired nodal variable
-* int num_nodes number of nodal points
+* int neid exodus file id
+* int time_step whole time step number
+* int nodeal_var_index index of desired nodal variable
+* int start_node_num starting location for read
+* int num_nodes number of nodal points
*
-* exit conditions -
-* float* nodal_var_vals array of nodal variable values
+* exit conditions -
+* float* nodal_var_vals array of nodal variable values
*
-* revision history -
+* revision history -
*
+* $Id: ne_gnnv.c,v 1.16 2008/01/25 15:47:35 gdsjaar Exp $
*
*****************************************************************************/
-#include "exodusII.h"
-#include "exodusII_int.h"
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
/*
- * reads the values of a single nodal variable for a single time step from
+ * reads the values of a single nodal variable for a single time step from
* the database; assume the first time step and nodal variable index is 1
*/
-int ex_get_nodal_var (int exoid,
- int time_step,
- int nodal_var_index,
- int num_nodes,
- void *nodal_var_vals)
+int ne_get_n_nodal_var (int neid,
+ int time_step,
+ int nodal_var_index,
+ int start_node_num,
+ int num_nodes,
+ void *nodal_var_vals)
{
- int varid;
- int status;
+ int varid, status;
size_t start[3], count[3];
char errmsg[MAX_ERR_LENGTH];
exerrval = 0; /* clear error code */
- /* inquire previously defined variable */
-
- if (ex_large_model(exoid) == 0) {
+ if (ex_large_model(neid) == 0) {
/* read values of the nodal variable */
- if ((status = nc_inq_varid(exoid, VAR_NOD_VAR, &varid)) != NC_NOERR) {
+ if ((status = nc_inq_varid (neid, VAR_NOD_VAR, &varid)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
- "Warning: could not find nodal variables in file id %d",
- exoid);
- ex_err("ex_get_nodal_var",errmsg,exerrval);
+ "Warning: could not find nodal variable %d in file id %d",
+ nodal_var_index, neid);
+ ex_err("ne_get_n_nodal_var",errmsg,exerrval);
return (EX_WARN);
}
-
start[0] = --time_step;
start[1] = --nodal_var_index;
- start[2] = 0;
+ start[2] = --start_node_num;
count[0] = 1;
count[1] = 1;
@@ -96,35 +100,33 @@ int ex_get_nodal_var (int exoid,
} else {
/* 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) {
+ if ((status = nc_inq_varid (neid, VAR_NOD_VAR_NEW(nodal_var_index), &varid)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Warning: could not find nodal variable %d in file id %d",
- nodal_var_index, exoid);
- ex_err("ex_get_nodal_var",errmsg,exerrval);
+ nodal_var_index, neid);
+ ex_err("ne_get_n_nodal_var",errmsg,exerrval);
return (EX_WARN);
}
-
+
start[0] = --time_step;
- start[1] = 0;
+ start[1] = --start_node_num;
count[0] = 1;
count[1] = num_nodes;
}
- if (ex_comp_ws(exoid) == 4) {
- status = nc_get_vara_float(exoid, varid, start, count, nodal_var_vals);
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float(neid, varid, start, count, nodal_var_vals);
} else {
- status = nc_get_vara_double(exoid, varid, start, count, nodal_var_vals);
+ status = nc_get_vara_double(neid, varid, start, count, nodal_var_vals);
}
-
if (status != NC_NOERR) {
- exerrval = status;
- sprintf(errmsg,
- "Error: failed to get nodal variables in file id %d",
- exoid);
- ex_err("ex_get_nodal_var",errmsg,exerrval);
- return (EX_FATAL);
- }
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get nodal variables in file id %d", neid);
+ ex_err("ne_get_n_nodal_var",errmsg,exerrval);
+ return (EX_FATAL);
+ }
return (EX_NOERR);
}
diff --git a/nemesis/ne_gnspg.c b/nemesis/ne_gnspg.c
new file mode 100644
index 0000000..4980e05
--- /dev/null
+++ b/nemesis/ne_gnspg.c
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_ns_param_global()
+ *****************************************************************************
+ * This function retrieves the global node-set parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * global_ids - Pointer to a vector of global node-set IDs.
+ * node_cnts - Pointer to a vector of global node counts in
+ * each global node set.
+ * df_cnts - Pointer to a vector of global distribution
+ * factors in each global node set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_ns_param_global(int neid,
+ int *global_ids,
+ int *node_cnts,
+ int *df_cnts
+ )
+{
+ char *func_name="ne_get_ns_param_global";
+ int varid, status;
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Get the variable ID for the vector of global node set IDs */
+ if ((status = nc_inq_varid(neid, VAR_NS_IDS_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the vector of node set IDs */
+ status = nc_get_var_int(neid, varid, global_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_NS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the vector of global node set node count */
+ if (node_cnts != NULL) {
+ if ((status = nc_inq_varid(neid, VAR_NS_NODE_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NS_NODE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the vector of node set node counts */
+ status = nc_get_var_int(neid, varid, node_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_NS_NODE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (node_cnts != NULL)" */
+
+ /* Get the variable ID for the vector of global node set dist. fact count */
+ if (df_cnts != NULL) {
+ if ((status = nc_inq_varid(neid, VAR_NS_DF_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the vector of node set dist. fact counts */
+ status = nc_get_var_int(neid, varid, df_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_NS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ } /* End "if (df_cnts != NULL)" */
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gnss.c b/nemesis/ne_gnss.c
new file mode 100644
index 0000000..b71d307
--- /dev/null
+++ b/nemesis/ne_gnss.c
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_get_n_side_set()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * side_set_id - ID of side set to read.
+ * start_side_num - The starting index of the sides to be read.
+ * num_sides - The number of sides to read in.
+ * side_set_elem_list - List of element IDs in side set.
+ * side_set_side_list - List of side IDs in side set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * reads the side set element list and side set side list for a single side set
+ */
+
+int ne_get_n_side_set (int neid,
+ int side_set_id,
+ int start_side_num,
+ int num_sides,
+ int *side_set_elem_list,
+ int *side_set_side_list)
+{
+
+ int dimid, elem_list_id, side_list_id, status;
+ int side_set_id_ndx;
+ size_t num_side_in_set, count[1], start[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* first check if any side sets are specified */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_SS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: no side sets stored in file id %d",
+ neid);
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_WARN);
+ }
+
+ /* Lookup index of side set id in VAR_SS_IDS array */
+
+ if ((side_set_id_ndx = ex_id_lkup(neid, EX_SIDE_SET, side_set_id)) < 0) {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: side set %d is NULL in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+
+ sprintf(errmsg,
+ "Error: failed to locate side set id %d in %s array in file id %d",
+ side_set_id, VAR_SS_IDS, neid);
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions and variables */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_SIDE_SS(side_set_id_ndx), &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of sides in side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &num_side_in_set)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of sides in side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_ELEM_SS(side_set_id_ndx), &elem_list_id)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate element list for side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid (neid, VAR_SIDE_SS(side_set_id_ndx), &side_list_id)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate side list for side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of side numbers */
+ if (start_side_num < 0 || start_side_num > num_side_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid input");
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_sides < 0) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid number of elements in side set!");
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_side_num now starts at 1, not 0 */
+ if ((start_side_num + num_sides - 1) > num_side_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: request larger than number of elements in set!");
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* read in the element list and side list arrays */
+
+ start[0] = --start_side_num;
+ count[0] = num_sides;
+
+ status = nc_get_vara_int(neid, elem_list_id, start, count, side_set_elem_list);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get element list for side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ status = nc_get_vara_int(neid, side_list_id, start, count, side_set_side_list);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get side list for side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gnssd.c b/nemesis/ne_gnssd.c
new file mode 100644
index 0000000..2cd92bc
--- /dev/null
+++ b/nemesis/ne_gnssd.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_get_n_side_set_df()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * side_set_id - ID of side set to read.
+ * start_side_num - The starting index of the sides to be read.
+ * num_sides - The number of sides to read in.
+ * side_set_dist_fact - List of side IDs in side set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_n_side_set_df (int neid,
+ int side_set_id,
+ int start_num,
+ int num_df_to_get,
+ void *side_set_dist_fact)
+{
+
+ int dimid, dist_id, side_set_id_ndx, status;
+ size_t num_df_in_set, count[1], start[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* first check if any side sets are specified */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_SS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: no side sets stored in file id %d",
+ neid);
+ ex_err("ne_get_n_side_set_df",errmsg,exerrval);
+ return (EX_WARN);
+ }
+
+ /* Lookup index of side set id in VAR_SS_IDS array */
+ if ((side_set_id_ndx = ex_id_lkup(neid,EX_SIDE_SET,side_set_id)) < 0) {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: side set %d is NULL in file id %d",
+ side_set_id, neid);
+ ex_err("ne_get_n_side_set_df",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+ sprintf(errmsg,
+ "Error: failed to locate side set id %d in %s array in file id %d",
+ side_set_id, VAR_SS_IDS, neid);
+ ex_err("ne_get_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions and variables */
+ if ((status = nc_inq_dimid (neid, DIM_NUM_DF_SS(side_set_id_ndx), &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: dist factors not stored for side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set_df",errmsg,exerrval);
+ return (EX_WARN); /* complain - but not too loud */
+ }
+
+ if ((status = nc_inq_dimlen (neid, dimid, &num_df_in_set)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of dist factors in side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_num < 0 || start_num > num_df_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid input");
+ ex_err("ne_get_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_df_to_get < 0) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid number of df's to get!");
+ ex_err("ne_get_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_num now starts at 1, not 0 */
+ if ((start_num + num_df_to_get - 1) > num_df_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: request larger than number of df's in set!");
+ ex_err("ne_get_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid (neid, VAR_FACT_SS(side_set_id_ndx), &dist_id)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate dist factors list for side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+
+ /* read in the distribution factors array */
+ start[0] = --start_num;
+ count[0] = num_df_to_get;
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_get_vara_float (neid, dist_id, start, count, side_set_dist_fact);
+ } else {
+ status = nc_get_vara_double (neid, dist_id, start, count, side_set_dist_fact);
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get dist factors list for side set %d in file id %d",
+ side_set_id,neid);
+ ex_err("ne_get_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_gsspg.c b/nemesis/ne_gsspg.c
new file mode 100644
index 0000000..38d391c
--- /dev/null
+++ b/nemesis/ne_gsspg.c
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_get_ss_param_global()
+ *****************************************************************************
+ * This function retrieves the global side-set parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * global_ids - Pointer to a vector of global node-set IDs.
+ * side_cnts - Pointer to a vector of global node counts in
+ * each global node set.
+ * df_cnts - Pointer to a vector of global distribution
+ * factors in each global node set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_get_ss_param_global(int neid,
+ int *global_ids,
+ int *side_cnts,
+ int *df_cnts
+ )
+{
+ char *func_name="ne_get_ss_param_global";
+ int varid, status;
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Get the variable ID for the vector of global side set IDs */
+ if ((status = nc_inq_varid(neid, VAR_SS_IDS_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_SS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the vector of side set IDs */
+ status = nc_get_var_int(neid, varid, global_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_SS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the vector of global side set side count */
+ if (side_cnts != NULL) {
+ if ((status = nc_inq_varid(neid, VAR_SS_SIDE_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_SS_SIDE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the vector of side set side counts */
+ status = nc_get_var_int(neid, varid, side_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_SS_SIDE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (side_cnts != NULL)" */
+
+ /* Get the variable ID for the vector of global side set dist. fact count */
+ if (df_cnts != NULL) {
+ if ((status = nc_inq_varid(neid, VAR_SS_DF_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_SS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the vector of side set dist. fact counts */
+ status = nc_get_var_int(neid, varid, df_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_SS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ } /* End "if (df_cnts != NULL)" */
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_nemesisI.h b/nemesis/ne_nemesisI.h
new file mode 100644
index 0000000..a3ca8ca
--- /dev/null
+++ b/nemesis/ne_nemesisI.h
@@ -0,0 +1,487 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*====================================================================
+ * ------------------------
+ * | CVS File Information |
+ * ------------------------
+ *
+ * $RCSfile: ne_nemesisI.h,v $
+ *
+ * $Author: gdsjaar $
+ *
+ * $Date: 2008/02/07 13:40:50 $
+ *
+ * $Revision: 1.17 $
+ *
+ * $Name: $
+ *====================================================================*/
+
+/****************************************************************************
+ * This file contains prototypes for the functions found in the NEMESIS
+ * library.
+ ****************************************************************************/
+
+#ifndef _NE_NEMESIS_H
+#define _NE_NEMESIS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define NEMESIS_API_VERSION 3.12
+#define NEMESIS_API_VERSION_NODOT 312
+
+/*=============================================================================
+ * Initial Information Routines
+ *===========================================================================*/
+extern int
+ne_get_init_info(int neid, /* NemesisI file ID */
+ int *num_proc, /* Number of processors */
+ int *num_proc_in_f, /* Number of procs in this file */
+ char *ftype
+ );
+
+extern int
+ne_put_init_info(int neid, /* NemesisI file ID */
+ int num_proc, /* Number of processors */
+ int num_proc_in_f, /* Number of procs in this file */
+ char *ftype
+ );
+
+extern int
+ne_get_init_global(int neid, /* NemesisI file ID */
+ int *num_nodes_g, /* Number of global FEM nodes */
+ int *num_elems_g, /* Number of global FEM elements */
+ int *num_elem_blks_g, /* Number of global elem blocks */
+ int *num_node_sets_g, /* Number of global node sets */
+ int *num_side_sets_g /* Number of global side sets */
+ );
+extern int
+ne_put_init_global(int neid, /* NemesisI file ID */
+ int num_nodes_g, /* Number of global FEM nodes */
+ int num_elems_g, /* Number of global FEM elements */
+ int num_elem_blks_g, /* Number of global elem blocks */
+ int num_node_sets_g, /* Number of global node sets */
+ int num_side_sets_g /* Number of global side sets */
+ );
+
+/*=============================================================================
+ * Loadbalance Parameter Routines
+ *===========================================================================*/
+extern int
+ne_get_loadbal_param(int neid, /* NetCDF/Exodus file ID */
+ int *num_int_nodes, /* Number of internal FEM nodes */
+ int *num_bor_nodes, /* Number of border FEM nodes */
+ int *num_ext_nodes, /* Number of external FEM nodes */
+ int *num_int_elems, /* Number of internal FEM elems */
+ int *num_bor_elems, /* Number of border FEM elems */
+ int *num_node_cmaps, /* Number of nodal comm maps */
+ int *num_elem_cmaps, /* Number of elemental comm maps */
+ int processor /* Processor ID */
+ );
+
+extern int
+ne_put_loadbal_param(int neid, /* NemesisI file ID */
+ int num_int_nodes, /* Number of internal FEM nodes */
+ int num_bor_nodes, /* Number of border FEM nodes */
+ int num_ext_nodes, /* Number of external FEM nodes */
+ int num_int_elems, /* Number of internal FEM elems */
+ int num_bor_elems, /* Number of border FEM elems */
+ int num_node_cmaps,/* Number of nodal comm maps */
+ int num_elem_cmaps,/* Number of elemental comm maps */
+ int processor /* Processor ID */
+ );
+
+extern int
+ne_put_loadbal_param_cc(int neid, /* NetCDF/Exodus file ID */
+ int *num_int_nodes, /* Number of internal node IDs */
+ int *num_bor_nodes, /* Number of border node IDs */
+ int *num_ext_nodes, /* Number of external node IDs */
+ int *num_int_elems, /* Number of internal elem IDs */
+ int *num_bor_elems, /* Number of border elem IDs */
+ int *num_node_cmaps, /* Number of nodal comm maps */
+ int *num_elem_cmaps /* Number of elem comm maps */
+ );
+
+/*=============================================================================
+ * NS, SS & EB Global Parameter Routines
+ *===========================================================================*/
+extern int
+ne_get_ns_param_global(int neid, /* NetCDF/Exodus file ID */
+ int *ns_ids_glob, /* Global IDs of node sets */
+ int *ns_n_cnt_glob, /* Count of nodes in node sets */
+ int *ns_df_cnt_glob /* Count of dist. factors in ns */
+ );
+
+extern int
+ne_put_ns_param_global(int neid, /* NemesisI file ID */
+ int *global_ids, /* Vector of global node-set IDs */
+ int *global_n_cnts, /* Vector of node counts in */
+ /* node-sets */
+ int *global_df_cnts /* Vector of dist factor */
+ /* counts in node-sets */
+ );
+
+extern int
+ne_get_ss_param_global(int neid, /* NetCDF/Exodus file ID */
+ int *ss_ids_glob, /* Global side-set IDs */
+ int *ss_s_cnt_glob, /* Global side count */
+ int *ss_df_cnt_glob /* Global dist. factor count */
+ );
+
+extern int
+ne_put_ss_param_global(int neid, /* NemesisI file ID */
+ int *global_ids, /* Vector of global side-set IDs */
+ int *global_el_cnts, /* Vector of element/side */
+ /* counts in each side set */
+ int *global_df_cnts /* Vector of dist. factor */
+ /* counts in each side set */
+ );
+
+extern int
+ne_get_eb_info_global(int neid, /* NemesisI file ID */
+ int *el_blk_ids, /* Vector of global element IDs */
+ int *el_blk_cnts /* Vector of global element counts */
+ );
+
+extern int
+ne_put_eb_info_global(int neid, /* NemesisI file ID */
+ int *el_blk_ids, /* Vector of global element IDs */
+ int *el_blk_cnts /* Vector of global element counts */
+ );
+
+/*=============================================================================
+ * NS, SS & EB Subset Routines
+ *===========================================================================*/
+extern int
+ne_get_n_side_set(int neid, /* NetCDF/Exodus file ID */
+ int side_set_id, /* Side-set ID to read */
+ int start_side_num, /* Starting element number */
+ int num_sides, /* Number of sides to read */
+ int *side_set_elem_list, /* List of element IDs */
+ int *side_set_side_list /* List of side IDs */
+ );
+
+extern int
+ne_put_n_side_set(int neid, /* NetCDF/Exodus file ID */
+ int side_set_id, /* Side-set ID to write */
+ int start_side_num, /* Starting element number */
+ int num_sides, /* Number of sides to write */
+ int *side_set_elem_list, /* List of element IDs */
+ int *side_set_side_list /* List of side IDs */
+ );
+
+extern int
+ne_get_n_side_set_df(int neid, /* NetCDF/Exodus file ID */
+ int side_set_id, /* Side-set ID */
+ int start_num, /* Starting df number */
+ int num_df_to_get, /* Number of df's to read */
+ void *side_set_df /* Distribution factors */
+ );
+
+extern int
+ne_put_n_side_set_df(int neid, /* NetCDF/Exodus file ID */
+ int side_set_id, /* Side-set ID */
+ int start_num, /* Starting df number */
+ int num_df_to_get, /* Number of df's to write */
+ void *side_set_df /* Distribution factors */
+ );
+
+extern int
+ne_get_n_node_set(int neid, /* NetCDF/Exodus file ID */
+ int node_set_id, /* Node set ID */
+ int start_node_num, /* Node index to start reading at */
+ int num_node, /* Number of nodes to read */
+ int *node_set_node_list /* List of nodes in node set */
+ );
+
+extern int
+ne_put_n_node_set(int neid, /* NetCDF/Exodus file ID */
+ int node_set_id, /* Node set ID */
+ int start_node_num, /* Node index to start writing at */
+ int num_node, /* Number of nodes to write */
+ int *node_set_node_list /* List of nodes in node set */
+ );
+
+extern int
+ne_get_n_node_set_df(int neid, /* NetCDF/Exodus file ID */
+ int node_set_id, /* Node-set ID */
+ int start_num, /* Starting df number */
+ int num_df_to_get, /* Number of df's to read */
+ void *node_set_df /* Distribution factors */
+ );
+
+extern int
+ne_put_n_node_set_df(int neid, /* NetCDF/Exodus file ID */
+ int node_set_id, /* Node-set ID */
+ int start_num, /* Starting df number */
+ int num_df_to_get, /* Number of df's to write */
+ void *node_set_df /* Distribution factors */
+ );
+
+extern int
+ne_get_n_coord(int neid, /* NetCDF/Exodus file ID */
+ int start_node_num, /* Starting position to read from */
+ int num_nodes, /* Number of coords to read */
+ void *x_coor, /* Vector of X coordinates */
+ void *y_coor, /* Vector of Y coordinates */
+ void *z_coor /* Vector of Z coordinates */
+ );
+
+extern int
+ne_put_n_coord(int neid, /* NetCDF/Exodus file ID */
+ int start_node_num, /* Starting position to write to */
+ int num_nodes, /* Number of coords to write */
+ void *x_coor, /* Vector of X coordinates */
+ void *y_coor, /* Vector of Y coordinates */
+ void *z_coor /* Vector of Z coordinates */
+ );
+
+extern int
+ne_get_n_elem_conn (int neid, /* NetCDF/Exodus file ID */
+ int elem_blk_id, /* Element block ID */
+ int start_elem_num, /* Starting position to read from */
+ int num_elems, /* Number of elements to read */
+ int *connect /* Connectivity vector */
+ );
+
+extern int
+ne_put_n_elem_conn (int neid, /* NetCDF/Exodus file ID */
+ int elem_blk_id, /* Element block ID */
+ int start_elem_num, /* Starting position to write to */
+ int num_elems, /* Number of elements to write */
+ int *connect /* Connectivity vector */
+);
+
+extern int
+ne_get_n_elem_attr (int neid, /* NetCDF/Exodus file ID */
+ int elem_blk_id, /* Element block ID */
+ int start_elem_num, /* Starting position to read from */
+ int num_elems, /* Number of elements to read */
+ void *attrib /* Attribute */
+ );
+
+extern int
+ne_put_n_elem_attr (int neid, /* NetCDF/Exodus file ID */
+ int elem_blk_id, /* Element block ID */
+ int start_elem_num, /* Starting position to write to */
+ int num_elems, /* Number of elements to write */
+ void *attrib /* Attribute */
+ );
+
+extern int
+ne_get_elem_type(int neid, /* NetCDF/Exodus file ID */
+ int elem_blk_id, /* Element block ID */
+ char *elem_type /* The name of the element type */
+ );
+
+/*=============================================================================
+ * Variable Routines
+ *===========================================================================*/
+extern int
+ne_get_n_elem_var (int neid, /* NetCDF/Exodus file ID */
+ int time_step, /* time index */
+ int elem_var_index, /* elemental variable index */
+ int elem_blk_id, /* elemental block id */
+ int num_elem_this_blk, /* number of elements in block */
+ int start_elem_num, /* Starting position for read */
+ int num_elem, /* Number of elements to read */
+ void *elem_var_vals /* variable values */
+ );
+
+extern int
+ne_put_elem_var_slab (int neid, /* NetCDF/Exodus file ID */
+ int time_step, /* time index */
+ int elem_var_index, /* elemental variable index */
+ int elem_blk_id, /* elemental block id */
+ int start_pos, /* Starting position to write to */
+ int num_vals, /* Number of elements to write */
+ void *elem_var_vals /* variable values */
+ );
+
+extern int
+ne_get_n_nodal_var(int neid, /* NetCDF/Exodus file ID */
+ int time_step, /* whole time step number */
+ int nodal_var_index, /* index of desired nodal var */
+ int start_node_num, /* starting node number */
+ int num_nodes, /* number of nodes to read */
+ void *nodal_vars /* array of nodal var values */
+ );
+
+extern int
+ne_put_nodal_var_slab(int neid, /* NetCDF/Exodus file ID */
+ int time_step, /* The time step index */
+ int nodal_var_index, /* Nodal variable index */
+ int start_pos, /* Start position for write */
+ int num_vals, /* Number of nodal variables */
+ void *nodal_var_vals /* Nodal variable values */
+ );
+
+/*=============================================================================
+ * Number Map Routines
+ *===========================================================================*/
+extern int
+ne_get_n_elem_num_map (int neid, /* NetCDF/Exodus file ID */
+ int start_ent, /* Starting position to read from */
+ int num_ents, /* Number of elements to read */
+ int *elem_map /* element map numbers */
+ );
+
+extern int
+ne_put_n_elem_num_map (int neid, /* NetCDF/Exodus file ID */
+ int start_ent, /* Starting position to read from */
+ int num_ents, /* Number of elements to read */
+ int *elem_map /* element map numbers */
+ );
+
+extern int
+ne_get_n_node_num_map(int neid, /* NetCDF/Exodus file ID */
+ int start_ent, /* starting node number */
+ int num_ents, /* number of nodes to read */
+ int *node_map /* vector for node map */
+ );
+
+extern int
+ne_put_n_node_num_map(int neid, /* NetCDF/Exodus file ID */
+ int start_ent, /* starting node number */
+ int num_ents, /* number of nodes to read */
+ int *node_map /* vector for node map */
+ );
+
+extern int
+ne_get_node_map(int neid, /* NetCDF/Exodus file ID */
+ int *node_mapi, /* Internal FEM node IDs */
+ int *node_mapb, /* Border FEM node IDs */
+ int *node_mape, /* External FEM node IDs */
+ int processor /* Processor IDs */
+ );
+
+extern int
+ne_put_node_map(int neid, /* NetCDF/Exodus file ID */
+ int *node_mapi, /* Internal FEM node IDs */
+ int *node_mapb, /* Border FEM node IDs */
+ int *node_mape, /* External FEM node IDs */
+ int processor /* This processor ID */
+ );
+
+extern int
+ne_get_elem_map(int neid, /* NetCDF/Exodus file ID */
+ int *elem_mapi, /* Internal element IDs */
+ int *elem_mapb, /* Border element IDs */
+ int processor /* Processor ID */
+ );
+
+extern int
+ne_put_elem_map(int neid, /* NetCDF/Exodus file ID */
+ int *elem_mapi, /* Internal FEM element IDs */
+ int *elem_mapb, /* Border FEM element IDs */
+ int processor /* This processor ID */
+ );
+
+
+/*=============================================================================
+ * Communications Maps Routines
+ *===========================================================================*/
+
+extern int
+ne_get_cmap_params(int neid, /* NetCDF/Exodus file ID */
+ int *node_cmap_ids, /* Nodal comm. map IDs */
+ int *node_cmap_node_cnts, /* Number of nodes in each map */
+ int *elem_cmap_ids, /* Elemental comm. map IDs */
+ int *elem_cmap_elem_cnts, /* Number of elems in each map */
+ int processor /* This processor ID */
+ );
+
+extern int
+ne_put_cmap_params(int neid, /* NetCDF/Exodus file ID */
+ int *node_map_ids, /* Node map IDs */
+ int *node_map_node_cnts, /* Nodes in nodal comm */
+ int *elem_map_ids, /* Elem map IDs */
+ int *elem_map_elem_cnts, /* Elems in elemental comm */
+ int processor /* This processor ID */
+ );
+
+extern int
+ne_put_cmap_params_cc(int neid, /* NetCDF/Exodus file ID */
+ int *node_map_ids, /* Node map IDs */
+ int *node_map_node_cnts, /* Nodes in nodal comm */
+ int *node_proc_ptrs, /* Pointer into array for */
+ /* node maps */
+ int *elem_map_ids, /* Elem map IDs */
+ int *elem_map_elem_cnts, /* Elems in elemental comm */
+ int *elem_proc_ptrs /* Pointer into array for */
+ /* elem maps */
+ );
+
+extern int
+ne_get_node_cmap(int neid, /* NetCDF/Exodus file ID */
+ int map_id, /* Map ID */
+ int *node_ids, /* FEM node IDs */
+ int *proc_ids, /* Processor IDs */
+ int processor /* This processor ID */
+ );
+
+extern int
+ne_put_node_cmap(int neid, /* NetCDF/Exodus file ID */
+ int map_id, /* Nodal comm map ID */
+ int *node_ids, /* FEM node IDs */
+ int *proc_ids, /* Processor IDs */
+ int processor /* This processor ID */
+ );
+
+extern int
+ne_get_elem_cmap(int neid, /* NetCDF/Exodus file ID */
+ int map_id, /* Elemental comm map ID */
+ int *elem_ids, /* Element IDs */
+ int *side_ids, /* Element side IDs */
+ int *proc_ids, /* Processor IDs */
+ int processor /* This processor ID */
+ );
+
+extern int
+ne_put_elem_cmap(int neid, /* NetCDF/Exodus file ID */
+ int map_id, /* Elemental comm map ID */
+ int *elem_ids, /* Vector of element IDs */
+ int *side_ids, /* Vector of side IDs */
+ int *proc_ids, /* Vector of processor IDs */
+ int processor /* This processor ID */
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _NE_NEMESIS_H */
diff --git a/nemesis/ne_nemesisI_int.h b/nemesis/ne_nemesisI_int.h
new file mode 100644
index 0000000..927a951
--- /dev/null
+++ b/nemesis/ne_nemesisI_int.h
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/**********************************************************************
+ * This file contains constant definitions used internally NEMESIS.
+ **********************************************************************/
+
+#ifndef _NE_NEMESISI_INT_H
+#define _NE_NEMESISI_INT_H
+
+#include <stdint.h>
+
+#define NEMESIS_FILE_VERSION 2.6
+
+#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_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 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_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"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Only used internally by NEMESIS */
+
+extern int
+ne_leavedef(int neid, /* NemesisI file ID */
+ char *func_name /* Name of calling function */
+ );
+
+extern int
+ne_get_file_type(int neid, /* NetCDF/Exodus file ID */
+ char *ftype /* Nemesis file type */
+ );
+
+extern int
+ne_get_map_status(int neid,
+ char *stat_var,
+ int proc_id,
+ int *stat);
+
+extern int
+ne_put_version(int neid /* NetCDF/Exodus file ID */
+ );
+
+extern int
+ne_check_file_version(int neid /* NetCDF/Exodus file ID */
+ );
+extern char *
+ne_catstr2(char *name, /* The name to attach num1 and num2 to */
+ int num1, /* First number to tack to name */
+ int num2 /* Second number to tack to name */
+ );
+
+extern int
+ne_id_lkup(int neid, /* NetCDF/Exodus file ID */
+ char *var_name, /* Nemesis variable name */
+ int64_t *idx, /* index variable for variable, length 2 */
+ int ne_var_id /* NetCDF variable ID */
+ );
+
+extern int
+ne_get_idx(int neid, /* NetCDF/Exodus file ID */
+ char *ne_var_name, /* Nemesis index variable name */
+ int64_t *index, /* array of length 2 to hold results */
+ int pos /* position of this proc/cmap in index */
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _NE_NEMESISI_INT_H */
diff --git a/nemesis/ne_pcmp.c b/nemesis/ne_pcmp.c
new file mode 100644
index 0000000..6e1784b
--- /dev/null
+++ b/nemesis/ne_pcmp.c
@@ -0,0 +1,438 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_cmap_params()
+ *****************************************************************************
+ * This function outputs the communication map parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * node_cmap_ids - Pointer to vector of nodal communication
+ * set IDs.
+ * node_cmap_node_cnts - Pointer to a vector which contains a count of
+ * the number of FEM nodes for each nodal
+ * communication map.
+ * elem_cmap_ids - Pointer to vector for retrieval of elemental
+ * communication set IDs.
+ * elem_cmap_elem_cnts - Pointer to a vector which contains a count of
+ * the number of FEM elements for each elemental
+ * communication map.
+ * processor - The processor the file being read was written
+ * for.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+#include <stdint.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_put_cmap_params(int neid,
+ int *node_cmap_ids,
+ int *node_cmap_node_cnts,
+ int *elem_cmap_ids,
+ int *elem_cmap_elem_cnts,
+ int processor
+ )
+{
+ char *func_name="ne_put_cmap_params";
+
+ size_t num_n_comm_maps, num_e_comm_maps;
+ size_t ncnt_cmap, ecnt_cmap;
+ int icm, varid, dimid[1], n_varid, e_varid, status;
+ int n_varid_idx, e_varid_idx;
+ size_t start[1];
+ char ftype[2];
+ int nl_ncnt_cmap, nl_ecnt_cmap;
+ int nmstat;
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /*
+ ** with the new database format, this function sould only
+ ** be used for writing a parallel file
+ */
+ /* Get the file type */
+ if (ne_get_file_type(neid, ftype) != EX_NOERR) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: failed to get file type from file ID %d\n",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* make sure that this is a parallel file */
+ if (ftype[0] != 'p') {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: function for use with parallel files only, file ID %d\n",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Put NetCDF file into define mode */
+ if ((status = nc_redef(neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to file ID %d into define mode", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check to see if there are nodal communications maps in the file */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_N_CMAPS, &dimid[0])) != NC_NOERR) {
+ num_n_comm_maps = 0;
+ }
+ else {
+ if ((status = nc_inq_dimlen(neid, dimid[0], &num_n_comm_maps)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_N_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /*
+ * Add dimensions for the size of the number of nodal
+ * communication maps.
+ */
+ if (num_n_comm_maps > 0) {
+
+ /* add the communications data index variable */
+ if ((status = nc_def_var(neid, VAR_N_COMM_DATA_IDX, NC_INT, 1,
+ dimid, &n_varid_idx)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_N_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Add dimensions for all of the nodal communication maps */
+ ncnt_cmap = 0;
+ for(icm=0; icm < num_n_comm_maps; icm++) {
+ ncnt_cmap += node_cmap_node_cnts[icm];
+ }
+
+ if ((status = nc_def_dim(neid, DIM_NCNT_CMAP, ncnt_cmap, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add dimension for \"%s\" in file ID %d",
+ DIM_NCNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define variables for the nodal IDS and processor vectors */
+ if ((status = nc_def_var(neid, VAR_N_COMM_NIDS, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_N_COMM_NIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_N_COMM_PROC, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_N_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_n_comm_maps > 0)" */
+
+ /* Check to see if there are elemental communications maps in the file */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_E_CMAPS, &dimid[0])) != NC_NOERR) {
+ num_e_comm_maps = 0;
+ }
+ else{
+ if ((status = nc_inq_dimlen(neid, dimid[0], &num_e_comm_maps)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_E_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ }
+
+ /*
+ * Add dimensions for the size of the number of elemental
+ * communication maps.
+ */
+ if (num_e_comm_maps > 0) {
+
+ /* add the communications data index variable */
+ if ((status = nc_def_var(neid, VAR_E_COMM_DATA_IDX, NC_INT, 1,
+ dimid, &e_varid_idx)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_E_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Add dimensions for each of the nodal communication maps */
+ ecnt_cmap = 0;
+ for(icm=0; icm < num_e_comm_maps; icm++)
+ ecnt_cmap += elem_cmap_elem_cnts[icm];
+
+ if ((status = nc_def_dim(neid, DIM_ECNT_CMAP, ecnt_cmap, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add dimension for \"%s\" in file ID %d",
+ DIM_ECNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define variables for the nodal IDS and processor vectors */
+ if ((status = nc_def_var(neid, VAR_E_COMM_EIDS, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_E_COMM_EIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_E_COMM_PROC, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_E_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_E_COMM_SIDS, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_E_COMM_SIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_e_comm_maps > 0)" */
+
+ /* Exit define mode */
+ ne_leavedef(neid, func_name);
+
+ /* Set the status of the nodal communication maps */
+ if (num_n_comm_maps > 0) {
+
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_STAT, &n_varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ nl_ncnt_cmap = 0; /* reset this for index */
+ for(icm=0; icm < num_n_comm_maps; icm++) {
+
+ start[0] = icm;
+ if (node_cmap_node_cnts[icm] > 0)
+ nmstat = 1;
+ else
+ nmstat = 0;
+
+ if ((status = nc_put_var1_int(neid, n_varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: unable to output variable in file ID %d", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* increment to the next starting position */
+ nl_ncnt_cmap += node_cmap_node_cnts[icm];
+
+ /* fill the cmap data index */
+ if ((status = nc_put_var1_int(neid, n_varid_idx, start, &nl_ncnt_cmap)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output int elem map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "for(icm=0; icm < num_n_comm_maps; icm++)" */
+
+ /* Get the variable ID for the comm map IDs vector */
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_IDS, &n_varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the nodal comm map IDs */
+ status = nc_put_var_int(neid, n_varid, node_cmap_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable in file ID %d", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_n_comm_maps > 0)" */
+
+ /* Set the status of the elemental communication maps */
+ if (num_e_comm_maps > 0) {
+
+ /* Get variable ID for elemental status vector */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_STAT, &e_varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ nl_ecnt_cmap = 0; /* reset this for index */
+ for(icm=0; icm < num_e_comm_maps; icm++) {
+
+ start[0] = icm;
+ if (elem_cmap_elem_cnts[icm] > 0)
+ nmstat = 1;
+ else
+ nmstat = 0;
+
+ if ((status = nc_put_var1_int(neid, e_varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: unable to output variable in file ID %d", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* increment to the next starting position */
+ nl_ecnt_cmap += elem_cmap_elem_cnts[icm];
+
+ /* fill the cmap data index */
+ if ((status = nc_put_var1_int(neid, e_varid_idx, start, &nl_ecnt_cmap)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output int elem map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "for(icm=0; icm < num_e_comm_maps; icm++)" */
+
+ /* Get the variable ID for the elemental comm map IDs vector */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_IDS, &e_varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the elemental comm map IDs */
+ status = nc_put_var_int(neid, e_varid, elem_cmap_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable in file ID %d", neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_e_comm_maps > 0)" */
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pcmpc.c b/nemesis/ne_pcmpc.c
new file mode 100644
index 0000000..e2579cd
--- /dev/null
+++ b/nemesis/ne_pcmpc.c
@@ -0,0 +1,570 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_cmap_params_cc()
+ *****************************************************************************
+ * This function outputs the concantenated list of communication map
+ * parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * node_cmap_ids - Pointer to vector of nodal communication
+ * set IDs.
+ * node_cmap_node_cnts - Pointer to a vector which contains a count of
+ * the number of FEM nodes for each nodal
+ * communication map.
+ * elem_cmap_ids - Pointer to vector for retrieval of elemental
+ * communication set IDs.
+ * elem_cmap_elem_cnts - Pointer to a vector which contains a count of
+ * the number of FEM elements for each elemental
+ * communication map.
+ * proc_ids - The processor the file being read was written
+ * for.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <netcdf.h>
+#ifndef NC_INT64
+#define NC_INT64 NC_INT
+#endif
+
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_put_cmap_params_cc(int neid,
+ int *node_cmap_ids,
+ int *node_cmap_node_cnts,
+ int *node_proc_ptrs,
+ int *elem_cmap_ids,
+ int *elem_cmap_elem_cnts,
+ int *elem_proc_ptrs
+ )
+{
+ char *func_name="ne_put_cmap_params_cc";
+
+ size_t num_n_comm_maps, num_e_comm_maps, num_procs_in_file;
+ int status, icm, n_varid[2], e_varid[2], iproc;
+ 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;
+ long long nl_ecnt_cmap, nl_ncnt_cmap;
+ long long *n_var_idx = NULL;
+ long long *e_var_idx = NULL;
+
+ int nmstat;
+
+ char errmsg[MAX_ERR_LENGTH];
+ int format;
+ int index_type;
+ /*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* See if using NC_FORMAT_NETCDF4 format... */
+ nc_inq_format(neid, &format);
+ if (format == NC_FORMAT_NETCDF4) {
+ index_type = NC_INT64;
+ } else {
+ index_type = NC_INT;
+ }
+
+ /* Get the number of processors in the file */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_PROCS_F, &n_dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_PROCS_F, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, n_dimid[0], &num_procs_in_file)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_PROCS_F, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /*
+ * since I cannot get variables while in define mode, I need to
+ * get the cmap information index variables before I go into
+ * define mode
+ */
+
+ /* Check to see if there are nodal communications maps in the file */
+ if (nc_inq_dimid(neid, DIM_NUM_N_CMAPS, &n_dimid[0]) != NC_NOERR) {
+ num_n_comm_maps = 0;
+ }
+ else {
+ if ((status = nc_inq_dimlen(neid, n_dimid[0], &num_n_comm_maps)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in \
+file ID %d",
+ DIM_NUM_N_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if (num_n_comm_maps > 0) {
+ /* Get the variable ID for the comm map index vector */
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_INFO_IDX, &n_varid_idx)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* allocate space for the index variable */
+ n_var_idx = malloc((num_procs_in_file + 1) * sizeof(long long));
+ if (!n_var_idx) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: insufficient memory to read index variable from file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* and set the last value of the index */
+ n_var_idx[0] = 0;
+
+ /* get the communication map info index */
+ status = nc_get_var_longlong(neid, n_varid_idx, &(n_var_idx[1]));
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_N_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* "if (num_n_comm_maps > 0)" */
+
+ /* Check to see if there are elemental communications maps in the file */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_E_CMAPS, &e_dimid[0])) != NC_NOERR) {
+ num_e_comm_maps = 0;
+ }
+ else {
+ if ((status = nc_inq_dimlen(neid, e_dimid[0], &num_e_comm_maps)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in \
+file ID %d",
+ DIM_NUM_E_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if (num_e_comm_maps > 0) {
+ /* Get the variable ID for the comm map index vector */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_INFO_IDX, &e_varid_idx)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* allocate space for the index variable */
+ e_var_idx = malloc((num_procs_in_file + 1) * sizeof(long long));
+ if (!e_var_idx) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: insufficient memory to read index variable from file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* and set the first value of the index */
+ e_var_idx[0] = 0;
+
+ /* get the communication map info index */
+ status = nc_get_var_longlong(neid, e_varid_idx, &(e_var_idx[1]));
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_E_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* "if (num_e_comm_maps >0)" */
+
+ /* Put NetCDF file into define mode */
+ if ((status = nc_redef(neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file ID %d into define mode", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /*
+ * Add dimensions for the size of the number of nodal
+ * communication maps.
+ */
+ if (num_n_comm_maps > 0) {
+ /* add the communications data index variable */
+ if ((status = nc_def_var(neid, VAR_N_COMM_DATA_IDX, index_type, 1,
+ n_dimid, &n_varid_idx)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_N_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* now add up all of the nodal communications maps */
+ ncnt_cmap = 0;
+ for(iproc=0; iproc < num_procs_in_file; iproc++) {
+ num_icm = n_var_idx[iproc+1] - n_var_idx[iproc];
+ for(icm=0; icm < num_icm; icm++)
+ ncnt_cmap += node_cmap_node_cnts[node_proc_ptrs[iproc]+icm];
+ }
+
+ if ((status = nc_def_dim(neid, DIM_NCNT_CMAP, ncnt_cmap, &n_dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add dimension for \"%s\" of size %zd in file ID %d",
+ DIM_NCNT_CMAP, ncnt_cmap, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define variables for the nodal IDS and processor vectors */
+ if ((status = nc_def_var(neid, VAR_N_COMM_NIDS, NC_INT, 1, n_dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_N_COMM_NIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_N_COMM_PROC, NC_INT, 1, n_dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_N_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_n_comm_maps > 0)" */
+
+ /*
+ * Add dimensions for the size of the number of elemental
+ * communication maps.
+ */
+ if (num_e_comm_maps > 0) {
+ /* add the communications data index variable */
+ if ((status = nc_def_var(neid, VAR_E_COMM_DATA_IDX, index_type, 1,
+ e_dimid, &e_varid_idx)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_E_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* now add up all of the nodal communications maps */
+ ecnt_cmap = 0;
+ for(iproc=0; iproc < num_procs_in_file; iproc++) {
+ num_icm = e_var_idx[iproc+1] - e_var_idx[iproc];
+ for(icm=0; icm < num_icm; icm++)
+ ecnt_cmap += elem_cmap_elem_cnts[elem_proc_ptrs[iproc]+icm];
+ }
+
+ /* Add dimensions for elemental communications maps */
+ if ((status = nc_def_dim(neid, DIM_ECNT_CMAP, ecnt_cmap, &e_dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add dimension for \"%s\" in file ID %d",
+ DIM_ECNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define variables for the nodal IDS and processor vectors */
+ if ((status = nc_def_var(neid, VAR_E_COMM_EIDS, NC_INT, 1, e_dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_E_COMM_EIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_E_COMM_PROC, NC_INT, 1, e_dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_E_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_E_COMM_SIDS, NC_INT, 1, e_dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add variable \"%s\" in file ID %d",
+ VAR_E_COMM_SIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_e_comm_maps > 0)" */
+
+
+ /* Exit define mode */
+ ne_leavedef(neid, func_name);
+
+ /* Set the status of the nodal communication maps */
+ if (num_n_comm_maps > 0) {
+
+ /* need to get the two "n_comm_*" variable ids */
+
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_STAT, &n_varid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the comm map IDs vector */
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_IDS, &n_varid[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* reset the index variable */
+ nl_ncnt_cmap = 0;
+
+ for(iproc=0; iproc < num_procs_in_file; iproc++) {
+ num_icm = n_var_idx[iproc+1] - n_var_idx[iproc];
+ for(icm=0; icm < num_icm; icm++) {
+
+ start[0] = n_var_idx[iproc] + icm;
+ if (node_cmap_node_cnts[node_proc_ptrs[iproc]+icm] > 0)
+ nmstat = 1;
+ else
+ nmstat = 0;
+
+ if ((status = nc_put_var1_int(neid, n_varid[0], start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: unable to output variable in file ID %d", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* increment to the next starting position */
+ nl_ncnt_cmap += node_cmap_node_cnts[node_proc_ptrs[iproc]+icm];
+
+ /* fill the data index variable */
+ status = nc_put_var1_longlong(neid, n_varid_idx, start, &nl_ncnt_cmap);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output int elem map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "for(icm=0; icm < num_icm; icm++)" */
+
+ if (num_icm > 0) {
+ /* Output the nodal comm map IDs */
+ start[0] = n_var_idx[iproc];
+ count[0] = num_icm;
+ status = nc_put_vara_int(neid, n_varid[1], start, count,
+ &node_cmap_ids[node_proc_ptrs[iproc]]);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable in file ID %d", neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ }
+ } /* End "for(iproc=0; iproc < num_procs_in_file; iproc++)" */
+
+ /* free up memory for index */
+ free(n_var_idx);
+
+ } /* End "if (num_n_comm_maps > 0)" */
+
+
+ /* Set the status of the elemental communication maps */
+ if (num_e_comm_maps > 0) {
+
+ /* need to get the two "e_comm_*" variables" */
+
+ /* Get variable ID for elemental status vector */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_STAT, &e_varid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the elemental comm map IDs vector */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_IDS, &e_varid[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* reset the index variable */
+ nl_ecnt_cmap = 0;
+
+ for(iproc=0; iproc < num_procs_in_file; iproc++) {
+ num_icm = e_var_idx[iproc+1] - e_var_idx[iproc];
+ for(icm=0; icm < num_icm; icm++) {
+
+ start[0] = e_var_idx[iproc] + icm;
+ if (elem_cmap_elem_cnts[elem_proc_ptrs[iproc]+icm] > 0)
+ nmstat = 1;
+ else
+ nmstat = 0;
+
+ if ((status = nc_put_var1_int(neid, e_varid[0], start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: unable to output variable in file ID %d", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* increment to the next starting position */
+ nl_ecnt_cmap += elem_cmap_elem_cnts[elem_proc_ptrs[iproc]+icm];
+
+ /* fill the data index variable */
+ status = nc_put_var1_longlong(neid, e_varid_idx, start, &nl_ecnt_cmap);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output int elem map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "for(icm=0; icm < num_icm; icm++)" */
+
+ if (num_icm > 0) {
+ /* Output the elemental comm map IDs */
+ start[0] = e_var_idx[iproc];
+ count[0] = num_icm;
+ status = nc_put_vara_int(neid, e_varid[1], start, count,
+ &elem_cmap_ids[elem_proc_ptrs[iproc]]);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable in file ID %d", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+ } /* End "for(iproc=0; iproc < num_procs_in_file; iproc++)" */
+
+ free(e_var_idx);
+
+ } /* End "if (num_e_comm_maps > 0)" */
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pebig.c b/nemesis/ne_pebig.c
new file mode 100644
index 0000000..6b0d4bf
--- /dev/null
+++ b/nemesis/ne_pebig.c
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_eb_info_global()
+ *****************************************************************************
+ * This function outputs the global element block IDs of all the element
+ * blocks associated with a geometry.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * el_blk_ids - Pointer to vector of global element block IDs.
+ * el_blk_cnts - Pointer to vector of global element block counts.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_put_eb_info_global(int neid,
+ int *el_blk_ids,
+ int *el_blk_cnts
+ )
+{
+ char *func_name="ne_put_eb_info_global";
+
+ int varid, status;
+ char errmsg[MAX_ERR_LENGTH];
+
+ /* Find the variable ID for the element block IDs */
+ if ((status = nc_inq_varid(neid, VAR_ELBLK_IDS_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_ELBLK_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the global element block IDs */
+ status = nc_put_var_int(neid, varid, el_blk_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_ELBLK_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Find the variable ID for the element block counts */
+ if ((status = nc_inq_varid(neid, VAR_ELBLK_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_ELBLK_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the global element block counts */
+ status = nc_put_var_int(neid, varid, el_blk_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_ELBLK_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pelcm.c b/nemesis/ne_pelcm.c
new file mode 100644
index 0000000..8d5bc80
--- /dev/null
+++ b/nemesis/ne_pelcm.c
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_elem_cmap()
+ ****************************************************************************
+ * The function outputs an elemental communication map.
+ ****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * map_id - The ID of the elementa communication map to write.
+ * elem_ids - Pointer to vector of element IDs to output.
+ * side_ids - Pointer to vector of side IDs for each element
+ * in "elem_ids".
+ * proc_ids - Pointer to vector of processor IDs for each
+ * element in "elem_ids".
+ * processor - The processor the file being read was written for.
+ */
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_put_elem_cmap(int neid,
+ int map_id,
+ int *elem_ids,
+ int *side_ids,
+ int *proc_ids,
+ int processor
+ )
+{
+ char *func_name="ne_put_elem_cmap";
+
+ int map_idx, varid, dimid, status;
+ size_t start[1], count[1], ret_val;
+ int64_t varidx[2];
+ int value;
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* get the index for the comm map information variables */
+ if (ne_get_idx(neid, VAR_E_COMM_INFO_IDX, varidx, processor) == -1) {
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_E_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the index for this map_id */
+ if ((map_idx=ne_id_lkup(neid, VAR_E_COMM_IDS, varidx, map_id)) == -1) {
+ sprintf(errmsg,
+ "Error: failed to find index for variable \"%s\" in file ID %d",
+ VAR_E_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /*
+ * Find out if this is a NULL comm map by checking it's entry in
+ * the status vector.
+ */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ start[0] = map_idx;
+ if ((status = nc_get_var1_int(neid, varid, start, &value)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_E_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (value == 0) return(EX_NOERR); /* NULL set */
+
+ /* now I need to get the comm map data index */
+ if (ne_get_idx(neid, VAR_E_COMM_DATA_IDX, varidx, map_idx) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_E_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension of the cmap data */
+ if (varidx[1] == -1) {
+ /* Get the size of the comm maps */
+ if ((status = nc_inq_dimid(neid, DIM_ECNT_CMAP, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get dimension ID for \"%s\" in file ID %d",
+ DIM_ECNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &ret_val)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get length of dimension \"%s\" in file ID %d",
+ DIM_ECNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ varidx[1] = ret_val;
+ } /* "if (varidx[1]==-1)" */
+
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+
+ /* Output the element IDs for this comm map */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_EIDS, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_EIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ status = nc_put_vara_int(neid, varid, start, count, elem_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output vector \"%s\" in file ID %d",
+ VAR_E_COMM_EIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the processor IDs for this map */
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_PROC, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ status = nc_put_vara_int(neid, varid, start, count, proc_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_E_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_E_COMM_SIDS, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_E_COMM_SIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ status = nc_put_vara_int(neid, varid, start, count, side_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to ouput variable \"%s\" in file ID %d",
+ VAR_E_COMM_SIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pelm.c b/nemesis/ne_pelm.c
new file mode 100644
index 0000000..baa5ea5
--- /dev/null
+++ b/nemesis/ne_pelm.c
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_elem_map()
+ *****************************************************************************
+ * This function outputs the elemental map.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * elem_mapi - Vector of internal element IDs.
+ * elem_mapb - Vector of border element IDs.
+ * processor - The processor ID for which info is to be read.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_put_elem_map(int neid,
+ int *elem_mapi,
+ int *elem_mapb,
+ int processor
+ )
+{
+ char *func_name="ne_put_elem_map";
+
+ char ftype[2];
+ int status, dimid, varid;
+ size_t start[1], count[1];
+ int64_t varidx[2];
+ int nmstat;
+
+ char errmsg[MAX_ERR_LENGTH];
+ /*-----------------------------Execution begins-----------------------------*/
+
+ /* Get the file type */
+ if (ne_get_file_type(neid, ftype) != EX_NOERR) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: unable to find file type for file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the status of the internal element map */
+ if ((status = nc_inq_varid(neid, VAR_INT_E_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 's')
+ start[0] = processor;
+ else
+ start[0] = 0;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ /* get the index */
+ if (ne_get_idx(neid, VAR_ELEM_MAP_INT_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_ELEM_MAP_INT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (varidx[1] == -1) {
+ /* Get the size of the internal element map */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_INT_ELEMS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_INT_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_INT_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ varidx[1] = count[0];
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_ELEM_MAP_INT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_ELEM_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the map */
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_put_vara_int(neid, varid, start, count, elem_mapi);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_ELEM_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End "if (nmstat == 1)" */
+
+ /* Get the status of the border element map */
+ if ((status = nc_inq_varid(neid, VAR_BOR_E_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_BOR_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 's')
+ start[0] = processor;
+ else
+ start[0] = 0;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file %d",
+ VAR_BOR_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ /* get the index */
+ if (ne_get_idx(neid, VAR_ELEM_MAP_BOR_IDX, varidx, processor) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_ELEM_MAP_BOR_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ if (varidx[1] == -1) {
+ /* Get the size of the border element map */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_BOR_ELEMS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_BOR_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_BOR_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ varidx[1] = count[0];
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_ELEM_MAP_BOR, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_ELEM_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the map */
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_put_vara_int(neid, varid, start, count, elem_mapb);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_ELEM_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "if (nmstat == 1)" */
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pennm.c b/nemesis/ne_pennm.c
new file mode 100644
index 0000000..e918f20
--- /dev/null
+++ b/nemesis/ne_pennm.c
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************
+*
+* ne_pennm - ne_put_n_elem_num_map
+*
+* environment - UNIX
+*
+* entry conditions -
+* input parameters:
+* int neid exodus file id
+* int start_ent first entry in elem_map
+* int num_ents number of entries in node_map
+* int* elem_map element numbering map array
+*
+* exit conditions -
+*
+* revision history -
+*
+*
+*****************************************************************************/
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+/*
+ * writes out a portion of the element numbering map to the database;
+ * this allows element numbers to be non-contiguous
+ */
+
+int ne_put_n_elem_num_map (int neid,
+ int start_ent,
+ int num_ents,
+ int *elem_map)
+{
+ char *func_name="ne_put_n_elem_num_map";
+
+ int numelemdim, dims[1], mapid, status;
+ size_t num_elem, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* inquire id's of previously defined dimensions */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_ELEM, &numelemdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of elements in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen (neid, numelemdim, &num_elem)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of elements in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_ent < 0 || start_ent > num_elem) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: Invalid input to function %s!\n", func_name);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_ents < 0) {
+ exerrval = status;
+ sprintf(errmsg, "Error: Invalid number of entries in map!\n");
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_ent now starts at 1, not 0 */
+ if ((start_ent + num_ents - 1) > num_elem) {
+ exerrval = status;
+ sprintf(errmsg, "Error: request range invalid!\n");
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* check to see if this variable is already defined */
+ if ((status = nc_inq_varid (neid, VAR_ELEM_NUM_MAP, &mapid)) != NC_NOERR) {
+
+ /* if not, then create it */
+
+ /* put netcdf file into define mode */
+ if ((status = nc_redef (neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file id %d into define mode",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ dims[0] = numelemdim;
+
+ if ((status = nc_def_var(neid, VAR_ELEM_NUM_MAP, NC_INT, 1, dims, &mapid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to create element numbering map in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+ }
+
+
+ /* leave define mode */
+ if ((status = nc_enddef (neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to complete definition in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End: "if ((mapid = nc_inq_varid (neid, VAR_ELEM_NUM_MAP)) != NC_NOERR)" */
+
+
+ /* write out the element numbering map */
+ start[0] = --start_ent;
+ count[0] = num_ents;
+
+ status = nc_put_vara_int(neid, mapid, start, count, elem_map);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store element numbering map in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ return (EX_NOERR);
+
+}
diff --git a/nemesis/ne_pevs.c b/nemesis/ne_pevs.c
new file mode 100644
index 0000000..b16ec97
--- /dev/null
+++ b/nemesis/ne_pevs.c
@@ -0,0 +1,281 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_put_elem_var_slab()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * time_step - The time step to write this data to.
+ * elem_var_index - The index of this elemental variable.
+ * elem_blk_id - The ID of the element block being written to.
+ * start_pos - The start point for outputting data. The
+ * first value is 0.
+ * num_vals - The number of values to be output.
+ * elem_var_vals - Pointer to the vector of values to be output.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+#include <stdlib.h>
+
+/*
+ * writes the values of a single element variable for one element block,
+ * starting at start_pos, at one time step to the database; assume the
+ * first time step and element variable index are 1
+ */
+
+int ne_put_elem_var_slab (int neid,
+ int time_step,
+ int elem_var_index,
+ int elem_blk_id,
+ int start_pos,
+ int num_vals,
+ void *elem_var_vals)
+{
+ int status;
+ int varid, dimid,time_dim, numelbdim, dims[2], elem_blk_id_ndx;
+ size_t num_elem_blk, num_elem_var, start[2], count[2];
+ int *elem_var_tab;
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* Determine index of elem_blk_id in VAR_ID_EL_BLK array */
+ if ((elem_blk_id_ndx = ex_id_lkup(neid, EX_ELEM_BLOCK, elem_blk_id)) < 0) {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: no variables allowed for NULL block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_elem_var_slab", errmsg, EX_MSG);
+ return (EX_WARN);
+ } else {
+ sprintf(errmsg,
+ "Error: failed to locate element block id %d in %s array in file id %d",
+ elem_blk_id, VAR_ID_EL_BLK, neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if ((status = nc_inq_varid (neid,
+ VAR_ELEM_VAR(elem_var_index, elem_blk_id_ndx), &varid)) != NC_NOERR) {
+ if (status == NC_ENOTVAR) { /* variable doesn't exist, create it! */
+
+ /* inquire previously defined dimensions */
+
+ /* check for the existance of an element variable truth table */
+ if ((status = nc_inq_varid (neid, VAR_ELEM_TAB, &varid)) == NC_NOERR) {
+ /* find out number of element blocks and element variables */
+ if ((status = nc_inq_dimid (neid, DIM_NUM_EL_BLK, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of element blocks in file id %d",
+ neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &num_elem_blk)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of element blocks in file id %d",
+ neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_ELE_VAR, &dimid)) != NC_NOERR) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg,
+ "Error: no element variables stored in file id %d",
+ neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &num_elem_var)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of element variables in file id %d",
+ neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (!(elem_var_tab =
+ (int *)malloc(num_elem_blk*num_elem_var*sizeof(int)))) {
+ exerrval = EX_MEMFAIL;
+ sprintf(errmsg,
+ "Error: failed to allocate memory for element variable truth table in file id %d",
+ neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* read in the element variable truth table */
+ if ((status = nc_get_var_int(neid, varid, elem_var_tab)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get truth table from file id %d", neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (elem_var_tab[num_elem_var*(elem_blk_id_ndx-1)+elem_var_index-1] == 0L) {
+ free(elem_var_tab);
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg,
+ "Error: Invalid element variable %d, block %d in file id %d",
+ elem_var_index, elem_blk_id, neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ free(elem_var_tab);
+ }
+
+ if ((status = nc_inq_dimid (neid, DIM_TIME, &time_dim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate time dimension in file id %d", neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ goto error_ret; /* exit define mode and return */
+ }
+
+ if ((status = nc_inq_dimid(neid, DIM_NUM_EL_IN_BLK(elem_blk_id_ndx), &numelbdim)) != NC_NOERR) {
+ if (status == NC_EBADDIM) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: number of elements in element block %d not defined in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ } else {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of elements in element block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ }
+ goto error_ret;
+ }
+
+ /* variable doesn't exist so put file into define mode */
+ if ((status = nc_redef (neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file id %d into define mode", neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+
+ /* define netCDF variable to store element variable values */
+ dims[0] = time_dim;
+ dims[1] = numelbdim;
+ if ((status = nc_def_var(neid, VAR_ELEM_VAR(elem_var_index, elem_blk_id_ndx),
+ nc_flt_code(neid), 2, dims, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define element variable %d in file id %d",
+ elem_var_index, neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ goto error_ret;
+ }
+
+
+ /* leave define mode */
+ if ((status = nc_enddef(neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to complete element variable %s definition to file id %d",
+ VAR_ELEM_VAR(elem_var_index, elem_blk_id_ndx), neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } else {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate element variable %s in file id %d",
+ VAR_ELEM_VAR(elem_var_index, elem_blk_id_ndx),neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* store element variable values */
+ start[0] = --time_step;
+ start[1] = --start_pos;
+
+ count[0] = 1;
+ count[1] = num_vals;
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, varid, start, count, elem_var_vals);
+ } else {
+ status = nc_put_vara_double(neid, varid, start, count, elem_var_vals);
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store element variable %d in file id %d",
+ elem_var_index, neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ return (EX_NOERR);
+
+ /* Fatal error: exit definition mode and return */
+ error_ret:
+ if (nc_enddef (neid) != NC_NOERR) /* exit define mode */
+ {
+ sprintf(errmsg,
+ "Error: failed to complete definition for file id %d", neid);
+ ex_err("ne_put_elem_var_slab", errmsg, exerrval);
+ }
+ return (EX_FATAL);
+}
diff --git a/nemesis/ne_piinf.c b/nemesis/ne_piinf.c
new file mode 100644
index 0000000..a2182b0
--- /dev/null
+++ b/nemesis/ne_piinf.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_init_info()
+ *****************************************************************************
+ * This function writes information about the processors for which the
+ * decomposition was performed.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * num_proc - The number of processors in the decomposition.
+ * num_proc_in_f - The number of processors the file contains
+ * information for.
+ * ftype - The type of Nemesis file.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+int ne_put_init_info(int neid,
+ int num_proc,
+ int num_proc_in_f,
+ char *ftype
+ )
+{
+ char *func_name="ne_put_init_info";
+
+ int dimid, varid;
+ int ltempsv;
+ int lftype;
+ int status;
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Check the file type */
+ if (!ftype) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: NULL file type input for file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Set the file type */
+ if (ftype[0] == 'p' || ftype[0] == 'P')
+ lftype = 0;
+ else if (ftype[0] == 's' || ftype[0] == 'S')
+ lftype = 1;
+ else {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: unknown file type requested for file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Put file into define mode */
+ if ((status = nc_redef(neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file ID %d into define mode", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Define dimension for the number of processors */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_PROCS, &dimid)) != NC_NOERR) {
+ ltempsv = num_proc;
+ if ((status = nc_def_dim(neid, DIM_NUM_PROCS, ltempsv, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file ID %d",
+ DIM_NUM_PROCS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ /* If this is a parallel file then the status vectors are size 1 */
+ if (nc_inq_dimid(neid, DIM_NUM_PROCS_F, &dimid) != NC_NOERR) {
+ ltempsv = num_proc_in_f;
+ if ((status = nc_def_dim(neid, DIM_NUM_PROCS_F, ltempsv, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file ID %d",
+ DIM_NUM_PROCS_F, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ /* Output the file type */
+ if (nc_inq_varid(neid, VAR_FILE_TYPE, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_FILE_TYPE, NC_INT, 0, NULL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define file type in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if (ne_leavedef(neid, func_name) != EX_NOERR)
+ return (EX_FATAL);
+
+ if ((status = nc_put_var1_int(neid, varid, NULL, &lftype)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: unable to output file type variable in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ }
+ else {
+ if (ne_leavedef(neid, func_name) != EX_NOERR)
+ return (EX_FATAL);
+ }
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pinig.c b/nemesis/ne_pinig.c
new file mode 100644
index 0000000..1f3e8a6
--- /dev/null
+++ b/nemesis/ne_pinig.c
@@ -0,0 +1,319 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_init_global()
+ *****************************************************************************
+ * This function outputs the initial global information.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * num_nodes_g - The number of global FEM nodes. This is output as
+ * a NetCDF variable.
+ * num_elems_g - The number of global FEM elements. This is output
+ * as a NetCDF variable.
+ * num_elem_blks_g - The number of global element blocks. This is output
+ * as a NetCDF dimension.
+ * num_node_sets_g - The number of global node sets. This is output as
+ * a NetCDF dimension.
+ * num_side_sets_g - The number of global side sets. This is output as
+ * a NetCDF dimension.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_put_init_global(int neid,
+ int num_nodes_g,
+ int num_elems_g,
+ int num_elem_blks_g,
+ int num_node_sets_g,
+ int num_side_sets_g
+ )
+{
+ char *func_name="ne_put_init_global";
+
+ int varid, dimid, status;
+ int ltempsv;
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Put NetCDF file into define mode */
+ if ((status = nc_redef(neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file ID %d into define mode", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the file version */
+ if ((status=ne_put_version(neid)) < 0) return (status);
+
+ /* Define dimension for number of global nodes */
+ ltempsv = num_nodes_g;
+ if ((status = nc_def_dim(neid, DIM_NUM_NODES_GLOBAL, ltempsv, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file ID %d",
+ DIM_NUM_NODES_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define dimension for number of global elements */
+ ltempsv = num_elems_g;
+ if ((status = nc_def_dim(neid, DIM_NUM_ELEMS_GLOBAL, ltempsv, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file ID %d",
+ DIM_NUM_ELEMS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Output the number of global element blocks. This is output as a
+ * dimension since the vector of global element block IDs is sized
+ * by this quantity.
+ */
+ ltempsv = num_elem_blks_g;
+ if ((status = nc_def_dim(neid, DIM_NUM_ELBLK_GLOBAL, ltempsv, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file ID %d",
+ DIM_NUM_ELBLK_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define the element block IDs variable. */
+ if ((status = nc_def_var(neid, VAR_ELBLK_IDS_GLOBAL, NC_INT, 1, &dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable definition for \"%s\" into \
+file ID %d",
+ VAR_ELBLK_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define the element block counts variable. */
+ if ((status = nc_def_var(neid, VAR_ELBLK_CNT_GLOBAL, NC_INT, 1, &dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable definition for \"%s\" into \
+file ID %d",
+ VAR_ELBLK_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Output the number of global node sets. This is output as a
+ * dimension since the vector of global element block IDs is sized
+ * by this quantity.
+ */
+ if (num_node_sets_g > 0) {
+ ltempsv = num_node_sets_g;
+ if ((status = nc_def_dim(neid, DIM_NUM_NS_GLOBAL, ltempsv, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file ID %d",
+ DIM_NUM_NS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define the variable for output of global node set IDs */
+ if ((status = nc_def_var(neid, VAR_NS_IDS_GLOBAL, NC_INT, 1, &dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable definition for \"%s\" into \
+file ID %d",
+ VAR_NS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define variable for global node counts in each global node set */
+ if ((status = nc_def_var(neid, VAR_NS_NODE_CNT_GLOBAL, NC_INT, 1, &dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable definition for \"%s\" into \
+file ID %d",
+ VAR_NS_NODE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returing */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Define variable for global dist. factor count in each global
+ * node set
+ */
+ if ((status = nc_def_var(neid, VAR_NS_DF_CNT_GLOBAL, NC_INT, 1, &dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable definition for \"%s\" into \
+file ID %d",
+ VAR_NS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returing */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_node_sets_g > 0)" */
+
+ /*
+ * Output the number of global side sets. This is output as a
+ * dimension since the vector of global element block IDs is sized
+ * by this quantity.
+ */
+ if (num_side_sets_g > 0) {
+ ltempsv = num_side_sets_g;
+ if ((status = nc_def_dim(neid, DIM_NUM_SS_GLOBAL, ltempsv, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_SS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define the variable for output of global side set IDs */
+ if ((status = nc_def_var(neid, VAR_SS_IDS_GLOBAL, NC_INT, 1, &dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable definition for \"%s\" into \
+file id %d",
+ VAR_SS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Define the variable for count of global number of sides in the
+ * global side sets.
+ */
+ if ((status = nc_def_var(neid, VAR_SS_SIDE_CNT_GLOBAL, NC_INT, 1, &dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable definition for \"%s\" into \
+file id %d",
+ VAR_SS_SIDE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Define the variable for count of global dist. factors in the
+ * global side sets.
+ */
+ if ((status = nc_def_var(neid, VAR_SS_DF_CNT_GLOBAL, NC_INT, 1, &dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable definition for \"%s\" into \
+file id %d",
+ VAR_SS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_side_sets_g > 0)" */
+
+ /* End define mode */
+ if (ne_leavedef(neid, func_name) != EX_NOERR)
+ return (EX_FATAL);
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_plbp.c b/nemesis/ne_plbp.c
new file mode 100644
index 0000000..ca30cb0
--- /dev/null
+++ b/nemesis/ne_plbp.c
@@ -0,0 +1,650 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_loadbal_param()
+ *****************************************************************************
+ * This function outputs the load balance parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * num_int_nodes - The number of internal FEM nodes.
+ * num_bor_nodes - The number of border FEM nodes.
+ * num_ext_nodes - The number of external FEM nodes.
+ * num_int_elems - The number of internal FEM elements.
+ * num_bor_elems - The number of border FEM elements.
+ * num_node_cmaps - The number of nodal communication maps.
+ * num_elem_cmaps - The number of elemental communication maps.
+ * processor - The processor the file being read was written for.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+int ne_put_loadbal_param(int neid,
+ int num_int_nodes,
+ int num_bor_nodes,
+ int num_ext_nodes,
+ int num_int_elems,
+ int num_bor_elems,
+ int num_node_cmaps,
+ int num_elem_cmaps,
+ int processor
+ )
+{
+ char *func_name="ne_put_loadbal_param";
+
+ int status, varid;
+ int dimid_npf, dimid[3];
+ int varid_nm[3], varid_em[2];
+ char ftype[2];
+
+ int nmstat, ltempsv;
+
+ char errmsg[MAX_ERR_LENGTH];
+ /*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Get the file type */
+ if (ne_get_file_type(neid, ftype) != EX_NOERR) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: failed to get file type from file ID %d\n",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* make sure that this is a parallel file */
+ if (ftype[0] != 'p') {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: function for use with parallel files only, file ID %d\n",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /*
+ * Get the dimension ID for the number of processors storing
+ * information in this file.
+ */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_PROCS_F, &dimid_npf)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_PROCS_F, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Put NetCDF file into define mode */
+ if ((status = nc_redef(neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file id %d into define mode", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the file version */
+ if ((status=ne_put_version(neid)) < 0) return (status);
+
+ /* Define the status variables for the nodal vectors */
+ if (nc_inq_varid(neid, VAR_INT_N_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_INT_N_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ /* Set the dimension for status vectors */
+ if (nc_inq_varid(neid, VAR_BOR_N_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_BOR_N_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ if (nc_inq_varid(neid, VAR_EXT_N_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_EXT_N_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ /* Define the variable IDs for the elemental status vectors */
+ if (nc_inq_varid(neid, VAR_INT_E_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_INT_E_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ if (nc_inq_varid(neid, VAR_BOR_E_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_BOR_E_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: Failed to define variable \"%s\" in file ID %d",
+ VAR_BOR_E_STAT, neid);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ /* Get the variable ID for the nodal status vectors */
+ if ((status = nc_inq_varid(neid, VAR_INT_N_STAT, &varid_nm[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_BOR_N_STAT, &varid_nm[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_EXT_N_STAT, &varid_nm[2])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define variable for the internal element information */
+ if (num_int_elems > 0) {
+ ltempsv = num_int_elems;
+ if ((status = nc_def_dim(neid, DIM_NUM_INT_ELEMS, ltempsv, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_INT_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_ELEM_MAP_INT, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_ELEM_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_int_elems > 0)" */
+
+ /* Get the variable IDs for the elemental status vectors */
+ if ((status = nc_inq_varid(neid, VAR_INT_E_STAT, &varid_em[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_BOR_E_STAT, &varid_em[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_BOR_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Define variable for the border element information */
+ if (num_bor_elems > 0) {
+ ltempsv = num_bor_elems;
+ if ((status = nc_def_dim(neid, DIM_NUM_BOR_ELEMS, ltempsv, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_BOR_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_ELEM_MAP_BOR, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_ELEM_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_bor_elems > 0)" */
+
+ if (num_int_nodes > 0) {
+ /* Define variable for vector of internal FEM node IDs */
+ ltempsv = num_int_nodes;
+ if ((status = nc_def_dim(neid, DIM_NUM_INT_NODES, ltempsv, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_INT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_NODE_MAP_INT, NC_INT, 1, &dimid[0], &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_int_nodes > 0)" */
+
+ if (num_bor_nodes > 0) {
+ /* Define variable for vector of border FEM node IDs */
+ ltempsv = num_bor_nodes;
+ if ((status = nc_def_dim(neid, DIM_NUM_BOR_NODES, ltempsv, &dimid[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_BOR_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_NODE_MAP_BOR, NC_INT, 1, &dimid[1], &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+
+ }
+
+ } /* End "if (num_bor_nodes > 0)" */
+
+ if (num_ext_nodes > 0) {
+ /* Define dimension for vector of external FEM node IDs */
+ ltempsv = num_ext_nodes;
+ if ((status = nc_def_dim(neid, DIM_NUM_EXT_NODES, ltempsv, &dimid[2])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_EXT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_NODE_MAP_EXT, NC_INT, 1, &dimid[2], &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_EXT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_ext_nodes > 0)" */
+
+ /* Add the nodal communication map count */
+ if (num_node_cmaps > 0) {
+ ltempsv = num_node_cmaps;
+ if ((status = nc_def_dim(neid, DIM_NUM_N_CMAPS, ltempsv, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add dimension \"%s\" in file ID %d",
+ DIM_NUM_N_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Add the ID vector */
+ if ((status = nc_def_var(neid, VAR_N_COMM_IDS, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_N_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Add the status vector */
+ if ((status = nc_def_var(neid, VAR_N_COMM_STAT, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_N_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_node_cmaps > 0)" */
+
+ /* Add the nodal communication map count */
+ if (num_elem_cmaps > 0) {
+ ltempsv = num_elem_cmaps;
+ if ((status = nc_def_dim(neid, DIM_NUM_E_CMAPS, ltempsv, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add dimension \"%s\" in file ID %d",
+ DIM_NUM_E_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Add variables for elemental communication maps */
+ if ((status = nc_def_var(neid, VAR_E_COMM_IDS, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_E_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_E_COMM_STAT, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_E_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_elem_cmaps > 0)" */
+
+ /* Leave define mode */
+ if (ne_leavedef(neid, func_name) != EX_NOERR)
+ return (EX_FATAL);
+
+ /*
+ ** Set up status vector for internal node map
+ ** NOTE(9/26/96): this function is no longer valid
+ ** for scaler files, so no need to check for file type
+ */
+ if (num_int_nodes == 0) {
+ /* NULL set for internal nodes */
+ nmstat = 0;
+ if ((status = nc_put_var_int(neid, varid_nm[0], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for int node map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+ else {
+ nmstat = 1;
+ if ((status = nc_put_var_int(neid, varid_nm[0], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for int node map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_int_nodes == 0)" */
+
+ /* Set up status vector for border node map */
+ if (num_bor_nodes == 0) {
+ /* NULL set for border nodes */
+ nmstat = 0;
+ if ((status = nc_put_var_int(neid, varid_nm[1], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for bor node map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+ else {
+ /* Set the status indicating non-NULL size */
+ nmstat = 1;
+ if ((status = nc_put_var_int(neid, varid_nm[1], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for bor node map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_bor_nodes == 0)" */
+
+ /* Set up status vector for external node map */
+ if (num_ext_nodes == 0) {
+ /* NULL set for external nodes */
+ nmstat = 0;
+ if ((status = nc_put_var_int(neid, varid_nm[2], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for ext node map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+ else {
+ /* Set the status indicating non-NULL size */
+ nmstat = 1;
+ if ((status = nc_put_var_int(neid, varid_nm[2], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for ext node map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_ext_nodes == 0)" */
+
+ /* Set up status vector for internal element map */
+ if (num_int_elems == 0) {
+ /* NULL set for internal elements */
+ nmstat = 0;
+ if ((status = nc_put_var_int(neid, varid_em[0], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for int elem map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+ else {
+ /* Set the status indicating non-NULL size */
+ nmstat = 1;
+ if ((status = nc_put_var_int(neid, varid_em[0], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for int elem map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_int_elems == 0)" */
+
+ /* Set up status vector for border element map */
+ if (num_bor_elems == 0) {
+ /* NULL set for internal elements */
+ nmstat = 0;
+ if ((status = nc_put_var_int(neid, varid_em[1], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for bor elem map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+ else {
+ /* Set the status indicating non-NULL size */
+ nmstat = 1;
+ if ((status = nc_put_var_int(neid, varid_em[1], &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status for bor elem map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_bor_elems == 0)" */
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_plbpc.c b/nemesis/ne_plbpc.c
new file mode 100644
index 0000000..aa4da6f
--- /dev/null
+++ b/nemesis/ne_plbpc.c
@@ -0,0 +1,838 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_loadbal_param_cc()
+ *****************************************************************************
+ * This function outputs the concatenated list of load-balance parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * num_int_nodes - Vector of number of internal FEM nodes for
+ * "num_proc_in_f" processors.
+ * num_bor_nodes - Vector of number of border FEM nodes for
+ * "num_proc_in_f" processors.
+ * num_ext_nodes - Vector of number of external FEM nodes for
+ * "num_proc_in_f" processors.
+ * num_int_elems - Vector of number of internal FEM elems for
+ * "num_proc_in_f" processors.
+ * num_bor_elems - Vector of number of border FEM elems for
+ * "num_proc_in_f" processors.
+ * num_node_cmaps - Vector of number of nodal communication maps
+ * for "num_proc_in_f" processors.
+ * num_elem_cmaps - Vector of number of elemental communication maps
+ * for "num_proc_in_f" processors.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+#include <netcdf.h>
+#ifndef NC_INT64
+#define NC_INT64 NC_INT
+#endif
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+int ne_put_loadbal_param_cc(int neid,
+ int *num_int_nodes,
+ int *num_bor_nodes,
+ int *num_ext_nodes,
+ int *num_int_elems,
+ int *num_bor_elems,
+ int *num_node_cmaps,
+ int *num_elem_cmaps
+ )
+{
+ char *func_name="ne_put_loadbal_param_cc";
+
+ int status;
+ int iproc, varid, dimid_npf, dimid[3];
+ int num_proc, num_proc_in_f;
+ int varid_nm[3], varid_em[2];
+ int varid_idx[7] = {0, 0, 0, 0, 0, 0, 0};
+ size_t start[1];
+ char ftype[2];
+ int oldfill;
+
+ long long num_int_elem = 0, num_int_node = 0, num_bor_elem = 0;
+ long long num_bor_node = 0, num_ext_node = 0;
+ long long num_n_cmaps = 0, num_e_cmaps = 0;
+
+ int nmstat;
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ int format;
+ int index_type;
+ /*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* See if using NC_FORMAT_NETCDF4 format... */
+ nc_inq_format(neid, &format);
+ if (format == NC_FORMAT_NETCDF4) {
+ index_type = NC_INT64;
+ } else {
+ index_type = NC_INT;
+ }
+
+ /* Get the processor information from the file */
+ if (ne_get_init_info(neid, &num_proc, &num_proc_in_f, ftype) != EX_NOERR) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: Unable to get processor info from file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /*
+ * Get the dimension ID for the number of processors storing
+ * information in this file.
+ */
+ if ((status = nc_inq_dimid(neid, DIM_NUM_PROCS_F, &dimid_npf)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_PROCS_F, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Put NetCDF file into define mode */
+ if ((status = nc_redef(neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file id %d into define mode", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Set the fill mode */
+ if ((status = nc_set_fill(neid, NC_NOFILL, &oldfill)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file ID %d into no-fill mode",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the file version */
+ if ((status=ne_put_version(neid)) < 0) return (status);
+
+ /* Output the file type */
+ if (nc_inq_varid(neid, VAR_FILE_TYPE, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_FILE_TYPE, NC_INT, 0, NULL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define file type in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ /* Define the status variables for the nodal vectors */
+ if (nc_inq_varid(neid, VAR_INT_N_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_INT_N_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ /* Set the dimension for status vectors */
+ if (nc_inq_varid(neid, VAR_BOR_N_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_BOR_N_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ if (nc_inq_varid(neid, VAR_EXT_N_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_EXT_N_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ /* Define the variable IDs for the elemental status vectors */
+ if (nc_inq_varid(neid, VAR_INT_E_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_INT_E_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ if (nc_inq_varid(neid, VAR_BOR_E_STAT, &varid) != NC_NOERR) {
+ if ((status = nc_def_var(neid, VAR_BOR_E_STAT, NC_INT, 1, &dimid_npf, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: Failed to define variable \"%s\" in file ID %d",
+ VAR_BOR_E_STAT, neid);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ }
+
+ /* Get the variable ID for the nodal status vectors */
+ if ((status = nc_inq_varid(neid, VAR_INT_N_STAT, &varid_nm[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_BOR_N_STAT, &varid_nm[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_EXT_N_STAT, &varid_nm[2])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the variable IDs for the elemental status vectors */
+ if ((status = nc_inq_varid(neid, VAR_INT_E_STAT, &varid_em[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_INT_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_BOR_E_STAT, &varid_em[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_BOR_E_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* mms: NEW STUFF HERE */
+ /*
+ ** first need to loop through the processors in this
+ ** file and get the counts of the element and cmap lists
+ */
+ for(iproc=0; iproc < num_proc_in_f; iproc++) {
+ num_int_elem += num_int_elems[iproc];
+ num_int_node += num_int_nodes[iproc];
+ num_bor_elem += num_bor_elems[iproc];
+ num_bor_node += num_bor_nodes[iproc];
+ num_ext_node += num_ext_nodes[iproc];
+ num_e_cmaps += num_elem_cmaps[iproc];
+ num_n_cmaps += num_node_cmaps[iproc];
+ }
+
+ /* Define variable for the internal element information */
+ if (num_int_elem > 0) {
+ if ((status = nc_def_dim(neid, DIM_NUM_INT_ELEMS, num_int_elem, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_INT_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_ELEM_MAP_INT, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_ELEM_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* and the index variable */
+ if ((status = nc_def_var(neid, VAR_ELEM_MAP_INT_IDX, index_type, 1,
+ &dimid_npf, &varid_idx[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_ELEM_MAP_INT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+ } /* End "if (num_int_elem > 0)" */
+
+ /* Define variable for the border element information */
+ if (num_bor_elem > 0) {
+ if ((status = nc_def_dim(neid, DIM_NUM_BOR_ELEMS, num_bor_elem, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_BOR_ELEMS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_ELEM_MAP_BOR, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_ELEM_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* and the index variable */
+ if ((status = nc_def_var(neid, VAR_ELEM_MAP_BOR_IDX, index_type, 1,
+ &dimid_npf, &varid_idx[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_ELEM_MAP_BOR_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_bor_elem > 0)" */
+
+ if (num_int_node > 0) {
+ /* Define variable for vector of internal FEM node IDs */
+ if ((status = nc_def_dim(neid, DIM_NUM_INT_NODES, num_int_node, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_INT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_NODE_MAP_INT, NC_INT, 1, &dimid[0], &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* and the index variable */
+ if ((status = nc_def_var(neid, VAR_NODE_MAP_INT_IDX, index_type, 1,
+ &dimid_npf, &varid_idx[2])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_INT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_int_node > 0)" */
+
+ if (num_bor_node > 0) {
+ /* Define variable for vector of border FEM node IDs */
+ if ((status = nc_def_dim(neid, DIM_NUM_BOR_NODES, num_bor_node, &dimid[1])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_BOR_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_NODE_MAP_BOR, NC_INT, 1, &dimid[1], &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* and the index variable */
+ if ((status = nc_def_var(neid, VAR_NODE_MAP_BOR_IDX, index_type, 1,
+ &dimid_npf, &varid_idx[3])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_BOR_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_bor_node > 0)" */
+
+ if (num_ext_node > 0) {
+ /* Define dimension for vector of external FEM node IDs */
+ if ((status = nc_def_dim(neid, DIM_NUM_EXT_NODES, num_ext_node, &dimid[2])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to dimension \"%s\" in file id %d",
+ DIM_NUM_EXT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_NODE_MAP_EXT, NC_INT, 1, &dimid[2], &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_EXT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* and the index variable */
+ if ((status = nc_def_var(neid, VAR_NODE_MAP_EXT_IDX, index_type, 1,
+ &dimid_npf, &varid_idx[4])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_EXT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_ext_node > 0)" */
+
+ /* Output the communication map dimensions */
+ if (num_n_cmaps > 0) {
+ if ((status = nc_def_dim(neid, DIM_NUM_N_CMAPS, num_n_cmaps, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add dimension \"%s\" in file ID %d",
+ DIM_NUM_N_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Add variables for communication maps */
+ if ((status = nc_def_var(neid, VAR_N_COMM_IDS, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_N_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_N_COMM_STAT, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_N_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* and the index variable */
+ if ((status = nc_def_var(neid, VAR_N_COMM_INFO_IDX, index_type, 1,
+ &dimid_npf, &varid_idx[5])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_N_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_n_cmaps > 0)" */
+
+ if (num_e_cmaps > 0) {
+ if ((status = nc_def_dim(neid, DIM_NUM_E_CMAPS, num_e_cmaps, &dimid[0])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to add dimension \"%s\" in file ID %d",
+ DIM_NUM_E_CMAPS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* Add variables for elemental communication maps */
+ if ((status = nc_def_var(neid, VAR_E_COMM_IDS, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_E_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_def_var(neid, VAR_E_COMM_STAT, NC_INT, 1, dimid, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_E_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* and the index variable */
+ if ((status = nc_def_var(neid, VAR_E_COMM_INFO_IDX, index_type, 1,
+ &dimid_npf, &varid_idx[6])) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to define variable \"%s\" in file ID %d",
+ VAR_E_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ } /* End "if (num_e_cmaps > 0)" */
+
+ /* Leave define mode */
+ if (ne_leavedef(neid, func_name) != EX_NOERR)
+ return (EX_FATAL);
+
+ /* need to reset these counters */
+ num_int_elem = 0;
+ num_int_node = 0;
+ num_bor_elem = 0;
+ num_bor_node = 0;
+ num_ext_node = 0;
+ num_n_cmaps = 0;
+ num_e_cmaps = 0;
+
+ /* Update the status vectors */
+ for(iproc=0; iproc < num_proc_in_f; iproc++) {
+ start[0] = iproc;
+
+ if (num_int_nodes[iproc] > 0)
+ nmstat = 1;
+ else
+ nmstat = 0;
+
+ if ((status = nc_put_var1_int(neid, varid_nm[0], start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status int node map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_bor_nodes[iproc] > 0)
+ nmstat = 1;
+ else
+ nmstat = 0;
+
+ if ((status = nc_put_var1_int(neid, varid_nm[1], start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status bor node map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_ext_nodes[iproc] > 0)
+ nmstat = 1;
+ else
+ nmstat = 0;
+
+ if ((status = nc_put_var1_int(neid, varid_nm[2], start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status ext node map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_int_elems[iproc] > 0)
+ nmstat = 1;
+ else
+ nmstat = 0;
+
+ if ((status = nc_put_var1_int(neid, varid_em[0], start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status int elem map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_bor_elems[iproc] > 0)
+ nmstat = 1;
+ else
+ nmstat = 0;
+
+ if ((status = nc_put_var1_int(neid, varid_em[1], start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output status bor elem map in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* now fill the index variables */
+ if (varid_idx[0] > 0) {
+ /* increment to the next starting position */
+ num_int_elem += num_int_elems[iproc];
+ status = nc_put_var1_longlong(neid, varid_idx[0], start, &num_int_elem);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output internal element map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if (varid_idx[1] > 0) {
+ /* increment to the next starting position */
+ num_bor_elem += num_bor_elems[iproc];
+ status = nc_put_var1_longlong(neid, varid_idx[1], start, &num_bor_elem);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output border element map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if (varid_idx[2] > 0) {
+ /* increment to the next starting position */
+ num_int_node += num_int_nodes[iproc];
+ status = nc_put_var1_longlong(neid, varid_idx[2], start, &num_int_node);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output internal node map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if (varid_idx[3] > 0) {
+ /* increment to the next starting position */
+ num_bor_node += num_bor_nodes[iproc];
+ status = nc_put_var1_longlong(neid, varid_idx[3], start, &num_bor_node);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output border node map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if (varid_idx[4] > 0) {
+ /* increment to the next starting position */
+ num_ext_node += num_ext_nodes[iproc];
+ status = nc_put_var1_longlong(neid, varid_idx[4], start, &num_ext_node);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output external node map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if (varid_idx[5] > 0) {
+ /* increment to the next starting position */
+ num_n_cmaps += num_node_cmaps[iproc];
+ status = nc_put_var1_longlong(neid, varid_idx[5], start, &num_n_cmaps);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output node communication map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if (varid_idx[6] > 0) {
+ /* increment to the next starting position */
+ num_e_cmaps += num_elem_cmaps[iproc];
+ status = nc_put_var1_longlong(neid, varid_idx[6], start, &num_e_cmaps);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output elem communication map index in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ } /* End "for(iproc=0; iproc < num_proc_in_f; iproc++)" */
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pncm.c b/nemesis/ne_pncm.c
new file mode 100644
index 0000000..6e100d5
--- /dev/null
+++ b/nemesis/ne_pncm.c
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_node_cmap()
+ ****************************************************************************
+ * This function outputs a nodal communication map.
+ ****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * map_id - The ID of the nodal communication map to retrieve.
+ * node_ids - Pointer to vector containing the FEM node IDs
+ * that make up this communication map.
+ * proc_ids - Pointer to vector containing the processors IDs
+ * associated with each of the nodes in this nodal
+ * communication map.
+ * processor - The processor the file is being written for.
+ */
+/****************************************************************************/
+/****************************************************************************/
+/****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_put_node_cmap(int neid,
+ int map_id,
+ int *node_ids,
+ int *proc_ids,
+ int processor
+ )
+{
+ char *func_name="ne_put_node_cmap";
+
+ int map_idx, varid, dimid, status;
+ size_t start[1], count[1], ret_val;
+ int64_t varidx[2];
+ int value;
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* get the index for the comm map information variables */
+ if (ne_get_idx(neid, VAR_N_COMM_INFO_IDX, varidx, processor) == -1) {
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_N_COMM_INFO_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the index for this map_id */
+ if ((map_idx=ne_id_lkup(neid, VAR_N_COMM_IDS, varidx, map_id)) == -1) {
+ sprintf(errmsg,
+ "Error: failed to find index for variable \"%s\" in file ID %d",
+ VAR_N_COMM_IDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /*
+ * Find out if this is a NULL comm map by checking it's entry in
+ * the status vector.
+ */
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ start[0] = map_idx;
+ if ((status = nc_get_var1_int(neid, varid, start, &value)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: unable to get variable \"%s\" from file ID %d",
+ VAR_N_COMM_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (value == 0) return(EX_NOERR); /* NULL set */
+
+ /* now I need to get the comm map data index */
+ if (ne_get_idx(neid, VAR_N_COMM_DATA_IDX, varidx, map_idx) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_N_COMM_DATA_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension of the cmap data */
+ if (varidx[1] == -1) {
+ /* Get the size of the comm maps */
+ if ((status = nc_inq_dimid(neid, DIM_NCNT_CMAP, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get dimension ID for \"%s\" in file ID %d",
+ DIM_NCNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &ret_val)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NCNT_CMAP, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ varidx[1] = ret_val;
+ } /* "if (varidx[1]==-1)" */
+
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+
+ /* Output the node IDs for this comm map */
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_NIDS, &varid )) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_NIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ status = nc_put_vara_int(neid, varid, start, count, node_ids);
+ if (status != NC_NOERR) {
+ fprintf(stderr, "Start, Count = %zd\t%zd\n", start[0], count[0]);
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output vector \"%s\" in file ID %d",
+ VAR_N_COMM_NIDS, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the processor IDs for this map */
+ if ((status = nc_inq_varid(neid, VAR_N_COMM_PROC, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_N_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ status = nc_put_vara_int(neid, varid, start, count, proc_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_N_COMM_PROC, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pncor.c b/nemesis/ne_pncor.c
new file mode 100644
index 0000000..3df61ff
--- /dev/null
+++ b/nemesis/ne_pncor.c
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_n_coord()
+ *****************************************************************************
+ * This function puts "n" coordinate values.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * start_node_num - The starting index of the coords to be obtained.
+ * num_nodes - The number of FEM nodes to read coords for.
+ * x_coor - Pointer to location of X coordinate vector.
+ * y_coor - Pointer to location of Y coordinate vector.
+ * z_coor - Pointer to location of Z coordinate vector.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * writes the coordinates of all the nodes in the model
+ */
+
+int ne_put_n_coord (int neid,
+ int start_node_num,
+ int num_nodes,
+ void *x_coor,
+ void *y_coor,
+ void *z_coor)
+{
+ int coordidx, coordidy, coordidz;
+ int coordid;
+
+ int status;
+ int ndimdim;
+ size_t i, num_dim, start[2], count[2];
+ char *which = NULL;
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* inquire id's of previously defined dimensions */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_DIM, &ndimdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of dimensions in file id %d",
+ neid);
+ ex_err("ne_put_n_coord",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, ndimdim, &num_dim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of dimensions in file id %d",
+ neid);
+ ex_err("ne_put_n_coord",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+
+ /* write out the coordinates */
+ if (ex_large_model(neid) == 0) {
+ if ((status = nc_inq_varid (neid, VAR_COORD, &coordid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: failed to locate nodal coordinates in file id %d", neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_WARN);
+ }
+
+ start_node_num--; /* do this here so it is only decremented once */
+ for (i=0; i<num_dim; i++) {
+ start[0] = i;
+ start[1] = start_node_num;
+
+ count[0] = 1;
+ count[1] = num_nodes;
+
+ if (i == 0 && x_coor != NULL) {
+ which = "X";
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, coordid, start, count, x_coor);
+ } else {
+ status = nc_put_vara_double(neid, coordid, start, count, x_coor);
+ }
+ }
+ else if (i == 1 && y_coor != NULL) {
+ which = "Y";
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, coordid, start, count, y_coor);
+ } else {
+ status = nc_put_vara_double(neid, coordid, start, count, y_coor);
+ }
+ }
+ else if (i == 2 && z_coor != NULL) {
+ which = "Z";
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, coordid, start, count, z_coor);
+ } else {
+ status = nc_put_vara_double(neid, coordid, start, count, z_coor);
+ }
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put %s coord array in file id %d", which, neid);
+ ex_err("ne_put_n_coord",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+ } else {
+ start_node_num--; /* do this here so it is only decremented once */
+ for (i=0; i<num_dim; i++) {
+ start[0] = start_node_num;
+ count[0] = num_nodes;
+
+ if (i == 0 && x_coor != NULL) {
+ which = "X";
+ if ((status = nc_inq_varid (neid, VAR_COORD_X, &coordidx)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: failed to locate x-nodal coordinates in file id %d", neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_WARN);
+ }
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, coordidx, start, count, x_coor);
+ } else {
+ status = nc_put_vara_double(neid, coordidx, start, count, x_coor);
+ }
+ }
+
+ else if (i == 1 && y_coor != NULL) {
+ which = "Y";
+ if ((status = nc_inq_varid (neid, VAR_COORD_Y, &coordidy)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: failed to locate y-nodal coordinates in file id %d", neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_WARN);
+ }
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, coordidy, start, count, y_coor);
+ } else {
+ status = nc_put_vara_double(neid, coordidy, start, count, y_coor);
+ }
+ }
+ else if (i == 2 && z_coor != NULL) {
+ which = "Z";
+ if ((status = nc_inq_varid (neid, VAR_COORD_Z, &coordidz)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Warning: failed to locate z-nodal coordinates in file id %d", neid);
+ ex_err("ne_get_n_coord",errmsg,exerrval);
+ return (EX_WARN);
+ }
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, coordidz, start, count, z_coor);
+ } else {
+ status = nc_put_vara_double(neid, coordidz, start, count, z_coor);
+ }
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put %s coord array in file id %d", which, neid);
+ ex_err("ne_put_n_coord",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pneat.c b/nemesis/ne_pneat.c
new file mode 100644
index 0000000..be8964b
--- /dev/null
+++ b/nemesis/ne_pneat.c
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_put_n_elem_attr()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * elem_blk_id - The element block ID.
+ * start_elem_num - The starting index of the elements to be
+ * obtained.
+ * num_elems - The number of FEM elements to read coords for.
+ * attrib - Pointer to the attribute vector.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * writes the attributes for an element block
+ */
+
+int ne_put_n_elem_attr (int neid,
+ int elem_blk_id,
+ int start_elem_num,
+ int num_elems,
+ void *attrib)
+{
+ int status;
+ int numelbdim, numattrdim, attrid, elem_blk_id_ndx;
+ size_t num_elem_this_blk, num_attr, start[2], count[2];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* Determine index of elem_blk_id in VAR_ID_EL_BLK array */
+ if ((elem_blk_id_ndx = ex_id_lkup(neid, EX_ELEM_BLOCK, elem_blk_id)) < 0) {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: no attributes allowed for NULL block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_attr",errmsg,EX_MSG);
+ return (EX_WARN); /* no attributes for this element block */
+ } else {
+ sprintf(errmsg,
+ "Error: no element block id %d in %s array in file id %d",
+ elem_blk_id, VAR_ID_EL_BLK, neid);
+ ex_err("ne_put_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions */
+ if ((status = nc_inq_dimid (neid, DIM_NUM_EL_IN_BLK(elem_blk_id_ndx), &numelbdim)) != NC_NOERR) {
+ if (status == NC_EBADDIM) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: no element block with id %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ } else {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of elements for block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+
+ if ((status = nc_inq_dimlen(neid, numelbdim, &num_elem_this_blk)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of elements for block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimid(neid, DIM_NUM_ATT_IN_BLK(elem_blk_id_ndx), &numattrdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: number of attributes not defined for block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_attr",errmsg,EX_MSG);
+ return (EX_FATAL); /* number of attributes not defined */
+ }
+
+ if ((status = nc_inq_dimlen(neid, numattrdim, &num_attr)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of attributes for block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid (neid, VAR_ATTRIB(elem_blk_id_ndx), &attrid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate attribute variable for block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* do some error checking */
+ if (num_elem_this_blk < (start_elem_num + num_elems - 1)) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: requested attributes from too many elements in this block, %d",
+ elem_blk_id);
+ ex_err("ne_put_n_elem_attr",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+
+ /* write out the attributes */
+ start[0] = --start_elem_num;
+ start[1] = 0;
+
+ count[0] = num_elems;
+ count[1] = num_attr;
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, attrid, start, count, attrib);
+ } else {
+ status = nc_put_vara_double(neid, attrid, start, count, attrib);
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put attributes for block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_attr",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return(EX_NOERR);
+}
diff --git a/nemesis/ne_pnelc.c b/nemesis/ne_pnelc.c
new file mode 100644
index 0000000..19aa568
--- /dev/null
+++ b/nemesis/ne_pnelc.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_put_n_elem_conn()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * elem_blk_id - The element block ID.
+ * start_elem_num - The starting index of the elements to be
+ * obtained.
+ * num_elems - The number of FEM elements to read coords for.
+ * connect - Pointer to the connectivity vector.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * writes the connectivity array for an element block
+ */
+
+int ne_put_n_elem_conn (int neid,
+ int elem_blk_id,
+ int start_elem_num,
+ int num_elems,
+ int *connect)
+{
+ int numelbdim, nelnoddim, connid, elem_blk_id_ndx, status;
+ size_t num_elem_this_blk, num_nod_per_elem, start[2], count[2];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* Determine index of elem_blk_id in VAR_ID_EL_BLK array */
+ if ((elem_blk_id_ndx = ex_id_lkup(neid, EX_ELEM_BLOCK, elem_blk_id)) == -1)
+ {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: connectivity array not allowed for NULL element block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_conn",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+
+ sprintf(errmsg,
+ "Error: failed to locate element block id %d in %s array in file id %d",
+ elem_blk_id,VAR_ID_EL_BLK, neid);
+ ex_err("ne_put_n_elem_conn",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_EL_IN_BLK(elem_blk_id_ndx), &numelbdim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of elements in block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_conn",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, numelbdim, &num_elem_this_blk)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of elements in block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_conn",errmsg,exerrval);
+ return(EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NOD_PER_EL(elem_blk_id_ndx), &nelnoddim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of nodes/elem in block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_conn",errmsg,exerrval);
+ return(EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen (neid, nelnoddim, &num_nod_per_elem)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of nodes/elem in block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_conn",errmsg,exerrval);
+ return(EX_FATAL);
+ }
+
+
+ if ((status = nc_inq_varid (neid, VAR_CONN(elem_blk_id_ndx), &connid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate connectivity array for element block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_conn",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+
+ /* do some error checking */
+ if (num_elem_this_blk < (start_elem_num + num_elems - 1)) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: requested connectivity from too many elements in this block, %d",
+ elem_blk_id);
+ ex_err("ne_put_n_elem_conn",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+
+ /* write out the connectivity array */
+ start[0] = --start_elem_num;
+ start[1] = 0;
+
+ count[0] = num_elems;
+ count[1] = num_nod_per_elem;
+
+ status = nc_put_vara_int(neid, connid, start, count, connect);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to write connectivity array for block %d in file id %d",
+ elem_blk_id, neid);
+ ex_err("ne_put_n_elem_conn",errmsg, exerrval);
+ return(EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pnm.c b/nemesis/ne_pnm.c
new file mode 100644
index 0000000..dd62b5e
--- /dev/null
+++ b/nemesis/ne_pnm.c
@@ -0,0 +1,343 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************
+ * This function outputs the nodal map.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * node_mapi - Pointer to vector containing the internal FEM
+ * nodal IDs.
+ * node_mapb - Pointer to vector containing the border FEM
+ * nodal IDs.
+ * node_mape - Pointer to vector containing the external FEM
+ * nodal IDs.
+ * proc_id - The processor the file is being written for.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+int ne_put_node_map(int neid,
+ int *node_mapi,
+ int *node_mapb,
+ int *node_mape,
+ int proc_id
+ )
+{
+ char *func_name="ne_put_node_map";
+
+ int status, varid, dimid;
+ char ftype[2];
+ size_t start[1], count[1];
+ int64_t varidx[2];
+ int nmstat;
+
+ char errmsg[MAX_ERR_LENGTH];
+ /*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Get the file type */
+ if (ne_get_file_type(neid, ftype) != EX_NOERR) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: unable to find file type for file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the status of this node map */
+ if ((status = nc_inq_varid(neid, VAR_INT_N_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 'p')
+ start[0] = 0;
+ else
+ start[0] = proc_id;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Write out the internal node-number map */
+ if (nmstat == 1) {
+ /* get the index */
+ if (ne_get_idx(neid, VAR_NODE_MAP_INT_IDX, varidx, proc_id) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_NODE_MAP_INT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension */
+ if (varidx[1] == -1) {
+ if ((status = nc_inq_dimid(neid, DIM_NUM_INT_NODES, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_INT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_INT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ varidx[1] = count[0];
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_NODE_MAP_INT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NODE_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_put_vara_int(neid, varid, start, count, node_mapi);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_INT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "if (nmstat == 1)" */
+
+ /* Get the status of this node map */
+ if ((status = nc_inq_varid(neid, VAR_BOR_N_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 'p')
+ start[0] = 0;
+ else
+ start[0] = proc_id;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file %d",
+ VAR_BOR_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ /* Write out the border node-number map */
+ /* get the index */
+ if (ne_get_idx(neid, VAR_NODE_MAP_BOR_IDX, varidx, proc_id) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_NODE_MAP_BOR_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension */
+ if (varidx[1] == -1) {
+ if ((status = nc_inq_dimid(neid, DIM_NUM_BOR_NODES, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_BOR_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_BOR_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ varidx[1] = count[0];
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_NODE_MAP_BOR, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NODE_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the map */
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_put_vara_int(neid, varid, start, count, node_mapb);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_BOR, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "if (nmstat == 1)" */
+
+ /* Get the status of this node map */
+ if ((status = nc_inq_varid(neid, VAR_EXT_N_STAT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (ftype[0] == 'p')
+ start[0] = 0;
+ else
+ start[0] = proc_id;
+
+ if ((status = nc_get_var1_int(neid, varid, start, &nmstat)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file %d",
+ VAR_EXT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (nmstat == 1) {
+ /* Write out the external node-number map */
+ if (ne_get_idx(neid, VAR_NODE_MAP_EXT_IDX, varidx, proc_id) == -1) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find index variable, \"%s\", in file ID %d",
+ VAR_NODE_MAP_EXT_IDX, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* check if I need to get the dimension */
+ if (varidx[1] == -1) {
+ if ((status = nc_inq_dimid(neid, DIM_NUM_EXT_NODES, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for \"%s\" in file ID %d",
+ DIM_NUM_EXT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, count)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find length of dimension \"%s\" in file ID %d",
+ DIM_NUM_EXT_NODES, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ varidx[1] = count[0];
+ }
+
+ if ((status = nc_inq_varid(neid, VAR_NODE_MAP_EXT, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NODE_MAP_EXT, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the map */
+ start[0] = varidx[0];
+ count[0] = varidx[1] - varidx[0];
+ status = nc_put_vara_int(neid, varid, start, count, node_mape);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_NODE_MAP_EXT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ } /* End "if (nmstat == 1)" */
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pnnnm.c b/nemesis/ne_pnnnm.c
new file mode 100644
index 0000000..4f4df34
--- /dev/null
+++ b/nemesis/ne_pnnnm.c
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************
+*
+* ne_pnnnm - ne_put_n_node_num_map
+*
+* entry conditions -
+* input parameters:
+* int neid exodus file id
+* int start_ent first entry in node_map
+* int num_ents number of entries in node_map
+* int* node_map node numbering map
+*
+* exit conditions -
+*
+* revision history -
+*
+*
+*****************************************************************************/
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+/*
+ * writes out the node numbering map to the database; allows node numbers
+ * to be non-contiguous
+ */
+
+int ne_put_n_node_num_map (int neid,
+ int start_ent,
+ int num_ents,
+ int *node_map)
+{
+ char *func_name="ne_put_n_node_num_map";
+
+ int numnodedim, dims[1], mapid, status;
+ size_t num_nodes, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* inquire id's of previously defined dimensions */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NODES, &numnodedim)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of nodes in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, numnodedim, &num_nodes)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of nodes in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_ent < 0 || start_ent > num_nodes) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: Invalid input to function %s!\n", func_name);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_ents < 0) {
+ exerrval = status;
+ sprintf(errmsg, "Error: Invalid number of entries in map!\n");
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_ent now starts at 1, not 0 */
+ if ((start_ent + num_ents - 1) > num_nodes) {
+ exerrval = status;
+ sprintf(errmsg, "Error: request range invalid!\n");
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* check to see if node number map variable is already defined */
+ if ((status = nc_inq_varid (neid, VAR_NODE_NUM_MAP, &mapid)) != NC_NOERR) {
+ /* if not, then create it */
+
+ /* put netcdf file into define mode */
+ if ((status = nc_redef (neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put file id %d into define mode",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* create a variable array in which to store the node numbering map */
+ dims[0] = numnodedim;
+ if ((status = nc_def_var(neid, VAR_NODE_NUM_MAP, NC_INT, 1, dims, &mapid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to create node numbering map array in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+
+ /* Leave define mode before returning */
+ ne_leavedef(neid, func_name);
+
+ return (EX_FATAL);
+ }
+
+ /* leave define mode */
+ if ((status = nc_enddef (neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to complete definition in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+
+ /* write out the node numbering map */
+ start[0] = --start_ent;
+ count[0] = num_ents;
+ status = nc_put_vara_int (neid, mapid, start, count, node_map);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store node numbering map in file id %d",
+ neid);
+ ex_err(func_name,errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pnns.c b/nemesis/ne_pnns.c
new file mode 100644
index 0000000..639f7a9
--- /dev/null
+++ b/nemesis/ne_pnns.c
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_put_n_node_set()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * node_set_id - ID of node set to read.
+ * start_node_num - The starting index of the nodes to be read.
+ * num_nodes - The number of nodes to read in.
+ * node_set_node_list - List of node IDs in node set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI.h"
+#include "ne_nemesisI_int.h"
+
+/*
+ * writes the node list for a single node set
+ */
+
+int ne_put_n_node_set (int neid,
+ int node_set_id,
+ int start_node_num,
+ int num_nodes,
+ int *node_set_node_list)
+{
+ int dimid, node_list_id, node_set_id_ndx, status;
+ size_t num_nodes_in_set, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* first check if any node sets are specified */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: no node sets specified in file id %d",
+ neid);
+ ex_err("ne_put_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Lookup index of node set id in VAR_NS_IDS array */
+ if ((node_set_id_ndx = ex_id_lkup(neid, EX_NODE_SET, node_set_id)) < 0)
+ {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: no data allowed for NULL node set %d in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+ sprintf(errmsg,
+ "Error: failed to locate node set id %d in VAR_NS_IDS array in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NOD_NS(node_set_id_ndx), &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of nodes in set %d in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &num_nodes_in_set)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of nodes in set %d in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_node_num < 0 || start_node_num > num_nodes_in_set) {
+ fprintf(stderr, "ERROR: Invalid input to function ne_get_n_node_set!\n");
+ return -1;
+ }
+
+ if (num_nodes < 0) {
+ fprintf(stderr, "ERROR: Invalid number of nodes in nodes set!\n");
+ return -1;
+ }
+
+ /* start_node_num now starts at 1, not 0 */
+ if ((start_node_num + num_nodes - 1) > num_nodes_in_set) {
+ fprintf(stderr, "ERROR: request larger than number of nodes in set!\n");
+ return -1;
+ }
+
+ /* inquire if variable for node set node list has been defined */
+ if ((status = nc_inq_varid (neid, VAR_NODE_NS(node_set_id_ndx), &node_list_id)) != NC_NOERR) {
+ /* variable doesn't exist */
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate node set %d node list in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* write out the node list array */
+ start[0] = --start_node_num;
+ count[0] = num_nodes;
+
+ status = nc_put_vara_int(neid, node_list_id, start, count, node_set_node_list);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store node set %d node list in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pnnsd.c b/nemesis/ne_pnnsd.c
new file mode 100644
index 0000000..90fcdf8
--- /dev/null
+++ b/nemesis/ne_pnnsd.c
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_put_n_node_set_df()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * node_set_id - ID of node set to write.
+ * start_num - The starting index of the df's to be written.
+ * num_df_to_get - The number of distribution factors to write out.
+ * node_set_dist_fact - List of node distribution factors in node set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * writes the node set distribution factors for a single node set
+ */
+
+int ne_put_n_node_set_df (int neid,
+ int node_set_id,
+ int start_num,
+ int num_df_to_get,
+ void *node_set_dist_fact)
+{
+ int status;
+ int dimid, dist_id, node_set_id_ndx;
+ size_t num_nodes_in_set, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* first check if any node sets are specified */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NS, &dimid)) < 0) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: no node sets specified in file id %d",
+ neid);
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Lookup index of node set id in VAR_NS_IDS array */
+ if ((node_set_id_ndx = ex_id_lkup(neid, EX_NODE_SET, node_set_id)) < 0)
+ {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: no data allowed for NULL node set %d in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set_df",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+ sprintf(errmsg,
+ "Error: failed to locate node set id %d in VAR_NS_IDS array in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions */
+ if ((status = nc_inq_dimid (neid, DIM_NUM_NOD_NS(node_set_id_ndx), &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of nodes in node set %d in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &num_nodes_in_set)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of nodes in set %d in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_num < 0 || start_num > num_nodes_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid input");
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_df_to_get < 0) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid number of nodes in nodes set!");
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_num now starts at 1, not 0 */
+ if ((start_num + num_df_to_get - 1) > num_nodes_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: request larger than number of nodes in set!");
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* find id of distribution factors variable */
+ if ((status = nc_inq_varid (neid, VAR_FACT_NS(node_set_id_ndx), &dist_id)) != NC_NOERR) {
+ if (status == NC_ENOTVAR) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg,
+ "Warning: no dist factors defined for node set %d in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_WARN);
+
+ } else {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate node set %d dist factors in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+
+ /* write out the distribution factors array */
+ start[0] = --start_num;
+ count[0] = num_df_to_get;
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, dist_id, start, count, node_set_dist_fact);
+ } else {
+ status = nc_put_vara_double(neid, dist_id, start, count, node_set_dist_fact);
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store node set %d dist factors in file id %d",
+ node_set_id, neid);
+ ex_err("ne_put_n_node_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pnspg.c b/nemesis/ne_pnspg.c
new file mode 100644
index 0000000..b1a99c3
--- /dev/null
+++ b/nemesis/ne_pnspg.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_ns_param_global()
+ *****************************************************************************
+ * This function outputs the global node-set parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * global_ids - Pointer to a vector of global node-set IDs.
+ * node_cnts - Pointer to a vector of global node counts in
+ * each global node set.
+ * df_cnts - Pointer to a vector of global distribution
+ * factors in each global node set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_put_ns_param_global(int neid,
+ int *global_ids,
+ int *node_cnts,
+ int *df_cnts
+ )
+{
+ char *func_name="ne_put_ns_param_global";
+ int varid, status;
+
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Get the variable ID for the vector of global node set IDs */
+ if ((status = nc_inq_varid(neid, VAR_NS_IDS_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the vector of global node set IDs */
+ status = nc_put_var_int(neid, varid, global_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" to file ID %d",
+ VAR_NS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the vector of global node-set node counts */
+ if ((status = nc_inq_varid(neid, VAR_NS_NODE_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NS_NODE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the vector of global node counts in each global node set */
+ status = nc_put_var_int(neid, varid, node_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable \"%s\" in file ID %d",
+ VAR_NS_NODE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the number of dist. factors in each node set */
+ if ((status = nc_inq_varid(neid, VAR_NS_DF_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_NS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the vector of dist. factor counts */
+ status = nc_put_var_int(neid, varid, df_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_NS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pnss.c b/nemesis/ne_pnss.c
new file mode 100644
index 0000000..0d728d0
--- /dev/null
+++ b/nemesis/ne_pnss.c
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_put_n_side_set()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * side_set_id - ID of side set to read.
+ * start_side_num - The starting index of the sides to be read.
+ * num_sides - The number of sides to read in.
+ * side_set_elem_list - List of element IDs in side set.
+ * side_set_side_list - List of side IDs in side set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * writes the side set element list and side set side list for a single side set
+ */
+
+int ne_put_n_side_set (int neid,
+ int side_set_id,
+ int start_side_num,
+ int num_sides,
+ int *side_set_elem_list,
+ int *side_set_side_list)
+{
+ int status;
+ int dimid;
+ int elem_list_id, side_list_id, side_set_id_ndx;
+ size_t num_side_in_set, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* first check if any side sets are specified */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_SS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: no side sets defined in file id %d",
+ neid);
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Lookup index of side set id in VAR_SS_IDS array */
+
+ if ((side_set_id_ndx = ex_id_lkup(neid, EX_SIDE_SET, side_set_id)) < 0)
+ {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: no data allowed for NULL side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+ sprintf(errmsg,
+ "Error: failed to locate side set id %d in VAR_SS_IDS array in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimensions */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_SIDE_SS(side_set_id_ndx), &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of sides in side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &num_side_in_set)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of sides in side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of side numbers */
+ if (start_side_num < 0 || start_side_num > num_side_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid input");
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_sides < 0) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid number of elements in side set!");
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_side_num now starts at 1, not 0 */
+ if ((start_side_num + num_sides - 1) > num_side_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: request larger than number of elements in set!");
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* inquire id's of previously defined variables */
+ if ((status = nc_inq_varid (neid, VAR_ELEM_SS(side_set_id_ndx), &elem_list_id)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate element list for side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid (neid, VAR_SIDE_SS(side_set_id_ndx), &side_list_id)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate side list for side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+
+ /* write out the element list and side list arrays */
+ start[0] = --start_side_num;
+ count[0] = num_sides;
+
+ status = nc_put_vara_int(neid, elem_list_id, start, count, side_set_elem_list);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store element list for side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+
+ status = nc_put_vara_int(neid, side_list_id, start, count, side_set_side_list);
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store side list for side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_pnssd.c b/nemesis/ne_pnssd.c
new file mode 100644
index 0000000..f03cebc
--- /dev/null
+++ b/nemesis/ne_pnssd.c
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_put_n_side_set_df()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * side_set_id - ID of side set to written.
+ * start_num - The starting index of the df's to be written.
+ * num_df_to_get - The number of sides to write.
+ * side_set_dist_fact - List of distribution factors for the side set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "exodusII.h"
+#include "exodusII_int.h"
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
+ * writes the distribution factors for a single side set
+ */
+
+int ne_put_n_side_set_df (int neid,
+ int side_set_id,
+ int start_num,
+ int num_df_to_get,
+ void *side_set_dist_fact)
+{
+ int status;
+ int dimid, side_set_id_ndx;
+ int dist_id;
+ size_t num_df_in_set, start[1], count[1];
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* first check if any side sets are specified */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_SS, &dimid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: no side sets specified in file id %d",
+ neid);
+ ex_err("ne_put_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Lookup index of side set id in VAR_SS_IDS array */
+
+ if ((side_set_id_ndx = ex_id_lkup(neid, EX_SIDE_SET, side_set_id)) < 0)
+ {
+ if (exerrval == EX_NULLENTITY) {
+ sprintf(errmsg,
+ "Warning: no data allowed for NULL side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ex_put_side_set_fact",errmsg,EX_MSG);
+ return (EX_WARN);
+ } else {
+ sprintf(errmsg,
+ "Error: failed to locate side set id %d in VAR_SS_IDS array in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ /* inquire id's of previously defined dimension and variable */
+
+ if ((status = nc_inq_dimid (neid, DIM_NUM_DF_SS(side_set_id_ndx), &dimid)) != NC_NOERR) {
+ if (status == NC_EBADDIM) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg,
+ "Warning: no dist factors defined for side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set_df",errmsg,exerrval);
+ return (EX_WARN);
+
+ } else {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate number of dist factors in side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ }
+
+ if ((status = nc_inq_dimlen(neid, dimid, &num_df_in_set)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get number of dist factors in side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Check input parameters for a valid range of numbers */
+ if (start_num < 0 || start_num > num_df_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid input");
+ ex_err("ne_put_n_side_set_df", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (num_df_to_get < 0) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: Invalid number of df's to put!");
+ ex_err("ne_put_n_side_set_df", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* start_num now starts at 1, not 0 */
+ if ((start_num + num_df_to_get - 1) > num_df_in_set) {
+ exerrval = EX_BADPARAM;
+ sprintf(errmsg, "Error: request larger than number of df's in set!");
+ ex_err("ne_put_n_side_set_df", errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_inq_varid (neid, VAR_FACT_SS(side_set_id_ndx), &dist_id)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to locate dist factors list for side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+
+
+ /* write out the distribution factors array */
+ start[0] = --start_num;
+ count[0] = num_df_to_get;
+
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, dist_id, start, count, side_set_dist_fact);
+ } else {
+ status = nc_put_vara_double(neid, dist_id, start, count, side_set_dist_fact);
+ }
+
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to store dist factors for side set %d in file id %d",
+ side_set_id, neid);
+ ex_err("ne_put_n_side_set_df",errmsg,exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
diff --git a/cbind/src/expnv.c b/nemesis/ne_pnvs.c
similarity index 54%
rename from cbind/src/expnv.c
rename to nemesis/ne_pnvs.c
index f9d405a..baa83d3 100644
--- a/cbind/src/expnv.c
+++ b/nemesis/ne_pnvs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
* retains certain rights in this software.
*
@@ -32,44 +32,49 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-/*****************************************************************************
-*
-* expnv - ex_put_nodal_var
-*
-* entry conditions -
-* input parameters:
-* int exoid exodus file id
-* int time_step whole time step number
-* int nodeal_var_index index of desired nodal variable
-* int num_nodes number of nodal points
-* float* nodal_var_vals array of nodal variable values
-*
-* exit conditions -
-*
-* revision history -
-*
-*
-*****************************************************************************/
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_put_nodal_var_slab()
+ *
+ *****************************************************************************
+ *
+ * Variable Index:
+ *
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * time_step - The time step to write this data to.
+ * nodal_var_index - The index of this nodal variable.
+ * start_pos - The start point for outputting data. The first
+ * value is 0.
+ * num_vals - The number of values to be output.
+ * nodal_var_vals - Pointer to the vector of values to be output.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
#include "exodusII.h"
#include "exodusII_int.h"
-/*!
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/*
* writes the values of a single nodal variable for a single time step to
* the database; assume the first time step and nodal variable index
* is 1
- * \param exoid exodus file id
- * \param time_step whole time step number
- * \param nodal_var_index index of desired nodal variable
- * \param num_nodes number of nodal points
- * \param nodal_var_vals array of nodal variable values
*/
-int ex_put_nodal_var (int exoid,
- int time_step,
- int nodal_var_index,
- int num_nodes,
- const void *nodal_var_vals)
+int ne_put_nodal_var_slab (int neid,
+ int time_step,
+ int nodal_var_index,
+ int start_pos,
+ int num_vals,
+ void *nodal_var_vals)
{
int status;
@@ -79,55 +84,61 @@ int ex_put_nodal_var (int exoid,
exerrval = 0; /* clear error code */
- if (ex_large_model(exoid) == 0) {
+ /* inquire previously defined variable -- if not found assume that
+ the new separate 'blob' per nodal var storage is being used */
+
+ if (ex_large_model(neid) == 0) {
/* write values of the nodal variable */
- if ((status = nc_inq_varid(exoid, VAR_NOD_VAR, &varid)) != NC_NOERR) {
+ if ((status = nc_inq_varid (neid, VAR_NOD_VAR, &varid)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
- "Warning: could not find nodal variables in file id %d",
- exoid);
- ex_err("ex_put_nodal_var",errmsg,exerrval);
+ "Warning: could not find nodal variable %d in file id %d",
+ nodal_var_index, neid);
+ ex_err("ne_put_nodal_var_slab",errmsg,exerrval);
return (EX_WARN);
}
+
start[0] = --time_step;
start[1] = --nodal_var_index;
- start[2] = 0;
+ start[2] = --start_pos;
count[0] = 1;
count[1] = 1;
- count[2] = num_nodes;
+ count[2] = num_vals;
} else {
+
/* nodal variables stored separately, find variable for this variable
index */
- if ((status = nc_inq_varid(exoid, VAR_NOD_VAR_NEW(nodal_var_index), &varid)) != NC_NOERR) {
+ if ((status = nc_inq_varid (neid, VAR_NOD_VAR_NEW(nodal_var_index), &varid)) != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Warning: could not find nodal variable %d in file id %d",
- nodal_var_index, exoid);
- ex_err("ex_put_nodal_var",errmsg,exerrval);
+ nodal_var_index, neid);
+ ex_err("ne_put_nodal_var_slab",errmsg,exerrval);
return (EX_WARN);
}
start[0] = --time_step;
- start[1] = 0;
+ start[1] = --start_pos;
count[0] = 1;
- count[1] = num_nodes;
+ count[1] = num_vals;
}
- if (ex_comp_ws(exoid) == 4) {
- status = nc_put_vara_float(exoid, varid, start, count, nodal_var_vals);
+ if (ex_comp_ws(neid) == 4) {
+ status = nc_put_vara_float(neid, varid, start, count, nodal_var_vals);
} else {
- status = nc_put_vara_double(exoid, varid, start, count, nodal_var_vals);
+ status = nc_put_vara_double(neid, varid, start, count, nodal_var_vals);
}
-
+
if (status != NC_NOERR) {
exerrval = status;
sprintf(errmsg,
"Error: failed to store nodal variables in file id %d",
- exoid);
- ex_err("ex_put_nodal_var",errmsg,exerrval);
+ neid);
+ ex_err("ne_put_nodal_var_slab",errmsg,exerrval);
return (EX_FATAL);
}
+
return (EX_NOERR);
}
diff --git a/nemesis/ne_psspg.c b/nemesis/ne_psspg.c
new file mode 100644
index 0000000..af72584
--- /dev/null
+++ b/nemesis/ne_psspg.c
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ * ne_put_ss_param_global()
+ *****************************************************************************
+ * This function outputs the global side-set parameters.
+ *****************************************************************************
+ * Variable Index:
+ * neid - The NetCDF ID of an already open NemesisI file.
+ * global_ids - Pointer to a vector of global side-set IDs.
+ * side_cnts - Pointer to a vector of global side counts in
+ * each global side set.
+ * df_cnts - Pointer to a vector of global distribution
+ * factors in each global side set.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+
+#include <netcdf.h>
+
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+int ne_put_ss_param_global(int neid,
+ int *global_ids,
+ int *side_cnts,
+ int *df_cnts
+ )
+{
+ char *func_name="ne_put_ss_param_global";
+ int varid;
+
+ int status;
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* Get the variable ID for the vector of global side set IDs */
+ if ((status = nc_inq_varid(neid, VAR_SS_IDS_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_SS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the vector of global side set IDs */
+ status = nc_put_var_int(neid, varid, global_ids);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" to file ID %d",
+ VAR_SS_IDS_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the vector of global side-set side counts */
+ if ((status = nc_inq_varid(neid, VAR_SS_SIDE_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_SS_SIDE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the vector of global side counts in each global side set */
+ status = nc_put_var_int(neid, varid, side_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to put variable \"%s\" in file ID %d",
+ VAR_SS_SIDE_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Get the variable ID for the number of dist. factors in each side set */
+ if ((status = nc_inq_varid(neid, VAR_SS_DF_CNT_GLOBAL, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ VAR_SS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ /* Output the vector of dist. factor counts */
+ status = nc_put_var_int(neid, varid, df_cnts);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output variable \"%s\" in file ID %d",
+ VAR_SS_DF_CNT_GLOBAL, neid);
+ ex_err(func_name, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+
+ return (EX_NOERR);
+}
diff --git a/nemesis/ne_test.c b/nemesis/ne_test.c
new file mode 100644
index 0000000..ccc33be
--- /dev/null
+++ b/nemesis/ne_test.c
@@ -0,0 +1,1044 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* This file contains the source code for the program used to test the
+ * Nemesis distribution.
+ *****************************************************************************
+ * Written By: Gary L. Hennigan (SNL, 1421)
+ *****************************************************************************
+ * Functions contained in this file:
+ * main() - Entry point and main calling program.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <exodusII.h>
+
+#include "ne_nemesisI.h"
+
+/* Constants for init_global functions */
+#define NNG 100
+#define NEG 50
+#define NEBG 5
+#define NEBCG 10
+#define NNSG 2
+#define NSSG 3
+
+/* Constants for load-balance functions */
+#define NPROC 10
+#define NPROCF NPROC
+#define NINTN 200
+#define NBORN 10
+#define NEXTN 5
+#define NINTE 100
+#define NBORE 20
+#define NNCMAP 4
+#define NECMAP 2
+
+/* Constants for communication map */
+#define NCNTCM 20
+#define ECNTCM 17
+
+int main(int argc, char *argv[])
+{
+
+ /* Local function calls */
+ int ne_test_glbp(int);
+ int ne_test_piinf(int);
+ int ne_test_pinig(int);
+ int ne_test_pelbid(int);
+ int ne_test_pnsp(int);
+ int ne_test_pssp(int);
+ int ne_test_pnm(int);
+ int ne_test_pem(int);
+ int ne_test_pcmp(int);
+ int ne_test_pncm(int);
+ int ne_test_pecm(int);
+
+ int ne_test_giinf(int);
+ int ne_test_ginig(int);
+ int ne_test_gelbid(int);
+ int ne_test_gnsp(int);
+ int ne_test_gssp(int);
+ int ne_test_gnm(int);
+ int ne_test_gem(int);
+ int ne_test_gncm(int);
+ int ne_test_gecm(int);
+
+ int ne_test_plbpc(int);
+ int ne_test_pcmpc(int);
+
+ /* Unitialized local variables */
+ int ne_file_id;
+ char test_direc[256], file_name[256];
+ float version;
+
+ /* Initialized local variables */
+ int mode3 = EX_CLOBBER;
+ int mode4 = EX_CLOBBER|EX_NETCDF4|EX_NOCLASSIC;
+
+ char *yo="main";
+ int io_ws=0, cpu_ws=0, t_pass=0, t_fail=0;
+ int debug_flag=0;
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ /* Get the location of the temporary file to use for the test */
+ if (argc <= 1) {
+ /* Nothing specified. Use defaults. */
+ strcpy(file_name, "./ne_test.exoII");
+ }
+ else if (argc == 2) {
+ /* Test for the help flag */
+ if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "-?") == 0) {
+ /* Output the help line */
+ printf("Usage:\n\tne_test <optional directory> <optional file name>\n");
+ exit(0);
+ }
+ /* Test for the debug flag */
+ else if (strcmp(argv[1], "-d") == 0 || strcmp(argv[1], "-d") == 0) {
+ printf("****DEBUG MODE****\n");
+ ex_opts(EX_VERBOSE | EX_DEBUG);
+ strcpy(file_name, "./ne_test.exoII");
+ debug_flag = 1;
+ }
+ /* Else get the directory name and assign default name */
+ else {
+ strcpy(test_direc, argv[1]);
+ if (test_direc[strlen(test_direc)-1] != '/') {
+ strcpy(file_name, test_direc);
+ strcat(file_name, "/ne_test.exoII");
+ }
+ else {
+ strcpy(file_name, test_direc);
+ strcat(file_name, "ne_test.exoII");
+ }
+ }
+ }
+ else if (argc == 3) {
+ /* Both directory and file name specified */
+ strcpy(test_direc, argv[1]);
+ if (test_direc[strlen(test_direc)-1] == '/') {
+ strcpy(file_name, test_direc);
+ strcat(file_name, "/");
+ strcat(file_name, argv[2]);
+ }
+ else {
+ strcpy(file_name, test_direc);
+ strcat(file_name, argv[2]);
+ }
+ }
+
+/*---------------------------------------------------------------------------*/
+/* OUTPUT TEST SECTION */
+/*---------------------------------------------------------------------------*/
+
+ printf("*********************Output Tests***********************\n");
+
+ /* Create the ExodusII/Nemesis file */
+ printf("creating ExodusII file..."); fflush(stdout);
+
+ /* Attempt to create a netcdf4-format file; if it fails, then assume
+ that the netcdf library does not support that mode and fall back
+ to classic netcdf3 format. If that fails, issue an error and
+ die.
+ */
+ if ((ne_file_id=ex_create(file_name, mode4, &cpu_ws, &io_ws)) < 0) {
+ /* netcdf4 create failed, try netcdf3 */
+ if ((ne_file_id=ex_create(file_name, mode3, &cpu_ws, &io_ws)) < 0) {
+ printf("FAILED\n");
+ t_fail++;
+ fprintf(stderr, "[%s]: ERROR, unable to create test file \"%s\"!\n",
+ yo, file_name);
+ exit(-1);
+ } else {
+ printf(" (netcdf3 format) ");
+ }
+ } else {
+ printf(" (netcdf4 format) ");
+ }
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+
+ /* Test the output of initial information */
+ printf("testing init info output..."); fflush(stdout);
+ if (ne_test_piinf(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test the output of initial global information */
+ printf("testing global init info output..."); fflush(stdout);
+ if (ne_test_pinig(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test the output of the global element block IDs */
+ printf("testing global element block ID output..."); fflush(stdout);
+ if (ne_test_pelbid(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test the output of the global node-set info */
+ printf("testing global node-set params output..."); fflush(stdout);
+ if (ne_test_pnsp(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test the output of the global side-set info */
+ printf("testing global side-set params output..."); fflush(stdout);
+ if (ne_test_pssp(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test the output of the concatenated load-balance parameters */
+ printf("testing concatenated load balance info output...");
+ fflush(stdout);
+ if (ne_test_plbpc(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ }
+ else {
+ printf("succesful\n"); fflush(stdout);
+ }
+
+ /* Test the output of the node map */
+ printf("testing node map output..."); fflush(stdout);
+ if (ne_test_pnm(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test the output of the element map */
+ printf("testing element map output..."); fflush(stdout);
+ if (ne_test_pem(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test the output of the concatenated communication map params */
+ printf("testing concatenated communication map params output...");
+ fflush(stdout);
+ if (ne_test_pcmpc(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test nodal communication map output */
+ printf("testing nodal communication map output..."); fflush(stdout);
+ if (ne_test_pncm(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test elemental communication map output */
+ printf("testing elemental communication map output..."); fflush(stdout);
+ if (ne_test_pecm(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Close the ExodusII/Nemesis test file */
+ printf("closing ExodusII file..."); fflush(stdout);
+ if (ex_close(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ fprintf(stderr, "[%s]: ERROR, unable to close test file \"%s\"!\n",
+ yo, file_name);
+ exit(-1);
+ }
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+
+/*---------------------------------------------------------------------------*/
+/* INPUT TEST SECTION */
+/*---------------------------------------------------------------------------*/
+
+ printf("**********************Input Tests***********************\n");
+
+ /* Re-open the ExodusII/NemesisI file */
+ printf("reopening ExodusII file..."); fflush(stdout);
+ if (ex_open(file_name, EX_READ, &cpu_ws, &io_ws, &version) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of of the initial information */
+ printf("testing init info input..."); fflush(stdout);
+ if (ne_test_giinf(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of initial global information */
+ printf("testing global init info input..."); fflush(stdout);
+ if (ne_test_ginig(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of global element block IDs */
+ printf("testing global element block IDs input..."); fflush(stdout);
+ if (ne_test_gelbid(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of global node-set params */
+ printf("testing global node-set params input..."); fflush(stdout);
+ if (ne_test_gnsp(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of global side-set params */
+ printf("testing global side-set params input..."); fflush(stdout);
+ if (ne_test_gssp(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of load-balance params */
+ printf("testing load-balance params input..."); fflush(stdout);
+ if (ne_test_glbp(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of the node map */
+ printf("testing node map input..."); fflush(stdout);
+ if (ne_test_gnm(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of element map */
+ printf("testing element map input..."); fflush(stdout);
+ if (ne_test_gem(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of nodal communication maps */
+ printf("testing nodal communication map input..."); fflush(stdout);
+ if (ne_test_gncm(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Test read of elemental communication maps */
+ printf("testing elemental communication map input..."); fflush(stdout);
+ if (ne_test_gecm(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ if (debug_flag == 1)
+ return 1;
+ }
+ else {
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+ }
+
+ /* Close the ExodusII/Nemesis test file */
+ printf("closing ExodusII file..."); fflush(stdout);
+ if (ex_close(ne_file_id) < 0) {
+ printf("FAILED\n"); fflush(stdout);
+ t_fail++;
+ fprintf(stderr, "[%s]: ERROR, unable to close test file \"%s\"!\n",
+ yo, file_name);
+ exit(-1);
+ }
+ printf("successful\n"); fflush(stdout);
+ t_pass++;
+
+ /* Output a test summary */
+ printf("\n");
+ printf("Tests Passed: %d\n", t_pass);
+ printf("Tests Failed: %d\n", t_fail);
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_piinf(int fileid)
+{
+ char ftype[3];
+
+ strcpy(ftype, "s");
+
+ return (ne_put_init_info(fileid, NPROC, NPROCF, ftype));
+}
+
+/*****************************************************************************/
+int ne_test_pinig(int fileid)
+{
+
+ int nng=NNG, neg=NEG, nebg=NEBG, nnsg=NNSG, nssg=NSSG;
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ return (ne_put_init_global(fileid, nng, neg, nebg, nnsg, nssg));
+}
+
+/*****************************************************************************/
+int ne_test_pelbid(int fileid)
+{
+ int i, elblk_ids[NEBG], elblk_cnt[NEBG];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(i=0; i < NEBG; i++) {
+ elblk_ids[i]=(i+1);
+ elblk_cnt[i]=NEBCG;
+ }
+
+ return (ne_put_eb_info_global(fileid, elblk_ids, elblk_cnt));
+}
+
+/*****************************************************************************/
+int ne_test_pnsp(int fileid)
+{
+ int i, global_ids[NNSG], global_n_cnts[NNSG], global_df_cnts[NNSG];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(i=0; i < NNSG; i++) {
+ global_ids[i]=2*(i+1);
+ global_n_cnts[i]=3*(i+1);
+ global_df_cnts[i]=1;
+ }
+
+ return (ne_put_ns_param_global(fileid, global_ids, global_n_cnts,
+ global_df_cnts));
+}
+
+/*****************************************************************************/
+int ne_test_pssp(int fileid)
+{
+ int i, global_ids[NSSG], global_el_cnts[NSSG], global_df_cnts[NSSG];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(i=0; i < NSSG; i++) {
+ global_ids[i]=3*(i+1);
+ global_el_cnts[i]=2*(i+1);
+ global_df_cnts[i]=1;
+ }
+
+ return (ne_put_ss_param_global(fileid, global_ids, global_el_cnts,
+ global_df_cnts));
+}
+
+/*****************************************************************************/
+int ne_test_pnm(int fileid)
+{
+ int iproc, j, error, j1=0;
+ int node_mapi[NINTN], node_mapb[NBORN], node_mape[NEXTN];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+ for(j=0; j < NINTN; node_mapi[j++]=j1++);
+ for(j=0; j < NBORN; node_mapb[j++]=j1++);
+ for(j=0; j < NEXTN; node_mape[j++]=j1++);
+ j1 = 0;
+ error = ne_put_node_map(fileid, node_mapi, node_mapb, node_mape, iproc);
+ if (error < 0) return error;
+ }
+
+ return 0;
+
+}
+
+/*****************************************************************************/
+int ne_test_pem(int fileid)
+{
+ int iproc, j, error, j1=0;
+ int elem_mapi[NINTE], elem_mapb[NBORE];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+ for(j=0; j < NINTE; elem_mapi[j++]=j1++);
+ for(j=0; j < NBORE; elem_mapb[j++]=j1++);
+ j1 = 0;
+ error = ne_put_elem_map(fileid, elem_mapi, elem_mapb, iproc);
+ if (error < 0) return error;
+ }
+
+ return 0;
+
+}
+
+/*****************************************************************************/
+int ne_test_pcmp(int fileid)
+{
+ int i, iproc, error;
+ int node_map_ids[NNCMAP], node_map_node_cnts[NNCMAP];
+ int elem_map_ids[NECMAP], elem_map_elem_cnts[NECMAP];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+ for(i=0; i < NNCMAP; i++) {
+ node_map_ids[i]=(i+1);
+ node_map_node_cnts[i]=NCNTCM;
+ }
+
+ for(i=0; i < NECMAP; i++) {
+ elem_map_ids[i]=2*(i+1);
+ elem_map_elem_cnts[i]=ECNTCM;
+ }
+
+ error = ne_put_cmap_params(fileid, node_map_node_cnts, node_map_ids,
+ elem_map_elem_cnts, elem_map_ids, iproc);
+ if (error < 0) return error;
+ }
+
+ return 0;
+
+}
+
+/*****************************************************************************/
+int ne_test_pncm(int fileid)
+{
+ int i, iproc, error;
+ int node_map_ids[NNCMAP], node_ids[NCNTCM], proc_ids[NCNTCM];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+ for(i=0; i < NNCMAP; i++) {
+ node_map_ids[i]=(i+1);
+ }
+ for(i=0; i < NCNTCM; i++) {
+ node_ids[i] = 2*(i+1);
+ proc_ids[i] = 3*(i+1);
+ }
+
+ for(i=0; i < NNCMAP; i++) {
+ error = ne_put_node_cmap(fileid, node_map_ids[i], node_ids,
+ proc_ids, iproc);
+ if (error < 0) return error;
+ }
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_pecm(int fileid)
+{
+ int i, iproc, error;
+ int elem_map_ids[NECMAP], elem_ids[ECNTCM], side_ids[ECNTCM];
+ int proc_ids[ECNTCM];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+ for(i=0; i < NECMAP; i++) {
+ elem_map_ids[i]=2*(i+1);
+ }
+ for(i=0; i < ECNTCM; i++) {
+ elem_ids[i] = 2*(i+1);
+ side_ids[i] = 3*(i+1);
+ proc_ids[i] = 4*(i+1);
+ }
+
+ for(i=0; i < NECMAP; i++) {
+ error = ne_put_elem_cmap(fileid, elem_map_ids[i], elem_ids,
+ side_ids, proc_ids, iproc);
+ if (error < 0) return error;
+ }
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_giinf(int fileid)
+{
+ int error, nproc, nprocf;
+ char ftype[2];
+
+/*-----------------------------Execution Begins-----------------------------*/
+ error = ne_get_init_info(fileid, &nproc, &nprocf, ftype);
+
+ if (error < 0) return error;
+
+ if (nproc != NPROC) return -1;
+ if (nprocf != NPROCF) return -1;
+ if (strcmp(ftype, "s") != 0) return -1;
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_ginig(int fileid)
+{
+
+ int error;
+ int num_nodes_g, num_elems_g, num_elem_blks_g, num_ns_g, num_ss_g;
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ error = ne_get_init_global(fileid, &num_nodes_g, &num_elems_g,
+ &num_elem_blks_g, &num_ns_g, &num_ss_g);
+
+ if (error < 0) return error;
+
+ if (num_nodes_g != NNG) return -1;
+ if (num_elems_g != NEG) return -1;
+ if (num_elem_blks_g != NEBG) return -1;
+ if (num_ns_g != NNSG) return -1;
+ if (num_ss_g != NSSG) return -1;
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_gelbid(int fileid)
+{
+
+ int i, error;
+ int el_blk_ids[NEBG], el_blk_cnt[NEBG];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ error = ne_get_eb_info_global(fileid, el_blk_ids, el_blk_cnt);
+
+ if (error < 0) return error;
+
+ for(i=0; i < NEBG; i++) {
+ if (el_blk_ids[i] != (i+1)) return -1;
+ if (el_blk_cnt[i] != NEBCG) return -1;
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_gnsp(int fileid)
+{
+
+ int i, error;
+ int global_ids[NNSG], global_n_cnts[NNSG], global_df_cnts[NNSG];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ error = ne_get_ns_param_global(fileid, global_ids, global_n_cnts,
+ global_df_cnts);
+
+ if (error < 0) return error;
+
+ for(i=0; i < NNSG; i++) {
+ if (global_ids[i] != 2*(i+1)) return -1;
+ if (global_n_cnts[i] != 3*(i+1)) return -1;
+ if (global_df_cnts[i] != 1 ) return -1;
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_gssp(int fileid)
+{
+
+ int i, error;
+ int global_ids[NSSG], global_e_cnts[NSSG], global_df_cnts[NSSG];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ error = ne_get_ss_param_global(fileid, global_ids, global_e_cnts,
+ global_df_cnts);
+
+ if (error < 0) return error;
+
+ for(i=0; i < NSSG; i++) {
+ if (global_ids[i] != 3*(i+1)) return -1;
+ if (global_e_cnts[i] != 2*(i+1)) return -1;
+ if (global_df_cnts[i] != 1 ) return -1;
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_glbp(int fileid)
+{
+
+ int iproc, error;
+ int nintn, nborn, nextn, ninte, nbore, nncmap, necmap;
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+ error = ne_get_loadbal_param(fileid, &nintn, &nborn, &nextn, &ninte,
+ &nbore, &nncmap, &necmap, iproc);
+
+ if (error < 0) return error;
+
+ if (nintn != NINTN ) return -1;
+ if (nborn != NBORN ) return -1;
+ if (nextn != NEXTN ) return -1;
+ if (ninte != NINTE ) return -1;
+ if (nbore != NBORE ) return -1;
+ if (nncmap != NNCMAP) return -1;
+ if (necmap != NECMAP) return -1;
+
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_gnm(int fileid)
+{
+ int iproc, j, error, j1=0;
+ int node_mapi[NINTN], node_mapb[NBORN], node_mape[NEXTN];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+ error = ne_get_node_map(fileid, node_mapi, node_mapb, node_mape, iproc);
+
+ if (error < 0) return error;
+
+ for(j=0; j < NINTN; j++) {
+ if (node_mapi[j] != j1++) return -1;
+ }
+ for(j=0; j < NBORN; j++) {
+ if (node_mapb[j] != j1++) return -1;
+ }
+ for(j=0; j < NEXTN; j++) {
+ if (node_mape[j] != j1++) return -1;
+ }
+
+ j1 = 0;
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_gem(int fileid)
+{
+ int iproc, j, error, j1=0;
+ int elem_mapi[NINTE], elem_mapb[NBORE];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+
+ error = ne_get_elem_map(fileid, elem_mapi, elem_mapb, iproc);
+
+ if (error < 0) return error;
+
+ for(j=0; j < NINTE; j++) {
+ if (elem_mapi[j] != j1++) return -1;
+ }
+ for(j=0; j < NBORE; j++) {
+ if (elem_mapb[j] != j1++) return -1;
+ }
+ j1 = 0;
+ }
+
+ return 0;
+
+}
+
+/*****************************************************************************/
+int ne_test_gncm(int fileid)
+{
+ int i, j, iproc, error;
+ int node_map_ids[NNCMAP], node_map_cnts[NNCMAP];
+ int node_ids[NCNTCM], proc_ids[NCNTCM];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+
+ error = ne_get_cmap_params(fileid, node_map_ids, node_map_cnts,
+ NULL, NULL, iproc);
+
+ if (error < 0) return error;
+
+ for(i=0; i < NNCMAP; i++) {
+ error = ne_get_node_cmap(fileid, node_map_ids[i], node_ids,
+ proc_ids, iproc);
+
+ if (error < 0) return error;
+
+ for(j=0; j < NCNTCM; j++) {
+ if (node_ids[j] != 2*(j+1)) return -1;
+ if (proc_ids[j] != 3*(j+1)) return -1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_gecm(int fileid)
+{
+ int i, j, iproc, error;
+ int elem_ids[ECNTCM], elem_map_cnts[NECMAP], proc_ids[ECNTCM];
+ int side_ids[ECNTCM], elem_map_ids[NECMAP];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ for(iproc=0; iproc < NPROCF; iproc++) {
+
+ error = ne_get_cmap_params(fileid, NULL, NULL,
+ elem_map_ids, elem_map_cnts, iproc);
+
+ if (error < 0) return error;
+
+ for(i=0; i < NECMAP; i++) {
+ error = ne_get_elem_cmap(fileid, elem_map_ids[i], elem_ids,
+ side_ids, proc_ids, iproc);
+
+ if (error < 0) return error;
+
+ for(j=0; j < ECNTCM; j++) {
+ if (elem_ids[j] != 2*(j+1)) return -1;
+ if (side_ids[j] != 3*(j+1)) return -1;
+ if (proc_ids[j] != 4*(j+1)) return -1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/*****************************************************************************/
+int ne_test_plbpc(int fileid)
+{
+ int iproc;
+
+ int num_int_nodes[NPROCF], num_bor_nodes[NPROCF], num_ext_nodes[NPROCF];
+ int num_int_elems[NPROCF], num_bor_elems[NPROCF];
+ int num_node_cmaps[NPROCF], num_elem_cmaps[NPROCF];
+
+/*-----------------------------Execution Begins-----------------------------*/
+
+ /* Set up the vectors */
+ for(iproc=0; iproc < NPROCF; iproc++) {
+ num_int_nodes[iproc] = NINTN;
+ num_bor_nodes[iproc] = NBORN;
+ num_ext_nodes[iproc] = NEXTN;
+
+ num_int_elems[iproc] = NINTE;
+ num_bor_elems[iproc] = NBORE;
+
+ num_node_cmaps[iproc] = NNCMAP;
+ num_elem_cmaps[iproc] = NECMAP;
+ }
+
+ return (ne_put_loadbal_param_cc(fileid, num_int_nodes, num_bor_nodes,
+ num_ext_nodes, num_int_elems,
+ num_bor_elems, num_node_cmaps,
+ num_elem_cmaps));
+
+}
+
+/*****************************************************************************/
+int ne_test_pcmpc(int fileid)
+{
+ int iproc, j, n_cntr, e_cntr;
+
+ int nmap_ids[NNCMAP*NPROCF], nmap_n_cnts[NNCMAP*NPROCF];
+ int nmap_proc_ptr[NPROCF+1];
+ int emap_ids[NECMAP*NPROCF], emap_e_cnts[NECMAP*NPROCF];
+ int emap_proc_ptr[NPROCF+1];
+/*-----------------------------Execution Begins-----------------------------*/
+
+ nmap_proc_ptr[0] = 0;
+ emap_proc_ptr[0] = 0;
+ n_cntr = 0;
+ e_cntr = 0;
+ for(iproc=0; iproc < NPROCF; iproc++) {
+
+ for(j=0; j < NNCMAP; j++) {
+ nmap_ids[n_cntr] = (j+1);
+ nmap_n_cnts[n_cntr++] = NCNTCM;
+ }
+
+ for(j=0; j < NECMAP; j++) {
+ emap_ids[e_cntr] = 2*(j+1);
+ emap_e_cnts[e_cntr++] = ECNTCM;
+ }
+
+ nmap_proc_ptr[iproc+1] = nmap_proc_ptr[iproc] + NNCMAP;
+ emap_proc_ptr[iproc+1] = emap_proc_ptr[iproc] + NECMAP;
+ }
+
+
+ return (ne_put_cmap_params_cc(fileid, nmap_ids, nmap_n_cnts, nmap_proc_ptr,
+ emap_ids, emap_e_cnts, emap_proc_ptr));
+}
diff --git a/nemesis/ne_util.c b/nemesis/ne_util.c
new file mode 100644
index 0000000..b028e1e
--- /dev/null
+++ b/nemesis/ne_util.c
@@ -0,0 +1,539 @@
+/*
+ * Copyright (c) 1998 Sandia Corporation. Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
+ * 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 Sandia Corporation 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.
+ *
+ */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Function(s) contained in this file:
+ *
+ * ne_leavedef()
+ * ne_catstr2()
+ * ne_id_lkup()
+ * ne_get_file_type()
+ * ne_put_version()
+ * ne_check_file_version()
+ * ne_get_idx()
+ *
+ *****************************************************************************
+ * Much of this code is a modified version of what is found in NemesisI.
+ */
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#include <string.h>
+#include <math.h>
+
+#include <netcdf.h>
+#include <exodusII.h>
+#include <exodusII_int.h>
+
+#include "ne_nemesisI_int.h"
+#include "ne_nemesisI.h"
+
+/* Global variables */
+char *ne_ret_string;
+
+int ne_leavedef(int neid,
+ char *call_rout
+ )
+{
+ char errmsg[MAX_ERR_LENGTH];
+ int status;
+
+ if ((status = nc_enddef(neid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to end define mode for file id %d",
+ neid);
+ ex_err(call_rout, errmsg, exerrval);
+
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+char *ne_catstr2(char *name,
+ int num1,
+ int num2
+ )
+{
+ char *func_name="ne_catstr2";
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ if (ne_ret_string == NULL) {
+ ne_ret_string = (char *)malloc((NC_MAX_NAME+1)*sizeof(char));
+ if (ne_ret_string == NULL) {
+ exerrval = EX_MSG;
+ sprintf(errmsg, "Error: Insufficient memory!\n");
+ ex_err(func_name, errmsg, exerrval);
+ return NULL;
+ }
+ }
+
+ if (strlen(name) > NC_MAX_NAME) {
+ exerrval = EX_MSG;
+ sprintf(errmsg, "Error: name too long!");
+ ex_err(func_name, errmsg, exerrval);
+
+ return (NULL);
+ }
+
+ sprintf(ne_ret_string, "%s%d-%d", name, num1, num2);
+
+ return ne_ret_string;
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* Note: This function assumes a 1-d vector of data for "ne_var_name".
+ */
+/*****************************************************************************/
+int ne_id_lkup(int neid, char *ne_var_name, int64_t *idx, int ne_var_id)
+{
+ char *func_name="ne_id_lkup";
+
+ int status;
+ int varid, ndims, dimid[1], ret=-1;
+ nc_type var_type;
+ size_t index, length, start[1];
+ size_t begin, end;
+ int id_val;
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ if ((status = nc_inq_varid(neid, ne_var_name, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" in file ID %d",
+ ne_var_name, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* check if I need the length for this varible */
+ if (idx[1] == -1) {
+ /* Get the dimension IDs for this variable */
+ if ((status = nc_inq_var(neid, varid, (char *) 0, &var_type, &ndims,
+ dimid, (int *) 0)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension ID for variable \"%s\" in file ID %d",
+ ne_var_name, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return -1;
+ }
+
+ /* Get the length of this variable */
+ if ((status = nc_inq_dimlen(neid, dimid[0], &length)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find dimension for variable \"%s\" in file ID %d",
+ ne_var_name, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return -1;
+ }
+
+ idx[1] = length;
+ } /* End "if (idx[1] == -1)" */
+
+ begin = idx[0];
+ end = idx[1];
+
+ /* Find the index by looping over each entry */
+ for(index=begin; index < end; index++) {
+ start[0] = index;
+ if ((status = nc_get_var1_int(neid, varid, start, &id_val)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable \"%s\" in file ID %d",
+ ne_var_name, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return -1;
+ }
+
+ if (id_val == ne_var_id) {
+ ret = (int) index;
+ break;
+ }
+ }
+
+ return ret;
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* This function retrieves the file type from a Nemesis file.
+ */
+/*****************************************************************************/
+int ne_get_file_type(int neid,
+ char *ftype
+ )
+{
+ char *func_name="ne_get_file_type";
+
+ int status;
+ int varid;
+ int lftype;
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ if ((status = nc_inq_varid(neid, VAR_FILE_TYPE, &varid)) != NC_NOERR) {
+
+ /* If no file type is found, assume parallel */
+ ftype[0] = 'p';
+ ftype[1] = '\0';
+
+ return (EX_NOERR);
+ }
+
+ if ((status = nc_get_var1_int(neid, varid, NULL, &lftype)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get variable \"%s\" from file ID %d",
+ VAR_FILE_TYPE, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Set the appropriate character */
+ if (lftype == 0) strcpy(ftype, "p");
+ else if (lftype == 1) strcpy(ftype, "s");
+
+ return (EX_NOERR);
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* This function outputs the Nemesis version information to the file.
+ */
+/*****************************************************************************/
+int ne_put_version(int neid)
+{
+ char *func_name="ne_put_version";
+ int status;
+ float file_ver, api_ver;
+
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear the error code */
+
+ file_ver = NEMESIS_FILE_VERSION;
+ api_ver = NEMESIS_API_VERSION;
+
+ /* Check to see if the nemesis file version is already in the file */
+ if (nc_get_att_float(neid, NC_GLOBAL, "nemesis_file_version", &file_ver) != NC_NOERR) {
+
+ /* Output the Nemesis file version */
+ if ((status = nc_put_att_float(neid, NC_GLOBAL, "nemesis_file_version", NC_FLOAT,
+ 1, &file_ver)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output nemesis file version in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ /* Output the Nemesis API version */
+ if ((status = nc_put_att_float(neid, NC_GLOBAL, "nemesis_api_version", NC_FLOAT,
+ 1, &api_ver)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to output nemesis api version in file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ }
+ return (EX_NOERR);
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* This function checks that the version info is correct.
+ */
+/*****************************************************************************/
+int ne_check_file_version(int neid)
+{
+ char *func_name="ne_check_file_version";
+
+ float file_ver;
+
+ int status;
+ char errmsg[MAX_ERR_LENGTH];
+
+ exerrval = 0; /* clear error code */
+
+ /* Get the file version */
+ if ((status = nc_get_att_float(neid, NC_GLOBAL, "nemesis_file_version", &file_ver)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get the nemesis file version from file ID %d",
+ neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if (fabs(NEMESIS_FILE_VERSION-file_ver) > 0.001) {
+ exerrval = EX_MSG;
+ sprintf(errmsg,
+ "Error: Nemesis version mismatch in file ID %d!\n", neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
+
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/* This function gets the index for the given variable at the
+ * position given.
+ */
+/*****************************************************************************/
+int ne_get_idx(int neid, char *ne_var_name, int64_t *index, int pos)
+{
+ char *func_name="ne_get_idx";
+
+ int status;
+ int varid;
+ size_t start[1], count[1];
+ long long varidx[2];
+ char errmsg[MAX_ERR_LENGTH];
+/*-----------------------------Execution begins-----------------------------*/
+
+ exerrval = 0; /* clear error code */
+
+ /* set default values for idx */
+ index[0] = 0;
+ index[1] = -1;
+
+ /*
+ * assume that if there is an error returned, that this
+ * means that this is a parallel file, and the index does
+ * not exists. This is not an error
+ */
+ if ((status = nc_inq_varid(neid, ne_var_name, &varid)) == NC_NOERR) {
+ /* check if we are at the beginning of the index vector */
+ if (pos == 0) {
+ start[0] = pos;
+ count[0] = 1;
+ } else {
+ start[0] = pos - 1;
+ count[0] = 2;
+ }
+
+ status = nc_get_vara_longlong(neid, varid, start, count, varidx);
+ if (status != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable \"%s\" in file ID %d",
+ ne_var_name, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return -1;
+ }
+
+ if (pos == 0) {
+ index[0] = 0;
+ index[1] = varidx[0];
+ } else {
+ index[0] = varidx[0];
+ index[1] = varidx[1];
+ }
+ }
+
+ return 1;
+}
+
+int ne_get_proc_count(int neid)
+{
+ int status;
+ int dimid;
+ size_t ltemp;
+ int proc_count = -1;
+
+ if ((status = nc_inq_dimid(neid, DIM_NUM_PROCS, &dimid)) != NC_NOERR) {
+ return (-1);
+ }
+
+ /* Get the value of the number of processors */
+ if ((status = nc_inq_dimlen(neid, dimid, <emp)) != NC_NOERR) {
+ return (-1);
+ }
+ proc_count = ltemp;
+ return proc_count;
+}
+
+struct ne_stat_struct {
+ int neid;
+ int *stats;
+ size_t num;
+} ne_stat_struct;
+
+static struct ne_stat_struct *nem_int_e_maps = 0;
+static struct ne_stat_struct *nem_bor_e_maps = 0;
+static struct ne_stat_struct *nem_int_n_maps = 0;
+static struct ne_stat_struct *nem_bor_n_maps = 0;
+static struct ne_stat_struct *nem_ext_n_maps = 0;
+
+int ne_fill_map_status(int neid,
+ char *stat_var,
+ int *stat_array)
+{
+ int status;
+ int varid;
+ char errmsg[MAX_ERR_LENGTH];
+ char *func_name = "ne_fill_map_status(internal function)";
+
+ /* Now query the map status and fill the array. */
+ if ((status = nc_inq_varid(neid, stat_var, &varid)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to find variable ID for \"%s\" from file ID %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+
+ if ((status = nc_get_var_int(neid, varid, stat_array)) != NC_NOERR) {
+ exerrval = status;
+ sprintf(errmsg,
+ "Error: failed to get status for \"%s\" from file %d",
+ VAR_INT_N_STAT, neid);
+ ex_err(func_name, errmsg, exerrval);
+ return (EX_FATAL);
+ }
+ return (EX_NOERR);
+}
+
+int ne_get_map_status(int neid,
+ char *stat_var,
+ int proc_id,
+ int *stat)
+{
+ int num_procs = 0;
+
+ struct ne_stat_struct *maps = 0;
+ if (strcmp(stat_var, VAR_INT_N_STAT ) == 0) {
+ if (nem_int_n_maps == 0) {
+ nem_int_n_maps = malloc(sizeof(ne_stat_struct));
+ num_procs = ne_get_proc_count(neid);
+ nem_int_n_maps->stats = malloc(sizeof(int) * num_procs);
+
+ ne_fill_map_status(neid, stat_var, nem_int_n_maps->stats);
+ }
+ maps = nem_int_n_maps;
+ maps->neid = neid;
+ maps->num = num_procs;
+ }
+ else if (strcmp(stat_var, VAR_BOR_N_STAT ) == 0) {
+ if (nem_bor_n_maps == 0) {
+ nem_bor_n_maps = malloc(sizeof(ne_stat_struct));
+ num_procs = ne_get_proc_count(neid);
+ nem_bor_n_maps->stats = malloc(sizeof(int) * num_procs);
+
+ ne_fill_map_status(neid, stat_var, nem_bor_n_maps->stats);
+ }
+ maps = nem_bor_n_maps;
+ maps->neid = neid;
+ maps->num = num_procs;
+ }
+ else if (strcmp(stat_var, VAR_EXT_N_STAT ) == 0) {
+ if (nem_ext_n_maps == 0) {
+ nem_ext_n_maps = malloc(sizeof(ne_stat_struct));
+ num_procs = ne_get_proc_count(neid);
+ nem_ext_n_maps->stats = malloc(sizeof(int) * num_procs);
+
+ ne_fill_map_status(neid, stat_var, nem_ext_n_maps->stats);
+ }
+ maps = nem_ext_n_maps;
+ maps->neid = neid;
+ maps->num = num_procs;
+ }
+ else if (strcmp(stat_var, VAR_INT_E_STAT ) == 0) {
+ if (nem_int_e_maps == 0) {
+ nem_int_e_maps = malloc(sizeof(ne_stat_struct));
+ num_procs = ne_get_proc_count(neid);
+ nem_int_e_maps->stats = malloc(sizeof(int) * num_procs);
+
+ ne_fill_map_status(neid, stat_var, nem_int_e_maps->stats);
+ }
+ maps = nem_int_e_maps;
+ maps->neid = neid;
+ maps->num = num_procs;
+ }
+ else if (strcmp(stat_var, VAR_BOR_E_STAT ) == 0) {
+ if (nem_bor_e_maps == 0) {
+ nem_bor_e_maps = malloc(sizeof(ne_stat_struct));
+ num_procs = ne_get_proc_count(neid);
+ nem_bor_e_maps->stats = malloc(sizeof(int) * num_procs);
+
+ ne_fill_map_status(neid, stat_var, nem_bor_e_maps->stats);
+ }
+ maps = nem_bor_e_maps;
+ maps->neid = neid;
+ maps->num = num_procs;
+ }
+
+ exerrval = 0; /* clear error code */
+
+ if (maps != 0) {
+ *stat = maps->stats[proc_id];
+ return(EX_NOERR);
+ } else {
+ return(EX_FATAL);
+ }
+}
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/exodus.git
More information about the debian-science-commits
mailing list