Permalink
Browse files

using different inputs for x and y to make it clearer how the example…

… works
  • Loading branch information...
1 parent 31730f6 commit 236c467c49ab44d912f14095f6916aa4a9098e73 Sebastian Walter committed Jan 2, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 documentation/sphinx/examples/taylor_series_of_jacobian.py
@@ -23,8 +23,10 @@ def eval_g(x, y):
# compute Taylor series
#
-# Jx( 1. + 2.*t + 3.*t**2 + 4.*t**3 + 5.*t**5)
-# Jy( 1. + 2.*t + 3.*t**2 + 4.*t**3 + 5.*t**5)
+# Jx( 1. + 2.*t + 3.*t**2 + 4.*t**3 + 5.*t**5,
+# 6. + 7.*t + 8.*t**2 + 9.*t**3 + 10.*t**5 )
+# Jy( 1. + 2.*t + 3.*t**2 + 4.*t**3 + 5.*t**5,
+# 6. + 7.*t + 8.*t**2 + 9.*t**3 + 10.*t**5 )
#
# where
#
@@ -36,8 +38,8 @@ def eval_g(x, y):
D,P = 5, 3 # order D=5, number of directions P
ax = UTPM(numpy.zeros((D, P)))
ay = UTPM(numpy.zeros((D, P)))
-ax.data[:, :] = numpy.array([1., 2. ,3. ,4. ,5.]).reshape((5,1)) # input Taylor polynomial
-ay.data[:, :] = numpy.array([1., 2. ,3. ,4. ,5.]).reshape((5,1)) # input Taylor polynomial
+ax.data[:, :] = numpy.array([1., 2. ,3., 4. ,5.]).reshape((5,1)) # input Taylor polynomial
+ay.data[:, :] = numpy.array([6., 7. ,8., 9. ,10.]).reshape((5,1)) # input Taylor polynomial
# forward sweep
cg.pushforward([ax, ay])

0 comments on commit 236c467

Please sign in to comment.