[cig-commits] r6461 - in short/3D/PyLith/trunk/unittests/pytests: materials meshio

brad at geodynamics.org brad at geodynamics.org
Thu Mar 29 10:14:41 PDT 2007


Author: brad
Date: 2007-03-29 10:14:40 -0700 (Thu, 29 Mar 2007)
New Revision: 6461

Modified:
   short/3D/PyLith/trunk/unittests/pytests/materials/TestMaterial.py
   short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOAscii.py
Log:
Fixed setting coordinate system in unit tests involving MeshIOAscii.

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/TestMaterial.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestMaterial.py	2007-03-29 17:05:33 UTC (rev 6460)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestMaterial.py	2007-03-29 17:14:40 UTC (rev 6461)
@@ -55,16 +55,16 @@
     material.label = "my material"
     material.id = 54
 
+    from spatialdata.geocoords.CSCart import CSCart
+    cs = CSCart()
+    cs.spaceDim = 1
+
     from pylith.meshio.MeshIOAscii import MeshIOAscii
     importer = MeshIOAscii()
     importer.filename = "data/twoelems.mesh"
+    importer.coordsys = cs
     mesh = importer.read()
 
-    from spatialdata.geocoords.CSCart import CSCart
-    cs = CSCart()
-    cs.spaceDim = 1
-    cs.initialize()
-    mesh.coordsys = cs
     
     material.initialize(mesh)
 

Modified: short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOAscii.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOAscii.py	2007-03-29 17:05:33 UTC (rev 6460)
+++ short/3D/PyLith/trunk/unittests/pytests/meshio/TestMeshIOAscii.py	2007-03-29 17:14:40 UTC (rev 6461)
@@ -50,8 +50,10 @@
     filenameIn = "data/mesh2Din3D.txt"
     filenameOut = "data/mesh2Din3D_test.txt"
     
+    from spatialdata.geocoords.CSCart import CSCart
     iohandler = MeshIOAscii()
     iohandler.filename = filenameIn
+    iohandler.coordsys = CSCart()
     mesh = iohandler.read()
     iohandler.filename = filenameOut
     iohandler.write(mesh)



More information about the cig-commits mailing list