[MOAB-dev] r4003 - MOAB/trunk/src/parallel
smithrm at mcs.anl.gov
smithrm at mcs.anl.gov
Wed Jun 9 17:17:19 CDT 2010
Author: smithrm
Date: 2010-06-09 17:17:19 -0500 (Wed, 09 Jun 2010)
New Revision: 4003
Modified:
MOAB/trunk/src/parallel/ReadParallel.cpp
Log:
o Fix MOAB ticket #30 where geometric vertex sets were not being partitioned.
Specifically, after deleting non-local entities the sets that contained those
entities were not being removed from the partition.
Modified: MOAB/trunk/src/parallel/ReadParallel.cpp
===================================================================
--- MOAB/trunk/src/parallel/ReadParallel.cpp 2010-06-09 18:03:03 UTC (rev 4002)
+++ MOAB/trunk/src/parallel/ReadParallel.cpp 2010-06-09 22:17:19 UTC (rev 4003)
@@ -656,6 +656,18 @@
&all_sets);
RR("Failure gathering related entities.");
+ // Collect the empty sets from all_sets
+ Range orig_empty_sets;
+ for (Range::iterator rit = all_sets.begin();
+ rit != all_sets.end(); rit++) {
+ int num_ents;
+ result = mbImpl->get_number_entities_by_handle(*rit, num_ents);
+ RR("Failure getting number of entities.");
+
+ if (num_ents == 0)
+ orig_empty_sets.insert(*rit);
+ }
+
// get pre-existing entities
Range file_ents;
result = mbImpl->get_entities_by_handle(file_set, file_ents);
@@ -681,6 +693,20 @@
RR("Failure removing deletable entities.");
}
+ // Collect the empty sets from keepable_sets and add to deletable_sets
+ for (Range::iterator rit = keepable_sets.begin();
+ rit != keepable_sets.end(); rit++) {
+ int num_ents;
+ result = mbImpl->get_number_entities_by_handle(*rit, num_ents);
+ RR("Failure getting number of entities.");
+
+ if (num_ents == 0)
+ deletable_sets.insert(*rit);
+ }
+
+ // Subtract the original empty_sets from deletable_sets.
+ deletable_sets = subtract(deletable_sets, orig_empty_sets);
+
myDebug.tprint( 2, "Deleting deletable entities.\n" );
if (myPcomm->proc_config().proc_rank() == 0) {
More information about the moab-dev
mailing list