| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(tester_t), | intent(out) | :: | this | |||
| double precision, | intent(in), | optional | :: | d_tol | ||
| real, | intent(in), | optional | :: | r_tol |
subroutine init(this, d_tol, r_tol)
class(tester_t), intent(out) :: this
double precision, intent(in), optional :: d_tol
real, intent(in), optional :: r_tol
this% n_errors = 0
this% n_tests = 0
if (present(d_tol)) then
this% d_tol = d_tol
else
this% d_tol = 2.d0*epsilon(1.d0)
end if
if (present(r_tol)) then
this% r_tol = r_tol
else
this% r_tol = 2.*epsilon(1.)
end if
end subroutine init