[cig-commits] r19478 - short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology

brad at geodynamics.org brad at geodynamics.org
Wed Jan 25 15:07:40 PST 2012


Author: brad
Date: 2012-01-25 15:07:39 -0800 (Wed, 25 Jan 2012)
New Revision: 19478

Modified:
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/MeshRefiner.cc
Log:
Consolidate mesh infrastructure updating (stratify, overlap, sections, labels) in refinement for censored and uncensored cases.

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/MeshRefiner.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/MeshRefiner.cc	2012-01-25 22:12:27 UTC (rev 19477)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/topology/MeshRefiner.cc	2012-01-25 23:07:39 UTC (rev 19478)
@@ -51,11 +51,34 @@
 				      cellrefiner_type& refiner)
 { // refine
   assert(!mesh.isNull());
+
+  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+  //logger.setDebug(1);
+  logger.stagePush("RefinedMesh");
+
   if (mesh->hasLabel("censored depth")) {
     _refineCensored(newMesh, mesh, refiner);
   } else {
     _refine(newMesh, mesh, refiner);
   } // if/else
+
+  logger.stagePush("RefinedMeshStratification");
+  _stratify(newMesh);
+  logger.stagePop();
+
+  logger.stagePush("RefinedMeshOverlap");
+  _calcNewOverlap(newMesh, mesh, refiner);
+  logger.stagePop();
+
+  logger.stagePush("RefinedMeshIntSections");
+  _createIntSections(newMesh, mesh, refiner);
+  logger.stagePop();
+
+  logger.stagePush("RefinedMeshLabels");
+  _createLabels(newMesh, mesh, refiner);
+  logger.stagePop();
+
+  logger.stagePop(); // RefinedMesh
 } // refine
 
 // ----------------------------------------------------------------------
@@ -73,7 +96,6 @@
 
   ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
   //logger.setDebug(1);
-  logger.stagePush("RefinedMesh");
   logger.stagePush("RefinedMeshCreation");
 
   // Calculate order in old mesh.
@@ -195,27 +217,6 @@
   refiner.setCoordsNewVertices(newCoordinates, coordinates);
 
   logger.stagePop();
-  logger.stagePush("RefinedMeshStratification");
-
-  _stratify(newMesh);
-
-  logger.stagePop();
-  logger.stagePush("RefinedMeshOverlap");
-
-  _calcNewOverlap(newMesh, mesh, refiner);
-
-  logger.stagePop();
-  logger.stagePush("RefinedMeshIntSections");
-
-  _createIntSections(newMesh, mesh, refiner);
-
-  logger.stagePop();
-  logger.stagePush("RefinedMeshLabels");
-
-  _createLabels(newMesh, mesh, refiner);
-
-  logger.stagePop();
-  logger.stagePop(); // Mesh
 } // _refine
   
 // ----------------------------------------------------------------------
@@ -432,11 +433,6 @@
 
   refiner.setCoordsNewVertices(newCoordinates, coordinates);
 
-  _stratify(newMesh);
-  _calcNewOverlap(newMesh, mesh, refiner);
-  _createIntSections(newMesh, mesh, refiner);
-  _createLabels(newMesh, mesh, refiner);
-
   // Create sensored depth
   const ALE::Obj<SieveFlexMesh::label_type>& censoredLabel = newMesh->createLabel("censored depth");
   assert(!censoredLabel.isNull());



More information about the CIG-COMMITS mailing list