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
47 real(DP),
intent(in) :: x
48 real(DP),
intent(in) :: range
49 real(DP),
intent(inout) :: dydx
50 real(DP),
intent(inout) :: y
63 elseif (xs <
done)
then
78 real(DP),
intent(inout) :: x
79 real(DP),
intent(inout) :: range
80 real(DP),
intent(inout) :: dydx
81 real(DP),
intent(inout) :: y
84 real(DP) :: cof1, cof2, cof3
97 y = cof1 * (cof2 + cof3)
98 dydx = (aa * x**
dtwo - bb * x)
102 else if ((x - s) > -
dprec)
then
114 real(DP),
intent(inout) :: x
115 real(DP),
intent(inout) :: range
116 real(DP),
intent(inout) :: dydx
117 real(DP),
intent(inout) :: y
127 y =
done - (s - x) / s
141 real(DP),
intent(inout) :: x
142 real(DP),
intent(inout) :: range
143 real(DP),
intent(inout) :: dydx
144 real(DP),
intent(inout) :: y
168 real(DP),
intent(in) :: d
169 real(DP),
intent(inout) :: smooth
170 real(DP),
intent(inout) :: dwdh
186 if (diff >
dzero)
then
193 y = aa * x**
dtwo + b * x
198 else if (diff > -
dem14)
then
215 real(dp),
intent(in) :: top
216 real(dp),
intent(in) :: bot
217 real(dp),
intent(in) :: x
225 else if (x > top)
then
241 real(dp),
intent(in) :: top
242 real(dp),
intent(in) :: bot
243 real(dp),
intent(in) :: x
244 real(dp),
intent(in),
optional :: eps
254 if (
present(eps))
then
268 else if (w < (b - s))
then
287 real(dp),
intent(in) :: top
288 real(dp),
intent(in) :: bot
289 real(dp),
intent(in) :: x
290 real(dp),
optional,
intent(in) :: eps
299 if (
present(eps))
then
308 else if (x > top)
then
316 y = av *
dhalf * (br * br) / teps
317 elseif (br < (
done - teps))
then
319 elseif (br <
done)
then
320 y =
done - ((av *
dhalf * (bri * bri)) / teps)
343 real(dp),
intent(in) :: top
344 real(dp),
intent(in) :: bot
345 real(dp),
intent(in) :: x
346 real(dp),
intent(in) :: alpha
347 real(dp),
intent(in) :: beta
348 real(dp),
intent(in) :: sr
358 if (pc <=
dzero)
then
362 seff = (
done + (alpha * pc)**beta)**gamma
364 y = seff * (
done - sr) + sr
378 real(dp),
intent(in) :: top
379 real(dp),
intent(in) :: bot
380 real(dp),
intent(in) :: x
381 real(dp),
optional,
intent(in) :: eps
390 if (
present(eps))
then
398 else if (x > top)
then
407 elseif (br < (
done - teps))
then
409 elseif (br <
done)
then
427 real(dp),
intent(in) :: top
428 real(dp),
intent(in) :: bot
429 real(dp),
intent(in) :: x
430 real(dp),
intent(in),
optional :: c1
431 real(dp),
intent(in),
optional :: c2
441 if (
present(c1))
then
446 if (
present(c2))
then
461 cof2 = cof2 / b**
dtwo
466 else if (s <
done)
then
484 real(dp),
intent(in) :: top
485 real(dp),
intent(in) :: bot
486 real(dp),
intent(in) :: x
487 real(dp),
intent(in),
optional :: c1
488 real(dp),
intent(in),
optional :: c2
499 if (
present(c1))
then
504 if (
present(c2))
then
525 else if (s <
done)
then
526 y = cof1 * w**
dtwo + cof2 * w
541 function sslope(x, xi, yi, sm, sp, ta)
result(y)
545 real(dp),
intent(in) :: x
546 real(dp),
intent(in) :: xi
547 real(dp),
intent(in) :: yi
548 real(dp),
intent(in) :: sm
549 real(dp),
intent(in) :: sp
550 real(dp),
optional,
intent(in) :: ta
561 if (
present(ta))
then
594 real(dp),
intent(in) :: x
595 real(dp),
intent(in) :: xi
596 real(dp),
intent(in) :: sm
597 real(dp),
intent(in) :: sp
598 real(dp),
optional,
intent(in) :: ta
607 if (
present(ta))
then
622 y =
dhalf * (sm + sp) -
dhalf * rho * (sm - sp)
639 real(dp),
intent(in) :: x
640 real(dp),
intent(in) :: xi
641 real(dp),
optional,
intent(in) :: tomega
648 if (
present(tomega))
then
655 epsilon =
dhalf * omega
661 if (dx < -epsilon)
then
663 else if (dx < epsilon)
then
684 real(dp),
intent(in) :: x
685 real(dp),
intent(in) :: xi
686 real(dp),
optional,
intent(in) :: tomega
693 if (
present(tomega))
then
700 epsilon =
dhalf * omega
706 if (dx < -epsilon)
then
708 else if (dx < epsilon)
then
709 y = (dx / omega) +
dhalf
728 real(dp),
intent(in) :: x
729 real(dp),
intent(in) :: xi
730 real(dp),
intent(in) :: yi
731 real(dp),
intent(in) :: sm
732 real(dp),
intent(in) :: sp
733 real(dp),
optional,
intent(in) :: tomega
741 if (
present(tomega))
then
748 epsilon =
dhalf * omega
754 if (dx < -epsilon)
then
756 else if (dx < epsilon)
then
780 real(dp),
intent(in) :: x
781 real(dp),
intent(in) :: xi
782 real(dp),
intent(in) :: sm
783 real(dp),
intent(in) :: sp
784 real(dp),
optional,
intent(in) :: tomega
792 if (
present(tomega))
then
799 epsilon =
dhalf * omega
805 if (dx < -epsilon)
then
807 else if (dx < epsilon)
then
809 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