Octopus
minimizer_tests_oct_m Module Reference

This modules takes care of testing optimizers using standard test functions. More...

Detailed Description

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 write_iter_info (iter, n, val, maxdr, maxgrad, x)
 Helper function required by the minimizer. More...
 

Function/Subroutine Documentation

◆ test_optimizers()

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 142 of file minimizer_tests.F90.

◆ rosenbrock_gradient_2d()

subroutine minimizer_tests_oct_m::rosenbrock_gradient_2d ( integer, intent(in)  n,
real(real64), dimension(n), intent(in)  x,
real(real64), intent(inout)  val,
integer, intent(in)  getgrad,
real(real64), dimension(n), intent(inout)  grad 
)
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 181 of file minimizer_tests.F90.

◆ write_iter_info()

subroutine minimizer_tests_oct_m::write_iter_info ( integer, intent(in)  iter,
integer, intent(in)  n,
real(real64), intent(in)  val,
real(real64), intent(in)  maxdr,
real(real64), intent(in)  maxgrad,
real(real64), dimension(n), intent(in)  x 
)
private

Helper function required by the minimizer.

Outputs the details of the optimization steps into a file called optimization.log

Definition at line 206 of file minimizer_tests.F90.