next up previous contents
Next: Command reference Up: Running rauto Previous: Demo duff: harmonic forcing   Contents

Demo roess: constants inheritance

To create a working copy of the demo roess change to a directory where you would like to do your computations, for example, ${HOME}/rauto. Then type `rdm roess'. This will create the sub-directory roess, which contains the files roess.f, r.roess and demo. Change to the directory roess.

The equations file roess.f defines the right hand side of the Rössler equation

$\displaystyle \dot{x}$ $\displaystyle =$ $\displaystyle -y-z,$  
$\displaystyle \dot{y}$ $\displaystyle =$ $\displaystyle x+\alpha y,$  
$\displaystyle \dot{z}$ $\displaystyle =$ $\displaystyle \beta + z(x-\gamma).$  

and provides an initial equilibrium point in STPNT for $ \alpha=0.005$, $ \beta=0.25$, $ \gamma=6.2$. The master constants file r.roess is set up for a continuation in PAR(1) $ {}=\alpha\in[0, 0.4]$. The file demo is a script for the command interpreter bash and demonstrates rauto's mechanism of constants inheritance.

Constants inheritance creates a dependency of a restarted or child run on its restart or parent run. The objective is to trigger a recomputation of a child run whenever its restart solution in the parent run might have changed, including changes in the discretization. This feature is essential, for example, for

$ \bullet$
adding commands to a script (avoid unnecessary recomputations),
$ \bullet$
scans (number and location of UZR restart solutions may change) and
$ \bullet$
switching between coarse and fine grids (changing master constants file only).
It is also useful in situations where you want to change a certain AUTO constant depending on its value for the parent run as the demonstration program illustrates. Use the command `printac run ac_name' to print the value that was assigned to AUTO constant ac_name during run run. For the experts: note that it is indeed more natural to use shell scripts rather than the command make as we have a top-down dependency and make is designed to resolve bottom-up dependencies. Furthermore, the dependency check employed by rauto is more accurate, because it is based on the contents of certain files as opposed to using just the modification date. The only rule imposed on shell scripts is that the command for a child run must be executed after the command of its parent run.

The demonstration program computes a variable number of steps of a period-doubling cascade occurring in Rössler's equation. It uses a loop over the index of the step and makes full use of constants inheritance for doubling the number of mesh points and reducing the initial, minimal and maximal step size by a factor of $ 4.67$ every iteration. The full command for calling the demonstration program is `demo [steps]', where the optional argument steps specifies how many steps of the period-doubling sequence shall be computed, default is 3. The author was able to go up to step$ {}=7$, which seems to be the accuracy limit of AUTO. Note that you might need to recompile AUTO with NTSTX and NCOLX set to sufficiently high values; see [1] for details. The demonstration program executes the rauto commands

rauto roess alf

rrun=alf
rauto roess po1 $rrun -ICP 1 11 -IRS `splabs $rrun HB` \
  -DS 0.1 -DSMAX 0.5 -ISW -1 -IPS 2 -NPR 1

for (( i=2 ; $i <= ${1:-3} ; ++i )) do

  # names of run and restart run
  run=po$i
  rrun=po$(( $i - 1 ))

  # read step sizes from restart run
  h0=$(printac $rrun DS )
  hmin=$(printac $rrun DSMIN )
  hmax=$(printac $rrun DSMAX )

  # reduce step sizes and double NTST
  h0=$( dc -e "8 k $h0 4.67 / p" )
  hmin=$( dc -e "8 k $hmin 4.67 / p" )
  hmax=$( dc -e "8 k $hmax 4.67 / p" )
  NTST=$(( 2*$(printac $rrun NTST) ))

  # print current settings and perform run
  echo "NTST=$NTST, DS=$h0, DSMIN=$hmin, DSMAX=$hmax"
  rauto roess $run $rrun -ICP 1 11 -IRS `splabs $rrun PD` \
    -DS $h0 -DSMIN $hmin -DSMAX $hmax -NTST $NTST \
    -ISW -1 -IPS 2 -NPR 5
done

Note the use of default value substitution ${1:-3}, command substitution $(...) and arithmetic expansion $((...)). Use the commands plotbd and plotsol as shown in Figure 8 to plot the bifurcation diagram and families of solutions.

Figure 8: Bifurcation diagram (a) of the Rössler system and an enlargement (b). The family of period-one solutions emerging in a Hopf-bifurcation shown as individual solutions (c) and as a two-dimensional manifold (d) in $ (\alpha ,x,y)$ space. Projection of the period-one (e) and the period-doubled (f) solutions onto the $ (x,y)$ plane.
\includegraphics[width=0.4\linewidth]{roess1.eps}  \includegraphics[width=0.4\linewidth]{roess2.eps}
(a) plotbd 1:3 "[0:0.25]" "[-1:16]" `lsruns "*"`  
plotbd 1:3 "[0.1:0.16]" "[9:11.5]" `lsruns "*"` (b)  
\includegraphics[width=0.47\linewidth]{roess3.eps}  \includegraphics[width=0.47\linewidth]{roess4.eps}
(c) plotsol -bl 2 0:2:3 po1  plotsol 0:2:3 po1 (d)
    
\includegraphics[width=0.4\linewidth]{roess5.eps}  \includegraphics[width=0.4\linewidth]{roess6.eps}
(e) plotsol po1  plotsol po2 (f)


next up previous contents
Next: Command reference Up: Running rauto Previous: Demo duff: harmonic forcing   Contents
Frank Schilder 2007-04-12