Commit 6bf49f69 authored by ulrich_y's avatar ulrich_y
Browse files

Added tolerance options for check

parent 6f985d96
......@@ -58,14 +58,19 @@ contains
end function
subroutine check(res, ref, ans)
subroutine check(res, ref, ans, ttol)
complex(kind=prec) :: res, ref
real(kind=prec) :: delta
real(kind=prec) :: delta, mytol
real(kind=prec), optional :: ttol
character(len=40) :: msg
logical, optional :: ans
mytol = tol
if (present(ttol)) mytol = ttol
delta = abs(res-ref)
if(delta < tol) then
if(delta < mytol) then
write(msg, 900) delta
call iprint(trim(msg), 0)
if (present(ans)) ans = .true.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment