Debian Codegraph @

07p/demos/fnc/fnc.f90

raw symbols SCIP
1 ! ----------------------------------------------------------------------
2 ! ----------------------------------------------------------------------
3 ! Slow manifolds computation in the self-coupled FitzHugh-Nagumo system
4 ! ----------------------------------------------------------------------
5 ! Continuation of canard orbits in parameter space
6 ! ----------------------------------------------------------------------
7 ! Ref.: Desroches, Krauskopf and Osinga, preprint of the UoB, 2009
8 ! URL : http://rose.bris.ac.uk/dspace/handle/1983/1312
9 ! ----------------------------------------------------------------------
10 ! ----------------------------------------------------------------------
11
12 SUBROUTINE FUNC(NDIM,U,ICP,PAR,IJAC,F,DFDU,DFDP)
13 ! ---------- ----
14
15 IMPLICIT NONE
16 INTEGER, INTENT(IN) :: NDIM, ICP(*), IJAC
17 DOUBLE PRECISION, INTENT(IN) :: U(NDIM), PAR(*)
18 DOUBLE PRECISION, INTENT(OUT) :: F(NDIM)
19 DOUBLE PRECISION, INTENT(INOUT) :: DFDU(NDIM,NDIM), DFDP(NDIM,*)
20
21 DOUBLE PRECISION v, h, s, epsilon, gamma, delta, T
22
23 ! Define the state variables
24 v = U(1)
25 h = U(2)
26 s = U(3)
27
28 ! Define the system parameters
29 epsilon = PAR(1)
30 gamma = PAR(2)
31 delta = PAR(3)
32
33 ! Define the integration time as a parameter
34 T = PAR(11)
35
36 ! Define the right-hand sides
37 F(1) = T * (h - (v**3 - v + 1) / 2 - gamma * s * v)
38 F(2) = T * (-epsilon * (2 * h + 2.6d0 * v))
39 F(3) = T * (-epsilon * delta * s)
40
41 END SUBROUTINE FUNC
42
43 ! ----------------------------------------------------------------------
44 ! ----------------------------------------------------------------------
45
46 SUBROUTINE STPNT
47 END SUBROUTINE STPNT
48
49 ! ----------------------------------------------------------------------
50 ! ----------------------------------------------------------------------
51 SUBROUTINE BCND(NDIM,PAR,ICP,NBC,U0,U1,FB,IJAC,DBC)
52 ! ---------- ----
53
54 IMPLICIT NONE
55 INTEGER, INTENT(IN) :: NDIM, ICP(*), NBC, IJAC
56 DOUBLE PRECISION, INTENT(IN) :: PAR(*), U0(NDIM), U1(NDIM)
57 DOUBLE PRECISION, INTENT(OUT) :: FB(NBC)
58 DOUBLE PRECISION, INTENT(INOUT) :: DBC(NBC,*)
59
60 ! Define the critical manifold S as {(v,h,s) ; 2*h-v^3+v-1-s*v=0}
61 ! (we use the fact that gamma is fixed at the value 0.5)
62
63 ! Define boundary conditions */
64 FB(1) = U0(1) - PAR(4) ! Initial point is on the intersection between S
65 FB(2) = U0(2) - PAR(7) ! and the plane {h=-6.0}
66 FB(3) = 2*U0(2)-U0(1)**3+U0(1)-1-U0(3)*U0(1)
67
68 FB(4) = U1(1)
69 FB(5) = U1(2) - 0.5
70 FB(6) = U1(3) - PAR(6) ! End point is in a cross-section containing the
71 ! folded node: Sigma_fn={s=0.27970}
72 END SUBROUTINE BCND
73
74 ! ----------------------------------------------------------------------
75 ! ----------------------------------------------------------------------
76 SUBROUTINE PVLS
77 END SUBROUTINE PVLS
78 ! ----------------------------------------------------------------------
79 ! ----------------------------------------------------------------------
80 SUBROUTINE ICND
81 END SUBROUTINE ICND
82 ! ----------------------------------------------------------------------
83 ! ----------------------------------------------------------------------
84 SUBROUTINE FOPT
85 END SUBROUTINE FOPT