libSUFR
a LIBrary of Some Useful Fortran Routines
All Classes Namespaces Files Functions Variables Pages
solvers.f90 File Reference

(libSUFR version 0.7.8, revision 407, hash 01069b8, 2025-03-02)

Procedures to solve equations. More...

Go to the source code of this file.

Modules

module  sufr_solvers
 Procedures to solve equations.
 

Functions/Subroutines

real(double) function sufr_solvers::root_solver (func, x1, x2, accur, status, verbose)
 Using Brent's method, find the root of a function func that lies between x1 and x2.
 
real(double) function sufr_solvers::minimum_solver (func, ax, bx, cx, accur, xmin, status, verbose)
 Use Brent's method and parabolic interpolation to find the minimum of function func that lies between xa and xc.
 
pure subroutine golden_section (x1, x2, a1, a2, y1, y2)
 Do a golden-section step for minimum_solver(): find the point that is a fraction 0.382 into the larger of two intervals.
 

Detailed Description

Procedures to solve equations.

Definition in file solvers.f90.

Function/Subroutine Documentation

◆ golden_section()

pure subroutine golden_section ( real(double), intent(in) x1,
real(double), intent(in) x2,
real(double), intent(in) a1,
real(double), intent(in) a2,
real(double), intent(out) y1,
real(double), intent(out) y2 )

Do a golden-section step for minimum_solver(): find the point that is a fraction 0.382 into the larger of two intervals.

Parameters
x1
x2
a1
a2
y1(output)
y2(output)

Definition at line 334 of file solvers.f90.

References sufr_kinds::dbl, and sufr_kinds::double.

Referenced by sufr_solvers::minimum_solver().