Create a preconditioner object with the desired tolerance and maximum number of iterations.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r8), | intent(in), | optional | :: | tolerance | The tolerance within which to apply the inverse Jacobian. Defaults to 0.001. |
|
integer, | intent(in), | optional | :: | max_iterations | The maximum number of iterations to use when applying the preconditioner. Defaults to 20. |
function constructor(tolerance, max_iterations) result(this)
!* Author: Chris MacMackin
! Date: December 2016
!
! Create a preconditioner object with the desired tolerance and
! maximum number of iterations.
!
real(r8), optional, intent(in) :: tolerance
!! The tolerance within which to apply the inverse Jacobian.
!! Defaults to 0.001.
integer, optional, intent(in) :: max_iterations
!! The maximum number of iterations to use when applying the
!! preconditioner. Defaults to 20.
type(preconditioner) :: this
if (present(tolerance)) this%tolerance = tolerance
if (present(max_iterations)) this%max_iterations = max_iterations
end function constructor