Returns true if this is a solution and sets xzero
and fzero
.
Type | Intent | Optional | 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 |
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