[MOAB-dev] r4654 - in MOAB/trunk: src src/io src/moab test test/perf
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Fri Mar 25 14:46:14 CDT 2011
Author: kraftche
Date: 2011-03-25 14:46:13 -0500 (Fri, 25 Mar 2011)
New Revision: 4654
Modified:
MOAB/trunk/src/Core.cpp
MOAB/trunk/src/io/ReadNC.cpp
MOAB/trunk/src/moab/Core.hpp
MOAB/trunk/src/moab/Interface.hpp
MOAB/trunk/test/TagTest.cpp
MOAB/trunk/test/perf/perftool.cpp
Log:
change tag_iterate function
Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp 2011-03-25 19:40:47 UTC (rev 4653)
+++ MOAB/trunk/src/Core.cpp 2011-03-25 19:46:13 UTC (rev 4654)
@@ -2150,12 +2150,17 @@
}
ErrorCode Core::tag_iterate( Tag tag_handle,
- Range::iterator& iter,
- const Range::iterator& end,
+ Range::const_iterator iter,
+ Range::const_iterator end,
+ int& count,
void*& data_ptr )
{
+ Range::const_iterator init = iter;
assert(valid_tag_handle( tag_handle ));
- return tag_handle->tag_iterate( sequenceManager, iter, end, data_ptr );
+ ErrorCode result = tag_handle->tag_iterate( sequenceManager, iter, end, data_ptr );
+ if (MB_SUCCESS == result)
+ count = iter - init;
+ return result;
}
Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp 2011-03-25 19:40:47 UTC (rev 4653)
+++ MOAB/trunk/src/io/ReadNC.cpp 2011-03-25 19:46:13 UTC (rev 4654)
@@ -260,11 +260,12 @@
ERRORR(rval, "Couldn't add new vertices to file set.");
// get a ptr to global id memory
- Range::iterator viter = tmp_range.begin();
void *data;
- rval = mbImpl->tag_iterate(mGlobalIdTag, viter, tmp_range.end(), data);
+ int count;
+ rval = mbImpl->tag_iterate(mGlobalIdTag, tmp_range.begin(), tmp_range.end(), count, data);
if (MB_SUCCESS != rval) mbImpl->release_interface(scdi);
ERRORR(rval, "Failed to get tag iterator.");
+ assert((unsigned)count == tmp_range.size());
int *gid_data = (int*)data;
// set the vertex coordinates
@@ -466,11 +467,11 @@
verts.psize() == 1);
// get ptr to tag space
- Range::iterator viter = verts.begin();
void *data;
More information about the moab-dev
mailing list