Instructions to calculate wave families using AUTO

Part of the Electronic Supplementary Material for Sherratt, J.A. & Smith M.J. (2008) Periodic Travelling Waves in Cyclic Populations: Field studies and reaction-diffusion models. J. R. Soc. Interface 5, 483-505

Here we give instructions and AUTO code for drawing the travelling wave families to equations (2), as illustrated in Fig. 2(a) of the main manuscript. The files you need for this example are PP.f, r.PP.1, r.PP.2, r.PP.3, and r.PP.4.

To perform the necessary continuations AUTO requires a FORTRAN file (*.f) containing the equations and the initial conditions (the equations file), and a second file containing AUTO constants that define the type of problem you want to solve and the various thresholds and tolerances desired (the constants file). The equations file is PP.f, which has had comments added to it to aid readability (you should save all of the necessary files in the same directory).

PART 1: Draw the wave family for α=1

In this first set of AUTO calculations we want to draw the travelling wave family foir a case in which both predator and prey dispersal rates are equal to 1 (α=1).

STEP 1: Prior to running these codes, ensure that the directory has been cleared of data from previous runs using the commands:

@dl PP

@cl

STEP 2: The first calculation is to locate the wave speed at which there is a Hopf bifurcation in equations (A3). We want AUTO to start at a small wave speed and then increase the wave speed until it detects a Hopf bifurcation. The constants file required is r.PP.1. The code is run by the command

@R PP 1

This should result in output such as:

BR   PT TY LAB    PAR(1)        L2-NORM         U(1)          U(2)          U(3)          U(4)
   1     1  EP   1  1.000000E-01  2.879236E-01  1.000000E-01  0.000000E+00  2.700000E-01  0.000000E+00
   1    10  HB   2  4.472147E-01  2.879236E-01  1.000000E-01  0.000000E+00  2.700000E-01  0.000000E+00
   1   202  EP   3  1.004722E+01  2.879236E-01  1.000000E-01 -3.148443E-34  2.700000E-01 -1.402788E-36

We defined options in the constants file to make AUTO output data only at the beginning and end of the continuation, and if there happened to be a Hopf bifurcation in the equations. The column PT is the iteration number and TY explains why AUTO has output data to the screen at that particular iteration number. LAB is a label that AUTO assigns to the output points to allow them to be used in future calculations. The first and the last outputs occurred simply because they were the first and last iterations. The second output occured because AUTO detected a Hopf bifurcation in the equations. PAR(1) is the wave speed, so 0.45 is the Hopf bifurcation wave speed.

We need to save this data so that we can use it in future continuations so we type

@sv PP

STEP 3: Next we wish to continue the branch of periodic solutions that emerges from the Hopf bifurcation point (LAB 2). The constants file r.PP.2 has been set up to do this. We run it by typing

@R PP 2

which gives

  BR    PT  TY LAB    PAR(1)        L2-NORM       MAX U(1)      MAX U(2)      MAX U(3)      MAX U(4)       PERIOD
   2   183  EP   4  8.006923E+00  5.445970E-01  9.248032E-01  9.515167E-02  5.172582E-01  2.253816E-02  8.518563E+01

In this case AUTO has only output the last output from the calculation. Hovever it saves the data output at each iteration in fort.* data files which we can save by typing

@sv PP.fam1

We also want to use this data in future continuations so we type

@ap PP

which appends the data to the existing data form the previous run.

The file needed to draw the wave families is p.PP.fam1, which has a table of data that is identically arranged to the last output above, except that it includes data from all of the iterations. The columns of interest are the PAR(1) and PERIOD which denote the wave speed and the time periods, respectively. Therefore, to draw the wave family, we plotted the data in the PERIOD column agains those in the PAR(1) column.

PART 2: Draw the wave family for when α is not equal to 1

For these equations cHopf only exists when α<0.15. If cHopf exists for a chosen value of α then the wave family can be calculated using an identical procedure to that used in PART 1. First you need to modify the PP.f file.

Locate the line

PAR(2)=1.0d0 !alpha; the ratio of the dispersal rates

and modify the number to the one you want.

To draw the wave family for when cHopf doesn't exist (α<0.15) requires a few more continuation steps.

STEP 1: From Kopell and Howard (1973) we know that a travelling wave family always exists when the dispersal rates are equal. We use this solution, calculated above, to locate the wave family when cHopf doesn't exist. Let's say we want to draw the wave family for α=0.1. The constants file r.PP.3 has been set up to perform a continuation in α from the periodic solution labelled at the end of the wave family when α=1; this is LAB 4 above. It does this by reducing α from 1 whilst fixing the time period at the value from the last solution (PERIOD=85), and tracks how the other solution parameters vary.

This is executed by the command

@R PP 3

and it results in the output

  BR    PT  TY LAB    PAR(2)        L2-NORM       MAX U(1)      MAX U(2)      MAX U(3)      MAX U(4)      PAR(1)
   2    52  UZ   5  1.000000E-01  5.434527E-01  9.246997E-01  9.494632E-02  5.162862E-01  2.245676E-02  7.027166E+00
   2    54  EP   6  8.565844E-02  5.433736E-01  9.246922E-01  9.492815E-02  5.162180E-01  2.245100E-02  7.121014E+00

This output indicates that α (PAR(2)) was reduced from 1 to 0.085 and a user-requested output (label 5) was made at α=0.1. During this continuation, time period was fixed at 85 (not detailed in the output) and wavespeed (PAR(1)) was decreased.

STEP 2: We now wish to continue in wave speed for fixed α=0.1, and track time period, to draw the wave family. First of all we need to save the last output to allow us to use it in the next continuation; type

@ap PP

The constants-file r.PP.4 is then set up to get AUTO to continue in wave speed from the solution labelled 5 above (α=0.1) for fixed α . In this case AUTO reduces wave speed and tracks the corresponding variation in the solution time period. To execute this type

@R PP 4

and this gives

  BR    PT  TY LAB    PAR(1)        L2-NORM       MAX U(1)      MAX U(2)      MAX U(3)      MAX U(4)       PERIOD
   2   159  MX   7  5.404479E-03  2.907879E-01  1.491649E-01  5.127221E-05  2.945491E-01  2.986043E-05  5.078540E+03

This output means that at iteration (PT) 159 AUTO could not find the next solution (TY=MX). PAR(1)=0.0054 indicates that this happened at a very low wave speed and a correspondingly high time period (PERIOD=5007). This simply indicates that AUTO could not accurately calculate solutions for such extreme values using the tolerances defined in r.PP.4. This is expected since as wave speed approaches zero, time period approaches infinity and AUTO has to deal with numbers that are outwith its tolerance ranges. However, it did manage to calculate the travelling wave family down to c=0.0054 and this is what we draw in Fig. 2(a). Before plotting, this data should be saved using the command

@sv PP.fam2

Now you can plot time period (PERIOD) against wave speed (PAR(1)) for α=0.01, using the data in p.PP.fam2.

NEXT EXAMPLE,

INDEX