|
@@ -19,6 +19,9 @@ import scipy.integrate
|
|
|
# - fSY(t,y), mxn, a time dependent array of derivatives:
|
|
|
# fS(t)[p,:] = d(M*y)/dp (t)
|
|
|
# where current y is supplied at each step
|
|
|
+# - Su(t), mxn, a (time dependent) array of partial derivatives:
|
|
|
+# Su(t)[p,i] = du_i/dp (t)
|
|
|
+
|
|
|
|
|
|
def dfdy(t,y,system):
|
|
|
dfdy=system.M(t).dot(y)+system.u(t)
|
|
@@ -49,6 +52,8 @@ def dfdySFull(t,S,system):
|
|
|
#system.fS(y,t) is NxM matrix where M are parameters
|
|
|
y=mS[:,0]
|
|
|
mOut=system.M(t,y).dot(mS)+system.fSY(y,t)
|
|
|
+ #add u derivatives
|
|
|
+ mOut[:,1:]+=numpy.transpose(system.Su(t))
|
|
|
try:
|
|
|
system.iPrint+=1
|
|
|
except AttributeError:
|