[MOAB-dev] r4749 - MOAB/trunk/src/io
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Mon Apr 18 19:58:25 CDT 2011
Author: tautges
Date: 2011-04-18 19:58:25 -0500 (Mon, 18 Apr 2011)
New Revision: 4749
Modified:
MOAB/trunk/src/io/ReadNC.cpp
MOAB/trunk/src/io/ReadNC.hpp
Log:
Add 2d partitioning method; experimental for now, so 1d partition is used
by default.
Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp 2011-04-18 17:22:13 UTC (rev 4748)
+++ MOAB/trunk/src/io/ReadNC.cpp 2011-04-19 00:58:25 UTC (rev 4749)
@@ -355,13 +355,12 @@
return MB_SUCCESS;
}
-ErrorCode ReadNC::read_variables(EntityHandle file_set, std::vector<std::string> &var_names,
- std::vector<int> &tstep_nums, bool nomesh)
+ErrorCode ReadNC::read_variable_setup(std::vector<std::string> &var_names,
+ std::vector<int> &tstep_nums,
+ std::vector<VarData> &vdatas)
{
- std::vector<VarData> vdatas;
+
std::map<std::string,VarData>::iterator mit;
- ErrorCode rval = MB_SUCCESS;
-
if (var_names.empty()) {
for (mit = varInfo.begin(); mit != varInfo.end(); mit++) {
VarData vd = (*mit).second;
@@ -392,20 +391,143 @@
for (unsigned int i = 0; i < vdatas.size(); i++) {
vdatas[i].varTags.resize(tstep_nums.size(), 0);
vdatas[i].varDatas.resize(tstep_nums.size());
+ vdatas[i].readDims.resize(tstep_nums.size());
+ vdatas[i].readCounts.resize(tstep_nums.size());
}
}
- std::vector<int> requests(vdatas.size()*tstep_nums.size()), statuss(vdatas.size()*tstep_nums.size());
- int j = 0;
+ return MB_SUCCESS;
+}
+
+ErrorCode ReadNC::read_variable_allocate(std::vector<VarData> &vdatas,
+ std::vector<int> &tstep_nums,
+ Range &verts)
+{
+ ErrorCode rval = MB_SUCCESS;
+
for (unsigned int i = 0; i < vdatas.size(); i++) {
for (unsigned int t = 0; t < tstep_nums.size(); t++) {
dbgOut.tprintf(2, "Reading variable %s, time step %d\n", vdatas[i].varName.c_str(), tstep_nums[t]);
- ErrorCode tmp_rval = read_variable(file_set, vdatas[i], tstep_nums[t], &requests[j]);
- j++;
- if (MB_SUCCESS != tmp_rval) rval = tmp_rval;
+
+ // get the tag to read into
+ if (!vdatas[i].varTags[t]) {
More information about the moab-dev
mailing list