![]() |
Octopus
|
This modules takes care of testing optimizers using standard test functions. More...
This modules takes care of testing optimizers using standard test functions.
Functions/Subroutines | |
subroutine, public | test_optimizers (namespace) |
Unit tests for different optimizers. More... | |
subroutine | rosenbrock_gradient_2d (n, x, val, getgrad, grad) |
Gradient of the Rosenbrock function. More... | |
subroutine | sphere_gradient_2d (n, x, val, getgrad, grad) |
Gradient of the sphere function. More... | |
subroutine | rastrigin_gradient_2d (n, x, val, getgrad, grad) |
Gradient of the Rastrigin function. More... | |
subroutine | write_iter_info (iter, n, val, maxdr, maxgrad, x) |
Helper function required by the minimizer. More... | |
subroutine | set_log_file (name) |
Set the log‐file name before running each test. More... | |
Variables | |
character(len=:), allocatable | current_log |
Name of the current log file for write_iter_info. More... | |
subroutine, public minimizer_tests_oct_m::test_optimizers | ( | type(namespace_t), intent(in) | namespace | ) |
Unit tests for different optimizers.
At the moment
Definition at line 148 of file minimizer_tests.F90.
|
private |
Gradient of the Rosenbrock function.
The function is given by \( f(x, y) = (a - x)^2 + b(y - x^2)^2 \). It has a global minimum at \((x,y)=(a,a^2)\).
See https:
Definition at line 231 of file minimizer_tests.F90.
|
private |
Gradient of the sphere function.
Definition at line 255 of file minimizer_tests.F90.
|
private |
Gradient of the Rastrigin function.
The function is given by \( f(\mathbf{x}) = A + \sum_{i=1}^{n}\Bigl(x_i^2 - A\cos(2\pi x_i)\Bigr)\).
The gradient is \( \nabla f(\mathbf{x}) = 2\mathbf{x} + 2\pi A \sin\bigl(2\pi\mathbf{x}\bigr) \).
Definition at line 280 of file minimizer_tests.F90.
|
private |
Helper function required by the minimizer.
Outputs the details of the optimization steps into a file called optimization.log
Definition at line 305 of file minimizer_tests.F90.
|
private |
Set the log‐file name before running each test.
Definition at line 328 of file minimizer_tests.F90.
|
private |
Name of the current log file for write_iter_info.
Definition at line 140 of file minimizer_tests.F90.