15 real(DP),
intent(in) :: x
16 real(DP),
intent(in) :: range
17 real(DP),
intent(inout) :: dydx
18 real(DP),
intent(inout) :: y
31 elseif (xs <
done)
then
46 real(DP),
intent(in) :: x
47 real(DP),
intent(in) :: range
48 real(DP),
intent(inout) :: dydx
49 real(DP),
intent(inout) :: y
62 elseif (xs <
done)
then
80 subroutine sramp(x, range, dydx, y)
81 real(DP),
intent(in) :: x
82 real(DP),
intent(in) :: range
83 real(DP),
intent(inout) :: dydx
84 real(DP),
intent(inout) :: y
96 elseif (xs <
done)
then
97 y = x * xs * (
dtwo - xs)
110 real(DP),
intent(inout) :: x
111 real(DP),
intent(inout) :: range
112 real(DP),
intent(inout) :: dydx
113 real(DP),
intent(inout) :: y
115 real(DP) :: s, aa, bb
116 real(DP) :: cof1, cof2, cof3
129 y = cof1 * (cof2 + cof3)
130 dydx = (aa * x**
dtwo - bb * x)
134 else if ((x - s) > -
dprec)
then
145 real(DP),
intent(inout) :: x
146 real(DP),
intent(inout) :: range
147 real(DP),
intent(inout) :: dydx
148 real(DP),
intent(inout) :: y
158 y =
done - (s - x) / s
171 real(DP),
intent(inout) :: x
172 real(DP),
intent(inout) :: range
173 real(DP),
intent(inout) :: dydx
174 real(DP),
intent(inout) :: y
197 real(DP),
intent(in) :: d
198 real(DP),
intent(inout) :: smooth
199 real(DP),
intent(inout) :: dwdh
215 if (diff >
dzero)
then
222 y = aa * x**
dtwo + b * x
227 else if (diff > -
dem14)
then
243 real(dp),
intent(in) :: top
244 real(dp),
intent(in) :: bot
245 real(dp),
intent(in) :: x
253 else if (x > top)
then
268 real(dp),
intent(in) :: top
269 real(dp),
intent(in) :: bot
270 real(dp),
intent(in) :: x
271 real(dp),
intent(in),
optional :: eps
281 if (
present(eps))
then
295 else if (w < (b - s))
then
313 real(dp),
intent(in) :: top
314 real(dp),
intent(in) :: bot
315 real(dp),
intent(in) :: x
316 real(dp),
optional,
intent(in) :: eps
325 if (
present(eps))
then
334 else if (x > top)
then
342 y = av *
dhalf * (br * br) / teps
343 elseif (br < (
done - teps))
then
345 elseif (br <
done)
then
346 y =
done - ((av *
dhalf * (bri * bri)) / teps)
368 real(dp),
intent(in) :: top
369 real(dp),
intent(in) :: bot
370 real(dp),
intent(in) :: x
371 real(dp),
intent(in) :: alpha
372 real(dp),
intent(in) :: beta
373 real(dp),
intent(in) :: sr
383 if (pc <=
dzero)
then
387 seff = (
done + (alpha * pc)**beta)**gamma
389 y = seff * (
done - sr) + sr
402 real(dp),
intent(in) :: top
403 real(dp),
intent(in) :: bot
404 real(dp),
intent(in) :: x
405 real(dp),
optional,
intent(in) :: eps
414 if (
present(eps))
then
422 else if (x > top)
then
431 elseif (br < (
done - teps))
then
433 elseif (br <
done)
then
450 real(dp),
intent(in) :: top
451 real(dp),
intent(in) :: bot
452 real(dp),
intent(in) :: x
453 real(dp),
intent(in),
optional :: c1
454 real(dp),
intent(in),
optional :: c2
464 if (
present(c1))
then
469 if (
present(c2))
then
484 cof2 = cof2 / b**
dtwo
489 else if (s <
done)
then
504 real(dp),
intent(in) :: top
505 real(dp),
intent(in) :: bot
506 real(dp),
intent(in) :: x
507 real(dp),
intent(in),
optional :: c1
508 real(dp),
intent(in),
optional :: c2
519 if (
present(c1))
then
524 if (
present(c2))
then
545 else if (s <
done)
then
546 y = cof1 * w**
dtwo + cof2 * w
562 function sslope(x, xi, yi, sm, sp, ta)
result(y)
566 real(dp),
intent(in) :: x
567 real(dp),
intent(in) :: xi
568 real(dp),
intent(in) :: yi
569 real(dp),
intent(in) :: sm
570 real(dp),
intent(in) :: sp
571 real(dp),
optional,
intent(in) :: ta
582 if (
present(ta))
then
614 real(dp),
intent(in) :: x
615 real(dp),
intent(in) :: xi
616 real(dp),
intent(in) :: sm
617 real(dp),
intent(in) :: sp
618 real(dp),
optional,
intent(in) :: ta
627 if (
present(ta))
then
642 y =
dhalf * (sm + sp) -
dhalf * rho * (sm - sp)
656 real(dp),
intent(in) :: x
657 real(dp),
intent(in) :: xi
658 real(dp),
optional,
intent(in) :: tomega
665 if (
present(tomega))
then
672 epsilon =
dhalf * omega
678 if (dx < -epsilon)
then
680 else if (dx < epsilon)
then
698 real(dp),
intent(in) :: x
699 real(dp),
intent(in) :: xi
700 real(dp),
optional,
intent(in) :: tomega
707 if (
present(tomega))
then
714 epsilon =
dhalf * omega
720 if (dx < -epsilon)
then
722 else if (dx < epsilon)
then
723 y = (dx / omega) +
dhalf
742 real(dp),
intent(in) :: x
743 real(dp),
intent(in) :: xi
744 real(dp),
intent(in) :: yi
745 real(dp),
intent(in) :: sm
746 real(dp),
intent(in) :: sp
747 real(dp),
optional,
intent(in) :: tomega
755 if (
present(tomega))
then
762 epsilon =
dhalf * omega
768 if (dx < -epsilon)
then
770 else if (dx < epsilon)
then
791 real(dp),
intent(in) :: x
792 real(dp),
intent(in) :: xi
793 real(dp),
intent(in) :: sm
794 real(dp),
intent(in) :: sp
795 real(dp),
optional,
intent(in) :: tomega
803 if (
present(tomega))
then
810 epsilon =
dhalf * omega
816 if (dx < -epsilon)
then
818 else if (dx < epsilon)
then
820 y =
dhalf * ((sp - sm) * c + (sm + sp))
This module contains simulation constants.
real(dp), parameter dfour
real constant 4
real(dp), parameter dem8
real constant 1e-8
real(dp), parameter dem14
real constant 1e-14
real(dp), parameter dhalf
real constant 1/2
real(dp), parameter dem4
real constant 1e-4
real(dp), parameter dem6
real constant 1e-6
real(dp), parameter dzero
real constant zero
real(dp), parameter dem5
real constant 1e-5
real(dp), parameter dprec
real constant machine precision
real(dp), parameter dem2
real constant 1e-2
real(dp), parameter dtwo
real constant 2
real(dp), parameter dsix
real constant 6
real(dp), parameter dthree
real constant 3
real(dp), parameter done
real constant 1
This module defines variable data types.
real(dp) function svangenuchtensaturation(top, bot, x, alpha, beta, sr)
sQuadraticSaturation
subroutine slinear(x, range, dydx, y)
sLinear
real(dp) function squadraticsaturation(top, bot, x, eps)
sQuadraticSaturation
real(dp) function slinearsaturation(top, bot, x)
sLinearSaturation
real(dp) function scubicsaturation(top, bot, x, eps)
sCubicSaturation
real(dp) function squadraticslope(x, xi, yi, sm, sp, tomega)
sQuadraticSlope
real(dp) function sslope(x, xi, yi, sm, sp, ta)
sSlope
subroutine scubiclinear(x, range, dydx, y)
sCubicLinear
real(dp) function squadraticslopederivative(x, xi, sm, sp, tomega)
sQuadraticSlopeDerivative
subroutine sramp(x, range, dydx, y)
sRamp
real(dp) function squadraticsaturationderivative(top, bot, x, eps)
Derivative of the quadratic saturation function.
subroutine squadratic(x, range, dydx, y)
sQuadratic
real(dp) function sslopederivative(x, xi, sm, sp, ta)
sSlopeDerivative
real(dp) function sqsaturationderivative(top, bot, x, c1, c2)
sQSaturationDerivative
subroutine schsmooth(d, smooth, dwdh)
sChSmooth
real(dp) function squadratic0spderivative(x, xi, tomega)
sQuadratic0spDerivative
subroutine sscurve(x, range, dydx, y)
SCurve.
real(dp) function sqsaturation(top, bot, x, c1, c2)
sQSaturation
real(dp) function squadratic0sp(x, xi, tomega)
sQuadratic0sp
subroutine scubic(x, range, dydx, y)
sCubic