[MOAB-dev] r2626 - MOAB/trunk
janehu at mcs.anl.gov
janehu at mcs.anl.gov
Tue Feb 3 13:33:44 CST 2009
Author: janehu
Date: 2009-02-03 13:33:44 -0600 (Tue, 03 Feb 2009)
New Revision: 2626
Modified:
MOAB/trunk/ReadNCDF.cpp
Log:
Time step must be greater than 1.
Modified: MOAB/trunk/ReadNCDF.cpp
===================================================================
--- MOAB/trunk/ReadNCDF.cpp 2009-02-03 18:41:10 UTC (rev 2625)
+++ MOAB/trunk/ReadNCDF.cpp 2009-02-03 19:33:44 UTC (rev 2626)
@@ -1922,7 +1922,7 @@
//where var_name show the tag name to be updated, this version just takes
//coord.
//time is the optional, and it gives time step of each of the mesh
- //info in exodus file.
+ //info in exodus file. It start from 1.
//op is the operation that is going to be performed on the var_name info.
//currently support 'sum'
//destination shows where to store the updated info, currently assume it is
@@ -1966,6 +1966,8 @@
time_step = pval;
if (pval != (long int)time_step)
return MB_TYPE_OUT_OF_RANGE;
+ if(time_step <= 0)
+ return MB_TYPE_OUT_OF_RANGE;
}
//2. check for the operations, currently support sum.
@@ -2052,7 +2054,7 @@
break;
}
- int offset = time_step * numberNodes_loading;
+ int offset = (time_step-1) * numberNodes_loading;
if(op == "sum")
{
More information about the moab-dev
mailing list