[cig-commits] r14712 - in short/3D/PyLith/branches/pylith-swig: . libsrc/problems

brad at geodynamics.org brad at geodynamics.org
Tue Apr 14 21:44:44 PDT 2009


Author: brad
Date: 2009-04-14 21:44:44 -0700 (Tue, 14 Apr 2009)
New Revision: 14712

Modified:
   short/3D/PyLith/branches/pylith-swig/TODO
   short/3D/PyLith/branches/pylith-swig/libsrc/problems/Formulation.cc
   short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverNonlinear.cc
Log:
Fixed Matt's errors, but Matt introduced other problems with the changes to Field. We don't need args to scatterVectorToSection() and scatterSectionToVector() if we set up the solve correctly. We need to differentiate between the solution displacement field and the field we solve for.

Modified: short/3D/PyLith/branches/pylith-swig/TODO
===================================================================
--- short/3D/PyLith/branches/pylith-swig/TODO	2009-04-15 02:08:39 UTC (rev 14711)
+++ short/3D/PyLith/branches/pylith-swig/TODO	2009-04-15 04:44:44 UTC (rev 14712)
@@ -21,6 +21,9 @@
 
   (6) Tidy up
 
+    Check use of label_sequence.
+    label_sequence - iterators are cached, so use sequence or cache begin/end to maintain access
+
     Cleanup logging. Constraints and Integrators should log at the C++
     level using the C++ EventLogger. Add finer grain logging at C++
     level as in ElasticityImplicit.

Modified: short/3D/PyLith/branches/pylith-swig/libsrc/problems/Formulation.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/problems/Formulation.cc	2009-04-15 02:08:39 UTC (rev 14711)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/problems/Formulation.cc	2009-04-15 04:44:44 UTC (rev 14712)
@@ -98,7 +98,10 @@
   // Need to pass these Vecs for updating
 
   // Update section view of field.
-  topology::Field<topology::Mesh>& solution = _fields->get("solution");
+  topology::Field<topology::Mesh>& solution = _fields->solution();
+  std::cout << "solutionVec: " << solutionVec
+	    << ", solution.vector: " << solution.vector()
+	    << std::endl;
   solution.scatterVectorToSection(solutionVec);
 
   // Set residual to zero.
@@ -153,7 +156,7 @@
 
   // Update section view of field.
   if (solutionVec != NULL) {
-    topology::Field<topology::Mesh>& solution = _fields->get("solution");
+    topology::Field<topology::Mesh>& solution = _fields->solution();
     solution.scatterVectorToSection(solutionVec);
   }
 

Modified: short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverNonlinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverNonlinear.cc	2009-04-15 02:08:39 UTC (rev 14711)
+++ short/3D/PyLith/branches/pylith-swig/libsrc/problems/SolverNonlinear.cc	2009-04-15 04:44:44 UTC (rev 14712)
@@ -98,7 +98,7 @@
   VecView(solutionVec, PETSC_VIEWER_STDOUT_WORLD);
 
   // Update section view of field.
-  solution->scatterVectorToSection(solutionVec);
+  solution->scatterVectorToSection();
 } // solve
 
 // ----------------------------------------------------------------------



More information about the CIG-COMMITS mailing list