c
c rossler_rhs.f
c
c Vector field functions for the vector field 'rossler'
c These functions are to be used with the Fortran ODE solver LSODA.
c
c This file was generated by the program VFGEN, version: 2.5.0
c Generated on 15-Jan-2015 at 14:31
c
subroutine rossler_rhs(n_,t_,y_,f_)
implicit none
integer n_
double precision t_, y_, f_
dimension y_(6), f_(3)
double precision a, b, c
double precision x, y, z
c --- Parameters ---
a = y_(4)
b = y_(5)
c = y_(6)
c --- State variables ---
x = y_(1)
y = y_(2)
z = y_(3)
c --- The vector field ---
f_(1) = -y-z
f_(2) = x+a*y
f_(3) = b+( x-c)*z
return
end
c
c Jacobian of the vector field 'rossler'
c
c The subroutine assumes that the full Jacobian is to be computed.
c ml_ and mu_ are ignored, and nrowpd_ is assumed to be n_.
c
subroutine rossler_jac(n_,t_,y_,ml_,mu_,jac_,nrowpd_)
implicit none
integer n_, ml_, mu_, nrowpd_
double precision t_, y_, jac_
dimension y_(6), jac_(nrowpd_,3)
double precision a, b, c
double precision x, y, z
c --- Parameters ---
a = y_(4)
b = y_(5)
c = y_(6)
c --- State variables ---
x = y_(1)
y = y_(2)
z = y_(3)
c --- Jacobian ---
c jac_(1, 1) = 0
jac_(1, 2) = -1.0D0
jac_(1, 3) = -1.0D0
jac_(2, 1) = 1.0D0
jac_(2, 2) = a
c jac_(2, 3) = 0
jac_(3, 1) = z
c jac_(3, 2) = 0
jac_(3, 3) = x-c
return
end
c
c User-defined functions.
c
subroutine rossler_func(neq_, t_, y_, nf_, func_)
implicit none
integer neq_, nf_
double precision t_, y_, func_
dimension y_(6), func_(1)
double precision a, b, c
double precision x, y, z
c --- Parameters ---
a = y_(4)
b = y_(5)
c = y_(6)
c --- State variables ---
x = y_(1)
y = y_(2)
z = y_(3)
c --- Compute the functions ---
c yvalue:
func_(1) = y;
return
end