1 C --- Plain QSSA with fixed step size
3 SUBROUTINE INTEGRATE
( TIN
, TOUT
)
5 INCLUDE
'KPP_ROOT_params.h'
6 INCLUDE
'KPP_ROOT_global.h'
14 KPP_REAL P_VAR
(NVAR
), D_VAR
(NVAR
)
16 KPP_REAL T
, Tnext
, STEP
, Told
, SUP
27 C -- BELOW THIS LIMIT USE TAYLOR INSTEAD OF EXP ---
29 do while ( T
.lt
.Tnext
)
31 if ( T
.gt
.Tnext
) then
36 CALL FSPLIT_VAR
( VAR
, P_VAR
, D_VAR
)
39 if ( abs
(D_VAR
(i
)).gt
.SUP
) then
40 ratio
= P_VAR
(i
)/D_VAR
(i
)
41 tmp
= exp
(-D_VAR
(i
)*STEP
)
42 VAR
(i
) = tmp
* (VAR
(i
) - ratio
) + ratio
45 VAR
(i
) = VAR
(i
) + P_VAR
(i
) * 0.5 * STEP
* ( 1 - 0.5 * tmp
*
46 * ( 1 - 1.0 / 3.0 * tmp
) )