[cig-commits] r13932 - in short/3D/PyLith/branches/pylith-swig: modulesrc/topology pylith/topology unittests/pytests/topology
brad at geodynamics.org
brad at geodynamics.org
Thu Jan 22 21:51:16 PST 2009
Author: brad
Date: 2009-01-22 21:51:16 -0800 (Thu, 22 Jan 2009)
New Revision: 13932
Modified:
short/3D/PyLith/branches/pylith-swig/modulesrc/topology/Makefile.am
short/3D/PyLith/branches/pylith-swig/modulesrc/topology/topology.i
short/3D/PyLith/branches/pylith-swig/pylith/topology/Mesh.py
short/3D/PyLith/branches/pylith-swig/unittests/pytests/topology/TestMesh.py
Log:
Fixed use of communicator.
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/topology/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/topology/Makefile.am 2009-01-23 05:10:09 UTC (rev 13931)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/topology/Makefile.am 2009-01-23 05:51:16 UTC (rev 13932)
@@ -19,7 +19,6 @@
swig_sources = \
topology.i \
- ../include/mpi.i \
Mesh.i
swig_generated = \
Modified: short/3D/PyLith/branches/pylith-swig/modulesrc/topology/topology.i
===================================================================
--- short/3D/PyLith/branches/pylith-swig/modulesrc/topology/topology.i 2009-01-23 05:10:09 UTC (rev 13931)
+++ short/3D/PyLith/branches/pylith-swig/modulesrc/topology/topology.i 2009-01-23 05:51:16 UTC (rev 13932)
@@ -28,7 +28,6 @@
} // exception
%include "typemaps.i"
-%include "../include/mpi.i"
// Interfaces
%include "Mesh.i"
Modified: short/3D/PyLith/branches/pylith-swig/pylith/topology/Mesh.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/pylith/topology/Mesh.py 2009-01-23 05:10:09 UTC (rev 13931)
+++ short/3D/PyLith/branches/pylith-swig/pylith/topology/Mesh.py 2009-01-23 05:51:16 UTC (rev 13932)
@@ -18,8 +18,6 @@
from topology import Mesh as ModuleMesh
-from topology import mpi_communicator
-
# Mesh class
class Mesh(ModuleMesh):
"""
@@ -33,16 +31,11 @@
Constructor.
"""
if comm is None and dim is None:
- print "A"
ModuleMesh.__init__(self)
elif dim is None:
- print "B"
- commInt = mpi_communicator(comm)
- print commInt
- ModuleMesh.__init__(self, comm)
+ ModuleMesh.__init__(self, comm.handle)
else:
- print "C"
- ModuleMesh.__init__(self, comm, dim)
+ ModuleMesh.__init__(self, comm.handle, dim)
return
Modified: short/3D/PyLith/branches/pylith-swig/unittests/pytests/topology/TestMesh.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/unittests/pytests/topology/TestMesh.py 2009-01-23 05:10:09 UTC (rev 13931)
+++ short/3D/PyLith/branches/pylith-swig/unittests/pytests/topology/TestMesh.py 2009-01-23 05:51:16 UTC (rev 13932)
@@ -36,13 +36,20 @@
"""
Test constructor.
"""
- import mpi
- comm = mpi.MPI_COMM_SELF
- print comm
- mesh = Mesh(comm=mpi.MPI_COMM_SELF)
+ from pylith.mpi.Communicator import mpi_comm_self
+ mesh = Mesh(comm=mpi_comm_self())
return
+ def test_constructorC(self):
+ """
+ Test constructor.
+ """
+ from pylith.mpi.Communicator import mpi_comm_self
+ mesh = Mesh(comm=mpi_comm_self(), dim=2)
+ return
+
+
def test_coordsys(self):
"""
Test coordsys().
More information about the CIG-COMMITS
mailing list