[cgma-dev] r5136 - cgm/trunk/geom/parallel

hongjun at mcs.anl.gov hongjun at mcs.anl.gov
Tue Aug 30 12:52:24 CDT 2011


Author: hongjun
Date: 2011-08-30 12:52:24 -0500 (Tue, 30 Aug 2011)
New Revision: 5136

Modified:
   cgm/trunk/geom/parallel/CGMReadParallel.cpp
Log:
o Bug fixed for all geometry distribution methods with delete
o Unnessassary parts are deleted
o Passes make check


Modified: cgm/trunk/geom/parallel/CGMReadParallel.cpp
===================================================================
--- cgm/trunk/geom/parallel/CGMReadParallel.cpp	2011-08-30 17:48:27 UTC (rev 5135)
+++ cgm/trunk/geom/parallel/CGMReadParallel.cpp	2011-08-30 17:52:24 UTC (rev 5136)
@@ -557,7 +557,7 @@
     }
 
     if (td_par->get_charge_proc() != m_rank) { // candidate to be deleted
-      // check child surfaces
+      // check child surfaces if surface partitioned
       DLIList<RefFace*> face_list;
       (dynamic_cast<TopologyEntity*> (entity))->ref_faces(face_list);
       bool b_partitioned_surf = false;
@@ -566,14 +566,17 @@
       for (int j = 0; j < n_face; j++) {
         RefEntity* face = face_list.get_and_step();
         TDParallel *td_par_face = (TDParallel *) face->get_TD(&TDParallel::is_parallel);
-        if (td_par_face != NULL) {
-          DLIList<int>* shared_procs = td_par_face->get_shared_proc_list();
-          int n_shared = shared_procs->size();
-          shared_procs->reset();
-          for (int k = 0; k < n_shared; k++) {
-            if (shared_procs->get_and_step() == m_rank) {
-              b_partitioned_surf = true;
-              break;
+        if (td_par_face != NULL) { // if surface is partitioned
+          TopologyEntity *te = CAST_TO(face, TopologyEntity);
+          if (te->bridge_manager()->number_of_bridges() < 2) { // if surface is not merged
+            DLIList<int>* shared_procs = td_par_face->get_shared_proc_list();
+            int n_shared = shared_procs->size();
+            shared_procs->reset();
+            for (int k = 0; k < n_shared; k++) {
+              if (shared_procs->get_and_step() == m_rank) {
+                b_partitioned_surf = true;
+                break;
+              }
             }
           }
         }
@@ -598,12 +601,10 @@
   }
 
   // delete bodies
-  if (m_rank != reader) {
-    nEntity = delete_body_list.size();
-    delete_body_list.reset();
-    for (i = 0; i < nEntity; i++) {
-      GeometryQueryTool::instance()->delete_RefEntity(delete_body_list.get_and_step());
-    }
+  nEntity = delete_body_list.size();
+  delete_body_list.reset();


More information about the cgma-dev mailing list