solution Function

private function solution(me, x, f, xzero, fzero)

Returns true if this is a solution and sets xzero and fzero.

Type Bound

root_solver

Arguments

Type IntentOptional Attributes Name
class(root_solver), intent(inout) :: me
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: f
real(kind=wp), intent(inout) :: xzero
real(kind=wp), intent(inout) :: fzero

Return Value logical


Called by

proc~~solution~~CalledByGraph proc~solution root_module::root_solver%solution proc~anderson_bjorck root_module::anderson_bjorck_solver%anderson_bjorck proc~anderson_bjorck->proc~solution proc~anderson_bjorck_king root_module::anderson_bjorck_king_solver%anderson_bjorck_king proc~anderson_bjorck_king->proc~solution proc~barycentric root_module::barycentric_solver%barycentric proc~barycentric->proc~solution proc~bdqrf root_module::bdqrf_solver%bdqrf proc~bdqrf->proc~solution proc~bisection root_module::bisection_solver%bisection proc~bisection->proc~solution proc~blendtf root_module::blendtf_solver%blendtf proc~blendtf->proc~solution proc~chandrupatla root_module::chandrupatla_solver%chandrupatla proc~chandrupatla->proc~solution proc~illinois root_module::illinois_solver%illinois proc~illinois->proc~solution proc~itp root_module::itp_solver%itp proc~itp->proc~solution proc~muller root_module::muller_solver%muller proc~muller->proc~solution proc~pegasus root_module::pegasus_solver%pegasus proc~pegasus->proc~solution proc~regula_falsi root_module::regula_falsi_solver%regula_falsi proc~regula_falsi->proc~solution proc~ridders root_module::ridders_solver%ridders proc~ridders->proc~solution proc~solve root_module::root_solver%solve proc~solve->proc~solution interface~root_scalar root_module::root_scalar proc~solve->interface~root_scalar proc~zhang root_module::zhang_solver%zhang proc~zhang->proc~solution proc~root_scalar_by_type root_module::root_scalar_by_type proc~root_scalar_by_type->proc~solve interface~root_scalar->proc~root_scalar_by_type proc~root_scalar_by_name root_module::root_scalar_by_name interface~root_scalar->proc~root_scalar_by_name proc~root_scalar_by_name->interface~root_scalar

Source Code

    logical function solution(me,x,f,xzero,fzero)

    implicit none

    class(root_solver),intent(inout) :: me
    real(wp),intent(in) :: x
    real(wp),intent(in) :: f
    real(wp),intent(inout) :: xzero
    real(wp),intent(inout) :: fzero

    if (abs(f) <= me%ftol) then
        xzero = x
        fzero = f
        solution = .true.
    else
        solution = .false.
    end if

    end function solution