c======================================================================= c This routine defines the equations of motion for the driven c triangle well. It is used with twcmap.f c======================================================================= subroutine fcn(t, y, f) implicit none c----------------------------------------------------------------------- c common communication with main program c----------------------------------------------------------------------- include 'fcn.inc' c----------------------------------------------------------------------- c n: number of odes c t: time independent variable c y: solution (y(1)=x, y(2)=p) c f: derivative of solution c----------------------------------------------------------------------- integer n parameter (n = 2) real t real y(n), f(n) c----------------------------------------------------------------------- c evaluate derivatives c----------------------------------------------------------------------- f(1) = y(2)/m f(2) = v0 + v*cos(w*t + theta) return end