|
FLINT 0.9.9
Fortran Library for numerical INTegration of differential equations
|
FLINTUtils Module. More...
Data Types | |
| interface | func |
| Interface of the function whose root needs to be computed. More... | |
Functions/Subroutines | |
| subroutine | root (a, b, ya, yb, tol, f, x, fx, niter, error) |
| Subroutine for computing the root using Brent algorithm. | |
| pure integer function, dimension(size(sortedx)) | binarysearch (sortedx, sorteddataarray) |
| Performs binary search on a provided sorted array. | |
Variables | |
| integer, parameter, public | flint_sp = real32 |
| By default, use 64-bit double precision (IEEE-754) | |
| integer, parameter, public | single |
| integer, parameter, public | parameter |
| integer, parameter, public | flint_dp = real64 |
| integer, parameter, public | double |
| integer, parameter, public | flint_qp = real128 |
| integer, parameter, public | quadruple |
| integer, parameter, public | flint_wp = FLINT_DP |
| real(wp), parameter, public | flint_eps = epsilon(1.0_WP) |
| Smallest positive real satisfying 1.0_WP + eps > 1.0_WP. | |
| integer, parameter | flint_rootfind_maxitr = 50 |
| Max iterations for the root-finding. | |
FLINTUtils Module.
This module provides common utility functions.
| pure integer function, dimension(size(sortedx)) flintutils::binarysearch | ( | real(wp), dimension(1:), intent(in) | sortedx, |
| real(wp), dimension(:), intent(in) | sorteddataarray ) |
Performs binary search on a provided sorted array.
TBD
| [in] | sortedx | Element to find |
| [in] | sorteddataarray | Ascending-order sorted vector |
Definition at line 214 of file FLINTUtils.F90.
References binarysearch().
Referenced by binarysearch().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine flintutils::root | ( | real(wp), intent(in) | a, |
| real(wp), intent(in) | b, | ||
| real(wp), intent(in) | ya, | ||
| real(wp), intent(in) | yb, | ||
| real(wp), intent(in) | tol, | ||
| procedure(func) | f, | ||
| real(wp), intent(out) | x, | ||
| real(wp), intent(out) | fx, | ||
| integer, intent(out) | niter, | ||
| integer, intent(out) | error ) |
Subroutine for computing the root using Brent algorithm.
For details on the algorithm, see Numerical receipes in C book at https://www2.units.it/ipl/students_area/imm2/files/Numerical_Recipes.pdf
| [in] | a | Lower bound on the root |
| [in] | b | Upper bound on the root |
| [in] | ya | f(a) |
| [in] | yb | f(b) |
| [in] | tol | tolerance |
| f | function | |
| [out] | x | root |
| [out] | fx | value at root |
| [out] | niter | no. of iterations |
| [out] | error | error status |
Definition at line 69 of file FLINTUtils.F90.
References flint_eps, and flint_rootfind_maxitr.
| integer, parameter, public flintutils::double |
Definition at line 33 of file FLINTUtils.F90.
| integer, parameter, public flintutils::flint_dp = real64 |
Definition at line 33 of file FLINTUtils.F90.
| real(wp), parameter, public flintutils::flint_eps = epsilon(1.0_WP) |
Smallest positive real satisfying 1.0_WP + eps > 1.0_WP.
Definition at line 49 of file FLINTUtils.F90.
Referenced by root().
| integer, parameter, public flintutils::flint_qp = real128 |
Definition at line 34 of file FLINTUtils.F90.
| integer, parameter flintutils::flint_rootfind_maxitr = 50 |
Max iterations for the root-finding.
Definition at line 52 of file FLINTUtils.F90.
Referenced by root().
| integer, parameter, public flintutils::flint_sp = real32 |
By default, use 64-bit double precision (IEEE-754)
Definition at line 32 of file FLINTUtils.F90.
| integer, parameter, public flintutils::flint_wp = FLINT_DP |
Definition at line 42 of file FLINTUtils.F90.
| integer parameter public flintutils::parameter |
Definition at line 32 of file FLINTUtils.F90.
| integer, parameter, public flintutils::quadruple |
Definition at line 34 of file FLINTUtils.F90.
| integer, parameter, public flintutils::single |
Definition at line 32 of file FLINTUtils.F90.