The CW solver uses the BiCGSTAB-L algorithm which contains a parameter L as described in the docs:
Finally, there is a parameter L that determines a tradeoff between memory and work
per step and convergence rate of the iterative algorithm, biconjugate gradient
stabilized BiCGSTAB-L, that is used; larger values of L will often lead to faster
convergence at the expense of more memory and more work per iteration.
A unit test for the CW solver in test_array_metadata.py occasionally fails when using single-precision floating point for the fields. This failure is traced to the failure of the BiCGSTAB-L algorithm to converge to the correct resonant frequency of the ring resonator used in the test. Reducing L from 10 to 7 (only for single precision) fixes the convergence which in turn reduces the flakiness of this test.
In addition to the change in the L parameter of solve_cw (as well as a comment to explain why this change is necessary), this PR also includes some improvements to the formatting of this test.
The CW solver uses the BiCGSTAB-L algorithm which contains a parameter
L
as described in the docs:A unit test for the CW solver in
test_array_metadata.py
occasionally fails when using single-precision floating point for the fields. This failure is traced to the failure of the BiCGSTAB-L algorithm to converge to the correct resonant frequency of the ring resonator used in the test. ReducingL
from10
to7
(only for single precision) fixes the convergence which in turn reduces the flakiness of this test.In addition to the change in the
L
parameter ofsolve_cw
(as well as a comment to explain why this change is necessary), this PR also includes some improvements to the formatting of this test.