|
Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
|
Device backend dispatch for the steepest-descent optimizer kernels. More...
Functions/Subroutines | |
| subroutine, public | device_sd_direction (s_d, x_d, xmin, xmax, n) |
| Bound-projected steepest-descent direction on the device (Eq. D22). | |
| subroutine, public | device_sd_update_move_limits (delta_d, x_d, x1_d, x2_d, dec, inc, dmin, dmax, n) |
| Adapt the move limits on the device (Eq. D23). | |
| subroutine, public | device_sd_update_design (x_new_d, x_d, s_d, delta_d, psi, smax, xmin, xmax, n) |
| Move-limited, box-constrained design update on the device (Eq. D24). | |
Binds the CUDA and HIP launch wrappers in bcknd/device/{cuda,hip} and exposes one backend-independent wrapper per kernel. The formulas are those of steepest_descent_cpu.
| subroutine, public device_steepest_descent::device_sd_direction | ( | type(c_ptr) | s_d, |
| type(c_ptr) | x_d, | ||
| real(kind=rp), intent(in) | xmin, | ||
| real(kind=rp), intent(in) | xmax, | ||
| integer, intent(in) | n | ||
| ) |
| s_d | Device pointer to the gradient on entry, and to the projected direction on exit. | |
| x_d | Device pointer to the design variables. | |
| [in] | xmin | Lower bound of the design variables. |
| [in] | xmax | Upper bound of the design variables. |
| [in] | n | Number of design variables. |
Definition at line 158 of file device_steepest_descent.f90.


| subroutine, public device_steepest_descent::device_sd_update_design | ( | type(c_ptr) | x_new_d, |
| type(c_ptr) | x_d, | ||
| type(c_ptr) | s_d, | ||
| type(c_ptr) | delta_d, | ||
| real(kind=rp), intent(in) | psi, | ||
| real(kind=rp), intent(in) | smax, | ||
| real(kind=rp), intent(in) | xmin, | ||
| real(kind=rp), intent(in) | xmax, | ||
| integer, intent(in) | n | ||
| ) |
| x_new_d | Device pointer to the updated design variables. | |
| x_d | Device pointer to the current design variables. | |
| s_d | Device pointer to the bound-projected direction. | |
| delta_d | Device pointer to the move limits. | |
| [in] | psi | Step length. |
| [in] | smax | Global maximum of the absolute value of the direction. |
| [in] | xmin | Lower bound of the design variables. |
| [in] | xmax | Upper bound of the design variables. |
| [in] | n | Number of design variables. |
Definition at line 217 of file device_steepest_descent.f90.


| subroutine, public device_steepest_descent::device_sd_update_move_limits | ( | type(c_ptr) | delta_d, |
| type(c_ptr) | x_d, | ||
| type(c_ptr) | x1_d, | ||
| type(c_ptr) | x2_d, | ||
| real(kind=rp), intent(in) | dec, | ||
| real(kind=rp), intent(in) | inc, | ||
| real(kind=rp), intent(in) | dmin, | ||
| real(kind=rp), intent(in) | dmax, | ||
| integer, intent(in) | n | ||
| ) |
| delta_d | Device pointer to the move limits, updated in place. | |
| x_d | Device pointer to the design variables at the current iteration. | |
| x1_d | Device pointer to the design variables one iteration back. | |
| x2_d | Device pointer to the design variables two iterations back. | |
| [in] | dec | Factor applied on oscillation. |
| [in] | inc | Factor applied on monotone progress. |
| [in] | dmin | Smallest allowed move limit. |
| [in] | dmax | Largest allowed move limit. |
| [in] | n | Number of design variables. |
Definition at line 184 of file device_steepest_descent.f90.

