First, we copy the demo into a new directory and compile
BR PT TY LAB PERIOD L2-NORM ... PAR(1) 1 21 UZ 2 1.000000E+02 1.286637E-01 ... -7.213093E-01 1 42 UZ 3 2.000000E+02 9.097899E-02 ... -7.213093E-01 1 50 EP 4 2.400000E+02 8.305208E-02 ... -7.213093E-01Note that PAR(1) remains constant during the continuation as the parameter values do not change, only the the length of the interval over which the approximate homoclinic solution is computed. Note from the eigenvalues, stored in d.1 that this is a homoclinic orbit to a saddle-focus with a one-dimensional unstable manifold.
We now restart at LAB=3, corresponding to a time interval , and change the principal continuation parameters to be . The new constants defining the continuation are given in c.cir.2 and h.cir.2. We also activate the test functions pertinent to codimension-two singularities which may be encountered along a family of saddle-focus homoclinic orbits, viz. , , , and . This must be specified in three ways: by choosing NPSI=5 and appropriate IPSI(I) in h.cir.2, by adding the corresponding parameter labels to the list of continuation parameters ICP(I) in c.cir.2 (recall that these parameter indices are 20 more than the corresponding indices), and finally adding USZR functions defining zeros of these parameters in c.cir.2. Running
BR PT TY LAB PAR(1) ... PAR(2) ... PAR(25) PAR(29) 1 17 UZ 5 -7.256925E-01 ... 4.535645E-01 ... -1.765251E-05 -2.888436E-01 1 75 UZ 6 -1.014704E+00 ... 9.998966E-03 ... 1.664509E+00 -5.035997E-03 1 78 UZ 7 -1.026445E+00 ... -2.330391E-05 ... 1.710804E+00 1.165176E-05 1 81 UZ 8 -1.038012E+00 ... -1.000144E-02 ... 1.756690E+00 4.964621E-03 1 100 EP 9 -1.164160E+00 ... -1.087732E-01 ... 2.230329E+00 5.042736E-02with results saved in b.2, s.2, d.2.
We now continue in the other direction along the family. It turns out that starting from the initial point in the other direction results in missing a codim 2 point which is close to the starting point. Instead we start from the first saved point from the previous computation (label 5 in s.2):
BR PT TY LAB PAR(1) ... PAR(2) PAR(22) PAR(24) 1 9 UZ 10 -7.204001E-01 ... 5.912315E-01 -1.725669E+00 -3.295862E-05 1 18 UZ 11 -7.590583E-01 ... 7.428734E-01 3.432139E-05 -2.822988E-01 1 26 UZ 12 -7.746686E-01 ... 7.746147E-01 5.833163E-01 1.637611E-07 1 28 EP 13 -7.746628E-01 ... 7.746453E-01 5.908902E-01 1.426214E-04contains a neutral saddle-focus (a Belyakov transition) at LAB=10 (), a double real leading eigenvalue (saddle-focus to saddle transition) at LAB =11 () and a neutral saddle at LAB=12 (). Data at several points on the complete family are plotted in Fig. 24.2. If we had continued further (by increasing NMX), the computation would end at a no convergence error TY=MX owing to the homoclinic family approaching a Bogdanov-Takens singularity at small amplitude. To compute further towards the BT point we would first need to continue to a higher value of PAR(11).