[cig-commits] r6880 - short/3D/PyLith/trunk/pylith/meshio

brad at geodynamics.org brad at geodynamics.org
Tue May 15 12:34:47 PDT 2007


Author: brad
Date: 2007-05-15 12:34:47 -0700 (Tue, 15 May 2007)
New Revision: 6880

Modified:
   short/3D/PyLith/trunk/pylith/meshio/MeshIO.py
Log:
Fixed MeshIO so that only one processor reads mesh.

Modified: short/3D/PyLith/trunk/pylith/meshio/MeshIO.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/MeshIO.py	2007-05-15 04:44:14 UTC (rev 6879)
+++ short/3D/PyLith/trunk/pylith/meshio/MeshIO.py	2007-05-15 19:34:47 UTC (rev 6880)
@@ -59,7 +59,9 @@
     mesh.initialize(self.coordsys)
 
     # Read mesh
-    self.cppHandle.read(mesh.cppHandle)
+    import mpi
+    if 0 == mpi.MPI_Comm_rank(mpi.MPI_COMM_WORLD):
+      self.cppHandle.read(mesh.cppHandle)
     return mesh
 
 
@@ -75,32 +77,6 @@
     return
 
 
-  def createCubeBoundary(self, debug):
-    """
-    Create cube boundary mesh and store in Sieve mesh object.
-
-    @returns PETSc mesh object containing cube boundary mesh
-    """
-    self._info.log("Creating cube boundary mesh")
-
-    # Set flags
-    ##self._sync()
-    self.cppHandle.debug = debug
-
-    # Initialize coordinate system
-    ##if self.coordsys is None:
-    ##  raise ValueError, "Coordinate system for mesh is unknown."
-    ##self.coordsys.initialize()
-
-    from pylith.topology.Mesh import Mesh
-    mesh = Mesh()
-    ##mesh.initialize(self.coordsys)
-
-    # Create boundary
-    self.cppHandle.createCubeBoundary(mesh.cppHandle)
-    return mesh
-
-
   # PRIVATE METHODS ////////////////////////////////////////////////////
 
   def _configure(self):



More information about the cig-commits mailing list