Line data Source code
1 : !-----------------------------------------------------------------------
2 : ! This file is part of the Test Set for IVP solvers
3 : ! http://www.dm.uniba.it/~testset/
4 : !
5 : ! Problem VAN DER POL
6 : ! ODE of dimension 2
7 : !
8 : ! DISCLAIMER: see
9 : ! http://www.dm.uniba.it/~testset/disclaimer.php
10 : !
11 : ! The most recent version of this source file can be found at
12 : ! http://www.dm.uniba.it/~testset/src/problems/vdpol.f
13 : !
14 : ! This is revision
15 : ! $Id: vdpol.F,v 1.2 2006/10/02 10:29:14 testset Exp $
16 : !
17 : !-----------------------------------------------------------------------
18 :
19 : module bari_vdpol
20 :
21 : implicit none
22 :
23 : contains
24 :
25 14 : subroutine vdpol_init(neqn, y, yprime, consis)
26 : integer :: neqn
27 : double precision :: y(neqn), yprime(neqn)
28 : logical :: consis
29 :
30 14 : y(1) = 2d0
31 14 : y(2) = 0d0
32 :
33 14 : end subroutine vdpol_init
34 :
35 59826 : subroutine vdpol_feval(neqn, t, y, yprime, f, ierr, rpar, ipar)
36 : integer :: neqn, ierr, ipar(*)
37 : double precision :: t, y(neqn), yprime(neqn), f(neqn), rpar(*)
38 :
39 59826 : f(1) = y(2)
40 59826 : f(2) = ((1 - y(1)*y(1))*y(2) - y(1))/1.0d-3
41 :
42 59826 : end subroutine vdpol_feval
43 :
44 8221 : subroutine vdpol_jeval(ldim, neqn, t, y, yprime, dfdy, ierr, rpar, ipar)
45 : integer :: ldim, neqn, ierr, ipar(*)
46 : double precision :: t, y(neqn), yprime(neqn), dfdy(ldim, neqn), rpar(*)
47 :
48 8221 : dfdy(1, 1) = 0d0
49 8221 : dfdy(1, 2) = 1d0
50 8221 : dfdy(2, 1) = (-2.0d0*y(1)*y(2) - 1d0)/1.0d-3
51 8221 : dfdy(2, 2) = (1d0 - y(1)*y(1))/1.0d-3
52 :
53 8221 : end subroutine vdpol_jeval
54 :
55 14 : subroutine vdpol_solut(neqn, t, y)
56 : integer :: neqn
57 : double precision, intent(in) :: t
58 : double precision, intent(out) :: y(neqn)
59 :
60 : ! note -- this is for stiffness param = 1d-3
61 14 : y(1) = 1.7632345401889102d+00
62 14 : y(2) = -8.3568868191466206d-01
63 :
64 14 : end subroutine vdpol_solut
65 :
66 : end module bari_vdpol
|