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
76 real(DP),
intent(inout) :: x
77 real(DP),
intent(inout) :: range
78 real(DP),
intent(inout) :: dydx
79 real(DP),
intent(inout) :: y
82 real(DP) :: cof1, cof2, cof3
95 y = cof1 * (cof2 + cof3)
96 dydx = (aa * x**
dtwo - bb * x)
100 else if ((x - s) > -
dprec)
then
111 real(DP),
intent(inout) :: x
112 real(DP),
intent(inout) :: range
113 real(DP),
intent(inout) :: dydx
114 real(DP),
intent(inout) :: y
124 y =
done - (s - x) / s
137 real(DP),
intent(inout) :: x
138 real(DP),
intent(inout) :: range
139 real(DP),
intent(inout) :: dydx
140 real(DP),
intent(inout) :: y
163 real(DP),
intent(in) :: d
164 real(DP),
intent(inout) :: smooth
165 real(DP),
intent(inout) :: dwdh
181 if (diff >
dzero)
then
188 y = aa * x**
dtwo + b * x
193 else if (diff > -
dem14)
then
209 real(dp),
intent(in) :: top
210 real(dp),
intent(in) :: bot
211 real(dp),
intent(in) :: x
219 else if (x > top)
then
234 real(dp),
intent(in) :: top
235 real(dp),
intent(in) :: bot
236 real(dp),
intent(in) :: x
237 real(dp),
intent(in),
optional :: eps
247 if (
present(eps))
then
261 else if (w < (b - s))
then
279 real(dp),
intent(in) :: top
280 real(dp),
intent(in) :: bot
281 real(dp),
intent(in) :: x
282 real(dp),
optional,
intent(in) :: eps
291 if (
present(eps))
then
300 else if (x > top)
then
308 y = av *
dhalf * (br * br) / teps
309 elseif (br < (
done - teps))
then
311 elseif (br <
done)
then
312 y =
done - ((av *
dhalf * (bri * bri)) / teps)
334 real(dp),
intent(in) :: top
335 real(dp),
intent(in) :: bot
336 real(dp),
intent(in) :: x
337 real(dp),
intent(in) :: alpha
338 real(dp),
intent(in) :: beta
339 real(dp),
intent(in) :: sr
349 if (pc <=
dzero)
then
353 seff = (
done + (alpha * pc)**beta)**gamma
355 y = seff * (
done - sr) + sr
368 real(dp),
intent(in) :: top
369 real(dp),
intent(in) :: bot
370 real(dp),
intent(in) :: x
371 real(dp),
optional,
intent(in) :: eps
380 if (
present(eps))
then
388 else if (x > top)
then
397 elseif (br < (
done - teps))
then
399 elseif (br <
done)
then
416 real(dp),
intent(in) :: top
417 real(dp),
intent(in) :: bot
418 real(dp),
intent(in) :: x
419 real(dp),
intent(in),
optional :: c1
420 real(dp),
intent(in),
optional :: c2
430 if (
present(c1))
then
435 if (
present(c2))
then
450 cof2 = cof2 / b**
dtwo
455 else if (s <
done)
then
470 real(dp),
intent(in) :: top
471 real(dp),
intent(in) :: bot
472 real(dp),
intent(in) :: x
473 real(dp),
intent(in),
optional :: c1
474 real(dp),
intent(in),
optional :: c2
485 if (
present(c1))
then
490 if (
present(c2))
then
511 else if (s <
done)
then
512 y = cof1 * w**
dtwo + cof2 * w
524 function sslope(x, xi, yi, sm, sp, ta)
result(y)
528 real(dp),
intent(in) :: x
529 real(dp),
intent(in) :: xi
530 real(dp),
intent(in) :: yi
531 real(dp),
intent(in) :: sm
532 real(dp),
intent(in) :: sp
533 real(dp),
optional,
intent(in) :: ta
544 if (
present(ta))
then
574 real(dp),
intent(in) :: x
575 real(dp),
intent(in) :: xi
576 real(dp),
intent(in) :: sm
577 real(dp),
intent(in) :: sp
578 real(dp),
optional,
intent(in) :: ta
587 if (
present(ta))
then
602 y =
dhalf * (sm + sp) -
dhalf * rho * (sm - sp)
616 real(dp),
intent(in) :: x
617 real(dp),
intent(in) :: xi
618 real(dp),
optional,
intent(in) :: tomega
625 if (
present(tomega))
then
632 epsilon =
dhalf * omega
638 if (dx < -epsilon)
then
640 else if (dx < epsilon)
then
658 real(dp),
intent(in) :: x
659 real(dp),
intent(in) :: xi
660 real(dp),
optional,
intent(in) :: tomega
667 if (
present(tomega))
then
674 epsilon =
dhalf * omega
680 if (dx < -epsilon)
then
682 else if (dx < epsilon)
then
683 y = (dx / omega) +
dhalf
699 real(dp),
intent(in) :: x
700 real(dp),
intent(in) :: xi
701 real(dp),
intent(in) :: yi
702 real(dp),
intent(in) :: sm
703 real(dp),
intent(in) :: sp
704 real(dp),
optional,
intent(in) :: tomega
712 if (
present(tomega))
then
719 epsilon =
dhalf * omega
725 if (dx < -epsilon)
then
727 else if (dx < epsilon)
then
748 real(dp),
intent(in) :: x
749 real(dp),
intent(in) :: xi
750 real(dp),
intent(in) :: sm
751 real(dp),
intent(in) :: sp
752 real(dp),
optional,
intent(in) :: tomega
760 if (
present(tomega))
then
767 epsilon =
dhalf * omega
773 if (dx < -epsilon)
then
775 else if (dx < epsilon)
then
777 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)
@ brief sQuadraticSaturation
subroutine slinear(x, range, dydx, y)
@ brief sLinear
real(dp) function squadraticsaturation(top, bot, x, eps)
@ brief sQuadraticSaturation
real(dp) function slinearsaturation(top, bot, x)
@ brief sLinearSaturation
real(dp) function scubicsaturation(top, bot, x, eps)
@ brief sCubicSaturation
real(dp) function squadraticslope(x, xi, yi, sm, sp, tomega)
@ brief sQuadraticSlope
real(dp) function sslope(x, xi, yi, sm, sp, ta)
@ brief sSlope
subroutine scubiclinear(x, range, dydx, y)
@ brief sCubicLinear
real(dp) function squadraticslopederivative(x, xi, sm, sp, tomega)
@ brief sQuadraticSlopeDerivative
real(dp) function squadraticsaturationderivative(top, bot, x, eps)
@ brief Derivative of the quadratic saturation function
subroutine squadratic(x, range, dydx, y)
@ brief sQuadratic
real(dp) function sslopederivative(x, xi, sm, sp, ta)
@ brief sSlopeDerivative
real(dp) function sqsaturationderivative(top, bot, x, c1, c2)
@ brief sQSaturationDerivative
subroutine schsmooth(d, smooth, dwdh)
@ brief sChSmooth
real(dp) function squadratic0spderivative(x, xi, tomega)
@ brief sQuadratic0spDerivative
subroutine sscurve(x, range, dydx, y)
@ brief SCurve
real(dp) function sqsaturation(top, bot, x, c1, c2)
@ brief sQSaturation
real(dp) function squadratic0sp(x, xi, tomega)
@ brief sQuadratic0sp
subroutine scubic(x, range, dydx, y)
@ brief sCubic