Small bug fix in Dwpl-test

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