41 use num_types,
only: rp
59 integer,
intent(in) :: n
60 real(kind=rp),
dimension(n),
intent(inout) :: s
61 real(kind=rp),
dimension(n),
intent(in) :: x
62 real(kind=rp),
intent(in) :: xmin, xmax
67 if ((x(i) .ge. xmax .and. s(i) .gt. 0.0_rp) .or. &
68 (x(i) .le. xmin .and. s(i) .lt. 0.0_rp))
then
90 integer,
intent(in) :: n
91 real(kind=rp),
dimension(n),
intent(inout) :: delta
92 real(kind=rp),
dimension(n),
intent(in) :: x, x1, x2
93 real(kind=rp),
intent(in) :: dec, inc, dmin, dmax
98 d = (x(i) - x1(i)) * (x1(i) - x2(i))
99 if (d .lt. 0.0_rp)
then
100 delta(i) = dec * delta(i)
101 else if (d .gt. 0.0_rp)
then
102 delta(i) = inc * delta(i)
104 delta(i) = min(dmax, max(dmin, delta(i)))
126 integer,
intent(in) :: n
127 real(kind=rp),
dimension(n),
intent(out) :: x_new
128 real(kind=rp),
dimension(n),
intent(in) :: x, s, delta
129 real(kind=rp),
intent(in) :: psi, smax, xmin, xmax
133 x_new(i) = min(xmax, max(xmin, min(x(i) + delta(i), &
134 max(x(i) - delta(i), x(i) + psi * (s(i) / smax)))))
CPU backend for the steepest-descent optimizer kernels.
subroutine, public sd_direction_cpu(s, x, xmin, xmax, n)
Bound-projected steepest-descent direction on CPU (Eq. D22).
subroutine, public sd_update_move_limits_cpu(delta, x, x1, x2, dec, inc, dmin, dmax, n)
Adapt the move limits on CPU (Eq. D23).
subroutine, public sd_update_design_cpu(x_new, x, s, delta, psi, smax, xmin, xmax, n)
Move-limited, box-constrained design update on CPU (Eq. D24).