![]() |
libSUFR
a LIBrary of Some Useful Fortran Routines
|
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. | |
Procedures to solve equations.
Definition in file solvers.f90.
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.
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().