FOCUS
FOCUS copied to clipboard
Levenberg-Marquardt optimization implemented and misc.
Hi all,
In develop branch, I have pushed some new changes. Here is the list.
-
Levenberg-Marquardt (LM) optimization is now implemented.
This would be a good supplementary to DF and CG. Generally, DF is the most conservative (it could be slow, but it will always work as long as the integration interval in not too large). CG is the fastest, but it relies on a successful line search. The present line search algorithm is written by myself according to a textbook. It's not perfect. LM would be a moderate one. The only special requirement is that the number of free parameters (Ndof) should not be smaller than the number of targets (LM_mfvec). It also uses a different packing pattern for cost functions and the jacobian. For more details, please view lmalg.pdf
-
More diagnostic terms in diagnos.h
I have added two more diagnostic terms in diagnos.h. It now can calculate the overlap rate between the present Bn harmonics and the target harmonics. It will also compute a coil importance array (coil_importance in hdf5 file) for each coil. The definition is the surface average (over the plasma boundary) of the proportion contributed by each coil in the total magnetic field. You are more than welcome to make comments / suggestions.
-
Misc. about code structure, documentation, examples, etc.
One of the specific improvements is that it should be faster for calculating Bn harmonics.
The version tag is 'v0.3.1'. It will be committed to the master branch if no bugs found.