[cig-commits] r20168 - in short/3D/PyLith/branches/v1.7-trunk/tests_auto: 1d/line2 2d/tri3
brad at geodynamics.org
brad at geodynamics.org
Wed May 16 18:03:08 PDT 2012
Author: brad
Date: 2012-05-16 18:03:07 -0700 (Wed, 16 May 2012)
New Revision: 20168
Modified:
short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestDislocation.py
short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestExtensionDisp.py
short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestExtensionForce.py
short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestLine2.py
short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/dislocation.cfg
short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/extensiondisp.cfg
short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/extensionforce.cfg
short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/TestAxialDisp.py
short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/TestTri3.py
short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp.cfg
short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp_gendb.py
short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp_soln.py
short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/testpylith.py
Log:
Started migration from VTK to HDF5 output.
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestDislocation.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestDislocation.py 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestDislocation.py 2012-05-17 01:03:07 UTC (rev 20168)
@@ -22,10 +22,10 @@
import numpy
from TestLine2 import TestLine2
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
from pylith.tests.Fault import check_vertex_fields
+
# Local version of PyLithApp
from pylith.apps.PyLithApp import PyLithApp
class DislocationApp(PyLithApp):
@@ -60,16 +60,12 @@
self.nverticesO = 5
self.faultMesh = {'nvertices': 1,
- 'spaceDim': 3,
+ 'spaceDim': 1,
'ncells': 1,
'ncorners': 1}
run_pylith()
self.outputRoot = "dislocation"
- if has_vtk():
- self.reader = VTKDataReader()
- else:
- self.reader = None
return
@@ -77,10 +73,10 @@
"""
Check fault information.
"""
- if self.reader is None:
+ if not self.checkResults:
return
- filename = "%s-fault_info.vtk" % self.outputRoot
+ filename = "%s-fault_info.h5" % self.outputRoot
fields = ["normal_dir", "final_slip", "slip_time"]
check_vertex_fields(self, filename, self.faultMesh, fields)
@@ -91,10 +87,10 @@
"""
Check fault information.
"""
- if self.reader is None:
+ if not self.checkResults:
return
- filename = "%s-fault_t0000000.vtk" % self.outputRoot
+ filename = "%s-fault.h5" % self.outputRoot
fields = ["slip", "traction_change"]
check_vertex_fields(self, filename, self.faultMesh, fields)
@@ -109,11 +105,11 @@
spaceDim = self.mesh['spaceDim']
nverticesO = self.nverticesO
- disp = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
+ disp = numpy.zeros( (1, nvertices, spaceDim), dtype=numpy.float64)
maskP = vertices[:,0] >= 2.0
maskP[nverticesO:nvertices] = False
maskN = numpy.bitwise_and(vertices[:,0] <= 2.0, ~maskP)
- disp[:,0] = \
+ disp[0,:,0] = \
maskN*(-0.20 - 0.025*vertices[:,0]) + \
maskP*(+0.30 - 0.025*vertices[:,0])
@@ -130,12 +126,11 @@
tensorSize = self.mesh['tensorSize']
if name == "total_strain":
- stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+ stateVar = exx*numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
elif name == "stress":
lp2m = self.density*self.vp**2
- stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize),
- dtype=numpy.float64)
+ stateVar = lp2m*exx * numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
else:
raise ValueError("Unknown state variable '%s'." % name)
@@ -159,22 +154,22 @@
nvertices = self.faultMesh['nvertices']
if name == "normal_dir":
- field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+ field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
field[:,0] = normalDir
elif name == "final_slip":
- field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+ field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
field[:,0] = finalSlip
elif name == "slip_time":
- field = slipTime*numpy.ones( (nvertices, 1), dtype=numpy.float64)
+ field = slipTime*numpy.ones( (1, nvertices, 1), dtype=numpy.float64)
elif name == "slip":
- field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+ field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
field[:,0] = finalSlip
elif name == "traction_change":
- field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+ field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
field[:,0] = traction
else:
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestExtensionDisp.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestExtensionDisp.py 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestExtensionDisp.py 2012-05-17 01:03:07 UTC (rev 20168)
@@ -21,9 +21,8 @@
## @brief Test suite for testing pylith with 1-D axial extension.
import numpy
+
from TestLine2 import TestLine2
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
# Local version of PyLithApp
@@ -58,10 +57,6 @@
TestLine2.setUp(self)
run_pylith()
self.outputRoot = "extensiondisp"
- if has_vtk():
- self.reader = VTKDataReader()
- else:
- self.reader = None
return
@@ -71,8 +66,8 @@
"""
nvertices = self.mesh['nvertices']
spaceDim = self.mesh['spaceDim']
- disp = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
- disp[:,0] = -0.2 + 0.1 * vertices[:,0]
+ disp = numpy.zeros( (1,nvertices,spaceDim), dtype=numpy.float64)
+ disp[0,:,0] = -0.2 + 0.1 * vertices[:,0]
return disp
@@ -87,12 +82,11 @@
tensorSize = self.mesh['tensorSize']
if name == "total_strain":
- stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+ stateVar = exx*numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
elif name == "stress":
lp2m = self.density*self.vp**2
- stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize),
- dtype=numpy.float64)
+ stateVar = lp2m*exx * numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
else:
raise ValueError("Unknown state variable '%s'." % name)
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestExtensionForce.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestExtensionForce.py 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestExtensionForce.py 2012-05-17 01:03:07 UTC (rev 20168)
@@ -23,8 +23,6 @@
import numpy
from TestLine2 import TestLine2
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
# Local version of PyLithApp
@@ -59,10 +57,6 @@
TestLine2.setUp(self)
run_pylith()
self.outputRoot = "extensionforce"
- if has_vtk():
- self.reader = VTKDataReader()
- else:
- self.reader = None
return
@@ -72,8 +66,8 @@
"""
nvertices = self.mesh['nvertices']
spaceDim = self.mesh['spaceDim']
- disp = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
- disp[:,0] = 3.0/7.0 * (-2.0 + vertices[:,0])
+ disp = numpy.zeros( (1, nvertices, spaceDim), dtype=numpy.float64)
+ disp[0,:,0] = 3.0/7.0 * (-2.0 + vertices[:,0])
return disp
@@ -88,12 +82,11 @@
tensorSize = self.mesh['tensorSize']
if name == "total_strain":
- stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+ stateVar = exx*numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
elif name == "stress":
lp2m = self.density*self.vp**2
- stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize),
- dtype=numpy.float64)
+ stateVar = lp2m*exx * numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
else:
raise ValueError("Unknown state variable '%s'." % name)
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestLine2.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestLine2.py 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/TestLine2.py 2012-05-17 01:03:07 UTC (rev 20168)
@@ -23,6 +23,8 @@
import unittest
import numpy
+from pylith.tests import has_h5py
+
class TestLine2(unittest.TestCase):
"""
Generic tests for problems using 1-D bar mesh.
@@ -35,11 +37,16 @@
self.mesh = {'ncells': 4,
'ncorners': 2,
'nvertices': 5,
- 'spaceDim': 3,
+ 'spaceDim': 1,
'tensorSize': 1}
self.vs = 3000.0
self.vp = 5291.502622129181
self.density = 2500.0
+
+ if has_h5py():
+ self.checkResults = True
+ else:
+ self.checkResults = False
return
@@ -47,18 +54,18 @@
"""
Check elastic info.
"""
- if self.reader is None:
+ if not self.checkResults:
return
ncells= self.mesh['ncells']
- filename = "%s-elastic_info.vtk" % self.outputRoot
+ filename = "%s-elastic_info.h5" % self.outputRoot
m = self.density*self.vs**2
l = self.density*self.vp**2 - 2*m
- propMu = m*numpy.ones( (ncells, 1), dtype=numpy.float64)
- propLambda = l*numpy.ones( (ncells, 1), dtype=numpy.float64)
- propDensity = self.density*numpy.ones( (ncells, 2), dtype=numpy.float64)
+ propMu = m*numpy.ones( (1,ncells, 1), dtype=numpy.float64)
+ propLambda = l*numpy.ones( (1,ncells, 1), dtype=numpy.float64)
+ propDensity = self.density*numpy.ones( (1,ncells, 1), dtype=numpy.float64)
properties = {'mu': propMu,
'lambda': propLambda,
@@ -74,10 +81,10 @@
"""
Check solution (displacement) field.
"""
- if self.reader is None:
+ if not self.checkResults:
return
- filename = "%s_t0000000.vtk" % self.outputRoot
+ filename = "%s.h5" % self.outputRoot
from pylith.tests.Solution import check_displacements
check_displacements(self, filename, self.mesh)
@@ -88,10 +95,10 @@
"""
Check elastic state variables.
"""
- if self.reader is None:
+ if not self.checkResults:
return
- filename = "%s-elastic_t0000000.vtk" % self.outputRoot
+ filename = "%s-elastic.h5" % self.outputRoot
from pylith.tests.StateVariables import check_state_variables
stateVars = ["total_strain", "stress"]
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/dislocation.cfg 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/dislocation.cfg 2012-05-17 01:03:07 UTC (rev 20168)
@@ -100,15 +100,15 @@
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-[dislocation.problem.formulation.output.output.writer]
-filename = dislocation.vtk
-float_precision = 8
+[dislocation.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = dislocation.h5
[dislocation.timedependent.materials.elastic.output]
cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = dislocation-elastic.vtk
-writer.float_precision = 8
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = dislocation-elastic.h5
-[dislocation.timedependent.interfaces.fault.output.writer]
-filename = dislocation-fault.vtk
-float_precision = 8
+[dislocation.timedependent.interfaces.fault.output]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = dislocation-fault.h5
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/extensiondisp.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/extensiondisp.cfg 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/extensiondisp.cfg 2012-05-17 01:03:07 UTC (rev 20168)
@@ -85,9 +85,11 @@
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-[extensiondisp.problem.formulation.output.output.writer]
-filename = extensiondisp.vtk
+[extensiondisp.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = extensiondisp.h5
[extensiondisp.timedependent.materials.elastic.output]
cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = extensiondisp-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = extensiondisp-elastic.h5
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/extensionforce.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/extensionforce.cfg 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/1d/line2/extensionforce.cfg 2012-05-17 01:03:07 UTC (rev 20168)
@@ -90,9 +90,11 @@
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-[extensionforce.problem.formulation.output.output.writer]
-filename = extensionforce.vtk
+[extensionforce.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = extensionforce.h5
[extensionforce.timedependent.materials.elastic.output]
cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = extensionforce-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = extensionforce-elastic.h5
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/TestAxialDisp.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/TestAxialDisp.py 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/TestAxialDisp.py 2012-05-17 01:03:07 UTC (rev 20168)
@@ -23,8 +23,6 @@
import numpy
from TestTri3 import TestTri3
from axialdisp_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
# Local version of PyLithApp
from pylith.apps.PyLithApp import PyLithApp
@@ -64,11 +62,8 @@
TestTri3.setUp(self)
run_pylith()
self.outputRoot = "axialdisp"
- if has_vtk():
- self.reader = VTKDataReader()
- self.soln = AnalyticalSoln()
- else:
- self.reader = None
+
+ self.soln = AnalyticalSoln()
return
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/TestTri3.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/TestTri3.py 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/TestTri3.py 2012-05-17 01:03:07 UTC (rev 20168)
@@ -23,6 +23,8 @@
import unittest
import numpy
+from pylith.tests import has_h5py
+
class TestTri3(unittest.TestCase):
"""
Generic tests for problems using 2-D mesh.
@@ -35,8 +37,13 @@
self.mesh = {'ncells': 124,
'ncorners': 3,
'nvertices': 79,
- 'spaceDim': 3,
+ 'spaceDim': 2,
'tensorSize': 3}
+
+ if has_h5py():
+ self.checkResults = True
+ else:
+ self.checkResults = False
return
@@ -44,17 +51,17 @@
"""
Check elastic info.
"""
- if self.reader is None:
+ if not self.checkResults:
return
ncells= self.mesh['ncells']
- filename = "%s-elastic_info.vtk" % self.outputRoot
+ filename = "%s-elastic_info.h5" % self.outputRoot
from axialdisp_soln import p_mu,p_lambda,p_density
- propMu = p_mu*numpy.ones( (ncells, 1), dtype=numpy.float64)
- propLambda = p_lambda*numpy.ones( (ncells, 1), dtype=numpy.float64)
- propDensity = p_density*numpy.ones( (ncells, 2), dtype=numpy.float64)
+ propMu = p_mu*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
+ propLambda = p_lambda*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
+ propDensity = p_density*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
properties = {'mu': propMu,
'lambda': propLambda,
@@ -70,10 +77,10 @@
"""
Check solution (displacement) field.
"""
- if self.reader is None:
+ if not self.checkResults:
return
- filename = "%s_t0000000.vtk" % self.outputRoot
+ filename = "%s.h5" % self.outputRoot
from pylith.tests.Solution import check_displacements
check_displacements(self, filename, self.mesh)
@@ -84,10 +91,10 @@
"""
Check elastic state variables.
"""
- if self.reader is None:
+ if not self.checkResults:
return
- filename = "%s-elastic_t0000000.vtk" % self.outputRoot
+ filename = "%s-elastic.h5" % self.outputRoot
from pylith.tests.StateVariables import check_state_variables
stateVars = ["total_strain", "stress"]
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp.cfg 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp.cfg 2012-05-17 01:03:07 UTC (rev 20168)
@@ -90,9 +90,9 @@
ksp_max_it = 100
ksp_gmres_restart = 50
-#ksp_monitor = true
+ksp_monitor = true
#ksp_view = true
-#ksp_converged_reason = true
+ksp_converged_reason = true
#log_summary = true
# start_in_debugger = true
@@ -101,9 +101,11 @@
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-[axialdisp.problem.formulation.output.output.writer]
-filename = axialdisp.vtk
+[axialdisp.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = axialdisp.h5
[axialdisp.timedependent.materials.elastic.output]
cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = axialdisp-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = axialdisp-elastic.h5
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp_gendb.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp_gendb.py 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp_gendb.py 2012-05-17 01:03:07 UTC (rev 20168)
@@ -64,10 +64,10 @@
'data_dim': 2,
'values': [{'name': "displacement-x",
'units': "m",
- 'data': numpy.ravel(disp[:,0])},
+ 'data': numpy.ravel(disp[0,:,0])},
{'name': "displacement-y",
'units': "m",
- 'data': numpy.ravel(disp[:,1])}]}
+ 'data': numpy.ravel(disp[0,:,1])}]}
from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
io = SimpleIOAscii()
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp_soln.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp_soln.py 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/axialdisp_soln.py 2012-05-17 01:03:07 UTC (rev 20168)
@@ -61,9 +61,9 @@
Compute displacement field at locations.
"""
(npts, dim) = locs.shape
- disp = numpy.zeros( (npts, 3), dtype=numpy.float64)
- disp[:,0] = exx*locs[:,0] + exy*locs[:,1]
- disp[:,1] = eyy*locs[:,1] + exy*locs[:,0]
+ disp = numpy.zeros( (1, npts, 2), dtype=numpy.float64)
+ disp[0,:,0] = exx*locs[:,0] + exy*locs[:,1]
+ disp[0,:,1] = eyy*locs[:,1] + exy*locs[:,0]
return disp
@@ -72,10 +72,10 @@
Compute strain field at locations.
"""
(npts, dim) = locs.shape
- strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
- strain[:,0] = exx
- strain[:,1] = eyy
- strain[:,2] = exy
+ strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+ strain[0,:,0] = exx
+ strain[0,:,1] = eyy
+ strain[0,:,2] = exy
return strain
@@ -84,10 +84,10 @@
Compute stress field at locations.
"""
(npts, dim) = locs.shape
- stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
- stress[:,0] = sxx
- stress[:,1] = syy
- stress[:,2] = sxy
+ stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+ stress[0,:,0] = sxx
+ stress[0,:,1] = syy
+ stress[0,:,2] = sxy
return stress
Modified: short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/testpylith.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/testpylith.py 2012-05-17 01:02:43 UTC (rev 20167)
+++ short/3D/PyLith/branches/v1.7-trunk/tests_auto/2d/tri3/testpylith.py 2012-05-17 01:03:07 UTC (rev 20168)
@@ -29,8 +29,8 @@
from TestAxialDisp import TestAxialDisp
suite.addTest(unittest.makeSuite(TestAxialDisp))
- from TestShearDisp import TestShearDisp
- suite.addTest(unittest.makeSuite(TestShearDisp))
+ #from TestShearDisp import TestShearDisp
+ #suite.addTest(unittest.makeSuite(TestShearDisp))
#from TestDislocation import TestDislocation
#suite.addTest(unittest.makeSuite(TestDislocation))
More information about the CIG-COMMITS
mailing list