Hi! I noticed that the test Lcheck=6 was broken on the master branch; not all elements of the force gradient were printed. I fixed it in a new branch, called FixLcheck=6.
Now, I found the following problem: when comparing the analytical force gradient (Lfindzero=2) with some finite differences (Lcheck=6), and using the centroid method for determining the coordinate axis position (Lrzaxis=1), I get a mismatch for some specific derivatives (I think the derivatives df_mn / dR_1-N and df_mn / dZ_1-N), of the order of ~1E-4. Changing the finite difference step does not fix the problem.
Some comments / questions :
This mismatch does not appear when using the jacobian method for determining the axis position (Lrzaxis=2).
This "bug" exists for a long time - I checked and it is already in release 3.00
The biggest mismatch occur for the spectral constraint parts of the force.
Do we care about this? It seems that the jacobian method is much better that the centroid one; maybe we can erase / put a warning when using the centroid method?
Could this bug impact the force convergence ? I think it does, an error of 1E-4 on the force gradient is not negligible...
Hi! I noticed that the test
Lcheck=6
was broken on the master branch; not all elements of the force gradient were printed. I fixed it in a new branch, called FixLcheck=6.Now, I found the following problem: when comparing the analytical force gradient (
Lfindzero=2
) with some finite differences (Lcheck=6
), and using the centroid method for determining the coordinate axis position (Lrzaxis=1
), I get a mismatch for some specific derivatives (I think the derivatives df_mn / dR_1-N and df_mn / dZ_1-N), of the order of ~1E-4. Changing the finite difference step does not fix the problem.Some comments / questions :
Lrzaxis=2
).