[cig-commits] r16589 - in short/3D/PyLith/trunk: pylith/problems pylith/topology unittests/pytests/topology
brad at geodynamics.org
brad at geodynamics.org
Wed Apr 28 08:27:22 PDT 2010
Author: brad
Date: 2010-04-28 08:27:22 -0700 (Wed, 28 Apr 2010)
New Revision: 16589
Modified:
short/3D/PyLith/trunk/pylith/problems/Formulation.py
short/3D/PyLith/trunk/pylith/topology/Jacobian.py
short/3D/PyLith/trunk/unittests/pytests/topology/TestJacobian.py
Log:
Fixed use of MPI communicator in viewing Jacobian matrix.
Modified: short/3D/PyLith/trunk/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Formulation.py 2010-04-28 02:54:41 UTC (rev 16588)
+++ short/3D/PyLith/trunk/pylith/problems/Formulation.py 2010-04-28 15:27:22 UTC (rev 16589)
@@ -479,7 +479,9 @@
self._eventLogger.stagePop()
if self.viewJacobian:
- self.jacobianViewer.view(self.jacobian, t, self.mesh.comm())
+ from pylith.mpi.Communicator import Communicator
+ comm = Communicator(self.mesh.comm())
+ self.jacobianViewer.view(self.jacobian, t, comm)
self._debug.log(resourceUsageString())
return
Modified: short/3D/PyLith/trunk/pylith/topology/Jacobian.py
===================================================================
--- short/3D/PyLith/trunk/pylith/topology/Jacobian.py 2010-04-28 02:54:41 UTC (rev 16588)
+++ short/3D/PyLith/trunk/pylith/topology/Jacobian.py 2010-04-28 15:27:22 UTC (rev 16589)
@@ -39,6 +39,14 @@
return
+ def write(self, filename, comm):
+ """
+ Write Jacobian to binary file.
+ """
+ ModuleJacobian.write(self, filename, comm.handle)
+ return
+
+
def cleanup(self):
"""
Dellocate PETSC and local data structures.
Modified: short/3D/PyLith/trunk/unittests/pytests/topology/TestJacobian.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/topology/TestJacobian.py 2010-04-28 02:54:41 UTC (rev 16588)
+++ short/3D/PyLith/trunk/unittests/pytests/topology/TestJacobian.py 2010-04-28 15:27:22 UTC (rev 16589)
@@ -136,7 +136,7 @@
from pylith.mpi.Communicator import Communicator
comm = Communicator(self.mesh.comm())
- self.jacobian.write("jacobian.mat", comm.handle)
+ self.jacobian.write("jacobian.mat", comm)
# No testing of result.
return
More information about the CIG-COMMITS
mailing list