44 integer,
intent(in) :: n
45 real(kind=
rp),
dimension(n),
intent(inout) :: x
46 real(kind=
rp),
intent(in) :: edge0, edge1
54 integer,
intent(in) :: n
55 real(kind=
rp),
dimension(n),
intent(inout) :: x
56 real(kind=
rp),
intent(in) :: x_step, value0, value1
64 integer,
intent(in) :: n
65 real(kind=
rp),
dimension(n),
intent(inout) :: x
66 real(kind=
rp),
intent(in) :: k_0, k_1, q
79 real(kind=
rp),
intent(in) :: x
80 real(kind=
rp),
intent(in) :: edge0, edge1
81 real(kind=
rp) :: res, t
83 t =
clamp_kernel((x - edge0) / (edge1 - edge0), 0.0_rp, 1.0_rp)
85 res = t**3 * (t * (6.0_rp * t - 15.0_rp) + 10.0_rp)
90 elemental function clamp_kernel(x, lowerlimit, upperlimit)
result(res)
91 real(kind=
rp),
intent(in) :: x
92 real(kind=
rp),
intent(in) :: lowerlimit, upperlimit
95 res =
max(lowerlimit, min(upperlimit, x))
100 real(kind=
rp),
intent(in) :: x, x_step, value0, value1
103 res = merge(value0, value1, x > x_step)
109 real(kind=
rp),
intent(in) :: x, k_0, k_1, q
110 real(kind=
rp) :: perm
112 perm = k_0 + (k_1 - k_0) * x * (q + 1.0_rp) / (q + x)
CPU implementations of the filter functions.
subroutine, public permeability_cpu(x, k_0, k_1, q, n)
Apply a permeability function to a scalar.
elemental real(kind=rp) function smooth_step_kernel(x, edge0, edge1)
Apply a smooth step function to a scalar.
elemental real(kind=rp) function step_function_kernel(x, x_step, value0, value1)
Apply a step function to a scalar.
subroutine, public step_function_cpu(x, x_step, value0, value1, n)
Apply a step function to a scalar.
elemental real(kind=rp) function clamp_kernel(x, lowerlimit, upperlimit)
Clamp a value between two limits.
elemental real(kind=rp) function permeability_kernel(x, k_0, k_1, q)
Apply a permeability function to a scalar.
subroutine, public smooth_step_cpu(x, edge0, edge1, n)
Apply a smooth step function to a scalar.
integer, parameter, public rp
Global precision used in computations.