The error tolerance vector for a step from x to xf: rtol*s + atol,
where s depends on the rtol_scaling option.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(stepsize_class), | intent(in) | :: | me | |||
| real(kind=wp), | intent(in), | dimension(:) | :: | rtol |
relative tolerance |
|
| real(kind=wp), | intent(in), | dimension(:) | :: | atol |
absolute tolerance |
|
| real(kind=wp), | intent(in), | dimension(:) | :: | x |
state at the start of the step |
|
| real(kind=wp), | intent(in), | dimension(:) | :: | xf |
state at the end of the step |
the error tolerance for each component
pure function stepsize_class_tolerance(me,rtol,atol,x,xf) result(tol) implicit none class(stepsize_class),intent(in) :: me real(wp),dimension(:),intent(in) :: rtol !! relative tolerance real(wp),dimension(:),intent(in) :: atol !! absolute tolerance real(wp),dimension(:),intent(in) :: x !! state at the start of the step real(wp),dimension(:),intent(in) :: xf !! state at the end of the step real(wp),dimension(size(x)) :: tol !! the error tolerance for each component select case (me%rtol_scaling) case (2) tol = rtol * max(abs(x),abs(xf)) + atol case default tol = rtol * abs(xf) + atol end select end function stepsize_class_tolerance