Second-stage refinement makes accuracy worse, not better
Using 333437be from the two-away branch, do the following:
-
Insert a
1/0
intest/test_layer_pot_identity.py
to avoid running for more than one resolution. -
Run
PYOPENCL_TEST=port python test_layer_pot_identity.py 'test_identity_convergence(cl._csc, WobblyCircleGreenTest())'`
-
Observe very poor accuracy: (that last number is the error)
(3, 'wobbly-circle', 2000, 'green') 0.038146725565187
-
Disable second-stage refinement by changing line 583 in
pytential/qbx/refinement.py
fromwhile must_refine:
to
while 0 and must_refine:
-
Re-run the above test and observe a much-improved error:
(3, 'wobbly-circle', 2000, 'green') 2.668441871633514e-07
I don't believe this issue is connected to two-away, FWIW--that's just the branch where the test case lives. If you set fmm_order = False
in WobblyCircleGreenTest
, the above observations still hold.
@mattwala, any idea what might be going on here?
Edited by Andreas Klöckner