-
Notifications
You must be signed in to change notification settings - Fork 40
Description
In ProximalProjection we use a regularization in this line
DESC/desc/optimize/_constraint_wrappers.py
Line 1314 in 548a83b
| sf += sf[-1] # add a tiny bit of regularization |
This specifically is the part that is doing the (dF/dx^{-1}) @ dF/dc in the proximal projection (i.e. in the term on LHS of eq 2.9 in dudt QS paper )
while I understand that we are typically oversampling force error, and so this matrix may not be very well-conditioned, it seems like in practice having a blanket regularization of the smallest singular value may not always be the best choice. If we take our vacuum stellarator free boundary tutorial and run the free boundary problem without using any continuation stepping, we get two very different results with vs without this regularization: (left with the regularization, right without)
of course, with Fourier continuation we get good results in both cases, but this is showing that perhaps there are cases where the regularization is not helping us.
Maybe a different approach could be to not include this regularization and instead rely on the cutoff to remove the problematically small singular values, or adding a threshold based approach based on the condition number like sf += jnp.where(sf[-1]/sf[0] < 1e-8, sf[-1], 1e-8) or something?
notebooks with the runs (also has runs with the ess scaling as that seems to help free boundary too)
free_boundary_equilibrium_vac_no_regularization.ipynb
free_boundary_equilibrium_vac.ipynb