[cig-commits] r13950 - in short/3D/PyLith/branches/pylith-swig/pylith: meshio topology
brad at geodynamics.org
brad at geodynamics.org
Sun Jan 25 15:10:06 PST 2009
Author: brad
Date: 2009-01-25 15:10:06 -0800 (Sun, 25 Jan 2009)
New Revision: 13950
Modified:
short/3D/PyLith/branches/pylith-swig/pylith/meshio/MeshIOObj.py
short/3D/PyLith/branches/pylith-swig/pylith/topology/Mesh.py
Log:
Improved Mesh object- added communicator and debug flag as members; added createSieveMesh().
Modified: short/3D/PyLith/branches/pylith-swig/pylith/meshio/MeshIOObj.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/pylith/meshio/MeshIOObj.py 2009-01-25 23:09:49 UTC (rev 13949)
+++ short/3D/PyLith/branches/pylith-swig/pylith/meshio/MeshIOObj.py 2009-01-25 23:10:06 UTC (rev 13950)
@@ -37,7 +37,7 @@
return
- def read(self, dim, normalizer, debug, interpolate):
+ def read(self, normalizer, debug, interpolate):
"""
Read finite-element mesh and store in Sieve mesh object.
@@ -56,7 +56,8 @@
from pylith.mpi.Communicator import petsc_comm_world
from pylith.topology.Mesh import Mesh
- mesh = Mesh(petsc_comm_world(), dim)
+ mesh = Mesh()
+ mesh.setComm(petsc_comm_world())
mesh.coordsys(self.coordsys)
mesh.initialize()
Modified: short/3D/PyLith/branches/pylith-swig/pylith/topology/Mesh.py
===================================================================
--- short/3D/PyLith/branches/pylith-swig/pylith/topology/Mesh.py 2009-01-25 23:09:49 UTC (rev 13949)
+++ short/3D/PyLith/branches/pylith-swig/pylith/topology/Mesh.py 2009-01-25 23:10:06 UTC (rev 13950)
@@ -32,15 +32,23 @@
"""
if comm is None and dim is None:
ModuleMesh.__init__(self)
- elif dim is None:
- ModuleMesh.__init__(self, comm.handle)
+ elif comm is None:
+ ModuleMesh.__init__(self, dim)
else:
- ModuleMesh.__init__(self, comm.handle, dim)
+ ModuleMesh.__init__(self, dim, comm.handle)
return
- def comm(self):
+ def setComm(self, comm):
"""
+ Set communicator.
+ """
+ ModuleMesh.comm(self, comm.handle)
+ return
+
+
+ def getComm(self):
+ """
Get communicator.
"""
# Use Communicator object to wrap C++ MPI_Comm* returned by
More information about the CIG-COMMITS
mailing list