[MOAB-dev] r4548 - MOAB/trunk/src/io
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Tue Mar 8 10:37:37 CST 2011
Author: kraftche
Date: 2011-03-08 10:37:37 -0600 (Tue, 08 Mar 2011)
New Revision: 4548
Modified:
MOAB/trunk/src/io/WriteHDF5.cpp
Log:
Fix bug writing entity sets to HDF5 file.
The MOAB API is a little bit broken in that MESHSET_ORDERED and MESHSET_SET
are multually excusive and one or the other is always implied. That is,
MOAB has only two internal set types : "set" and "list". But the two different
flags allow for four different combinations. What happens internally
is that the choice of set type is made solely on whether or not
MESHSET_ORDERED is specified (specified implies "list", unspecified implies
"set".) The MESHSET_SET flag is ignored. Make HDF5 writer work the same
way (check for MESHSET_ORDERED and ingore MESHSET_SET.)
Modified: MOAB/trunk/src/io/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/WriteHDF5.cpp 2011-03-08 14:04:09 UTC (rev 4547)
+++ MOAB/trunk/src/io/WriteHDF5.cpp 2011-03-08 16:37:37 UTC (rev 4548)
@@ -1170,7 +1170,7 @@
unsigned char flags;
rval = writeUtil->get_entity_list_pointers( j, i, &ptr, which_data, &len, &flags );
if (MB_SUCCESS != rval) return rval;
- if (which_data == WriteUtilIface::CONTENTS && flags&MESHSET_SET) {
+ if (which_data == WriteUtilIface::CONTENTS && !(flags&MESHSET_ORDERED)) {
bool compacted;
remaining.clear();
rval = range_to_blocked_list( ptr, len/2, remaining, compacted );
@@ -2630,7 +2630,7 @@
CHK_MB_ERR_0(rval);
// check if can and should compress as ranges
- if ((flags&MESHSET_SET) && !(flags&MESHSET_ORDERED) && contents_length_set > 2)
+ if (!(flags&MESHSET_ORDERED) && contents_length_set > 2)
{
set_contents.clear();
rval = iFace->get_entities_by_handle( *iter, set_contents, false );
More information about the moab-dev
mailing list