[cig-commits] r8402 - short/3D/PyLith/trunk/playpen/euler
willic3 at geodynamics.org
willic3 at geodynamics.org
Thu Dec 6 21:31:03 PST 2007
Author: willic3
Date: 2007-12-06 21:31:03 -0800 (Thu, 06 Dec 2007)
New Revision: 8402
Modified:
short/3D/PyLith/trunk/playpen/euler/transform.py
Log:
Forgot to take into account a vertical fault.
Modified: short/3D/PyLith/trunk/playpen/euler/transform.py
===================================================================
--- short/3D/PyLith/trunk/playpen/euler/transform.py 2007-12-07 05:24:15 UTC (rev 8401)
+++ short/3D/PyLith/trunk/playpen/euler/transform.py 2007-12-07 05:31:03 UTC (rev 8402)
@@ -321,8 +321,11 @@
mag = math.sqrt(numpy.dot(horPerp,horPerp))
horPerp /= mag
dipCos = math.sin(math.radians(dip))
- r = math.sqrt(1.0/(1.0-dipCos*dipCos))
- udVec = numpy.array([horPerp[0]/r, horPerp[1]/r, dipCos], dtype=float)
+ if math.abs(dipCos) != 1.0:
+ r = math.sqrt(1.0/(1.0-dipCos*dipCos))
+ udVec = numpy.array([horPerp[0]/r, horPerp[1]/r, dipCos], dtype=float)
+ else:
+ udVec = numpy.array([0.0, 0.0, dipCos], dtype=float)
normVec = numpy.cross(asVec, udVec)
slipVec = numpy.array([ss, ds,ts], dtype=float)
rot1 = numpy.vstack((asVec, udVec, normVec))
More information about the cig-commits
mailing list