37 use num_types,
only: rp
53 integer,
intent(in) :: n
54 real(kind=rp),
intent(in) :: f_min, f_max, p
55 real(kind=rp),
dimension(n),
intent(out) :: x_out
56 real(kind=rp),
dimension(n),
intent(in) :: x_in
58 x_out = simp_mapping_kernel(f_min, f_max, p, x_in)
71 sens_out, sens_in, X_in, n)
72 integer,
intent(in) :: n
73 real(kind=rp),
intent(in) :: f_min, f_max, p
74 real(kind=rp),
dimension(n),
intent(out) :: sens_out
75 real(kind=rp),
dimension(n),
intent(in) :: sens_in
76 real(kind=rp),
dimension(n),
intent(in) :: x_in
78 sens_out = simp_mapping_backward_kernel(f_min, f_max, p, sens_in, x_in)
88 elemental function simp_mapping_kernel(f_min, f_max, p, X_in)
result(X_out)
89 real(kind=rp),
intent(in) :: f_min, f_max, p
90 real(kind=rp),
intent(in) :: x_in
91 real(kind=rp) :: x_out
93 x_out = f_min + (f_max - f_min) * x_in**p
95 end function simp_mapping_kernel
104 elemental function simp_mapping_backward_kernel(f_min, f_max, p, &
105 sens_in, X_in)
result(sens_out)
106 real(kind=rp),
intent(in) :: f_min, f_max, p
107 real(kind=rp),
intent(in) :: sens_in, x_in
108 real(kind=rp) :: sens_out
110 sens_out = sens_in * (f_max - f_min) * p * x_in**(p - 1.0_rp)
112 end function simp_mapping_backward_kernel
CPU backend for SIMP mapping operations.
subroutine, public simp_mapping_apply_backward_cpu(f_min, f_max, p, sens_out, sens_in, x_in, n)
Apply SIMP chain rule on CPU.
subroutine, public simp_mapping_apply_cpu(f_min, f_max, p, x_out, x_in, n)
Apply SIMP forward mapping on CPU.