fmin_module Module

Module for fmin 1D derative-free function minimizer.

License

Note

The default real kind (wp) can be changed using optional preprocessor flags. This library was built with real kind: real(kind=real64) [8 bytes]


Uses

  • module~~fmin_module~~UsesGraph module~fmin_module fmin_module iso_fortran_env iso_fortran_env module~fmin_module->iso_fortran_env

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: fmin_rk = real64

real kind used by this module [8 bytes]

integer, private, parameter :: wp = fmin_rk

local copy of fmin_rk with a shorter name


Abstract Interfaces

abstract interface

  • private function func(x) result(f)

    interface for user function

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: x

    indep. variable

    Return Value real(kind=wp)

    function value f(x)


Functions

public function fmin(f, ax, bx, tol) result(xmin)

An approximation x to the point where f attains a minimum on the interval (ax,bx) is determined.

Read more…

Arguments

Type IntentOptional Attributes Name
procedure(func) :: f

the function to minimize

real(kind=wp), intent(in) :: ax

left endpoint of initial interval

real(kind=wp), intent(in) :: bx

right endpoint of initial interval

real(kind=wp), intent(in) :: tol

desired length of the interval of uncertainty of the final result (>=0)

Return Value real(kind=wp)

abcissa approximating the point where f attains a minimum