[cig-commits] r7671 - in short/3D/PyLith/trunk: . libsrc/materials libsrc/meshio

knepley at geodynamics.org knepley at geodynamics.org
Sun Jul 15 12:21:36 PDT 2007


Author: knepley
Date: 2007-07-15 12:21:35 -0700 (Sun, 15 Jul 2007)
New Revision: 7671

Modified:
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/libsrc/materials/Material.cc
   short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
Log:
Small changes to try and reduce memory thrashing


Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2007-07-14 08:50:56 UTC (rev 7670)
+++ short/3D/PyLith/trunk/TODO	2007-07-15 19:21:35 UTC (rev 7671)
@@ -18,6 +18,8 @@
 
   6. Better default PETSc settings. (pc_type=asm?)
 
+  7. Experiment with different preconditioners and tabulate results
+
 ======================================================================
 KNOWN DEFICIENCIES
 ======================================================================

Modified: short/3D/PyLith/trunk/libsrc/materials/Material.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/Material.cc	2007-07-14 08:50:56 UTC (rev 7670)
+++ short/3D/PyLith/trunk/libsrc/materials/Material.cc	2007-07-15 19:21:35 UTC (rev 7671)
@@ -161,8 +161,10 @@
       } // for
     } // for
     // Insert cell contribution into fields
-    for (int iParam=0; iParam < numParams; ++iParam)
-      mesh->update(paramSections[iParam], *cellIter, &cellData[iParam][0]);
+    for (int iParam=0; iParam < numParams; ++iParam) {
+      //mesh->update(paramSections[iParam], *cellIter, &cellData[iParam][0]);
+      paramSections[iParam]->updatePoint(*cellIter, &cellData[iParam][0]);
+    }
   } // for
 
   // Close database

Modified: short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc	2007-07-14 08:50:56 UTC (rev 7670)
+++ short/3D/PyLith/trunk/libsrc/meshio/MeshIO.cc	2007-07-15 19:21:35 UTC (rev 7671)
@@ -218,10 +218,10 @@
           << cells->size() << ").";
       throw std::runtime_error(msg.str());
     } // if
-  
+    const Mesh::label_sequence::iterator end = cells->end();
     int i = 0;
     for(Mesh::label_sequence::iterator e_iter = cells->begin();
-        e_iter != cells->end();
+        e_iter != end;
         ++e_iter)
       (*_mesh)->setValue(labelMaterials, *e_iter, materialIds[i++]);
   }



More information about the cig-commits mailing list