Small changes in Dwpl-test

parent 9210f188
......@@ -71,16 +71,17 @@ CG!(prop,U,DwdagDw!,dpar,lp,dws,10000,1.0e-14)
diff = sum(norm2.(prop - prop_th))
if diff < 1.0e-15
print("Test Dplw for s=",s,", c=",c," passed with ",diff,"% error!\n")
else
error("Test Dplw failed with difference: ",diff,"\n")
if diff > 1.0e-15
error("Dwpl test for s=",s,", c=",c," failed with difference: ",diff,"\n")
end
return nothing
return diff
end
diff = 0.0
for i in 1:3 for j in 1:4
Dwpw_test(c=i,s=j)
diff += Dwpw_test(c=i,s=j)
end end
print("Dwpl test passed with average error ", diff/12)
\ No newline at end of file
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