[MOAB-dev] r4943 - in MOAB/trunk: MeshFiles/unittest/io src/io test/io
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Fri Jun 3 15:08:05 CDT 2011
Author: tautges
Date: 2011-06-03 15:08:04 -0500 (Fri, 03 Jun 2011)
New Revision: 4943
Added:
MOAB/trunk/MeshFiles/unittest/io/cam18x40x48.t2.nc
MOAB/trunk/test/io/read_nc.cpp
Modified:
MOAB/trunk/MeshFiles/unittest/io/Makefile.am
MOAB/trunk/src/io/ReadNC.cpp
MOAB/trunk/test/io/Makefile.am
Log:
Fixing a few bugs in the NC reader that were exposed by the new unit
test added here too.
mb_facet test still fails for me, but that was failing before.
Modified: MOAB/trunk/MeshFiles/unittest/io/Makefile.am
===================================================================
--- MOAB/trunk/MeshFiles/unittest/io/Makefile.am 2011-06-03 18:32:18 UTC (rev 4942)
+++ MOAB/trunk/MeshFiles/unittest/io/Makefile.am 2011-06-03 20:08:04 UTC (rev 4943)
@@ -1,6 +1,7 @@
EXTRA_DIST = brick_cubit10.1.cub \
brick_cubit10.2.cub \
brick_cubit10.cub \
+ cam18x40x48.t2.nc \
cubtest12.cub \
cubtest.jou \
dum.sat \
Added: MOAB/trunk/MeshFiles/unittest/io/cam18x40x48.t2.nc
===================================================================
(Binary files differ)
Property changes on: MOAB/trunk/MeshFiles/unittest/io/cam18x40x48.t2.nc
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp 2011-06-03 18:32:18 UTC (rev 4942)
+++ MOAB/trunk/src/io/ReadNC.cpp 2011-06-03 20:08:04 UTC (rev 4943)
@@ -375,6 +375,8 @@
if (tstep_nums.empty() && -1 != tMin) {
// no timesteps input, get them all
for (int i = tMin; i <= tMax; i++) tstep_nums.push_back(i);
+ }
+ if (!tstep_nums.empty()) {
for (unsigned int i = 0; i < vdatas.size(); i++) {
vdatas[i].varTags.resize(tstep_nums.size(), 0);
vdatas[i].varDatas.resize(tstep_nums.size());
@@ -398,7 +400,7 @@
// get the tag to read into
if (!vdatas[i].varTags[t]) {
- rval = get_tag(vdatas[i], t, vdatas[i].varTags[t]);
+ rval = get_tag(vdatas[i], tstep_nums[t], vdatas[i].varTags[t]);
ERRORR(rval, "Trouble getting tag.");
}
@@ -523,7 +525,7 @@
for (unsigned int i = 0; i < vdatas.size(); i++) {
for (unsigned int t = 0; t < tstep_nums.size(); t++) {
dbgOut.tprintf(2, "Converting variable %s, time step %d\n", vdatas[i].varName.c_str(), tstep_nums[t]);
- ErrorCode tmp_rval = convert_variable(file_set, vdatas[i], tstep_nums[t]);
+ ErrorCode tmp_rval = convert_variable(file_set, vdatas[i], t);
More information about the moab-dev
mailing list