[MOAB-dev] r5167 - MOAB/trunk/tools/mbzoltan
hongjun at mcs.anl.gov
hongjun at mcs.anl.gov
Fri Sep 16 15:48:47 CDT 2011
Author: hongjun
Date: 2011-09-16 15:48:46 -0500 (Fri, 16 Sep 2011)
New Revision: 5167
Modified:
MOAB/trunk/tools/mbzoltan/MBZoltan.cpp
Log:
o geometry partition can partition surface too
o passes make check
Modified: MOAB/trunk/tools/mbzoltan/MBZoltan.cpp
===================================================================
--- MOAB/trunk/tools/mbzoltan/MBZoltan.cpp 2011-09-16 19:20:17 UTC (rev 5166)
+++ MOAB/trunk/tools/mbzoltan/MBZoltan.cpp 2011-09-16 20:48:46 UTC (rev 5167)
@@ -986,10 +986,8 @@
DLIList<RefEntity*> entity_list;
if (dim == 0) gti->ref_entity_list("vertex", entity_list, CUBIT_FALSE);
else if (dim == 1) gti->ref_entity_list("curve", entity_list, CUBIT_FALSE);
- else if (dim == 2) gti->ref_entity_list("surfface", entity_list, CUBIT_FALSE);
- else if (dim == 3) gti->ref_entity_list("body", entity_list, CUBIT_FALSE);
else {
- std::cerr << "Dimention should be from 0 to 3." << std::endl;
+ std::cerr << "Dimention should be from 0 to 1." << std::endl;
return MB_FAILURE;
}
@@ -999,7 +997,7 @@
for (i = 0; i < n_part; i++) loads[i] = 0.;
entity_list.reset();
- for (i = 0; i < n_entity; i++) {
+ for (i = 0; i < n_entity; i++) { // for all entities
RefEntity* entity = entity_list.get_and_step();
TopologyEntity *te = CAST_TO(entity, TopologyEntity);
@@ -1027,6 +1025,30 @@
}
}
}
+
+ if (part_surf) { // also get shared procs from parent surfaces
+ DLIList<RefFace*> parent_faces;
+ (dynamic_cast<TopologyEntity*> (entity))->ref_faces(parent_faces);
+ int n_pface = parent_faces.size();
+ parent_faces.reset();
+
+ // get shared processors from parent faces
+ for (j = 0 ; j < n_pface; j++) {
+ RefEntity *parent = parent_faces.get_and_step();
+ TDParallel *parent_td = (TDParallel *) parent->get_TD(&TDParallel::is_parallel);
+
+ if (parent_td != NULL) {
+ DLIList<int>* parent_procs = parent_td->get_shared_proc_list();
+ int n_shared = parent_procs->size();
+ parent_procs->reset();
+
+ for (k = 0; k < n_shared; k++) {
+ int p = parent_procs->get_and_step();
+ s_proc.insert(p);
+ }
+ }
More information about the moab-dev
mailing list