FOCUS icon indicating copy to clipboard operation
FOCUS copied to clipboard

New CG implemented and will be replaced

Open zhucaoxiang opened this issue 5 years ago • 2 comments

The current nonlinear conjugate gradient (CG) method was written by myself based on the strategy of Yuan & Dai. The line search subroutine is also written by myself based on Numerical Optimization. It is often observed un-converged line search. In the develop branch, FOCUS is linked to another well-written library, CG-descent. If you want to use the old version CG, just compile with PFLAGS='-D oldcg'.

Here is a test using the rotating ellipse. Solid lines are the CG-descent, and dashed lines the old CG.

  1. Convergence over iterations. image

  2. Convergence over wall-time. image

  3. Poincare plots from CG-descent image

  4. Poincare plots from old CG image

The testing results show that the CG-descent is much faster in speed. My guess is that I didn't implement a very good line search subroutine. So I will encourage everyone to test the CG-descent and will merge it into master after some time.

git fetch
git checkout develop
make clean; make xfocus; make dfocus

zhucaoxiang avatar Aug 26 '19 17:08 zhucaoxiang