[cig-commits] r15022 - in short/3D/PyLith/trunk: . libsrc/faults pylith/meshio pylith/topology

brad at geodynamics.org brad at geodynamics.org
Tue May 19 18:00:48 PDT 2009


Author: brad
Date: 2009-05-19 18:00:47 -0700 (Tue, 19 May 2009)
New Revision: 15022

Modified:
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
   short/3D/PyLith/trunk/pylith/meshio/MeshIOObj.py
   short/3D/PyLith/trunk/pylith/topology/MeshImporter.py
Log:
Moved normalization of mesh to end of creation (after adjust topology, ditribution and refinement).

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2009-05-20 01:00:08 UTC (rev 15021)
+++ short/3D/PyLith/trunk/TODO	2009-05-20 01:00:47 UTC (rev 15022)
@@ -46,6 +46,8 @@
 
 2. Nondimensionalization
 
+  Move nondimensionalization of coordinates to after distribution.
+
   Add Quadrature::computeGeometry(coordinatesCell)
     Use #define PRECOMPUTE_GEOMETRY [TEST]
 

Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc	2009-05-20 01:00:08 UTC (rev 15021)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc	2009-05-20 01:00:47 UTC (rev 15022)
@@ -646,32 +646,6 @@
   } // for
   if (debug)
     coordinates->view("Coordinates with shadow vertices");
-
-#if 1
-  // Fix dimensioned coordinates (we use the same chart as the
-  // coordinates, so we only need to update the values).
-  // MATT: THIS CODE DOESN"T APPEAR TO WORK.
-  if (sieveMesh->hasRealSection("coordinates_dimensioned")) {
-    const ALE::Obj<topology::Mesh::RealSection>& coordinatesDim = 
-      sieveMesh->getRealSection("coordinates_dimensioned");
-    sieveMesh->reallocate(coordinatesDim);
-    assert(!coordinatesDim.isNull());
-
-    if (debug)
-      coordinatesDim->view("Dimensioned coordinates without shadow vertices");
-    for (SieveSubMesh::label_sequence::iterator v_iter = fVertices2Begin;
-	 v_iter != fVertices2EndNew;
-	 ++v_iter) {
-      coordinatesDim->updatePoint(vertexRenumber[*v_iter], 
-				  coordinatesDim->restrictPoint(*v_iter));
-      if (constraintCell)
-	coordinatesDim->updatePoint(vertexRenumber[*v_iter]+numFaultVertices,
-				    coordinatesDim->restrictPoint(*v_iter));
-    } // for
-    if (debug)
-      coordinatesDim->view("Dimensioned coordinates with shadow vertices");
-  } // if
-#endif
 } // create
 
 // ----------------------------------------------------------------------
@@ -819,41 +793,6 @@
   }
   //faultSieveMesh->view("Parallel fault mesh");
 
-#if 0
-  // Update dimensioned coordinates (reuse chart used by coordinates
-  // section).
-  // MATT: NEED TO ADD REUSE OF CHART. THIS CODE DOESN"T APPEAR TO WORK.
-  if (sieveMesh->hasRealSection("coordinates_dimensioned")) {
-    const ALE::Obj<topology::Mesh::RealSection>& coordinatesDim =
-      sieveMesh->getRealSection("coordinates_dimensioned");
-    assert(!coordinatesDim.isNull());
-    const ALE::Obj<topology::Mesh::RealSection>& fCoordinatesDim =
-      faultSieveMesh->getRealSection("coordinates_dimensioned");
-    assert(!fCoordinatesDim.isNull());
-
-    fCoordinatesDim->setChart(topology::Mesh::RealSection::chart_type(faultSieveMesh->heightStratum(0)->size(),
-                                                             faultSieveMesh->getSieve()->getChart().max()));
-    for (SieveMesh::label_sequence::iterator v_iter = vBegin;
-	 v_iter != vEnd;
-	 ++v_iter) {
-      if (fRenumbering.find(*v_iter) == fRenumberingEnd)
-	continue;
-      fCoordinatesDim->setFiberDimension(fRenumbering[*v_iter],
-					 coordinatesDim->getFiberDimension(*v_iter));
-  } // for
-    fCoordinatesDim->allocatePoint();
-    for(SieveMesh::label_sequence::iterator v_iter = vBegin;
-	v_iter != vEnd;
-	++v_iter) {
-      if (fRenumbering.find(*v_iter) == fRenumberingEnd)
-	continue;
-      fCoordinatesDim->updatePoint(fRenumbering[*v_iter], 
-				   coordinatesDim->restrictPoint(*v_iter));
-    } // for
-  } // if
-#endif
-  //faultSieveMesh->view("Parallel fault mesh");
-
   // Create the parallel overlap
   //   Can I figure this out in a nicer way?
   ALE::Obj<SieveSubMesh::send_overlap_type> sendParallelMeshOverlap =

Modified: short/3D/PyLith/trunk/pylith/meshio/MeshIOObj.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/MeshIOObj.py	2009-05-20 01:00:08 UTC (rev 15021)
+++ short/3D/PyLith/trunk/pylith/meshio/MeshIOObj.py	2009-05-20 01:00:47 UTC (rev 15022)
@@ -61,8 +61,6 @@
 
     # Read mesh
     ModuleMeshIO.read(self, mesh)
-
-    mesh.nondimensionalize(normalizer)
     return mesh
 
 

Modified: short/3D/PyLith/trunk/pylith/topology/MeshImporter.py
===================================================================
--- short/3D/PyLith/trunk/pylith/topology/MeshImporter.py	2009-05-20 01:00:08 UTC (rev 15021)
+++ short/3D/PyLith/trunk/pylith/topology/MeshImporter.py	2009-05-20 01:00:47 UTC (rev 15022)
@@ -102,6 +102,9 @@
     # refine mesh (if necessary)
     mesh = self.refiner.refine(mesh)
 
+    # Nondimensionalize mesh (coordinates of vertices).
+    mesh.nondimensionalize(normalizer)
+
     self._logger.eventEnd(logEvent)    
     return mesh
 



More information about the CIG-COMMITS mailing list