[MOAB-dev] r3937 - MOAB/trunk/src/io
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Fri May 21 14:02:38 CDT 2010
Author: tautges
Date: 2010-05-21 14:02:38 -0500 (Fri, 21 May 2010)
New Revision: 3937
Modified:
MOAB/trunk/src/io/ReadCCMIO.cpp
MOAB/trunk/src/io/ReadCCMIO.hpp
Log:
More fixes for CCMIO reader; now reads correctly, at least some files.
Modified: MOAB/trunk/src/io/ReadCCMIO.cpp
===================================================================
--- MOAB/trunk/src/io/ReadCCMIO.cpp 2010-05-21 14:26:45 UTC (rev 3936)
+++ MOAB/trunk/src/io/ReadCCMIO.cpp 2010-05-21 19:02:38 UTC (rev 3937)
@@ -148,7 +148,8 @@
int subset_list_length,
const Tag* file_id_tag)
{
- CCMIOID rootID, problemID, stateID, processorID;
+ CCMIOID rootID, problemID, stateID, processorID,
+ verticesID, topologyID, solutionID;
CCMIOError error = kCCMIONoErr;
CCMIOOpenFile(&error, file_name, kCCMIORead, &rootID);
@@ -159,11 +160,21 @@
CHKERR(rval,NULL);
// get processors
+ std::vector<CCMIOSize_t> procs;
+ bool has_solution = false;
+ rval = get_processors(stateID, processorID, verticesID, topologyID, solutionID,
+ procs, has_solution);
+ CHKERR(rval,NULL);
+
+ std::vector<CCMIOSize_t>::iterator vit;
Range new_ents, *new_ents_ptr = NULL;
if (file_set) new_ents_ptr = &new_ents;
- rval = read_mesh(stateID, problemID, processorID, new_ents_ptr);
- CHKERR(rval,NULL);
+ for (vit = procs.begin(); vit != procs.end(); vit++) {
+ rval = read_processor(stateID, problemID, processorID, verticesID, topologyID,
+ *vit, new_ents_ptr);
+ CHKERR(rval,NULL);
+ }
// load some meta-data
rval = load_metadata(rootID, problemID, file_set);
@@ -360,23 +371,91 @@
return MB_SUCCESS;
}
+ErrorCode ReadCCMIO::read_processor(CCMIOID stateID, CCMIOID problemID,
+ CCMIOID processorID, CCMIOID verticesID, CCMIOID topologyID,
+ CCMIOSize_t proc, Range *new_ents)
+{
+ ErrorCode rval;
+
+ // vert_map fields: s: none, i: gid, ul: vert handle, r: none
+ //TupleList vert_map(0, 1, 1, 0, 0);
+ TupleList vert_map;
More information about the moab-dev
mailing list